| Yoko http://forum.yoko.com.ua/ |
|
| Need help with my script http://forum.yoko.com.ua/viewtopic.php?f=3&t=8037 |
Page 1 of 1 |
| Author: | nightsun [ 2006-06-21 22:56:15 ] |
| Post subject: | Need help with my script |
Greetings, I am new on this coding stuff and i was wondering if you could help me with my script. I don't understand russian so only english advices please. I have a quite bunch of problems because i don't understand those russian manuals. Firstly I can't get my global variables working. I always get function not found -SETGLOBAL/-GETGLOBAL error message. Aren't those supposed to be variables not functions? Secondly what is the unequal marking? I mean opposite to the equal "==" marking used for example in if-sentences. Script is supposed to collect leather from corpses automatically when i walk near them. Leather collecting part is already working quite well but those global variables are giving me a big headache since i need some way to "tell" the script not to start looting already looted corpse again. The script itself is supposed to run in a endless loop. Is there any sites explaining injection scripting related commands, variables etc.. or somekind of guide in english? Any other comments are also welcome. This is my script: sub main() SetGlobal("kom","1") <------ PROBLEM repeat if UO.GetGlobal("kom") == "1" then <--------- THIS RIGHT? if uo.getdistance( 'lastcorpse' ) <2 then Autoloot() else endif else endif until uo.dead() end sub sub AutoLoot() var corpse = uo.getSerial('lastcorpse') ; corpse for looting UO.waittargetobject('lastcorpse') UO.usetype('WSF') ;Type - DAGGER wait(500) uo.useobject(corpse) ; open corpse wait(500) UO.FindType( 'DEG', '-1', 'lastcorpse' ) uo.waittargetobject('finditem') uo.usetype('JAG') wait(500) UO.FindType( 'JJG', '-1', 'lastcorpse' ) while uo.findcount() uo.moveitem('finditem',"0","backpack") wait(500) ; fastloot pause UO.FindType( 'JJG', '-1', 'lastcorpse' ) SetGlobal("kom","2") <-------- NOT WORKING end sub |
|
| Author: | Edred [ 2006-06-21 23:25:38 ] |
| Post subject: | Re: Need help with my script |
nightsun wrote: Code: SetGlobal("kom","1") <------ PROBLEMUO.SetGlobal("kom","1") Quote: Code: if UO.GetGlobal("kom") == "1" then <--------- THIS RIGHT?yes Quote: Code: uo.useobject(corpse) ; open corpse you don't need in serial of corpse, you can use 'lastcorpse': uo.useobject('lastcorpse') Quote: Code: UO.FindType( 'DEG', '-1', 'lastcorpse' ) Correct it: Code: UO.FindType( 'DEG', '-1', 'lastcorpse' ) |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|