ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Neo on August 15, 2011, 12:20:46 PM
-
I just started playing with some lumber scripts...
The thing is, I used this stuff I wrote this morning, and it was working, and now it doesn't work anymore.
I'm setting #ltargetx #ltargety #ltargetz #ltargetkind #ltargettile to the tree, and using the axe, and then event macro 22...
A message appears: You can't do that.
Anyone know what's causing this?
Cheers!
neo
-
I haven't yet given it a shot to write a script, but at first glance people are going to need more information.
1) Where are you when it happens (ie.. at home, bank, near a tree)?
2) Does it happen after you recall to a location (ie no axe in hand)?
3) Does it loop and continue you give this message?
4) Any chance I can see it in action?
Or... Maybe I am wrong and someone here can answer this on the fly ;D
Like I said... I haven't made my first script yet... But I would like to consider myself an avid scripter.
On second thought... you would probably be best to ignore me.. LOL
-
Well, I'm just testing some stuff... So, I stand near a tree, double-click my axe, and target the tree. It starts chopping...
Then I set the ltargetx, y, z, etc to the tree's.
Then I try something like this, standing in the same position:
set #ltargetx %1
set #ltargetz %2
set #ltargety %3
set #ltargetkind %4
set #ltargettile %5
finditem %axe C_ , #charid
set #lobjectid #findid
event macro 17
repeat
wait
until #targcurs = 1
event macro 22
Am I doing something wrong?
Weird thing is that this worked for me this morning (unless I'm going crazy or sth), and now I get a message:
You can't do that...
:(
neo
-
Where did you test?
-
Where did you test?
Malas and Ter Mur so far....
-
Just tested trammel, no luck either!
-
for example
tile Init
for %x -2 2
{
for %y -2 2
{
set %xx #CHARPOSX + %x
set %yy #CHARPOSY + %y
set #LTARGETX %xx
set #LTARGETY %yy
tile Cnt #LTARGETX #LTARGETY 1
tile Get #LTARGETX #LTARGETY #TILECNT 1
if tree in #TILENAME
{
set #LTARGETTILE #TILETYPE
set #LTARGETKIND 3
set #LTARGETZ #TILEZ
set #LOBJECTID %AXE
event Macro 17 0
target 2s
event Macro 22
gosub scan_journal
}
}
}
Oh and yes, tile scaning does not work in ter-mur
-
for example
tile Init
for %x -2 2
{
for %y -2 2
{
set %xx #CHARPOSX + %x
set %yy #CHARPOSY + %y
set #LTARGETX %xx
set #LTARGETY %yy
tile Cnt #LTARGETX #LTARGETY 1
tile Get #LTARGETX #LTARGETY #TILECNT 1
if tree in #TILENAME
{
set #LTARGETTILE #TILETYPE
set #LTARGETKIND 3
set #LTARGETZ #TILEZ
set #LOBJECTID %AXE
event Macro 17 0
target 2s
event Macro 22
gosub scan_journal
}
}
}
Oh and yes, tile scaning does not work in ter-mur
Yeah, I know it doesn't work... But I was manually setting the tile, just to test something, and it's not working... :(
-
Weird...
I just changed the order of this
to this:
set #ltargetx %x
set #ltargety %y
set #ltargetz %z
set #ltargettile %tile
set #ltargetkind %kind
And now it's working! :O
Maybe I had a typo before? Or I dunno... I think I'm spending too much time in front of the computer these days! :)
Thanks for the quick replies guys!
neo
-
Kudos for you for trying to write a script and being able to trouble shoot it. Thata more than I've ever done.
-
Is there a default z value?
-
Is there a default z value?
No, the z value varies too.
neo
-
set targetz to 0
-
set targetz to 0
If you set it generically to 0, it'll work for every tree?
-
set targetz to 0
If you set it generically to 0, it'll work for every tree?
I believe so yes.
-
set targetz to 0
If you set it generically to 0, it'll work for every tree?
I believe so yes.
Nice, didn't know about that... Thanks for the info...
neo