- tomtom wrote:
- well, i nid sample only can make a fixed macro to u
erm..this is my macro. u check and see.
automacro a {
console /You are sitting./
call {
do ignore 1 all
if (@invamount (Blue Gemstone) == 0) goto qk
do chat create "Castle 600z" 2 0 nykie
# A, B, C, D = Chatroom title
pause 1
do sit
stop
:qk
lock a
lock b
lock c
lock d
lock e
lock f
do chat create "Out of Order" 2 0 nykie
do sit
stop
}
}
automacro b {
console /(.*?) \(level (\d*)\) Requests a Deal/
call {
do deal
$name = $.lastMatch1
do chat modify "Serving $name" 2 0 nykie
do pm "$name" "Castle Warp- 600z"
pause 1
pause 10
# Cancel the deal in x seconds if the buyer no action
do deal no
stop
}
}
automacro c {
console /^(.*) added Item to Deal: (.*) x (.*)$/i
call {
if ($.lastMatch2 != "Blue Gemstone") goto end
#Cancel the deal in x seconds if the buyer no action after put on Blue Gemstone
pause 1
pause 10
do deal no
stop
:end
# Cancel the deal if the buyer put on the items
do deal no
stop
}
}
automacro d {
console /(.*) added (.*) z to Deal/
call {
$a = $.lastMatch2
if ($a = 600) goto bb
#$a = ".*" = The price you want to sell
pause 2
# Cancel the deal if the gained zeny != the price you sell
do deal no
stop
:bb
pause 1
do deal
pause 1
do deal
pause 1
#Cancel the deal in x seconds if the buyer no action after put on the zeny
pause 10
do deal no
stop
}
}
automacro e {
console /^You gained (.+?) zeny.$/
call {
lock b
lock d
do chat leave
do stand
do sp "Increase Agi" "$name"
do c Thx for using Zhuzhu Warp Services.
do e @random ("thx","gawi","kis","ok","lv2")
$a = $.lastMatch1
if ($a = 600) goto a1
#$a = ".*" = The price you want to sell
:a1
call warp1
release all
}
}
##################################################
##################################################
##################################################
macro warp1 {
$aa1 = @Invamount (Blue Gemstone)
# Check the number of the bluestone "before" warp
$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 1
pause 2
$aa2 = @Invamount (Blue Gemstone)
# Check the number of the bluestone "after" warp
if ($aa1 == $aa2) goto ax
# If the number of bluestone before warp match that of after warp then regarding as failed, goto :ax
stop
:ax
pause 2
do c Regenerating...
call axx
# Run macro axx
stop
}
macro axx {
call warp1
# Run macro warp1
}
automacro f {
console /You opened Warp Portal on \((.*), (.*)\)/
call {
do c Warp Portal on @random("$x0", "$x1") $y0
if (@invamount (Blue Gemstone) == 0) goto qk
pause 1
do chat create "Castle 600z"" 2 0 nykie
release b
release d
pause 3
do sit
stop
:qk
lock a
lock b
lock c
lock d
lock e
lock f
do chat create "Out of Order" 2 0 nykie
do sit
stop
}
}
################################################## ##########
################################################## ##########
################################################## ##########
automacro debugA {
console /(.*) \((\d+)\): You gained (.*) zeny./i
priority 1
call {
$i = $.lastMatch2
if ("$i" != "") goto ok
:ok
release all
stop
}
}
automacro debugB {
console /(From: (.*)) : You gained (.*) zeny./i
priority 1
call {
$i = $.lastMatch2
if ("$i" != "") goto ok
:ok
release all
stop
}
}
################################################## ##########
################################################## ##########
################################################## ##########
automacro dealcancelled {
console /^Deal Cancelled$/i
delay 2
call {
do chat modify "Castle 600z" 2 0 nykie
do sit
release all
}
}