Yoko

All sides of Injection
It is currently 2025-12-19 17:45:57

All times are UTC+02:00




Post new topic  Reply to topic  [ 12 posts ] 
Author Message
PostPosted: 2005-01-08 02:56:27 
Offline

Joined: 2005-01-02 03:12:32
Posts: 14
I am trying to make my script for a while, but it fails... And now i tried to make most simple script, which MUST work, but...
Code:
sub Spools()
UO.findtype("Flax Bundle", -1, 0x4006fe59)
uo.grab(30,"finditem")
end sub
A third argument for findtype is a Container on ground. When i run script it says "Items found: 3" (in that box i have 3 items, one of chat is Flax Bundle), but it doesnt move flax bundles to my backpack. It's moving one random item from Container to Container...

Any suggestions?

P.S. You can write answer also in Russian, i understand that language.


Top
   
 Post subject:
PostPosted: 2005-01-08 13:08:23 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
http://yoko.netroof.net/help/

открой раздел Символы, и внимательно прочти все топики, особенно топик Типы


Top
   
 Post subject:
PostPosted: 2005-01-08 14:23:16 
Offline

Joined: 2005-01-02 03:12:32
Posts: 14
Thanks, i already readed it, but i cant understand why that script doesn't work? Please show how it must look to work...

I am good php/sql/bash programmer, but i cant understand that scripts...


Top
   
 Post subject:
PostPosted: 2005-01-08 19:20:44 
Offline

Joined: 2004-10-16 12:30:54
Posts: 46
Location: Argentina
my loot script don't work in 501.06 but work in 41?.?(4A2)
Code:
sub Loot()
var i,n
Dim A[46]
A[1] = 0x0EED ;Gold
A[2] = 0x0F16 ;Amethis
A[3] = 0x0F15 ;citri
A[4] = 0x0F10 ;esmeralda
A[5] = 0x0F21 ;saphiro
A[6] = 0x0f86 ;MandrakeRoot
A[7] = 0x0F13 ;rubi
A[8] = 0x1ce1 ;haed
A[9] = 0x1f14 ;Runa
A[10] = 0x204e ;RobeOfDarkMage
A[11] = 0x0f51 ;Dagger
A[12] = 0x0f7a ;BlackPearl
A[13] = 0x1404 ;WarFork
A[14] = 0x0f84 ;Garlic
A[15] = 0x0f85 ;Ginseng
A[16] = 0x1B76 ;Heater
A[17] = 0x1411 ;PlatemailLegs
A[18] = 0x1415 ;Platemail
A[19] = 0x1410 ;PlatemailArms
A[20] = 0x1414 ;PlatemailGauntlets
A[21] = 0x1412 ;PlatemailHelm
A[22] = 0x1413 ;PlatemailHelm
A[23] = 0x1F40 ;Poison
A[24] = 0x1F4A ;Light
A[25] = 0x0f0c ;Heal
A[26] = 0x0f88 ;Nightshade
A[27] = 0x0E76 ;Bag
A[28] = 0x09B0 ;BeltPouch
A[29] = 0x0E75 ;Backpack
A[30] = 0x0E21 ;bandage
A[31] = 0x1F5F ;FS
A[32] = 0x1F49 ;GH
A[33] = 0x1F4C ;Recall
A[34] = 0x0f8c ;SulphorousAsh
A[35] = 0x0f8d ;SpidersSilk
A[36] = 0x0f7b ;BloodMoss
A[37] = 0x0F7E ;gema
A[38] = 0x1086 ;Bracelet
A[39] = 0x0F2D ;gema
A[40] = 0x0F25 ;gema
A[41] = 0x0F26 ;gema
A[42] = 0x0F3F ;Arrow
A[43] = 0x1F09 ;Ring
A[44] = 0x1EA7 ;arcanegem
A[45] = 0x0F0D ;explo
A[46] = 0x0F19 ;saphire
i = 678
if uo.GetDistance("lastcontainer") < 5 then
FOR n=1 TO 46
uo.findtype(A[n],"-1","lastcontainer")
if uo.findcount() > 0 then
UO.grab(1, "finditem")
Wait(i)
END if
next
else
uo.print("acercate viteh!!")
end if
end sub


Top
   
 Post subject:
PostPosted: 2005-01-08 22:32:01 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
not grab(1 but grab(0


Top
   
 Post subject:
PostPosted: 2005-01-09 01:49:14 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Replace it:

Code:
if uo.findcount() > 0 then 
UO.grab(1, "finditem")
Wait(i)
END if


to

Code:
while uo.findcount() > 0
UO.grab("0", "finditem")
Wait(i)
uo.findtype(A[n],"-1","lastcontainer")
wend


;)


Top
   
 Post subject:
PostPosted: 2005-01-09 03:36:32 
Offline

Joined: 2005-01-02 03:12:32
Posts: 14
and me? :(


Top
   
 Post subject:
PostPosted: 2005-01-09 14:03:48 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
sh wrote:
and me? :(


У тебя все очень запущено...

1. Что такое "Flax Bundle" ? Переменная? Где объявление? Почему через пробел? Объект? Он определен? Почему опять же через пробел?

2. Сериал в поиске лучше писать в кавычках

3. Число в грабе НАДО писать в кавычках


Top
   
 Post subject:
PostPosted: 2005-01-09 22:05:44 
Offline

Joined: 2005-01-02 03:12:32
Posts: 14
Now it is:
Code:
sub Spools()
uo.exec('addobject Flax')
while uo.targeting()
wait(100)
wend
UO.findtype("Flax", -1, 'lastcontainer')
uo.grab("30",'finditem')
end sub
I select Flax Bundle in container and then script moves 30 pieces of random items from lastcontainer. Why it doesn't move only flax?


Top
   
 Post subject:
PostPosted: 2005-01-09 22:13:13 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Я же говорю - все очень запущено. И Йоко тебе не зря написал разобраться в принципах. Без этого - никуда. Ты должен очень хорошо представлять себе чем отличается сериал объекта от его типа. В команде addobject ты определяешь именно конкретный объект. А команда Findtype ищет по ТИПУ объекта.

Вообще, в хелпе у Йоко все очень хорошо разжевано про это, почему ты не можешь этого понять, не знаю. Но почитай еще вот здесь:
http://games.yek.ru/gud4/viewtopic.php?t=36906&start=0


Top
   
 Post subject:
PostPosted: 2005-01-09 23:33:57 
Offline

Joined: 2005-01-02 03:12:32
Posts: 14
Thanks, now i understand.
uo.grab("30","Flax",'lastcontainer')
:)


Top
   
 Post subject:
PostPosted: 2005-01-10 02:05:13 
Offline

Joined: 2005-01-02 03:12:32
Posts: 14
Yea, i`s done - http://yoko.netroof.net/forum/viewtopic ... 3457#13457


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 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:  
Powered by phpBB® Forum Software © phpBB Limited