steel arrow quiver [payon-geffen]
Posted: 22 Aug 2011, 08:39
In IDRO, most players prefer to hunt with orcs bow, so the type of arrow used is steel arrow.
The macro that I created, steel quiver is made from scell. You need two type char in one ID
first one [slot 0] is archer, put this one in payon and second is merchant [slot 2] to help you buy scell form geffen npc using skill overcharge.
This macro works quite simple, all you have to do is fill in the money to both of char in rasio 16:1.
Here's the codes
The macro that I created, steel quiver is made from scell. You need two type char in one ID
first one [slot 0] is archer, put this one in payon and second is merchant [slot 2] to help you buy scell form geffen npc using skill overcharge.
This macro works quite simple, all you have to do is fill in the money to both of char in rasio 16:1.
Here's the codes
Code: Select all
##### bug...inventory ngak boleh empty
##### tambahkan item sembarang di inventory...supaya bisa detect scell
#merchant job ======================================================================= merchant job
automacro buyscell {
inventory "Scell" == 0
location geffen, geffen_in
delay 4
exclusive 1
run-once 1
set stopquiver 0
set zeny 0
set scellprice 122
set buystat 0
set cartvol 8000
call {
:passcel
do eval $::Macro::Data::varStack{zeny} = $::char->{'zeny'}
if ($zeny >= 242) goto next2
$stopquiver = 1
log ============================ target reachs limit
log ============================ $.datetime zeny $zeny
pause 5
$charPlayer = 0
do conf char $charPlayer
do relog
stop
:next2
if (@inventory(Scell) < 0) goto movenows
call restocknow
goto end
:movenows
[
do move geffen_in 70 140
]
:buyagain
$scellToBuy = @eval($.maxweight-$.weight)
$zenycalc = @eval(@eval($scellToBuy*$scellprice)+242)
if ($zeny >= $zenycalc) goto buynow
$scellToBuy = @eval(@eval($zeny-120)/$scellprice)
do eval $::Macro::Data::varStack{scellToBuy} = int($scellToBuy)
$buystat = 1
:buynow
if ($scellToBuy > 0) goto buynows
call restocknow
goto end
:buynows
do talknpc 74 144 b b0,$scellToBuy
do eval $::Macro::Data::varStack{cartweight} = int($::cart{'weight'})
if ($buystat == 1) goto end
if ($cartweight == $cartvol) goto end
if ($cartweight < $cartvol) goto conta
goto end
:conta
$scellsum = @eval($cartvol-$cartweight)
do cart add @inventory(Scell) $scellsum
pause 2
goto buyagain
:end
release buyscell
}
}
automacro restock {
inventory "Scell" > 0
location geffen, geffen_in
exclusive 1
run-once 1
set storavol 30000
call restocknow
}
macro restocknow {
if (@config(storageAuto) == 1) goto walkagain0
do conf storageAuto 1
:walkagain0
if (@config(autoTalkCont) == 0) goto walkagain1
do conf autoTalkCont 0
:walkagain1
if (@config(storageAuto_keepOpen) == 1) goto walkagain
do conf storageAuto_keepOpen 1
:walkagain
if ($.pos == "125 65" && $.map == "geffen") goto walkthrough
[
do move geffen 125 65
]
if ($.pos != "125 65" && $.map != "geffen") goto walkagain
:walkthrough
do talknpc 120 62 c r1 n
:loopback
if (@eval(exists $::storage{opened}?1:0)) goto open
log ============================ wait a moment...
pause 2
goto loopback
:open
pause 4
if (@storage(Scell) < 0) goto putarrow
if (@storamount(Scell) == $storavol) goto changechar
$scellloose = @eval($storavol-@storamount(Scell))
do storage add @inventory(Scell) $scellloose
pause 2
if (@inventory(Scell) < 0) goto cartnext
###===== put something here: if stora scell amount != 30000
goto changechar
###===== put something here: add scell to inv
:putarrow
do storage add @inventory(Scell)
pause 0.2
:cartnext
if (@cart(Scell) < 0) goto end0
$scellloose2 = @eval($storavol-@storamount(Scell))
do storage addfromcart @cart(Scell) $scellloose2
pause 1
if (@cart(Scell) < 0) goto end0
$scellToINV = @eval($.maxweight-$.weight)
do cart get @cart(Scell) $scellToINV
goto changechar
:changechar
$charPlayer = 0
do storage close
do conf char $charPlayer
do relog
:end0
release restock
}
#archer job ======================================================================= archer job
automacro arrowcraft {
inventory "Scell" > 0
location payon, payon_in01
run-once 1
exclusive 1
set weightConst89 0.85
set weightConst90 0.89
call arrowmake
}
macro arrowmake {
do stand
:verx
if ($.pos == "177 223" && $.map == "payon") goto walk1
[
do move payon 177 223
]
if ($.pos != "177 223" && $.map != "payon") goto verx
:walk1
pause 0.5
while (@invamount(Scell) > 0) as bluegemloop
do arrowcraft forceuse @inventory(Scell)
end bluegemloop
$tmaxweightEND = @eval($.weight/$.maxweight)
if ($tmaxweightEND >= $weightConst90) goto autos
if ($tmaxweightEND >= $weightConst89) goto callmake
:autos
call autostorages
goto end
:callmake
call quivermake
:end
release arrowcraft
}
automacro chekinventory {
inventory "Scell" == 0
location payon, payon_in01
run-once 1
exclusive 1
set sdtone 0
set arrowweight 0.2
set quiverpass 0
set gemweight 1.6
set weightConst89 0.88
set weightConst49 0.88
set storavol 30000
set tmaxweight 0
call autostorages
}
automacro weightlimit {
inventory "Scell" > 0
location payon, payon_in01
weight >= 89%
delay 4
run-once 1
exclusive 1
set arrowweight 0.2
set quiverpass 0
set gemweight 1.6
set sdtone 1
set weightConst89 0.88
set weightConst49 0.88
set storavol 30000
set tmaxweight 0
call autostorages
}
macro autostorages {
:nextarrow
if (@config(storageAuto) == 1) goto ver0
do conf storageAuto 1
:ver0
if ($.pos == "177 223" && $.map == "payon") goto walk0
[
do move payon 177 223
]
if ($.pos != "177 223" && $.map != "payon") goto ver0
:walk0
do talknpc 175 226 c r1 n
:loopback
if (@eval(exists $::storage{opened}?1:0)) goto open
log wait a moment
pause 2
goto loopback
:open
if (@inventory(Steel Arrow) < 0) goto cont1
$crys = @eval($storavol - @storamount(Steel Arrow))
if (@invamount(Steel Arrow) <= $crys) goto passcrys
$quiverpass = 1
goto cont1
:passcrys
do storage add @inventory(Steel Arrow)
:cont1
if (@inventory(Steel Arrow Quiver) < 0) goto cont2
$froza = @eval($storavol - @storamount(Steel Arrow Quiver))
if (@invamount(Steel Arrow Quiver) <= $froza) goto passfroza
do storage add @inventory(Steel Arrow Quiver) $froza
goto cont2
:passfroza
do storage add @inventory(Steel Arrow Quiver)
:cont2
if ($quiverpass == 0) goto cont3
if (@inventory(Scell) < 0 ) goto contss
do storage add @inventory(Scell)
:contss
if (@storamount(Steel Arrow) >= 500) goto passlow
if ($stopquiver == 1) goto endover
$charPlayer = 1
do storage close
do conf char $charPlayer
release weightlimit
release chekinventory
do relog
stop
:endover
log all Steel Arrow has been turn off to quiver
do relog 100000
stop
:passlow
$tmaxweight = @eval($.weight/$.maxweight)
if ($tmaxweight < $weightConst89) goto addmore
$scrysx = @eval(@eval($.weight-@eval($.maxweight*$weightConst89))/$arrowweight)
do eval $::Macro::Data::varStack{scrysx} = int($scrysx)
do storage add @inventory(Steel Arrow) $scrysx
goto callnow
:addmore
$scrysx = @eval(@eval(@eval($.maxweight*$weightConst89)-$.weight)/$arrowweight)
do eval $::Macro::Data::varStack{scrysx} = int($scrysx)
do storage get @storage(Steel Arrow) $scrysx
:callnow
do storage close
call quivermake
goto end12
:cont3
if (@storage(Scell) < 0) goto contss
##check scell in inventory and measure its weight
if (@inventory(Scell) < 0) goto nextload
$scellINV = @invamount(Scell)
$scellweightINV = @eval($scellINV*$gemweight)
##check realweight on char
$realCharweight = @eval($.weight-$scellINV)
$totalCharweight = @eval($realCharweight+$scellweightINV)
$tmaxweight = $totalCharweight
$tmaxweightDEC = @eval($tmaxweight/$.maxweight)
goto nextload2
:nextload
$tmaxweight = $.weight
$tmaxweightDEC = @eval($.weight/$.maxweight)
goto nextload2
:nextload2
if ($tmaxweightDEC < $weightConst49) goto addmore2
$tgem = @eval(@eval($tmaxweight-@eval($.maxweight*$weightConst49))/$gemweight)
do eval $::Macro::Data::varStack{tgem} = int($tgem)
do storage add @inventory(Scell) $tgem
goto end
:nextload3
do autostorage
pause 30
release all
stop
:addmore2
$tgem = @eval(@eval(@eval($.maxweight*$weightConst49)-$tmaxweight)/$gemweight)
do eval $::Macro::Data::varStack{tgem} = int($tgem)
do storage get @storage(Scell) $tgem
:end
do storage close
:end12
if ($sdtone == 1) goto endall
release chekinventory
release arrowcraft
stop
:endall
release weightlimit
release chekinventory
release arrowcraft
}
macro quivermake {
:start
if ($.pos == "10 130" && $.map == "payon_in01") goto walk0
[
do move payon_in01 10 130
]
if ($.pos != "10 130" && $.map != "payon_in01") goto start
:walk0
do talknpc 5 134 c c c c r2 c r0 c c r0 c n
release chekinventory
release weightlimit
}