BUG:
- when authorized user pm "warp A" it will automatically cast the 1st slot of the list in my example here Prontera
I modified my warp seller to have a free warp function for my self or my friend to use my warp bot here the warp on pm code:
Code: Select all
macro var {
log setting up global variables ..
# Our Warp List
$loc1 = Prontera
$loc2 = Geffen
$loc3 = Alberta
$loc4 = Einbroch
# Set Map to warp here
$wslot1 = prontera
$wslot2 = geffen
$wslot3 = alberta
$wslot4 = ein_fild08
}
# DO NOT EDIT ANYHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING!
# YOU HAS BEING WARN!
# Loading our var
automacro start {
delay 2
console /other player view Equipment/i
call {
# call our main variables and lock auto-restock function
do reload warpm # change this to the files you save this macro (sometime macro script need to be reloaded)
call var
# check Gem amount
if (@invamount (Blue Gemstone) = 0) goto qk
pause 3
do sit
stop
:qk
lock pm
do chat create "OUT OF SERVICES!" 2 0 12121
stop
}
}
automacro pm {
console /\(From: (.*)\) : warp (.*)/
call {
$name = $.lastMatch1
# All people that can use warp need to be added in overallAuth
$auth = @eval (defined $::overallAuth{"$name"} ? $::overallAuth{"$name"}:"None")
if ($auth == 1) goto auth
do pm $.lastMatch1 Pardon...?
stop
:auth
# AGI UP you can add more buff here too
do sp 29 $name 10
$z = $.lastMatch2
if ($z = $loc1) goto p1
if ($z = $loc2) goto p2
if ($z = $loc3) goto p3
if ($z = $loc4) goto p4
:p1
call w1
stop
:p2
call w2
stop
:p3
call w3
stop
:p4
call w4
stop
}
}
macro w1 {
lock pm
$aa1 = @Invamount (Blue Gemstone)
# Opening Warp on Empty Spot
$x = @arg("$.pos", 1)
$y = @arg("$.pos", 2)
$x0 = @eval($x + @rand(1,3))
$x1 = @eval($x - @rand(1,3))
$y0 = @eval($y - @rand(1,3))
do sl 27 @random("$x0", "$x1") $y0
pause 2
do warp $wslot1
pause 2
$aa2 = @Invamount (Blue Gemstone)
if ($aa1 == $aa2) goto ax
stop
:ax
pause 2
# Warp Cast Failed re-casting
call axx
stop
}
macro axx {
call w1
}
macro w2 {
lock pm
$bb1 = @Invamount (Blue Gemstone)
# Opening Warp on Empty Spot
$x = @arg("$.pos", 1)
$y = @arg("$.pos", 2)
$x0 = @eval($x + @rand(1,3))
$x1 = @eval($x - @rand(1,3))
$y0 = @eval($y - @rand(1,3))
do sl 27 @random("$x0", "$x1") $y0
pause 2
do warp $wslot1
pause 2
$aa2 = @Invamount (Blue Gemstone)
if ($bb1 == $bb2) goto bx
stop
:bx
pause 2
# Warp Cast Failed re-casting
call bxx
stop
}
macro bxx {
call w2
}
macro w3 {
lock pm
$cc1 = @Invamount (Blue Gemstone)
# Opening Warp on Empty Spot
$x = @arg("$.pos", 1)
$y = @arg("$.pos", 2)
$x0 = @eval($x + @rand(1,3))
$x1 = @eval($x - @rand(1,3))
$y0 = @eval($y - @rand(1,3))
do sl 27 @random("$x0", "$x1") $y0
pause 2
do warp $wslot1
pause 2
$aa2 = @Invamount (Blue Gemstone)
if ($cc1 == $cc2) goto cx
stop
:cx
pause 2
# Warp Cast Failed re-casting
call cxx
stop
}
macro dxx {
call w3
}
macro w4 {
lock pm
$dd1 = @Invamount (Blue Gemstone)
# Opening Warp on Empty Spot
$x = @arg("$.pos", 1)
$y = @arg("$.pos", 2)
$x0 = @eval($x + @rand(1,3))
$x1 = @eval($x - @rand(1,3))
$y0 = @eval($y - @rand(1,3))
do sl 27 @random("$x0", "$x1") $y0
pause 2
do warp $wslot1
pause 2
$dd2 = @Invamount (Blue Gemstone)
if ($dd1 == $dd2) goto dx
stop
:dx
pause 2
# Warp Cast Failed re-casting
call dxx
stop
}
macro dxx {
call w4
}
# Last Part after warp succesfully opened
automacro last {
console /You opened Warp Portal on \((.*), (.*)\)/
call {
if (@invamount (Blue Gemstone) = 0) goto qk
pause 2
release pm
do sit
stop
:qk
do sit
lock pm
do chat create "OUT OF SERVICES!" 2 0 12121
stop
}
}
Cheers