誰可以幫我加個自動撿物跟限定犯圍內打怪啊....謝謝...
我是腳本白痴= =...請大大幫我改一改吧..謝謝
#[HOTKEY]END
#SetArgsOnCompile
dim sum=1,hp,hp1,hp2,mp,mp1,mp2,xp,pet,pet1,pet2,key,xpkey,hpkey,mpkey,petkey,skill1key,skill2key
function main
SetInputMode(4)
SetTimer("skill1", 100000, true) //施放技能1,每100000=10分鐘,可以自行修改
SetTimer("skill2", 300000, true) //揓技技能2,每300000=30分鐘,可以自行修改
while true
GO()
wend
end function
function GO
KSP_ReadMemory(&H1C0F27C,2,find)
key=GetConfigString("首發攻擊快捷鍵")
if find=0 then
KeyPress("`")
else
while find>0
KeyPress(key)
wait(500)
check() //邊打邊檢查hp、mp、寵hp
KSP_ReadMemory(&H1C0F27C,2,find)
wend
check() //打完再檢查一下hp、mp、寵hp
print("第" &sum & "隻怪")
sum=sum+1
end if
end function
function Check //檢查hp、mp、xp、寵血
KSP_ReadMemory(&H16398A4,2,hp)
KSP_ReadMemory(&H16398C0,2,hp1)
KSP_ReadMemory(&H16398A8,2,mp)
KSP_ReadMemory(&H16398C4,2,mp1)
KSP_ReadMemory(&H1A4E4B0,2,xp)
KSP_ReadMemory(&H1675E28,2,pet)
KSP_ReadMemory(&H1675E2C,2,pet1)
hp2=int(hp/hp1*100)
mp2=int(mp/mp1*100)
pet2=int(pet/pet1*100)
xpkey=GetConfigString("xp技能快捷鍵")
hpkey=GetConfigString("生命藥劑快捷鍵")
mpkey=GetConfigString("魔法藥劑快捷鍵")
petkey=GetConfigString("寵物生命藥劑快捷鍵")
if xp=1000 then //xp滿,自動放
KeyPress(xpkey)
end if
if hp2<80 then //hp低於80%,按補血鍵
KeyPress(hpkey)
end if
if mp2<50 then //hp低於50%,按補mp鍵
KeyPress(mpkey)
end if
if pet2<80 then //寵的血低於80%,按吃藥鍵
KeyPress(petkey)
end if
end function
function skill1 //技能1按鍵
skill1key=GetConfigString("狀態技能1快捷鍵")
KeyPress("8")
end function
function skill2 //技能2按鍵
skill2key=GetConfigString("狀態技能2快捷鍵")
KeyPress("9")
end function |