Page 1 of 1

Проблема со скриптом,нужна проверка.

Posted: 2005-01-07 07:26:59
by 123play
Парни в общем выпендривается он :)
Если нетрудно проверьте пожалусто в чем ошибки.


###############################################################
#===---====----===---===---= Mining =---=-=-=-=-=--=-=-=-=-=-=#
###############################################################
;--------------------------- Flags ----------------------------
; 0-Actions flag. If =1 ResidentACT paused script and run self
; 1-Elemental flag
; 2-World save flag
; 99-Pause main script flag
;-------------------- Action for situation --------------------

sub ResidentMSG()
VAR i
UO.DeleteJournal()
;------------------ Clear global var -------------------------
for i=0 to 2
UO.SetEasyUO(i,"0")
next
;-------------------- Check situations -----------------------
while 1==1
If UO.InJournal("OOPS") then
UO.SetJournalLine(UO.InJournal("OOPS")-1,"Fixed")
UO.SetEasyUO(1,"1")
UO.SetEasyUO(0,"1")
endif



If UO.InJournal("World save") then
UO.SetJournalLine(UO.InJournal("World save")-1,"Fixed")
UO.SetEasyUO(2,"1")
UO.SetEasyUO(0,"1")
endif
wait(250)
wend
end sub


sub ResidentACT()

UO.SetEasyUO(99,"0")

while 1==1
if UO.GetEasyUO(0)=="1" then

UO.SetEasyUO(99,"1") ;Pause main script

if UO.GetEasyUO(1)=="1" then
unloadore()
UO.SetEasyUO(1,"0")
endif

if UO.GetEasyUO(2)=="1" then
UO.Click('self')
repeat
wait(500)
until UO.InJournal(":")
UO.SetEasyUO(2,"0")
endif

UO.SetEasyUO(0,"0")
UO.SetEasyUO(99,"0")
endif
wait(250)
wend
end sub


;------------- Pause main script while situations -------------
sub CheckPause()
UO.SetEasyUO(99,"0")
if UO.GetEasyUO(99)=="1" then
repeat
wait(100)
until UO.GetEasyUO(99)=="0"
endif
end sub


;==================== Main mining script ======================
sub mine()
UO.Set('finddistance', '2')
VAR i,TileY,TileX,DirX,DirY,g,j
g=8
DIM rune[8]
UO.Exec('exec alarm') ; alarm when char lose HP
UO.Exec('exec ResidentMSG') ; check messages
UO.Exec('exec ResidentACT') ; action on messages

rune[0]=0x413FB01E
rune[1]=0x40E9596F
rune[2]=0x406D997E
rune[3]=0x40E9577E
rune[4]=0x40E9596D
rune[5]=0x40E74EC7
rune[6]=0x40E9577D
rune[7]=0x406D997C


While NOT UO.Dead()
For j=0 to (g-1)
UO.DeleteJournal()
DirX=1
DirY=1

For TileY=1 to 3
For TileX=1 to 5
ToHide()
CheckPause()
attack()
digit()
walk(1*DirX,0)
next
ToHide()
CheckPause()
digit()
DirX=-1*DirX
walk(0,1*DirY)
next
ToHide()
CheckPause()
digit()
DirY=-1*DirY
unloadore()
CheckPause()
mrecal(rune[j])
CheckPause()
next
wend
end sub


;-------------------- Try to mine under self ------------------
sub digit()
VAR Last=0,LastTimer
VAR MaxWeight=500

if UO.Weight>=MaxWeight then
unloadore()
endif

repeat
attack()
CheckLag() ; deleting journal

uo.grab('0', '~0x19B9') ; 4 and more ore
uo.grab('0', '~0x19B7') ; 1 ore
uo.grab('0', '~0x19BA') ; 2 ore
uo.grab('0', '~0x19B8') ; 3 ore
CheckLag()

UO.WaitTargetSelf()
UO.UseType('0x0F39')
LastTimer=UO.Timer()

repeat
attack()
wait(100)
attack()
until UO.InJournal("You put") OR UO.InJournal("You loosen") OR UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("OOPS") OR LastTimer+150<UO.Timer()
wait(1000)
CheckPause()
attack()
if UO.InJournal('You loosen') then
repeat
attack()
wait(100)
attack()
until UO.InJournal("You put") OR LastTimer+105<UO.Timer()
endif
attack()

until UO.InJournal("There is no") OR UO.InJournal("That is too")
attack()
wait(1000)
attack()
CheckPause()
end sub

sub Adigit()
VAR Last=0,LastTimer
VAR MaxWeight=400

if UO.Weight>=MaxWeight then
unloadore()
endif

repeat
attack()
CheckPause()
UO.WaitTargetSelf()
UO.UseType('0x0F39')
LastTimer=UO.Timer()

