народ помогите пожалуйста разобраться в скрипте.

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Angel Shadof
Posts: 10
Joined: 2004-11-02 19:43:53
Contact:

народ помогите пожалуйста разобраться в скрипте.

Post by Angel Shadof »

Скрипт рабочий он работает на моем шарде итд итп но почемуто когда я егогружу у меня неработает непонимаю почему вы немоглибы помочь разорбраться.




sub min()
var pathteleport=5
var timeout=3
sub main()
var walktype=1
var digtimes=1
var walkcount=0
var x=uo.getx()
var y=uo.gety()
uo.deletejournal()
mine:
repeat
y=uo.gety()
timeout=0
uo.deletejournal()
uo.usetype(0x0F39)
wait(1500)
uo.lclick(393,300)
repeat
wait(500)
timeout=timeout+500
uo.print(str(timeout))
until uo.injournal("You put") or uo.injournal("There is nothing here to mine for.") or uo.injournal("Try mining") or timeout>9000
if uo.injournal("You put") then
repeat
uo.deletejournal()
uo.print("1")
uo.deletejournal()
uo.exec("usetype 0x0F39")
uo.waittargettile("lasttile")
repeat
timeout=timeout+500
wait (500)
until (timeout>9000) or uo.injournal("You put") or uo.injournal("There is no ore")
timeout=0
until uo.injournal("There is no ore")
endif
until uo.injournal("There is no ore") or uo.injournal("Try mining")
if digtimes > 20 then
goto terminate
endif
timeout=0
walkdown:
if walkcount==2 then
if walktype==1 then
walktype=2
else
walktype=1
endif
walkcount=0
x=uo.getx()
walk:
uo.press(34,2)
repeat
timeout=timeout+500
uo.print(str(timeout))
wait(500)
until timeout > 2000 or uo.getx()>x
timeout=0
if not uo.getx()==x+1 then
goto walk
else
goto mine
endif
endif
uo.print(str(y))
if walktype==1 then
digtimes=digtimes+1
walkso:
y=uo.gety()
uo.press(35,1)
repeat
timeout=timeout+500
uo.print(str(timeout))
wait(500)
until uo.gety()>y or timeout > 2000
timeout=0
if not uo.gety()>y then
uo.print("repeat")
goto walkso
else
walkcount=walkcount+1
y=uo.gety()
endif
uo.print(str(walkcount))
goto mine
endif
if walktype==2 then
digtimes=digtimes+1
walkno:
y=uo.gety()
uo.press(33,1)
repeat
timeout=timeout+500
uo.print(str(timeout))
wait(500)
until uo.gety()<y or timeout > 2000
timeout=0
if not uo.gety()<y then
uo.print("repeat")
goto walkno
else
walkcount=walkcount+1
y=uo.gety()
endif
uo.print(str(walkcount))
goto mine
endif
terminate:
uo.say("stop")
uo.exec("terminate main")
end sub
sub alarm()
uo.deletejournal()
start:
repeat
wait(25)
until uo.injournal("stop") or uo.injournal("stopi")
uo.exec("terminate main")
recall:
timeout=0
if uo.injournal("stopi")then
uo.usetype(0x0F09)
endif
uo.deletejournal()
UO.cast("Recall","homerune")
repeat
timeout=timeout+500
wait(500)
uo.print(str(timeout))
uo.print(str(uo.getx()))
until uo.getx()== 4174 or (timeout>15000)
if not uo.getx()==4174 then
goto recall
UO.usetype (0x097b)
else
uo.say("i am AT HOME!")
endif
UO.findtype(0x19b9)
while UO.findcount()>0
UO.setReceivingcontainer('sunduk')
UO.findtype(0x19b9)
UO.moveitem('finditem',0,'sunduk')
wait (1000)
wend
UO.findtype(0x19b8)
while UO.findcount()>0
UO.setReceivingcontainer('sunduk')
UO.findtype(0x19b8)
UO.moveitem('finditem',0,'sunduk')
wait (1000)
wend
UO.findtype(0x19ba)
while UO.findcount()>0
UO.setReceivingcontainer('sunduk')
UO.findtype(0x19ba)
UO.moveitem('finditem',0,'sunduk')
wait (1000)
wend
timeout=0
uo.print("Teleporting")
if (pathteleport==0) then
uo.print("a")
pathteleport=pathteleport+1
a:
timeout=0
uo.cast("Recall","1")
while uo.getx()==4174 and timeout<5000
timeout=timeout+500
wait(500)
uo.print(str(timeout))
wend
if (uo.getx()==4174) then
goto a
endif
uo.exec("exec main")
goto start
endif
if (pathteleport==1) then
uo.print("b")
pathteleport=pathteleport+1
b:
timeout=0
uo.cast("Recall","2")
while uo.getx()==4174 and timeout<5000
timeout=timeout+500
uo.print(str(timeout))
wait(500)
wend
if (uo.getx()==4174) then
goto b
endif
uo.exec("exec main")
goto start
endif
if (pathteleport==2) then
uo.print("c")
pathteleport=pathteleport+1
c:
timeout=0
uo.cast("Recall","3")
while uo.getx()==4174 and timeout<5000
timeout=timeout+500
wait(500)
uo.print(str(timeout))
wend
if (uo.getx()==4174) then
goto c
endif
uo.exec("exec main")
goto start
endif
if (pathteleport==3) then
uo.print("d")
pathteleport=pathteleport+1
d:
timeout=0
uo.cast("Recall","4")
while uo.getx()==4174 and timeout<5000
timeout=timeout+500
wait(500)
uo.print(str(timeout))
wend
if (uo.getx()==4174) then
goto d
endif
uo.exec("exec main")
goto start
endif
if (pathteleport==4) then
uo.print("e")
pathteleport=0
e:
timeout=0
uo.cast("Recall","5")
while uo.getx()==4174 and timeout<5000
timeout=timeout+500
wait(500)
uo.print(str(timeout))
wend
if (uo.getx()==4174) then
goto e
endif
uo.exec("exec main")
goto start
endif
end sub
KrafteR
Posts: 260
Joined: 2004-07-22 16:07:11
Contact:

