Generalstuff.mac V3.0.0
Posted: Tue Aug 17, 2004 4:04 pm
Hello everyone. Fabolous1 here.
1. Experience Tracker
1a. Solo Experience
1b. Group Experience
1c. Raid Experience
1d. AA Experience
1e. Average Experience Per Kill
1f. Total Experience Per Kill
2. Auto-Forage
2a. Specify what you want in Forage.ini
2b. -1 gets all, 0 destroys all, 1 or higher will get all until you get that much and destroy the rest.
3. Auto-Stick
4. Time-System
4a. Time running
4b. Time between kills
4c. Average Time Between Kills
5. Auto-Skill Train (Thanks to Kambic: http://macroquest2.com/phpBB2/viewtopic ... 4758#64758 )
Coming soon:
1. LFG
If you would like to see another module in this please say so.
Updated Code July 1st, 2005, 7:32 PM EST
Forage.ini example
Example of how it works, note that I have added the ranger epic 1, and 1.5 foragable items and put some items of my ranger so it wouldn't delete them just incase. Also I think there is an error if you use a number over 0 or maybe over 9, cause I can't make it so I forage only 80 water and 80 roots
1. Experience Tracker
1a. Solo Experience
1b. Group Experience
1c. Raid Experience
1d. AA Experience
1e. Average Experience Per Kill
1f. Total Experience Per Kill
2. Auto-Forage
2a. Specify what you want in Forage.ini
2b. -1 gets all, 0 destroys all, 1 or higher will get all until you get that much and destroy the rest.
3. Auto-Stick
4. Time-System
4a. Time running
4b. Time between kills
4c. Average Time Between Kills
5. Auto-Skill Train (Thanks to Kambic: http://macroquest2.com/phpBB2/viewtopic ... 4758#64758 )
Coming soon:
1. LFG
If you would like to see another module in this please say so.
Code: Select all
||-- Generalstuff.mac
|-- By: Fabolous1 (Some stuff from Kambic's XPTracker.mac, and some from forage.mac)
|-- Version 5.0.0
|-- July 1st, 2005 7:31 PM EST
|-- Usage: /macro Generalstuff.mac
|-- Files: Forage.ini,Generalstuff.mac,Skill_Routines.inc,Skill_Routines.ini
|----------------------------------------------------
|-- Fabolous tells you, "
|-- Macro will track the immediate experience gained after each gain, as well as keep a running total and average experience per mob. Also have added Auto-Forage support and Auto-Stick support. Start the macro and /echo Help to see more."
|----------------------------------------------------
#turbo 40
#include Skill_Routines.inc
#event SoloExp "You gain experience#*#"
#event GroupExp "You gain party experience#*#"
#event RaidExp "You gained raid experience#*#"
#event GroupLeaderExp "You gain group leadership experience#*#"
#event RaidLeaderExp "You gain raid leadership experience#*#"
#event Help "#*#[MQ2] Help#*#"
#event Forage "#*#[MQ2] Forage#*#"
#event Stick "[MQ2] Stick#*#"
#event StickToTarget "[MQ2] Autostick#*#"
#event TimeStuff "[MQ2] Time Stuff#*#"
#event TimeInfoOn "[MQ2] Time Info On#*#"
#event TimeInfoOff "[MQ2] Time Info Off#*#"
#event ForageOFF "#*#You can not use this skill while on a mount#*#"
#event ForageOFF "#*#[MQ2] Forage off#*#"
#event ForageON "#*#[MQ2] Forage on#*#"
Sub Main
/echo Generalstuff.mac...
/echo /echo Help (For help)
/echo /echo Forage (For help on the Forage System)
/echo Make sure you have forage in ability window.
/echo If you get off your mount and wanna forage, /echo Forage On
/echo /echo Stick (For help on the new Stick System)
/echo /echo Time Stuff (For help on the new Time System)
/echo ***********************************
/declare ShowTimeStuff int outer
/varset ShowTimeStuff 1
/declare Forage int outer
/varset Forage 1
/declare StickFighting int outer
/varset StickFighting 0
/declare Timer float outer
/declare OverallRunningTime float outer
/declare wasSitting bool outer FALSE
/declare wasAttacking bool outer FALSE
/declare totForage int outer 0
/declare newForage int outer 0
/declare MobCount int outer
/declare AAMobCount int outer
/declare StandardSoloOldExp float outer
/declare StandardSoloNewExp float outer
/declare StandardSoloGainedExp float outer
/declare TotalStandardSoloGainedExp float outer
/declare StandardGroupOldExp float outer
/declare StandardGroupNewExp float outer
/declare StandardGroupGainedExp float outer
/declare TotalStandardGroupGainedExp float outer
/declare StandardRaidOldExp float outer
/declare StandardRaidNewExp float outer
/declare StandardRaidGainedExp float outer
/declare TotalStandardRaidGainedExp float outer
/declare TotalStandardAbsoluteGainedExp float outer
/declare AAOldExp float outer
/declare AANewExp float outer
/declare AAGainedExp float outer
/declare TotalAAGainedExp float outer
/declare GroupLeaderOldExp float outer
/declare GroupLeaderNewExp float outer
/declare GroupLeaderGainedExp float outer
/declare TotalGroupLeaderGainedExp float outer
/declare RaidLeaderOldExp float outer
/declare RaidLeaderNewExp float outer
/declare RaidLeaderGainedExp float outer
/declare TotalRaidLeaderGainedExp float outer
/varset StandardSoloOldExp ${Me.PctExp}
/varset StandardSoloNewExp 0
/varset StandardSoloGainedExp 0
/varset StandardGroupOldExp ${Me.PctExp}
/varset StandardGroupNewExp 0
/varset StandardGroupGainedExp 0
/varset StandardRaidOldExp ${Me.PctExp}
/varset StandardRaidNewExp 0
/varset StandardRaidGainedExp 0
/varset TotalStandardAbsoluteGainedExp 0
/varset AAOldExp ${Me.PctAAExp}
/varset AANewExp 0
/varset AAGainedExp 0
/varset GroupLeaderOldExp ${Me.PctGroupLeaderExp}
/varset GroupLeaderNewExp 0
/varset GroupLeaderGainedExp 0
/varset RaidLeaderOldExp ${Me.PctGroupLeaderExp}
/varset RaidLeaderNewExp 0
/varset RaidLeaderGainedExp 0
/varset Timer 0
/varset OverallRunningTime 0
:Main
/delay 1s
/varcalc Timer (${Timer} + 1)
/varcalc OverallRunningTime (${OverallRunningTime} + 1)
/doevents
/call Skill_Routines
/if ((${Forage}>0) && (${Me.AbilityReady["Forage"]} && !${Window[BigBankWnd].Open} && !${Merchant.Open} && !${Window[TradeWnd].Open})) {
/autoinv
/autoinv
/autoinv
/autoinv
/autoinv
/varset wasSitting FALSE
/varset wasAttacking FALSE
/if (${Me.Combat}) {
/varset wasAttacking TRUE
/attack off
}
/if (${Me.Sitting}) {
/varset wasSitting TRUE
/stand
}
/delay 5
/doability "Forage"
/if (${wasAttacking}) /attack on
/if (${wasSitting}) /sit
/delay 2s
/if (${Cursor.ID}) {
/if (${Ini[forage_stats.log,${Zone.Name},"Total Forages"].Equal["NULL"]}) {
/varset totForage 0
} else {
/varset totForage ${Ini[forage_stats.log,${Zone.Name},"Total Forages"]}
}
/if (${Ini[forage_stats.log,${Zone.Name},${Cursor.Name}].Equal["NULL"]}) {
/varset newForage 0
} else {
/varset newForage ${Ini[forage_stats.log,${Zone.Name},${Cursor.Name}]}
}
/varset totForage ${Math.Calc[${totForage}+1]}
/varset newForage ${Math.Calc[${newForage}+1]}
/ini "forage_stats.log" "${Zone.Name}" "Total Forages" "${totForage}"
/ini "forage_stats.log" "${Zone.Name}" "${Cursor.Name}" "${newForage}"
/if (${Ini[forage.ini,${Zone.Name},${Cursor.Name}].Equal["-1"]} || ${Ini[forage.ini,"Global",${Cursor.Name}].Equal["-1"]}) {
/autoinventory
/autoinventory
} else /if (${Ini[forage.ini,${Zone.Name},${Cursor.Name}].Equal["0"]} || ${Ini[forage.ini,"Global",${Cursor.Name}].Equal["0"]}) {
/destroy
} else /if (${Ini[forage.ini,${Zone.Name},${Cursor.Name},NULL].Equal[NULL]} || ${Ini[forage.ini,"Global",${Cursor.Name},NULL].Equal[NULL]}) {
/ini "forage.ini" "${Zone.Name}" "${Cursor.Name}" "0"
/destroy
} else {
/if (${FindItemCount[=${Cursor.Name}]}>${Ini[forage.ini,${Zone.Name},${Cursor.Name},99]} || ${FindItemCount[=${Cursor.Name}]}>${Ini[forage.ini,"Global",${Cursor.Name},99]}) {
/destroy
} else {
/autoinventory
/autoinventory
}
}
}
}
}
/goto :Main
/return
Sub CheckAAChange
/varset AANewExp ${Me.PctAAExp}
/if (${AANewExp}!=${AAOldExp}) {
/varcalc AAMobCount ${AAMobCount} + 1
/call CalculateAAExpChange
/echo AA Gained: ${AAGainedExp}
/echo AA Total: ${TotalAAGainedExp}
/echo AA Average: ${Math.Calc[${TotalAAGainedExp}/${AAMobCount}]}% Exp (AA Mobs: ${AAMobCount})
}
/return
Sub CalculateStandardSoloExpChange
/varset StandardSoloNewExp ${Me.PctExp}
/varcalc StandardSoloGainedExp (${StandardSoloNewExp}-${StandardSoloOldExp})
/varcalc TotalStandardSoloGainedExp (${TotalStandardSoloGainedExp}+${StandardSoloGainedExp})
/varset StandardSoloOldExp ${Me.PctExp}
/call CheckAAChange
/return
Sub CalculateStandardGroupExpChange
/varset StandardGroupNewExp ${Me.PctExp}
/varcalc StandardGroupGainedExp (${StandardGroupNewExp}-${StandardGroupOldExp})
/varcalc TotalStandardGroupGainedExp (${TotalStandardGroupGainedExp}+${StandardGroupGainedExp})
/varset StandardGroupOldExp ${Me.PctExp}
/call CheckAAChange
/return
Sub CalculateStandardRaidExpChange
/varset StandardRaidNewExp ${Me.PctExp}
/varcalc StandardRaidGainedExp (${StandardRaidNewExp}-${StandardRaidOldExp})
/varcalc TotalStandardRaidGainedExp (${TotalStandardRaidGainedExp}+${StandardRaidGainedExp})
/varset StandardRaidOldExp ${Me.PctExp}
/call CheckAAChange
/return
Sub CalculateAAExpChange
/varcalc AAGainedExp (${AANewExp}-${AAOldExp})
/varcalc TotalAAGainedExp (${TotalAAGainedExp}+${AAGainedExp})
/varset AAOldExp ${Me.PctAAExp}
/return
Sub CalculateGroupLeaderExpChange
/varset GroupLeaderNewExp ${Me.PctGroupLeaderExp}
/varcalc GroupLeaderGainedExp (${GroupLeaderNewExp}-${GroupLeaderOldExp})
/varcalc TotalGroupLeaderGainedExp (${TotalGroupLeaderGainedExp}+${GroupLeaderGainedExp})
/varset GroupLeaderOldExp ${Me.PctGroupLeaderExp}
/return
Sub CalculateRaidLeaderExpChange
/varset RaidLeaderNewExp ${Me.PctRaidLeaderExp}
/varcalc RaidLeaderGainedExp (${RaidLeaderNewExp}-${RaidLeaderOldExp})
/varcalc TotalRaidLeaderGainedExp (${TotalRaidLeaderGainedExp}+${RaidLeaderGainedExp})
/varset RaidLeaderOldExp ${Me.PctRaidLeaderExp}
/return
Sub AddSoloGroupRaidStandardExp
/varcalc TotalStandardAbsoluteGainedExp (${TotalStandardSoloGainedExp}+${TotalStandardGroupGainedExp}+${TotalStandardRaidGainedExp})
/return
Sub Event_SoloExp
/varcalc MobCount ${MobCount} + 1
/call CalculateStandardSoloExpChange
/call AddSoloGroupRaidStandardExp
/popup +${StandardSoloGainedExp}% experience.
/if (${TotalStandardAbsoluteGainedExp}>0) /echo XP Gained: ${StandardSoloGainedExp}
/if (${TotalStandardAbsoluteGainedExp}>0) /echo XP Total: ${TotalStandardAbsoluteGainedExp}
/if (${TotalStandardAbsoluteGainedExp}>0) /echo XP Average: ${Math.Calc[${TotalStandardAbsoluteGainedExp}/${MobCount}]}% Exp (Mobs: ${MobCount})
/if (${ShowTimeStuff}>0) /echo Time Between Mobs: ${Timer} seconds.
/if (${ShowTimeStuff}>0) /echo Time Running: ${OverallRunningTime}
/if (${ShowTimeStuff}>0) /echo Time Average Per Mob: ${Math.Calc[${OverallRunningTime}/${MobCount}]} Seconds
/varset Timer 0
/echo ***********************************
/return
Sub Event_GroupExp
/varcalc MobCount ${MobCount} + 1
/call CalculateStandardGroupExpChange
/call AddSoloGroupRaidStandardExp
/popup +${StandardGroupGainedExp}% experience.
/if (${TotalStandardAbsoluteGainedExp}>0) /echo XP Gained: ${StandardGroupGainedExp}
/if (${TotalStandardAbsoluteGainedExp}>0) /echo XP Total: ${TotalStandardAbsoluteGainedExp}
/if (${TotalStandardAbsoluteGainedExp}>0) /echo XP Average: ${Math.Calc[${TotalStandardAbsoluteGainedExp}/${MobCount}]}% Exp (Mobs: ${MobCount})
/if (${ShowTimeStuff}>0) /echo Time Between Mobs: ${Timer} seconds.
/if (${ShowTimeStuff}>0) /echo Time Running: ${OverallRunningTime}
/if (${ShowTimeStuff}>0) /echo Time Average Per Mob: ${Math.Calc[${OverallRunningTime}/${MobCount}]} Seconds
/varset Timer 0
/echo ***********************************
/return
Sub Event_RaidExp
/varcalc MobCount ${MobCount} + 1
/call CalculateStandardRaidExpChange
/call AddSoloGroupRaidStandardExp
/popup +${StandardRaidGainedExp}% experience.
/if (${TotalStandardAbsoluteGainedExp}>0) /echo XP Gained: ${StandardRaidGainedExp}
/if (${TotalStandardAbsoluteGainedExp}>0) /echo XP Total: ${TotalStandardAbsoluteGainedExp}
/if (${TotalStandardAbsoluteGainedExp}>0) /echo XP Average: ${Math.Calc[${TotalStandardAbsoluteGainedExp}/${MobCount}]}% Exp (Mobs: ${MobCount})
/if (${ShowTimeStuff}>0) /echo Time Between Mobs: ${Timer} seconds.
/if (${ShowTimeStuff}>0) /echo Time Running: ${OverallRunningTime}
/if (${ShowTimeStuff}>0) /echo Time Average Per Mob: ${Math.Calc[${OverallRunningTime}/${MobCount}]} Seconds
/varset Timer 0
/echo ***********************************
/return
Sub Event_GroupLeaderExp
/call CalculateGroupLeaderExpChange
/echo GL Gained: ${GroupLeaderGainedExp} || GL Total: ${TotalGroupLeaderGainedExp}
/return
Sub Event_RaidLeaderExp
/call CalculateRaidLeaderExpChange
/echo RL Gained: ${RaidLeaderGainedExp} || RL Total: ${TotalRaidLeaderGainedExp}
/return
Sub Event_Help
/echo -={ Generalstuff.mac }=-
/echo A macro built by Kambic and totally remade by Fabolous1.
/echo Added Features (By Fabolous1):
/echo 1. Auto-Forage System Added. (/echo Forage for help)
/echo 2. Auto-Stick System Added. (/echo Stick for help)
/echo 3. Added Average Experience.
/echo 4. Time Stuff, Needs a little more work though.
/echo 5. Auto-Skill Train System Added.
/echo More Feature's Coming Soon!
/return
Sub Event_Forage
/echo -={ Generalstuff.mac }=- :: Auto-Forage System
/echo Macros/Forage.ini is where you configure everything.
/echo -1 Means you will loot all of those specified.
/echo 0 Means you will destroy that item specified.
/echo 1+ Any number higher or equal to 1, will loot that many.
/echo Macros/Forage_Stats.log is where everything is stored.
/echo Make sure you have Forage in an ability spot in your Action's window.
/echo Thanks to Fabolous1 for this.
/return
Sub Event_Stick
/echo -={ Generalstuff.mac }=- :: Auto-Stick System
/echo This Auto-Stick System is still being worked on.
/echo To start sticking to your target type: /echo Autostick
/echo To stop sticking to your target lose your target or press: ESC
/return
Sub Event_TimeStuff
/echo /echo "Time Info On" or "Time Info Off" to turn Time Information off or on.
/echo This macro has been running ${OverallRunningTime} seconds.
/return
Sub Event_TimeInfoOff
/if (${ShowTimeStuff}>0) /varset ShowTimeStuff 0
/echo Time information off.
/return
Sub Event_TimeInfoOn
/if (${ShowTimeStuff}<1) /varset ShowTimeStuff 1
/echo Time information on.
/return
Sub Event_StickToTarget
/echo Lose your target (ESC) to cancel Auto-Stick!
/varset StickFighting 1
:Loop
/if (!${Target.ID}) {
/keypress back
/varset StickFighting 0
/attack off
/return
}
/if ((${Target.Distance}<11)&&(${StickFighting}>0)) /goto :Combat
/if ((${Target.Distance}>10)&&(${StickFighting}>0)) /goto :MoveCloser
/goto :Loop
:Combat
/keypress back
/face fast ${Target}
/attack on
/goto :Loop
:MoveCloser
/attack off
/face fast
/if (${Target.Distance}>10) {
/keypress forward HOLD
} else {
/keypress forward
}
/goto :Loop
/return
Sub Event_LFG
/varset LFG 1
/shout Level (${Me.Level}), (${Me.Class}) looking for a group or adventure, PST.
/return
Sub Event_LFGOff
/varset LFG 0
/return
Sub Event_GroupLeaderExp
/call CalculateGroupLeaderExpChange
/echo GL Gained: ${GroupLeaderGainedExp} || GL Total: ${TotalGroupLeaderGainedExp}
/return
Sub Event_RaidLeaderExp
/call CalculateRaidLeaderExpChange
/echo RL Gained: ${RaidLeaderGainedExp} || RL Total: ${TotalRaidLeaderGainedExp}
/return
Sub Event_Help
/echo -={ Generalstuff.mac }=-
/echo A macro built by Kambic and totally remade by Fabolous1.
/echo Added Features (By Fabolous1):
/echo 1. Auto-Forage System Added. (/echo Forage for help)
/echo 2. Auto-Stick System Added. (/echo Stick for help)
/echo 3. Added Experience Tracking.
/echo 4. Time Stuff, Needs a little more work though. (/echo Time Stuff for help)
/echo 5. Auto-Skill Train System Added.
/echo More Feature's Coming Soon!
/return
Sub Event_Forage
/echo -={ Generalstuff.mac }=- :: Auto-Forage System
/echo Macros/Forage.ini is where you configure everything.
/echo -1 Means you will loot all of those specified.
/echo 0 Means you will destroy that item specified.
/echo 1+ Any number higher or equal to 1, will loot that many.
/echo Macros/Forage_Stats.log is where everything is stored.
/echo Make sure you have Forage in your ability part of Actions Window
/echo If you get off your mount and you wanna forage, /echo Forage On
/echo Thanks to Fabolous1 for this.
/return
Sub Event_Stick
/echo -={ Generalstuff.mac }=- :: Auto-Stick System
/echo This Auto-Stick System is still being worked on.
/echo To start sticking to your target type: /echo Autostick
/echo To stop sticking to your target lose your target or press: ESC
/return
Sub Event_TimeStuff
/echo /echo "Time Info On" or "Time Info Off" to turn Time Information off or on.
/echo This macro has been running ${OverallRunningTime} seconds.
/return
Sub Event_TimeInfoOff
/if (${ShowTimeStuff}>0) /varset ShowTimeStuff 0
/echo Time information off.
/return
Sub Event_TimeInfoOn
/if (${ShowTimeStuff}<1) /varset ShowTimeStuff 1
/echo Time information on.
/return
Sub Event_StickToTarget
/echo Lose your target (ESC) to cancel Auto-Stick!
/varset StickFighting 1
:Loop
/if (!${Target.ID}) {
/keypress back
/varset StickFighting 0
/attack off
/return
}
/if ((${Target.Distance}<11)&&(${StickFighting}>0)) /goto :Combat
/if ((${Target.Distance}>10)&&(${StickFighting}>0)) /goto :MoveCloser
/goto :Loop
:Combat
/keypress back
/face fast ${Target}
/attack on
/goto :Loop
:MoveCloser
/attack off
/face fast
/if (${Target.Distance}>10) {
/keypress forward HOLD
} else {
/keypress forward
}
/goto :Loop
/return
Sub Event_ForageOFF
/popup Generalstuff: NOT FORAGING
/echo NOT FORAGING.
/echo "/echo Forage On" to turn it back on.
/varset Forage 0
/return
Sub Event_ForageON
/popup Generalstuff: FORAGING
/echo NOW FORAGING.
/varset Forage 1
/returnForage.ini example
Code: Select all
[Global]
Vegetables=-1
Platinum=-1
Pod of Water=-1
Shralok Pack=-1
Hand Made Backpack=-1
Backpack=-1
Roots=-1
Fruit=0
Whip of the Earthcrafter=-1
Dragorn Bonebow=-1
Vyzh`dra's Render of Souls=-1
Blue Flame Necklace=-1
Spiked Seahorse Hide Belt=-1
Chilled Tundra Root=-1
Ripened Heartfruit=-1
Speckled Molded Mushroom=-1
sweetened Mudroot=-1
Rose of Firiona=-1
Sickly Maiden's Hair=-1
Fallen Tree Branch=-1
Pine Sap=-1
Golanda Nut=-1
[The Field of Bone]
Lichenclover=0
[The Plane of Knowledge]
Roots=0
Bookworm=0
Habanero Pepper=0
[The Bazaar]
Roots=0
Pod of Water=0
Fishing Grubs=0
[The Lesser Faydark]
Morning Dew=0
Brell's Fishin' Pole=0
[Mistmoore's Catacombs: Ritualistic Summoning Grounds]
Spiderling Silk=0
Saprophytic Moss=0
Egg Case Cocoon=0
Gargoyle Granite=0
Nightshade=0
[The Ruins of Old Paineel]
Fishing Grubs=0
Berries=0
Rabbit Meat=0
[Everfrost Peaks]
Frost Turnip=0
[The Northern Desert of Ro]
Fishing Grubs=0
Rabbit Meat=0
Cactus Pulp=0
[Butcherblock Mountains]
Aviak Eggs=0
[The Great Divide]
Lichen Roots=0
Arctic Scallop=0
[The Lavastorm Mountains]
Fishing Grubs=0