Kaladim Bone Chips Quest

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

Grumpy
a hill giant
a hill giant
Posts: 167
Joined: Sun Nov 10, 2002 4:22 pm

Kaladim Bone Chips Quest

Post by Grumpy » Wed Dec 04, 2002 2:55 pm

This macro will hand in 4 unstacked bone chips to Gunlok Jure in the Kaladim Paladin Guild, just be in the room with him and fire it up. It also sells the junk you get to the merchant across the room.

Bugs:
For some reason, it usually works fine up until you sell all your junk, then try to start over again. It will target Gunlok and face him and start moving then stop (usually well out of range), haven't been able to track down why it does this.

Every once in a while, you'll wind up with the quest reward on your cursor and macro stops (I checked, I still had pack space).

For some reason, it doesn't exit gracefully (the count of bonechips left isn't working).

Don't have a way to check how encumbered you are, you can easily get too overburdened to move (just drop the heavy bits til you can move, go sell what you have left and go back and get the rest of the loot).

All in all, it works great, huge time/wrist saver, especially when handing in 400-600 bone chips at a time.

Any comments/improvements welcome, this is my first MQ macro.

| Kalbcs.mac
| This macro is designed to do the Kaladim Paladin Bone
| Chips Quest. Give 4 unstacked Bone Chips to "QuestGiver"
| (Gunlok Jure), reward is Exp, Cash and a random "junk"
| item (Rusty Weapon, Small Patchwork Armor, Torch, Lantern)
| Does the Quest until you are out of Bone Chips, or your
| Inventory is full, then turns around and sells the junk to
| The nearby "Merchant" (Tempia Lauley), then goes back to
| doing the quest. If you run out of Bone Chips, it sells
| the last set of junk, then ends.
| Eventually I'll make this generic for any Bone Chips quest
| (there are quite a few), then generic for any similar
| quest (like the Neriak Red Wine quest).
| Caveat: it's very possible to get your character so loaded
| with cash/junk that they are too encumbered to move, so
| Quester Beware!

#turbo

#define QuestGiver "Gunlok Jure"
#define Merchant "Tempia Lauley"

/varset v99 0

Sub Main
/stand

:Quest
/delay 1
/call GotoTarg QuestGiver
/delay 3

:QuestLoop
/varset v98 $char(cash)

/if "$invpanel"!="TRUE" /press i
/if "$cursor()"=="TRUE" /click left auto

/if n $count("Bone Chips")<4 {
/varset v99 1
/goto :SellJunk
}
/sendkey down ctrl
/delay 1
/finditem "Bone Chips"
:WaitFirst
/delay 1
/if "$cursor()"!="TRUE" /goto :WaitFirst
/sendkey up ctrl
/delay 1

/click left 315 145

:WaitTrade
/delay 1
/if "$cursor()"=="TRUE" /goto :WaitTrade

/call GiveBC 1
/call GiveBC 2
/call GiveBC 3

/click left npctrade give

:WaitQuest
/delay 1
/if n $v98==$char(cash) /goto :WaitQuest

/if n $freeinv(space)<1 {
/call GotoTarg Merchant
/press u
:WaitMerch
/delay 1
/if "$merchant"!="TRUE" /goto :WaitMerch
/goto :SellJunk
}
/goto :QuestLoop


:SellJunk
/varset v98 $char(cash)
/finditem similar "Rusty"
/if "$find()"=="TRUE" /goto :Sell
/finditem similar "Small Tattered"
/if "$find()"=="TRUE" /goto :Sell
/finditem similar "Small Patchwork"
/if "$find()"=="TRUE" /goto :Sell
/finditem similar "Small Lantern"
/if "$find()"=="TRUE" /goto :Sell
/finditem similar "Torch"
/if "$find()"=="TRUE" /goto :Sell
/if n v99==1 {
/goto :Done
} else {
/delay 10
/varset v91 0
/goto :Quest
}

:Sell
/click left merchant buy

:WaitSale
/delay 1
/if n $v98==$char(cash) /goto :WaitSale
/goto :SellJunk

:Done
/endmacro

/return

Sub AutoRun
/if $p0==$v80 /return
/varset v80 $p0
/if $p0==1 /sendkey down up
/if $p0==0 /sendkey up up
/return

Sub GotoTarg
/target $p0
/varset v91 $calc($rand(3)+5)
/if n $target(distance)<=$v91 /return

:GotoTargLoop
/delay 0
/face nopredict
/call AutoRun 1
/if n $target(distance)>$v91 /goto :GotoTargLoop
/call AutoRun 0
/return

Sub GiveBC
/sendkey down ctrl
/delay 1
/finditem "Bone Chips"
:Wait1
/delay 1
/if "$cursor()"!="TRUE" /goto :Wait1
/sendkey up ctrl
/delay 1
/click left npctrade $p0
:Wait2
/delay 1
/if "$cursor()"=="TRUE" /goto :Wait2
/return