Re: народ помогите пожалуйста разобраться в скрипте.

Post by KrafteR »

Angel Shadof wrote:Скрипт рабочий он работает на моем шарде итд итп но почемуто когда я егогружу у меня неработает непонимаю почему вы немоглибы помочь разорбраться.

Ну я думаю тебе вряд ли кто поможет, и не из-за того что здесь злые люди, а просто это нереально! Ты сведенья поточнее оставь, а то очень расплывчиво ты свою прозьбу сформулировал.
666Man666
Junior Expert
Posts: 474
Joined: 2004-11-13 00:43:55
Location: Киберзадроцк
Contact:

Post by 666Man666 »

ага и мене скрипт подкинте на автобота чтобы леато по городам и килял всех лктал и относил домой))))

з.ы... я чуток выивши ц )))
Edred
Expert!
Posts: 2544
Joined: 2004-04-03 17:36:29
Location: Saint-Petersburg

Re: народ помогите пожалуйста разобраться в скрипте.

Post by Edred »

Angel Shadof wrote:Скрипт рабочий он работает на моем шарде итд итп но почемуто когда я егогружу у меня неработает непонимаю почему вы немоглибы помочь разорбраться.


Приведи скрипт в порядок, то есть сделай в нем табуляциями структуру (посмотри как другие скрипты сделаны), запости его сюда как код ([сode]...[/сode]). Тогда может быть кто-то поможет. Хотя в длинных скриптах копаться мало кто будет.

А вообще - во-первых определись что значит "не работает". Что-то не делает? Или что-то делает не так? Локализуй свою проблему. Потом понаставь в соответствующей части скрипта команд UO.Print( "1" ) - цифры везде разные - запусти скрипт и смотри на какой цифре сбоит. Это поможет еще точнее локализовать проблему. Вот тогда, если не разберешься сам (а это увлекательное занятие), тебе здесь многие будут готовы помочь.
Post Reply