Yoko

All sides of Injection
It is currently 2026-01-23 00:50:06

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2007-03-13 09:39:07 
Offline

Joined: 2007-01-31 12:15:24
Posts: 25
В этом скрипте у меня проблемка когда приходит время реколится по книге он ее открывает но не реколится помогите как зделать чтоб он реколился


# Продажа торчей. Dragon World #
# You Must Die
# Действие скрипта:
# Стоим перед домом. Указав все переменные, запускаем функцию main.
# Указываем прицелом на рунбуку в которой лежат руны по которым будем летать в магазин для продажи торчей и домой для выкладки денег и добора торчей.
# Скрипт набирает торчей на максимальный вес, летит в магазин-продаёт там все имеющиеся торчи. Как только продал -летит к дому.
# Выкладывает деньги, добирает новые торчи и так по циклу.

var Sunduk='0x401E340D' # Откуда берём торчи, и куда складываем деньги
var gold='0x0EED' # Тип денег
var Torch='0x0F64' # Тип торчей
var MaxWeight=600 # Максимальный вес
var Shop=7 # Номер руны в рунбуке, по которой летим в магазин
var Home=2 # Номер руны в рунбуке, по которой летим домой
var XSunduk=4320 # Координаты по Х перед сундуком
var YSunduk=3780 # Координаты по Y перед сундуком
var ShopList='Torch' # Название Shoplist'a в закладке Main-> Buy/Sell. В окне выбора объектов для продажи вписываем: torch , если Bowcraft =100.0% -вписываем torch crafted " ваш ник ".
var x,y,k
uo.Set('buydelay','3000') # Задержка на продажу. Мне хватало.

sub main()
uo.AddObject('Runebook')
while uo.Targeting()
wait(100)
wend
Start()
end sub

sub Start()
GetTorches()
end sub

sub GetTorches()
while MaxWeight > uo.Weight
uo.FindType(Torch,'-1',Sunduk)
uo.moveitem('finditem','100')
wait(750)
if not uo.FindCount(Torch) then
return
end if
wend
RecallShop()
end sub

sub RecallShop()
x = uo.getX('self')
y = uo.getY('self')
uo.UseObject('Runebook')
wait(1000)
uo.LClick(135,Shop*15+55)
wait(1500)
k = 0
while uo.GetX('self') == X and (k<50)
k = k + 1
wait(1000)
wend
uo.Print('Selling...')
Sell()
end sub

sub Sell()
uo.FindType(Torch,'-1','backpack')
while uo.FindCount()
uo.Sell(ShopList)
wait(3500)
uo.FindType(Torch,'-1','backpack')
wend
RecallHome()
end sub

sub RecallHome()
x = uo.getX('self')
y = uo.getY('self')
uo.UseObject('Runebook')
wait(1000)
uo.LClick(135,Home*15+55)
wait(1500)
k = 0
while uo.GetX('self') == X and (k<50)
k = k + 1
wait(1000)
wend
uo.Print('Get out money...')
GetOutMoney()
end sub

sub GetOutMoney()
GotoXY(XSunduk,YSunduk)
uo.FindType(gold,'-1','backpack')
while uo.FindCount()
uo.moveitem('finditem','all',Sunduk)
wait(750)
uo.FindType(gold,'-1','backpack')
wend
Start()
end sub

sub GotoXY(x,y)
var myX,myY,lastX=0,lastY=0,i,halt=0,z,r=0
for i=1 to 60
myX=uo.getX();
myY=uo.getY();
if LastX==myX and LastY==myY then
halt=halt+1
else
halt=0
end if
if halt>=10 then
if uo.GetDir()==1 then
for z=0 to 8
uo.Press(40)
next
end if
if uo.GetDir()==3 then
for z=0 to 8
uo.Press(37)
next
end if
if uo.GetDir()==5 then
for z=0 to 8
uo.Press(38)
next
end if
if uo.GetDir()==7 then
for z=0 to 8
uo.Press(39)
next
end if
halt=15
end if
if Numb(x-myX)<=1 and Numb(y-myY)<=2 then
return 1
end if
if x<=myX then
if y<=myY then
for z=0 to 3
uo.Press(38)
next
else
for z=0 to 3
uo.Press(37)
next
end if
else
if y<=myY then
for z=0 to 3
uo.Press(39)
next
else
for z=0 to 3
uo.Press(40)
next
end if
end if
lastX=myX
lastY=myY
wait(200)
next
return 0
end sub

sub Numb(num)
if num>=0 then
return num
else
return num*(-1)
end if
end sub


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited