Well I took ArmySoldier's velliumhunter.mac and spent 18 straight hours making it work for Crystal Caverns! There is one bug that I know of: I can't get the playercheck to work the way I want (i.e. instead of totally stopping the macro, I want it to /warp succor, /fade, /squelch an AFK message, sit, wait 30mins and check again.) The trouble that I'm having is trying to get it to do that when a player is there, but if after the wait, the zone is clear, start the macro back up. Also, I'm having a bit of trouble having the macro sense when my bags are full (from the message that comes: "There was no place to put that! The item has dropped to the ground!) and moving to the 'sub full'. Oh well you veterns of code can look at it and hopefully help me out.
This macro is a paste-together of a few different macros that I modified to make them play nice with each other. I have given credit in the notes of the macro parts.
What is does: This will warp you all around The Crystal Caverns killing the Ry`Gorr's and will automatically loot everything. I have it set to auto-destroy the mining picks and all NO DROP items. When your bags are full (when this part gets fixed) it will /zone you to Thurgadin, /warp to the forge and make the Velium, weps, blocks, and bricks into Small Velium Pieces (fixed the problem ArmySoldier was having [easier to make it a sub than an include]). Then it will spin you around to the merchant, play your charisma song (if Bard) and auto-sell everything you looted (other than the Small Velium Pieces). Then it will zone you back to Crystal Caverns and start killing again.
When your HP's get below 15% (even during combat) it will zone you to Eastern Wastes to heal up. When you hit 100% HP it'll zone you back to Crystal Caverns to kill some more.
I tired to make this fully automated, save for putting stuff in the bank. If you would be intrested into making the Velium Pieces into Velium Bits, I would gladly add that to the macro. This macro is very long due to all the automation, so I appologize for the length. Ok so anyway, on to the macro...
CCVeliumHunter.mac
CCLoot.ini
CCMob.ini
P.S. Sorry for the long post, it's been a looooong day and this is my first macro
This macro is a paste-together of a few different macros that I modified to make them play nice with each other. I have given credit in the notes of the macro parts.
What is does: This will warp you all around The Crystal Caverns killing the Ry`Gorr's and will automatically loot everything. I have it set to auto-destroy the mining picks and all NO DROP items. When your bags are full (when this part gets fixed) it will /zone you to Thurgadin, /warp to the forge and make the Velium, weps, blocks, and bricks into Small Velium Pieces (fixed the problem ArmySoldier was having [easier to make it a sub than an include]). Then it will spin you around to the merchant, play your charisma song (if Bard) and auto-sell everything you looted (other than the Small Velium Pieces). Then it will zone you back to Crystal Caverns and start killing again.
When your HP's get below 15% (even during combat) it will zone you to Eastern Wastes to heal up. When you hit 100% HP it'll zone you back to Crystal Caverns to kill some more.
I tired to make this fully automated, save for putting stuff in the bank. If you would be intrested into making the Velium Pieces into Velium Bits, I would gladly add that to the macro. This macro is very long due to all the automation, so I appologize for the length. Ok so anyway, on to the macro...
CCVeliumHunter.mac
Rich (BB code):
| CCVeliumHunter.MAC
|
| Re-Re-Written by methos237
| From Re-write by Armysoldier
|
| Seriously Modified Hunter.mac
| Author : robdawg
|
| Useage : /macro CCVeliumHunter
| Description : This macro will warp your character through Crystal Caverns
| Then the killing begins.. Twists a few songs and melee
| Automatically loots and flaggs the loot
| Once Full you will zone to thurg and turn your treasures into Velium Pieces
| And sell other loot items!
|
|------------------------------------------------------------------------------------
#Event CC "#*#entered The Crystal Caverns#*#"
#Event Died "#*#entered The Guild Lobby#*#"
#Event Thurg "#*#entered The City of Thurgadin#*#"
#Event Cant "#*#cannot combine these items#*#"
#Event Full "#*#item has dropped to the ground#*#"
#Event Print "[MQ2] PRINT #1#"
#Event Print "[MQ2] SHOW #1#"
#Event Set "[MQ2] SET #1#"
#Event Help "[MQ2] HELP #1#"
#Event Help "[MQ2] HELP"
#include CCLoot.ini
#include CCMob.ini
#include common/sell.inc
#include common/buy.inc
#include common/packs.inc
#include common/cleanpacks.inc
#turbo 10
Sub Main
/docrack nostun on
/docrack nomeleepushback on
/docrack noencumber on
/docrack envirofall on
/speed 3
/alert add 2 shaesta
|------------------------------------------------------------
|How many times should aquire target fail before delaying?
|------------------------------------------------------------
/declare RV_FailMax int outer 3
|------------------------------------------------------------
|How far would you like to target a mob?
|------------------------------------------------------------
/declare RV_MaxRadius int outer 10000
|------------------------------------------------------------
|How far is the combat range?
|------------------------------------------------------------
/declare RV_Range int outer 10
|------------------------------------------------------------
|What is the minimum Z Value of mobs I should target?
|------------------------------------------------------------
/declare RV_MinZRange int outer -20000
|------------------------------------------------------------
|What is the maximum Z Value of mobs I should target?
|------------------------------------------------------------
/declare RV_MaxZRange int outer 35500
|------------------------------------------------------------
|Should I loot all items?
|------------------------------------------------------------
/declare RV_LootAllItems int outer 1
|------------------------------------------------------------
|Mob Array Information.
|------------------------------------------------------------
/call ReadINI CCMob.ini "${Zone.Name}" Mob
/if (!${Defined[RV_MobArray]}) {
/echo Mob Array Creation Error, ending macro...
/endmacro
}
|------------------------------------------------------------
|Loot Array Information.
|------------------------------------------------------------
/call ReadINI CCLoot.ini Loot
/if (!${Defined[RV_LootArray]}) {
/echo No Loot Array Created...
}
|------------------------------------------------------------
|Variables that you don't need to worry about.
|------------------------------------------------------------
/declare RV_FailCounter int outer 0
/declare RV_MyTargetID int outer 0
/declare RV_MyTargetName string outer
/declare RV_MyTargetDead int outer 0
/declare RV_InvalidTargetID int outer 0
/declare RV_HasTarget int outer 0
/declare RV_RandomWait int outer 0
/declare RV_LootSlot int outer 0
/declare RV_CheckLook int outer 0
/declare RV_Fighting int outer 0
/declare RV_TargetDead int outer 0
/declare RV_MyXLOC int outer 0
/declare RV_MyYLOC int outer 0
/declare RV_FastRange int outer
/declare RV_RangeMax int outer
/declare RV_RangeMin int outer
/varcalc RV_FastRange ${RV_Range}+3
/varcalc RV_RangeMax ${RV_Range}+1
/varcalc RV_RangeMin ${RV_Range}-1
/declare stop int outer
/varset stop 0
:Start
/doevents
/if (${Me.PctHPs}<15) /call REGEN
/call GMCheck
/call playercheck
/call GetTarget
:KillAdds
/if (${RV_HasTarget}) /call MoveToMob
/if (${RV_HasTarget}) /call CombatSub
/if (${RV_HasTarget}) /call MoveToMob
/if (${RV_HasTarget} && (${Defined[RV_LootArray]} || ${RV_LootAllItems})) /call LootMob
/call ResetSub
/varset RV_RandomWait ${Math.Rand[5]}
/varcalc RV_RandomWait ${RV_RandomWait}+1
/echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming
/delay ${RV_RandomWait}s
/if (${Target.ID}) {
/echo Looks like something is attacking us, killing it...
/delay 1s
/if (${Me.PctHPs}<15) /call REGEN
/varset RV_HasTarget 1
/varset RV_Fighting 1
/goto :KillAdds
}
/goto :Start
/return
|--------------------------------------------------------------------------------
|SUB: Aquire Target
|--------------------------------------------------------------------------------
Sub GetTarget
/declare RV_CurrentRadius int local
/declare RV_TargetSub int local
:Acquire
/for RV_CurrentRadius 10 to ${RV_MaxRadius} step 100
/for RV_TargetSub 1 to ${RV_MobArray.Size}
/squelch /target radius ${RV_CurrentRadius} nopcnear notid ${RV_InvalidTargetID} npc
"${RV_MobArray[${RV_TargetSub}]}"
/varset RV_MyTargetID ${Target.ID}
/varset RV_MyTargetDead 0
/if (${Target.ID}) {
/if (${Int[${Target.PctHPs}]}<100) {
/echo Mob NOT a Full Health, picking another...
/varset RV_InvalidTargetID ${Target.ID}
/call ResetSub
/goto :Acquire
}
/if (${Int[${Target.Z}]}<${RV_MinZRange}) {
/echo Mob is BELOW Min Z Range, picking another...
/varset RV_InvalidTargetID ${Target.ID}
/call ResetSub
/goto :Acquire
}
/if (${Int[${Target.Z}]}>${RV_MaxZRange}) {
/echo Mob is ABOVE Max Z Range, picking another...
/varset RV_InvalidTargetID ${Target.ID}
/call ResetSub
/goto :Acquire
}
/varset RV_HasTarget 1
/varset RV_MyTargetName ${Target.CleanName}
/echo Acquired ${Target.CleanName} at range ${Int[${Target.Distance}]}
/return
}
/next RV_TargetSub
/delay 2
/next RV_CurrentRadius
/if (!${Target.ID}) {
/varcalc RV_FailCounter ${RV_FailCounter}+1
/echo Failed to Acquire Target in Range ${RV_MaxRadius} ${RV_FailCounter} Time(s)
/if (${RV_FailCounter}>=${RV_FailMax}) {
/echo Waiting for Respawns, Resetting Failure Counter...
/echo moving back to the top!!!
/squelch /warp succor
/varset RV_FailCounter 0
}
/goto :Acquire
}
/return
|--------------------------------------------------------------------------------
|SUB: Moving
|--------------------------------------------------------------------------------
Sub MoveToMob
/varset RV_MyXLOC ${Int[${Me.X}]}
/varset RV_MyYLOC ${Int[${Me.Y}]}
/doevents
:MovementLoop
/if ((!${RV_Fighting})&&(!${RV_TargetDead})&&(${Target.PctHPs}<100)) {
/echo Mob not at full health, picking another...
/varset RV_InvalidTargetID ${Target.ID}
/varset RV_HasTarget 0
/call ResetSub
/return
}
/if (${Target.ID}) {
/squelch /warp target
/delay 6s ${Target.Distance}<20
/face fast nolook
/delay 1
/keypress back hold
/delay 1
/keypress forward
/squelch /stick 10
/call CombatSub
}
/if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop
/return
|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub
/echo Attacking Mob NOW!
/varset RV_Fighting 1
/varset RV_TargetDead 0
:CombatLoop
/doevents
/attack on
/if (${Me.PctHPs}<15) /call REGEN
/if (!${Target.ID}) {
/attack off
/varset RV_TargetDead 1
/varset RV_Fighting 0
/delay 2s
/target radius 100 corpse
/delay 1s
/call LootMob
/if (!${Target.ID}) {
/call ResetSub
/return
}
/face fast
}
/if (!${RV_TargetDead}) {
/goto :CombatLoop
}
/return
|--------------------------------------------------------------------------------
|SUB: Looting
|--------------------------------------------------------------------------------
Sub LootMob
/call Init
/declare LootSlot int inner 0
/declare LootCheck int inner 0
/declare LootTotal int inner 0
/squelch /warp target
/face fast
/autoinventory
/keypress forward
/keypress back
/fastdrop on
/lootn never
/delay 2s
/loot
/delay 1s
/declare total int local ${Corpse.Items}
/if (!${total}) /goto :DoneLooting
/declare WATCHDOG timer local
/declare not_found int local -1
/declare item_setting int local
/declare slot int local
/for slot 1 to ${total}
/varset WATCHDOG 5s
:ClearCursor
/delay 0
/doevents
/if (!${WATCHDOG}) {
/echo Item stuck on the cursor. Abort!
/goto :DoneLooting
}
/if (${Cursor.ID}) {
/autoinventory
/delay 5
/goto :ClearCursor
}
/varset item_setting ${Ini[CCLoot.ini,Loot,${Corpse.Item[${slot}].Name},${not_found}]}
| If the item isn't in the .ini file then add it.
/if (${item_setting}==${not_found}) {
/varset item_setting ${LOOT_DEFAULT}
/if (${Corpse.Item[${slot}].NoDrop}) {
/varset item_setting ${LOOT_NO_DROP}
}
/echo Adding to INI "${Corpse.Item[${slot}].Name}" (${LOOT_SETTINGS[${item_setting}]})
/ini CCLoot.ini Loot "${Corpse.Item[${slot}].Name}" ${item_setting}
}
/if (${item_setting}==${LOOT_DESTROY} && !${Corpse.Name.Find[${Me}]}) {
/echo -- You destroyed a <<${Corpse.Item[${slot}].Name}>>.-- (${LOOT_SETTINGS[${item_setting}]})
/itemnotify loot${slot} leftmouseup
/delay 5
/if (${Window[ConfirmationDialogBox].Open}) {
/notify ConfirmationDialogBox Yes_Button leftmouseup
/delay 5
}
/if (${Cursor.ID}) {
/destroy
/delay 5
} else {
/echo Uh oh, DESTROY item didn't show up on Cursor
}
} else /if (${item_setting}==${LOOT_KEEP} || ${item_setting}==${LOOT_SELL} || ${Corpse.Name.Find[${Me}]}) {
/echo -- You have looted a <<${Corpse.Item[${slot}]}>>.-- (${LOOT_SETTINGS[${item_setting}]})
/itemnotify loot${slot} rightmouseup
/delay 5
/if (${Window[ConfirmationDialogBox].Open}) {
/notify ConfirmationDialogBox Yes_Button leftmouseup
/delay 5
}
} else /if (${item_setting}==${LOOT_LEAVE}) {
/echo -- You left a <<${Corpse.Item[${slot}]}>>.-- (${LOOT_SETTINGS[${item_setting}]})
} else {
/echo Umm, something is wrong in the loot code
/echo I don't know what to do with ${Corpse.Item[${slot}]}
/echo I guess I'll just leave it there ><
}
/next slot
:DoneLooting
/notify LootWnd DoneButton leftmouseup
/delay 5
/return
|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
/keypress esc
/keypress esc
/keypress esc
/keypress esc
/varset RV_HasTarget 0
/varset RV_TargetDead 0
/varset RV_Fighting 0
/return
|--------------------------------------------------------------------------------
|SUB: Obstacle Avoidance
|--------------------------------------------------------------------------------
Sub HitObstacle
/echo Obstacle hit, moving around it...
/squelch warp target
/return
|--------------------------------------------------------------------------------
|SUB: GM Check
|--------------------------------------------------------------------------------
Sub GMCheck
/if (${Spawn[gm].ID}) {
/beep
/beep
/beep
/echo GM has entered the zone!
/echo FUCK HIM but ending the macro...
/zone eastwastes
/delay 15s
/camp desk
/endmacro
}
/return
|--------------------------------------------------------------------------------
|SUB: Reading from an INI File
|--------------------------------------------------------------------------------
Sub ReadINI(FileName,SectionName,ArrayType)
/echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}...
/delay 1s
/if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) {
/echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro...
/delay 1s
/return
}
/declare nValues int local 1
/declare nArray int local 0
/declare KeySet string local ${Ini[${FileName},${SectionName}]}
:CounterLoop
/if (!${KeySet.Arg[${nValues},|].Length}) {
/varcalc nValues ${nValues}-1
/goto :MakeArray
}
/varcalc nValues ${nValues}+1
/goto :CounterLoop
:MakeArray
/if (!${nValues}) /return
/if (${FileName.Equal["CCMob.ini"]}&&${nValues}>0) {
/echo Declaring Mob Array...
/declare RV_MobArray[${nValues}] string outer
/declare RV_MobStats[${nValues}] string outer
}
/for nArray 1 to ${nValues}
/if (${FileName.Equal["CCMob.ini"]}) {
/varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
/varset RV_MobStats[${nArray}] 0
}
/next nArray
/echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
/delay 1s
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Sing - What are you gonna twist?
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Sing
/twist 1 2 3 4 5 6
|----- Haste - Resist - Snare - DoT - DoT - Heal
/return
|-------------------------------------------------
| Move to Location Loop
|-------------------------------------------------
Sub MoveToLoc(float MoveToY,float MoveToX)
:MoveToLoop
/face fast nolook loc ${MoveToY},${MoveToX}
/if (${Math.Distance[${MoveToY},${MoveToX}]}>2) /keypress forward hold
/if (${Math.Distance[${MoveToY},${MoveToX}]}<=2) {
/goto :Arrived
}
/goto :MoveToLoop
:Arrived
/return
|--------------------------------------------------------------------------------
|SUB: REGEN
|--------------------------------------------------------------------------------
sub REGEN
/echo HP real low
/zone eastwastes
/delay 30s
/squelch /stopforage
/delay 2s
/if (${Me.Class.Name.Equal[Bard]}) /squelch stoptwist
/delay 5s
/if (${Me.Class.Name.Equal[Bard]}) /keypress 4
|------------------------ hotkey of heal song ^^^^^^
/delay 5s
/sit
/if (${Me.PctHPs}==100) /zone crystal
/return
|--------------------------------------------------------------------------------
|SUB: Full
|--------------------------------------------------------------------------------
sub Event_Full
/echo full
/twist off
/zone thurgadina
/delay 45s
/doevents
/return
|--------------------------------------------------------------------------------
|SUB: CC
|--------------------------------------------------------------------------------
sub Event_CC
/echo Time to farm some more!
/stand
/doevents
/delay 10s
/if (${Me.Class.Name.Equal[Bard]}) /call sing
/startforage
/pause 2s
/return
|--------------------------------------------------------------------------------
|SUB: Zoned Thurg
|--------------------------------------------------------------------------------
sub Event_Thurg
/echo Thurg
/squelch /stopforage
/attack off
/if (${Me.Class.Name.Equal[Bard]}) /twist off
/delay 15s
/call VeliumPieces
/target Dalgrim Underbelly
/squelch /face
/if (${Window[Enviro].Open}) /nomodkey /notify Enviro DoneButton leftmouseup
/call ClosePacks
|--------------------------------------------------------------------------------
| Change this to whatever spellgem Cinda's Charismatic Carillon is in
|--------------------------------------------------------------------------------
/if (${Me.Class.Name.Equal[Bard]}) /squelch /cast 7
/delay 4s
/click right target
/delay 10s ${Merchant.Open}
/call SellLoot
/delay 20s
/echo All done.. time to leave
/zone crystal
/delay 45s
/return
|--------------------------------------------------------------------------------
|SUB: Died
|--------------------------------------------------------------------------------
sub Event_Died
/echo DEAD.. damn it
/delay 5s
/sit
/camp desk
/endmac
/return
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|--------------------------------------------------------------------------------
|
| Auto Loot and Sell - This automatically loots items from the corpse: Destroying
| NO DROP items, Setting Velium Weps, Bricks, and Pieces to
| KEEP, and all other items of value to SELL. Settings of
| Items can be modified in CCLoot.ini
|
| Settings are: 1 - Keep, 2 - Destroy, 3 - Leave, 4 - Sell
| Items are automatically added as you loot them.
|
| Original Code by: anon_coward 14 Oct 2004
| Modified By: methos237 05 Dec 2005
|
|--------------------------------------------------------------------------------
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|--------------------------------------------------------------------------------
| SUB: SellLoot
|--------------------------------------------------------------------------------
Sub SellLoot(bool JUST_PRINT)
/call Init
/if (!${Defined[JUST_PRINT]}) /declare JUST_PRINT bool local FALSE
/if (${Merchant.Open} && !${JUST_PRINT}) {
/declare i int local
/for i 10 downto 1
/popup AUTO SELLING in ${i} sec
/delay 1s
/if (!${Merchant.Open}) /return
/next i
}
/declare plat int local ${Me.Platinum}
/declare gold int local ${Me.Gold}
/declare silver int local ${Me.Silver}
/declare copper int local ${Me.Copper}
/declare not_found int local -1
/declare item_setting int local
/declare slot int local
/declare spot int local
/for slot 1 to 8
/if (${InvSlot[pack${slot}].Item.Container}) {
/for spot 1 to ${InvSlot[pack${slot}].Item.Container}
/if (!${InvSlot[pack${slot}].Item.Item[${spot}].ID}) /goto :NextSpot
/varset item_setting
${Ini[CCLoot.ini,Loot,${InvSlot[pack${slot}].Item.Item[${spot}]},${not_found}]}
/if (${item_setting}==${not_found}) {
/echo Dunno what to do with ${InvSlot[pack${slot}].Item.Item[${spot}]} pack${slot} slot${spot}
} else /if (${item_setting}==${LOOT_KEEP}) {
/goto :NextSpot
} else /if (${item_setting}==${LOOT_DESTROY}) {
/echo Should have DESTROYED ${InvSlot[pack${slot}].Item.Item[${spot}]} pack${slot} slot${spot}
} else /if (${item_setting}==${LOOT_LEAVE}) {
/echo Should have LEFT ${InvSlot[pack${slot}].Item.Item[${spot}]} pack${slot} slot${spot}
} else /if (${item_setting}==${LOOT_SELL}) {
/echo Selling ${InvSlot[pack${slot}].Item.Item[${spot}]}
/if (${JUST_PRINT}) /goto :NextSpot
/if (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
/delay 5
/if (!${Window[pack${slot}].Open}) /nomodkey /itemnotify pack${slot} rightmouseup
/delay 5
/nomodkey /itemnotify ${InvSlot[pack${slot}].Item.Item[${spot}].InvSlot} leftmouseup
/delay 5
/nomodkey /shift /notify MerchantWnd MW_Sell_Button leftmouseup
/delay 5
} else {
/echo Bogus item setting: ${InvSlot[pack${slot}].Item.Item[${spot}]} => ${item_setting}
}
:NextSpot
/next spot
/if (${Window[pack${slot}].Open}) /nomodkey /itemnotify pack${slot} rightmouseup
/delay 1s
} else {
/if (!${InvSlot[pack${slot}].Item.ID}) /goto :NextSlot
/varset item_setting ${Ini[wizard.ini,Loot,${InvSlot[pack${slot}].Item},${not_found}]} slot${slot}
/if (${item_setting}==${not_found}) {
/echo Dunno what to do with ${InvSlot[pack${slot}].Item} slot${slot}
} else /if (${item_setting}==${LOOT_KEEP}) {
/goto :NextSlot
} else /if (${item_setting}==${LOOT_DESTROY}) {
/echo Should have DESTROYED ${InvSlot[pack${slot}].Item} slot${slot}
} else /if (${item_setting}==${LOOT_LEAVE}) {
/echo Should have LEFT ${InvSlot[pack${slot}].Item} slot${slot}
} else /if (${item_setting}==${LOOT_SELL}) {
/echo Selling ${InvSlot[pack${slot}].Item}
/if (${JUST_PRINT}) /goto :NextSlot
/if (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
/delay 5
/nomodkey /itemnotify pack${slot} leftmouseup
/delay 5
/nomodkey /shift /notify MerchantWnd MW_Sell_Button leftmouseup
/delay 5
} else {
/echo Bogus item setting: ${InvSlot[pack${slot}].Item} => ${item_setting}
}
}
:NextSlot
/next slot
/varcalc plat ${Me.Platinum}-${plat}
/varcalc gold ${Me.Gold}-${gold}
/varcalc silver ${Me.Silver}-${silver}
/varcalc copper ${Me.Copper}-${copper}
/if (${plat} || ${gold} || ${silver} || ${copper}) {
/echo Made ${plat}pp ${gold}gp ${silver}sp ${copper}cp
}
/nomodkey /notify MerchantWnd MW_Done_Button leftmouseup
/delay 5
/if (${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
/delay 5
/return
|-----------------------------------------------------------------------------
| SUB: SetLootPrefrence
|-----------------------------------------------------------------------------
Sub SetLootPreference(int pref)
/if (!${Cursor.ID}) {
/echo Pick up something on your cursor before typing this command
/return
}
/if (!${Defined[pref]}) {
/declare not_found int local -1
/declare item_setting int local ${Ini[CCLoot.ini,Loot,"${Cursor}",${not_found}]}
/if (${item_setting}==${not_found}) {
/echo No entry for ${Cursor}
} else /if (${item_setting}==${LOOT_KEEP}) {
/echo Pick up <<${Cursor}>>
} else /if (${item_setting}==${LOOT_DESTROY}) {
/echo Pick up & DESTROY <<${Cursor}>>
} else /if (${item_setting}==${LOOT_LEAVE}) {
/echo Leave <<${Cursor}>> on corpse
} else /if (${item_setting}==${LOOT_SELL}) {
/echo Pick up <<${Cursor}>> (to sell)
} else {
/echo Unknown TYPE for Loot <<${Cursor}>>
}
/return
}
/if (${pref} < 1 || ${pref} > 4) {
/echo Prefence ID ${pref} out of range. ERROR processing command
/return
}
/echo Setting preferenc "${Cursor.Name}" => ${LOOT_SETTINGS[${pref}]}
/ini CCLoot.ini Loot "${Cursor.Name}" ${pref}
/if (${pref}==${LOOT_DESTROY}) /destroy
/return
|-----------------------------------------------------------------------------
| SUB: Event_Print
|-----------------------------------------------------------------------------
Sub Event_Print(string EventTxt,string CmdName)
/if (${CmdName.Find[LOOT]}) {
/call SetLootPreference
} else /if (${CmdName.Find[SELL]}) {
/call SellLoot TRUE
} else {
/echo Unknown command: ${CmdName}
/echo for more info type /echo HELP
}
/return
|-----------------------------------------------------------------------------
| SUB: Event_Set
|-----------------------------------------------------------------------------
Sub Event_Set(string EventTxt,string CmdName)
/if (${CmdName.Find[SAVE]} || ${CmdName.Find[KEEP]}) {
/call SetLootPreference ${LOOT_KEEP}
} else /if (${CmdName.Find[DESTROY]}) {
/call SetLootPreference ${LOOT_DESTROY}
} else /if (${CmdName.Find[LEAVE]}) {
/call SetLootPreference ${LOOT_LEAVE}
} else /if (${CmdName.Find[SELL]}) {
/call SetLootPreference ${LOOT_SELL}
} else /if (${CmdName.Find[PAUSE]}) {
/if (${PAUSED}) {
/varset PAUSED FALSE
/echo ${Macro.Name} is active again
} else {
/varset PAUSED TRUE
/echo ${Macro.Name} is being paused
/echo type '/echo SET PAUSED' to resume
}
} else {
/echo Unknown command: ${CmdName}
/echo for more info type /echo HELP
}
/return
|--------------------------------------------------------------------------------
| SUB: Init
|--------------------------------------------------------------------------------
Sub Init
/if (!${Defined[PAUSED]}) /declare PAUSED bool outer FALSE
|A few constants for handling loot
/if (!${Defined[LOOT_KEEP]}) /declare LOOT_KEEP int outer 1
/if (!${Defined[LOOT_DESTROY]}) /declare LOOT_DESTROY int outer 2
/if (!${Defined[LOOT_LEAVE]}) /declare LOOT_LEAVE int outer 3
/if (!${Defined[LOOT_SELL]}) /declare LOOT_SELL int outer 4
|A table for mapping numbers to strings for printing
/if (!${Defined[LOOT_SETTINGS]}) /declare LOOT_SETTINGS[4] string outer
/varset LOOT_SETTINGS[${LOOT_KEEP}] KEEP
/varset LOOT_SETTINGS[${LOOT_DESTROY}] DESTROY
/varset LOOT_SETTINGS[${LOOT_LEAVE}] LEAVE
/varset LOOT_SETTINGS[${LOOT_SELL}] SELL
|Default values for specific types of loot
/if (!${Defined[LOOT_DEFAULT]}) /declare LOOT_DEFAULT int outer ${LOOT_SELL}
/if (!${Defined[LOOT_NO_DROP]}) /declare LOOT_NO_DROP int outer ${LOOT_DESTROY}
/return
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|--------------------------------------------------------------------------------
|
| VeliumPieces - This will take the Velium Weps and make them into Small Blocks
| of Velium, and take the Small Blocks of Velium and make them
| into Small Pieces of Velium.
|
| Original Code by: ArmySolider 9 Oct 2005
| Sightly Modified by: methos237 5 Dec 2005
|
|--------------------------------------------------------------------------------
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|--------------------------------------------------------------------------------
| SUB: VeliumPieces
|--------------------------------------------------------------------------------
Sub VeliumPieces
/doevents
/declare stop1 int outer
/varset stop1 0
/itemtarget "Forge"
/warp loc -429 -115 4
/delay 2s
/face loc -432,-112
:MainLoop
/call OpenForge
/call CleanForge
:Weapons
/call Combine
/if (${stop1}==14) /goto :Done
/doevents
/Goto :Weapons
/goto :MainLoop
:Done
/return
|--------------------------------------------------
| SUB: CleanForge- Removes all items from a forge.
|--------------------------------------------------
Sub CleanForge
/echo CLEANING forge .. be patient
/declare ForgeSlot int local 0
/for ForgeSlot 1 to 10
/nomodkey /shiftkey /itemnotify enviro${ForgeSlot} leftmouseup
/delay 3
/autoinventory
/delay 2
/next ForgeSlot
/return
|--------------------------------------------------
| SUB: OpenForge - Opens the nearest Forge.
|--------------------------------------------------
Sub OpenForge
/echo Opening forge
/if (${Merchant.Open}) /nomodkey /notify MerchantWnd MW_Done_Button leftmouseup
/if (${Window[Enviro].Open}) /nomodkey /notify Enviro DoneButton leftmouseup
/if (${Window[TradeskillWnd].Open}) /nomodkey /notify TradeskillWnd ExperimentButton leftmouseup
:OpeningForge
/itemtarget "Forge"
/click left item
/delay 1s
/if (${Window[TradeskillWnd].Open}) {
/nomodkey /notify TradeskillWnd ExperimentButton leftmouseup
/return
}
/delay 30s
/goto :OpeningForge
/if (${Window[TradeskillWnd].Open}) /nomodkey /notify TradeskillWnd ExperimentButton leftmouseup
/return
|--------------------------------------------------
| SUB: Combine
|--------------------------------------------------
Sub Combine
/Echo Doing combines WOOOT ${stop1}
/call OpenPacks
/if (${stop1}==0) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Warhammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==1) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Morning Star].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==2) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Great Staff].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==3) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Dagger].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==4) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Battle Axe].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==5) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Long Sword].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==6) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Rapier].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==7) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Scimitar].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==8) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Short Sword].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==9) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Spear].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==10) {
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Smithy Hammer].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Velium Two Handed Sword].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==11) {
/nomodkey /ctrl /itemnotify ${FindItem[=Smithing Chisel].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Block of Velium].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==12) {
/nomodkey /ctrl /itemnotify ${FindItem[=Smithing Chisel].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Large Brick of Velium].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/if (${stop1}==13) {
/nomodkey /ctrl /itemnotify ${FindItem[=Smithing Chisel].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro1]} leftmouseup
/nomodkey /ctrl /itemnotify ${FindItem[=Small Brick of Velium].InvSlot} leftmouseup
/nomodkey /itemnotify ${InvSlot[enviro2]} leftmouseup
}
/delay 3
/combine Enviro
/delay 2s
/autoinventory
/autoinventory
/delay 2s
/autoinventory
/autoinventory
/delay 2s
/autoinventory
/autoinventory
/delay 2s
/autoinventory
/autoinventory
/return
|-------------------------------------------------
| SUB: Event_Cant
|-------------------------------------------------
Sub Event_Cant
/call CleanForge
/echo ${stop1}
/if (${stop1}==0) /if (${FindItemCount[=Velium Warhammer]}==0) /varset stop1 1
/if (${stop1}==1) /if (${FindItemCount[=Velium Morning Star]}==0) /varset stop1 2
/if (${stop1}==2) /if (${FindItemCount[=Velium Great Staff]}==0) /varset stop1 3
/if (${stop1}==3) /if (${FindItemCount[=Velium Dagger]}==0) /varset stop1 4
/if (${stop1}==4) /if (${FindItemCount[=Velium Battle Axe]}==0) /varset stop1 5
/if (${stop1}==5) /if (${FindItemCount[=Velium Long Sword]}==0) /varset stop1 6
/if (${stop1}==6) /if (${FindItemCount[=Velium Rapier]}==0) /varset stop1 7
/if (${stop1}==7) /if (${FindItemCount[=Velium Scimitar]}==0) /varset stop1 8
/if (${stop1}==8) /if (${FindItemCount[=Velium Short Sword]}==0) /varset stop1 9
/if (${stop1}==9) /if (${FindItemCount[=Velium Spear]}==0) /varset stop1 10
/if (${stop1}==10) /if (${FindItemCount[=Velium Two Handed Sword]}==0) /varset stop1 11
/if (${stop1}==11) /if (${FindItemCount[=Block of Velium]}==0) /varset stop1 12
/if (${stop1}==12) /if (${FindItemCount[=Large Brick of Velium]}==0) /varset stop1 13
/if (${stop1}==13) /if (${FindItemCount[=Small Brick of Velium]}==0) /varset stop1 14
/echo ${stop1}
/return
|---------------------------------------------
| SUB: PlayerCheck
|---------------------------------------------
Sub playercheck
/if (${Spawn[pc noalert 2 radius 300].ID}) {
/echo player nearby
/log player nearby
/beep
/delay 5
/warp succor
/twist off
/fade
/delay 20s
/sit
/squelch /AFK Be back in awhile, my dog has to take a HUGE POO!!!!!
delay 1800s
}
/if (${Spawn[pc noalert 2 radius 300].ID}) {
:StillThere
delay 1800s
/echo Fucker is still there!!!! Will try again in 30 Minutes!
/log player nearby
/squelch /AFK My son cries, therefore I drink!! (and must go AFK)
/goto :StillThere
} /if (${Spawn[pc alert 2 radius 300].ID}) {
/echo WHOOOHOOOOO! The coast is clear!!!
/goto :NotThere
}
:NotThere
/return
CCLoot.ini
Rich (BB code):
[Loot]
Bottle of Karsin Acid=2
Ry`Gorr Mining Pick=2
Topaz=4
Small Brick of Velium=1
Klezendian Crystal=2
Amber=4
Velium Rapier=1
Gold Ring=4
Velishoul's Tome Pg.68=4
Rune of Expulsion=4
Frozen Long Sword=4
Crystallized Sulfur=4
Small Piece of Velium=1
velium Bastard Sword=1
Velium Battle Axe=1
Velium Dagger=1
Velium Great Staff=1
Velium Great Sword=1
Velium Hammer=1
Velium Mace=1
Velium Morningstar=1
Velium Short Sword=1
Velium Stilletto=1
Velium Warhammer=1
Velium Maul=1
Velium Morning Star=1
Velium Spear=1
Velium Scimitar=1
Velium Two Handed Sword=1
Velium Warsword=1
Velium Smithy Hammer=1
Smithing Chisel=1
Ivory=4
Pearl=4
Block of Velium=1
Herbalist Pack=4
Jade Shard=4
Mithril Earring=4
Shimmering Velium Ruby=4
Jade Earring=4
Words of Dimension=4
A Faded Velishoul's Tome Page=4
Words of Sight=4
Rune of Karana=4
Silver Amulet=4
Rune of Trauma=4
Words of Neglect=4
Frozen Two Handed Sword=4
Jade Ring=4
Large Brick of Velium=1
CCMob.ini
Rich (BB code):
[The Crystal Caverns]
Mob1=Ry`Gorr
Mob2=Foreman
P.S. Sorry for the long post, it's been a looooong day and this is my first macro

Last edited:

