automacro a { console /您現在已在遊戲中/ call { if (@invamount(藍色魔力礦石) == 0) goto qk #當藍色魔力礦石=0時qk= = pause 1 do chat create "泰國3000 中2000 斐1000 商城3500" 2 0 787878 #a-1 b-2 c-3 d-4 = 聊天室名稱 pause 1 do sit stop :qk do c QK do sit stop } } automacro b { console /(.*) ((.*)) 向您要求一個交易/ call { do deal pause 15 #15秒內不動作取消交易 do deal no stop } } automacro c { console /(.*) 加入物品以交易: (.*)/ call { #加入物品取消交易 do deal no stop } } automacro d { console /(.*) 加入 (.*) z 以交易/ call { $a = $.lastMatch2 if ($a = 1) goto bb if ($a = 2) goto bb if ($a = 3) goto bb if ($a = 4) goto bb #$a = ".*" = 3000 2000 1000 3500 pause 1 #當金額!=你販賣的金額取消交易 do deal no stop :bb pause 1 do deal pause 1 do deal #輸入金額10秒內未完成交易者取消交易 pause 10 do deal no stop } } automacro e { console /您獲得了 (.*) zeny/ call { do chat leave $a = $.lastMatch1 if ($a = 1) goto a1 if ($a = 2) goto b2 if ($a = 3) goto c3 if ($a = 4) goto d4 # 假如$a = 傳陣金額 執行下列funtion :a1 call aa1 #執行macro aa1 stop :b2 call bb2 stop :c3 call cc3 stop :d4 call dd4 stop } } macro aa1 { $aa1 = @invamount(藍色魔力礦石) #施放傳送之陣"前"的藍色魔力礦石數量 $x = @arg("$.pos", 1) $y = @arg("$.pos", 2) $x0 = @eval($x - @rand(1,3)) $y0 = @eval($y - @rand(1,3)) do sl 27 $x0 $y0 pause 1 do warp a #a = 泰國 pause 1 $aa2 = @invamount(藍色魔力礦石) #施放傳送之陣"後"的藍色魔力礦石數量 if ($aa1 == $aa2) goto ax #當施放傳送之陣前後藍色魔力礦石相等判定傳送失敗跳至:ax do c a stop :ax pause 1 do c 傳送失敗 do c 再來一次 call axx #執行macro axx stop } } macro axx { call aa1 #執行macro aa1 } #以下類推.. macro bb2 { $bb1 = @invamount(藍色魔力礦石) $x = @arg("$.pos", 1) $y = @arg("$.pos", 2) $x0 = @eval($x - @rand(1,3)) $y0 = @eval($y - @rand(1,3)) do sl 27 $x0 $y0 pause 1 do warp b #b = 中 pause 1 $bb2 = @invamount(藍色魔力礦石) if ($bb1 == $bb2) goto bx do c b stop :bx pause 1 do c 傳送失敗 do c 再來一次 call bxx stop } } macro bxx { call bb2 } macro cc3 { $cc1 = @invamount(藍色魔力礦石) $x = @arg("$.pos", 1) $y = @arg("$.pos", 2) $x0 = @eval($x - @rand(1,3)) $y0 = @eval($y - @rand(1,3)) do sl 27 $x0 $y0 pause 1 do warp c #c = 斐 pause 1 $cc2 = @invamount(藍色魔力礦石) if (cc1 == cc2) goto cx do c c stop :cx pause 1 do c 傳送失敗 do c 再來一次 call cxx stop } } macro cxx { call cc3 } macro dd4 { $dd1 = @invamount(藍色魔力礦石) $x = @arg("$.pos", 1) $y = @arg("$.pos", 2) $x0 = @eval($x - @rand(1,3)) $y0 = @eval($y - @rand(1,3)) do sl 27 $x0 $y0 pause 1 do warp d #d = 商城 pause 1 $cc2 = @invamount(藍色魔力礦石) if ($dd1 == $cc2) goto dx do c d stop :dx pause 1 do c 傳送失敗 do c 再來一次 call dxx stop } } macro dxx { call dd4 } automacro f { console /You 已開啟傳送之陣在 \((.*), (.*)\)/ call { do c @random("謝謝 !!","非常謝謝你 !!","一路順風,遇到颱風 XD !!","註你好運 !!","掰掰 !!") #開啟傳陣後會隨機在普通頻道上打出以上的東西 (可以自己改) if (@invamount (Blue Gemstone) == 0) goto qk pause 3 do chat create "泰國3000 中2000 斐1000 商城3500" 2 0 allenh #藍色魔力石在0個以上就會再次開啟聊天室 a,b,c,d=傳送點 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 "缺貨中~~" 2 0 787878 do sit stop #若藍色魔力石沒了,就會自動開啟聊天室並且關閉其他funtion 聊天室名稱:缺貨中 或自己改 } } ################################################## ########## ####以下可以防止各種情況發生###################### ########## ################################################## ########## 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 "泰國3000 中2000 斐1000 商城3500" 2 0 787878 #a-1 b-2 c-3 d-4 = 聊天室名稱 do sit release all } } |