repeat
attack()
wait(100)
attack()
until UO.InJournal("You put") OR UO.InJournal("You loosen") OR UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("OOPS") OR LastTimer+150<UO.Timer()
wait(1000)
attack()
CheckPause()

if UO.InJournal('You loosen') then
repeat
attack()
wait(100)
attack()
until UO.InJournal("You put") OR LastTimer+105<UO.Timer()
endif
attack()
until UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("attacking you") OR UO.InJournal("You see")
attack()
wait(1000)
attack()
CheckPause()
end sub


;------------------------- Unload ore -------------------------
sub unloadore()
VAR TempX,TempY,i,Exit
DIM Ore[5]


TempX=UO.GetX()
TempY=UO.GetY()
CheckPause()

mrecal(0x413FB01E)

CheckPause()
ToHide()
CheckPause()

Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore

UO.SetReceivingContainer('0x40F06409') ; storecontainer
wait(500)


For i=0 to 3
Exit=0
repeat
UO.FindType(Ore[i])
CheckLag()

if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
CheckLag()
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
CheckPause()
eat()
CheckPause()
eat()
CheckPause()
eat()
CheckPause()
eat()
wait (1000)
CheckPause()
ToHide()
CheckPause()
end sub

;----------- Morf in Daemon, kill elem and loot him -----------


sub tohide()
attack()
while NOT UO.Hidden()
UO.DeleteJournal()

if UO.Life<100 then
UO.UseType('0x0F09','0x0F09') ; inviz potion
attack()
wait(2000)
attack()
else
attack()
UO.UseSkill('Hiding')
repeat
attack()
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to
hide') OR UO.InJournal('preoccupied')
endif
attack()
UO.WarMode('flip')
wait(100)
UO.Warmode(0)
attack()
wend
end sub


sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')

repeat
wait(50)
until UO.InJournal('backpack')
end sub

sub alarm()
while 1==1
wait(1000)
if UO.Life<100 then
attack()
UO.WaitTargetSelf()
UO.UseType('0x0F39')
gong(1)
endif
wend
end sub

sub walk(dx,dy)
VAR i, walkwait=300
If dx<>0 then
If dx>0 then
If UO.GetDir()<>2 then
UO.Press(34)
wait(walkwait)
CheckPause()
Endif
For i=1 to dx
UO.Press(34)
wait(walkwait)
CheckPause()
next
Else
If UO.GetDir()<>6 then
UO.Press(36)
wait(walkwait)
CheckPause()
Endif
For i=1 to dx*-1
UO.Press(36)
wait(walkwait)
CheckPause()
next
Endif

endif

If dy<>0 then
If dy>0 then
If UO.GetDir()<>4 then
UO.Press(35)
wait(walkwait)
CheckPause()
Endif
For i=1 to dy
UO.Press(35)
wait(walkwait)
CheckPause()
next
Else
If UO.GetDir()<>0 then
UO.Press(33)
wait(walkwait)
CheckPause()
Endif
For i=1 to dy*-1
UO.Press(33)
wait(walkwait)
CheckPause()
next
Endif
endif
wait(1000)
end sub

sub mrecal(rune)
while UO.mana<13
UO.useskill("Medit")
wait (2000)
wend
repeat
CheckLag()
CheckPause()
UO.DeleteJournal()
UO.WaitTargetObject(rune)
UO.Cast('Recal')
wait(10000)
until NOT UO.InJournal("spell fizzles")
end sub

sub eat()
UO.UseType('0x097B') ; any registered type of food рыба
end sub

sub attack()
If (UO.InJournal("attacking you") or UO.InJournal("An") or UO.InJournal("Ex") or UO.InJournal("Rel") or UO.InJournal("In")) then
UO.UseType("0x0f09")
unloadore()
CheckPause()
mrecal(0x400BAB34)
endif

end sub

Re: Проблема со скриптом,нужна проверка.

Posted: 2005-01-07 10:12:59
by Sfagnum
123play wrote:Парни в общем выпендривается он :)
Если нетрудно проверьте пожалусто в чем ошибки.
изверг.
так в чём ошибка то? или хотя бы какая она? или что то не делает?

Телепаты в отпуске(с) Лох Позорный

Re: Проблема со скриптом,нужна проверка.

Posted: 2005-01-07 15:40:06
by 123play
Да хрен его просто выеб.
С боку наэкране пишет хрень типа ключь какойт-то найти неможет.раньше пахал,пол года незанимался этим щас нечего непомню :)

Posted: 2005-01-07 15:58:45
by Savage
Если винду переставлял то регистри надо поправить на предмет изиуо.

Posted: 2005-01-07 17:15:05
by 123play
де регик этот взять ?
дай ссылочку невлом :)

Posted: 2005-01-08 09:16:49
by Savage
Создай сам файл easy.reg на рабочем столе и с блокнотом пихни в него:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\EasyUO]
"*99"="0"


После чего поюзай свое произведение....