coolpoting 發表於 Jun 20, 2018 9:09:27 GMT
自從多了用好友點數買體力後現在不能自己花紅寶買能量了
有人知道要改哪裡嗎?
center = Region(150, 80, 1000, 520)
left = Region(0, 0, 800, 720) --左
right = Region(640, 0, 640, 720) --右
upper = Region(0, 0, 1280, 400) --上
low = Region(0, 360, 1280, 360) --下
cornerRU = Region(1000, 0, 280, 100)
upperleft = Region(50, 60, 750, 340)
upperRight = Region(640, 0, 640, 400)
cornerLD = Region(0, 550, 350, 300)
cornerRD = Region(600, 400, 680, 400)
flashRequireRegion = left
if(Task)then flashRequireRegion = right end--地圖模式
get_box = false--判斷是否開寶箱
click(Location(1100, 500))--開始戰鬥閃電
wait(12)
t = Timer()
while(t:check() < 60*20) do--20分鐘內無偵測到停止
if(cornerLD:exists("play.png", 0))then click(Location(240,675)) end --自動戰鬥
if(cornerRU:exists("cancel.png", 0))then cornerRU:click("cancel.png") end --不小心開啟聊天室
if(Task and (exists("ilin.png", 0) or exists("libia.png", 0) or exists("dulander.png", 0)))then click(Location(640,200)) end--過圖模式
--戰鬥失敗是否復活(非打塔)
if(left:exists("defeatedDiamond.png", 0)) then
if(relive) then click(Location(430,460))--復活=>繼續戰鬥
else click(Location(840,500))end --取消
t:set()
end
--玩家等級升級/暫停
if(center:exists("levelup.png", 0) or center:exists("pause.png", 0))then
click(Location(640,200))
click(Location(640,200))
t:set()
end
--戰鬥結束閃電/寶箱/五屬異界龍結束
if(center:exists("victoryFlash.png", 0) or center:exists("box.png", 0) or center:exists("result.png", 0))then
click(Location(640,200))
click(Location(640,200))
get_box = true
if (center:exists("cancel.png", 3)) then--戰鬥完成得到東西
get_box = false
if(not Tower and Sell) then
sellGo = center:find("cancel.png")
click(Location(sellGo:getX() - 340, sellGo:getY() + 400))
click(Location(sellGo:getX() - 230, sellGo:getY() + 421))
click(Location(sellGo:getX() - 230, sellGo:getY() + 340))
else center:click("cancel.png") end
t:set()
end
end
--再來一次閃電
if (flashRequireRegion:exists("smallFlash.png", 0)) then
if (Task and flashRequireRegion:exists("require0.png", 0)) then--最後一關
if(vibrate_) then vibrate(1) end
if(sound) then playMusic("call.ogg",false) end
simpleDialog("Warning", "Reach end of curent area.")
return
end
if (Tower and get_box and not Tower_retry) then --打塔失敗
if(vibrate_) then vibrate(1) end
if(sound) then playMusic("call.ogg",false) end
return
end
flashRequireRegion:existsClick("smallFlash.png")--再來一次閃電
t:set()
end
--========================================異常通知========================================--
if(upperleft:exists("NoFlash_1.png", 0))then
if(cornerRD:exists("worldMap1.png", 0))then if(not BuyFlash_Run(upper, upperRight, left, ToBuyflashes))then return end
elseif(cornerRU:exists(Pattern("bigCancel.png"):similar(0.6), 0))then
if(Tower)then if(not BuyFlash_Run(upper, upperRight, left, ToBuyflashes))then return end--沒體力
else--符文背包Full
if(vibrate_) then vibrate(1) end
if(sound) then playMusic("call.ogg",false) end
return
end
elseif(upperRight:exists("BuyFlashClose.png", 0)) then upperRight:click("BuyFlashClose.png")--6星滿等通知
else click(Location(530,430))--連線不穩通知
end
t:set()
end
--開始戰鬥畫面
if(cornerRD:exists("bigFlash.png", 1))then
if(Train and LevelCheck()) then
if(vibrate_)then vibrate(1) end
if(sound)then playMusic("call.ogg",false) end
dialogInit()--起始一個新的dialog設計。
addTextView("Lv get,how long time?(second)") addEditText("delayTime", "15")
dialogShow("Message")
wait(delayTime * 1)
dialogInit()--起始一個新的dialog設計。
addCheckBox("left_Lv_Check", "left", false) addEditText("left_Lv", "5") addCheckBox("up_Lv_Check", "up", false) addEditText("up_Lv", "5")
newRow()
addCheckBox("down_Lv_Check", "down", false) addEditText("down_Lv", "5") addCheckBox("right_Lv_Check", "right", false) addEditText("right_Lv", "5")
dialogShow("Set")
end
click(Location(1100, 500))
t:set()
end
end
有人知道要改哪裡嗎?
center = Region(150, 80, 1000, 520)
left = Region(0, 0, 800, 720) --左
right = Region(640, 0, 640, 720) --右
upper = Region(0, 0, 1280, 400) --上
low = Region(0, 360, 1280, 360) --下
cornerRU = Region(1000, 0, 280, 100)
upperleft = Region(50, 60, 750, 340)
upperRight = Region(640, 0, 640, 400)
cornerLD = Region(0, 550, 350, 300)
cornerRD = Region(600, 400, 680, 400)
flashRequireRegion = left
if(Task)then flashRequireRegion = right end--地圖模式
get_box = false--判斷是否開寶箱
click(Location(1100, 500))--開始戰鬥閃電
wait(12)
t = Timer()
while(t:check() < 60*20) do--20分鐘內無偵測到停止
if(cornerLD:exists("play.png", 0))then click(Location(240,675)) end --自動戰鬥
if(cornerRU:exists("cancel.png", 0))then cornerRU:click("cancel.png") end --不小心開啟聊天室
if(Task and (exists("ilin.png", 0) or exists("libia.png", 0) or exists("dulander.png", 0)))then click(Location(640,200)) end--過圖模式
--戰鬥失敗是否復活(非打塔)
if(left:exists("defeatedDiamond.png", 0)) then
if(relive) then click(Location(430,460))--復活=>繼續戰鬥
else click(Location(840,500))end --取消
t:set()
end
--玩家等級升級/暫停
if(center:exists("levelup.png", 0) or center:exists("pause.png", 0))then
click(Location(640,200))
click(Location(640,200))
t:set()
end
--戰鬥結束閃電/寶箱/五屬異界龍結束
if(center:exists("victoryFlash.png", 0) or center:exists("box.png", 0) or center:exists("result.png", 0))then
click(Location(640,200))
click(Location(640,200))
get_box = true
if (center:exists("cancel.png", 3)) then--戰鬥完成得到東西
get_box = false
if(not Tower and Sell) then
sellGo = center:find("cancel.png")
click(Location(sellGo:getX() - 340, sellGo:getY() + 400))
click(Location(sellGo:getX() - 230, sellGo:getY() + 421))
click(Location(sellGo:getX() - 230, sellGo:getY() + 340))
else center:click("cancel.png") end
t:set()
end
end
--再來一次閃電
if (flashRequireRegion:exists("smallFlash.png", 0)) then
if (Task and flashRequireRegion:exists("require0.png", 0)) then--最後一關
if(vibrate_) then vibrate(1) end
if(sound) then playMusic("call.ogg",false) end
simpleDialog("Warning", "Reach end of curent area.")
return
end
if (Tower and get_box and not Tower_retry) then --打塔失敗
if(vibrate_) then vibrate(1) end
if(sound) then playMusic("call.ogg",false) end
return
end
flashRequireRegion:existsClick("smallFlash.png")--再來一次閃電
t:set()
end
--========================================異常通知========================================--
if(upperleft:exists("NoFlash_1.png", 0))then
if(cornerRD:exists("worldMap1.png", 0))then if(not BuyFlash_Run(upper, upperRight, left, ToBuyflashes))then return end
elseif(cornerRU:exists(Pattern("bigCancel.png"):similar(0.6), 0))then
if(Tower)then if(not BuyFlash_Run(upper, upperRight, left, ToBuyflashes))then return end--沒體力
else--符文背包Full
if(vibrate_) then vibrate(1) end
if(sound) then playMusic("call.ogg",false) end
return
end
elseif(upperRight:exists("BuyFlashClose.png", 0)) then upperRight:click("BuyFlashClose.png")--6星滿等通知
else click(Location(530,430))--連線不穩通知
end
t:set()
end
--開始戰鬥畫面
if(cornerRD:exists("bigFlash.png", 1))then
if(Train and LevelCheck()) then
if(vibrate_)then vibrate(1) end
if(sound)then playMusic("call.ogg",false) end
dialogInit()--起始一個新的dialog設計。
addTextView("Lv get,how long time?(second)") addEditText("delayTime", "15")
dialogShow("Message")
wait(delayTime * 1)
dialogInit()--起始一個新的dialog設計。
addCheckBox("left_Lv_Check", "left", false) addEditText("left_Lv", "5") addCheckBox("up_Lv_Check", "up", false) addEditText("up_Lv", "5")
newRow()
addCheckBox("down_Lv_Check", "down", false) addEditText("down_Lv", "5") addCheckBox("right_Lv_Check", "right", false) addEditText("right_Lv", "5")
dialogShow("Set")
end
click(Location(1100, 500))
t:set()
end
end