Official ScriptUO EasyUO Scripts > Scripting Tutorials

Tutorial 2 - Selecting and Using an Item

<< < (2/3) > >>

Cerveza:
And be sure to ask if you have any questions. These were written in a way that should show people how to do things relatively easily (that was my hope).

El_Remo:
For instance. Your instructions here..  A group of 100 bandages will have an Item TYPE of ZJF. One bandage will have a TYPE of ZJF. A stack of 20,000 bandages will have an TYPE of ZJF.

A stack of bandages will have some unique Item ID (something like AQBBJHD). Each bandage will have a different ID.

How do I find out exactly what the unique ID for the stack of bandages would be?
I assume to get the Type of item, there is a database that tells us, but i wasnt sure how to begin to find what the unique ID would be. Im sure this may be elementary but ive no clue where to start.
Most of the other tutorials ive seen seem to go on the premise of the scritor knowing how to find these ID numbers..  Thanks for the follow up..
Or is it even necessary to know the Unique ID?

gimlet:
I think bandages are  ZLF

but one way is to use easyuo and another is to use TM 's program

http://www.scriptuo.com/index.php?topic=188.0;highlight=findinfo

Ultima:
Good Write up Cerveza! Now it makes sense the way you explain it and break it down in laymans terms step by step. This is what I've needed. I'm inspired to have to look through a few more of these tutorials.


What is this function? :


--- Code: ---until #CharGhost = YES
while #CharGhost = YES
--- End code ---

Cerveza:
It's just the end of the loop...

It will repeat whatever is in between the repeat and the until. It will keep cycling everything between those unless the condition set in the UNTIL is met.

Repeat
cerveza rocks
until cerveza doesn't rock

See, that will repeat forever because I will never fail to rock.

Repeat
whatever
until #false

That's another forever repeater. Until will never be #false, so it just keeps looping. Lots of people use that one. But what happens when you die and you don't have mana or whatever to continue the script?

That's why the

repeat
whatever
until #charGhost = YES

So... it will repeat whatever is in the middle until the character becomes a ghost. And then it does the next part...

while #charGhost = YES ; so while you are a ghost it does whatever is in the next section between the {} OR whatever is on the next line if there are no {}
wait 1 ; wait

So if you are a ghost, it goes to the while line and will wait until you are no longer a ghost to continue.

Good point to talk about repeat and while... remind me and I'll wright something up. And I'll mention the evils of the goto....

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version