|
本帖最後由 dandelion20 於 2016-10-16 11:48 編輯
大大您好
小弟愚鈍 想請問一下
這巨集所寫的是購買藍色礦石
所以可以請大大幫幫忙
怎麼樣設定說先去倉庫看有沒有藍色礦石
不夠再買嗎?
我有寫一點關於取倉 請大大鑑定並修改
如何確定倉庫無此物 再至指定地點購買
萬分感謝!!!
## 變數宣告
automacro Announces {
run-once 1
call {
# 你的聊天室位置、名稱與密碼:
$chatlocation = prontera這是你要執行飛機巨集腳本的地點(這個設定式在普隆德拉)...下面是 XY軸~不知道請在遊戲打 /WHERE 會有座標出現
$locationx = 105
$locationy = 126
$chatname = 古城3000火洞3500岩波4500毀葛5000
$chatpass = CYCUICE
藍色是聊天室名稱,紅色則是密碼
# 你的傳送點位置與金額:
$warplocation1 = glast_01這是地圖名稱請跟上面你聊天室的地圖名稱相符~
$warpprize1 = 3,000這是金額設定,可自行修改
$warplocation2 = yuno_fild03這是地圖名稱請跟上面你聊天室的地圖名稱相符~
$warpprize2 = 3,500這是金額設定,可自行修改
$warplocation3 = ve_fild03這是地圖名稱請跟上面你聊天室的地圖名稱相符~
$warpprize3 = 4,500這是金額設定,可自行修改
$warplocation4 = hugel這是地圖名稱請跟上面你聊天室的地圖名稱相符~
$warpprize4 = 5,000這是金額設定,可自行修改
# 藍色魔力礦石自動補充地點與條件(低於10個購買450個):
$autobuy = geffen_in
$autobuyx = 76
$autobuyy = 173
$needtobuy = 10
$wanttobuy = 450
# 是否採用雙開進行施放輔助狀態(0:否/1:是):
$blessing = 0
$blesser = 獨立施放輔助的角色ID
call Start1
}
}
## 主巨集開始
macro Start1 {
do chat leave
do move $chatlocation $locationx $locationy
pause 1
do conf ignoreAll 1
call Chat
}
automacro Start2 {
console /Buy completed./
run-once 1
call {
do chat leave
do move $chatlocation $locationx $locationy
pause 1
do conf ignoreAll 1
call Chat
}
}
##至倉庫查看有無藍色魔力礦石
getAuto 藍色魔力礦石 {
minAmount 1
maxAmount 500
passive 0
dcOnEmpty 0
}
## 藍色魔力礦石不足, 自動購買藍色魔力礦石
macro Stone {
do ss 29
do move $autobuy $autobuyx $autobuyy
do talk @npc(77 173)
do store
pause 1
do buy @store(藍色魔力礦石) $wanttobuy
pause 1
release all
}
## 開啟聊天室
macro Chat {
if (@invamount(藍色魔力礦石) < $needtobuy) goto buystone
do sit
do look 4
do chat create "$chatname" 2 0 $chatpass
do sit
stop
:buystone
call Stone
stop
}
## 15秒內不取消交易動作
automacro DealProcess1 {
console /(.*) ((.*)) Requests a Deal/
call {
do chat modify "交易進行中..."
do deal
pause 15
do deal no
do chat modify "$chatname"
stop
}
}
## 加入物品取消交易
automacro DealProcess2 {
console /(.*) added Item to Deal: (.*)/
call {
do deal no
do chat modify "$chatname"
release all
}
}
## 判斷交易金額是否正確
automacro DealProcess3 {
console /(.*) added (.*) z to Deal/
call {
# 記錄此玩家的名稱, 交易成功提供輔助狀態
$player = $.lastMatch1
$money = $.lastMatch2
if ($money == $warpprize1) goto checkmember
if ($money == $warpprize2) goto checkmember
if ($money == $warpprize3) goto checkmember
if ($money == $warpprize4) goto checkmember
pause 1
do deal no
do chat modify "$chatname"
stop
:checkmember
## 取消交易
automacro DealProcess4 {
console /Deal Cancelled/
call {
do chat modify "$chatname"
call Chat
}
}
## 實收金額正確, 開啟傳送之陣
automacro DealProcess5 {
console /You gained (.*) zeny/
call {
$money = $.lastMatch1
[
do chat leave
if ( $blessing == 0 ) goto blessself
if ( $blessing == 1 ) goto blesselse
do e 恭喜
do e o
]
call Warp
:blessself
do sp 34 $player 10
do sp 29 $player 10
stop
:blesselse
do pm $blesser $player
stop
}
}
macro Warp {
$before = @invamount(藍色魔力礦石)
$x = @arg("$.pos", 1)
$y = @arg("$.pos", 2)
$newx = @eval($x + @rand(-1,1))
$newy = @eval($y + @rand(-1,-5))
do sl 27 $newx $newy
pause 1
if ($money == $warpprize1) goto warp1
if ($money == $warpprize2) goto warp2
if ($money == $warpprize3) goto warp3
if ($money == $warpprize4) goto warp4
stop
:warp1
do warp $warplocation1
pause 1
call Checkagain
stop
:warp2
do warp $warplocation2
pause 1
call Checkagain
stop
:warp3
do warp $warplocation3
pause 1
call Checkagain
stop
:warp4
do warp $warplocation4
pause 1
call Checkagain
stop
:fail
pause 1
call Failwarp
stop
}
macro Checkagain {
$after = @invamount(藍色魔力礦石)
if ($before == $after) goto fail
pause 1
do sit
:fail
call Failwarp
stop
}
macro Failwarp {
do e 抱歉
call Warp
}
## 進行重置動作
automacro Reset {
console /You are sitting/
call {
if (@invamount(藍色魔力礦石) < $needtobuy) goto buystone
call Chat
stop
:buystone
call Stone
stop
}
} |
|