easyuo | Scope (Computer Science) | Control Flow

EasyUO Documentation

EasyUO Documentation

Table of Contents
Preface ............................................................................................................................................... i Introduction............................................................................................................................... i Revision History ....................................................................................................................... i Credits..................................................................................................................................... iv 1. Getting Started .............................................................................................................................1 Introduction...............................................................................................................................1 A simple tutorial .......................................................................................................................1 Installation ................................................................................................................................3 2. Language Reference .....................................................................................................................5 Variables ...................................................................................................................................5 Expressions ...............................................................................................................................6 Operators...................................................................................................................................7 Control Structures...................................................................................................................11 I. Command Reference ..................................................................................................................15 I. Control-flow commands ......................................................................................................17 II. Client commands................................................................................................................29 III. Event commands...............................................................................................................51 IV. Shop Commands...............................................................................................................73 V. Menu Commands...............................................................................................................77 VI. Namespace commands .....................................................................................................99 VII. Miscellaneous commands .............................................................................................107 II. System Variable Reference .....................................................................................................119 VIII. Character Info System Variables..................................................................................121 IX. Status Bar System Variables...........................................................................................129 X. Container Info System Variables .....................................................................................147 XI. Last Action System Variables.........................................................................................157 XII. FindItem System Variables ...........................................................................................173 XIII. Shop Info System Variables.........................................................................................183 XIV. Extended Info System Variables..................................................................................189 XV. Client Info System Variables ........................................................................................199 XVI. Combat Info System Variables ....................................................................................207 XVII. Namespace System Variables.....................................................................................215 XVIII. Miscellaneous System Variables...............................................................................219 XIX. Constants System Variables.........................................................................................237

iii

A. Design Hotkey Manager..........................................................................................................243 B. GNU Free Documentation License.........................................................................................245 PREAMBLE .........................................................................................................................245 APPLICABILITY AND DEFINITIONS .............................................................................245 VERBATIM COPYING .......................................................................................................247 COPYING IN QUANTITY..................................................................................................247 MODIFICATIONS ...............................................................................................................247 COMBINING DOCUMENTS .............................................................................................249 COLLECTIONS OF DOCUMENTS ...................................................................................250 AGGREGATION WITH INDEPENDENT WORKS ..........................................................250 TRANSLATION...................................................................................................................250 TERMINATION ...................................................................................................................251 FUTURE REVISIONS OF THIS LICENSE .......................................................................251

iv

Preface
Introduction
Copyright (C) 2003-2004 Codename Alexandria Project. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This document was created to have an easy-to-update multiple format document solution for EasyUO. The document itself was written in DocBook XML and have been converted to several formats using xsltproc, OpenJade and docbook-utils. The information contained in this manual is intended for people who develop scripts using EasyUO This manual consists primarily of a Command Reference and a System Variable Reference, but also contains a Language Reference. You can download this manual in several formats. The download page can be found at Codename Alexandria (http://codename-alex.sourceforge.net/easyuo-docs)

Revision History
Table 1. EasyUO Documentation Revision History Version 1.0.0 RC1 1.0.0 RC2 1.0.0 RC3 Date June 4th, 2003. June 6th, 2003. June 7th, 2003. Description First public release. Includes fixes from Spewy and Cheffe. More fixes from Spewy. Added Roadkill’s findEnemyArray sub to the #enemyID description. Explained the format of #time and #date. Added str and #strRes. Added getUOTitle and sound.

1.0.0 1.0.1

June 9th, 2003. June 25th, 2003.

i

2003. 1. 2003. Description Added event Property and #property.7 August 16th. nameSpace. #nsType and #dot. Updated event Macro so that Dispel is correct. July 17th. Default state for nameSpace and linesPerCycle commads has been clarified. Description of #true and #false now lists their numerical value.0. #nsName. ii .0. 2003.3 Date July 15th. Fixed a typo in getUOTitle. Added namespace variables chapter. 2003.0.Preface Version 1.4 July 24th. #contPosY and #strRes. 1. Some system variables read and write state were corrected: #contPosX. 2003. Added Imtcb’s examples and fixes to many commands.0. Removed some unnecessary text in shutDown.5 July 28th. Updated sound. Some typos were corrected.0. Added option G_{dist} to findItem. Fixed event Property and #property to include version number. 2003.0.6 July 30th.2 1. Updated #findRep to include the value for invulnerable reputation (yellow). 1. 1. The Variables section was revisited. Added Code Formatting Operators. Updated #lHandID and #rHandID.

#lpc. Updated return to include an expression. menu Set.0. Fixed a typo in deleteJournal. #ER.0.Preface Version 1. Updated the description of menu Get to reflect it working for both combo boxes and edit boxes. #opts. 10th. January 27th. #lLiftedType. menu Shape.0.14 April. 1. Added #result. iii .9 1. menu Check.8 Date September 30th. November 12th. #minDmg. #maxStam. #tileCnt. Updated onHotKey. #cliLogged. Inserted missing initEvents in Something useful. 2004. #PR. 1. 2004. Fixed the syntax of menu Edit Clarified examples within the Namespace commands section. 1. 1. 2004. Added #FR. #tileType. Added event ExMsg. #tileZ. 2003. Fixed a typo in Subs. Added tile. #lLiftedKind. menu Combo. 2004. menu Font Transparent. Description Updated nameSpace. 1. Updated event Macro to reflect reality. Added a note to deleteVar about it being deprecated. #contName.11 October 1st. #maxMana.0.0. Added #jIndex.0. 2003. click. #luck. #CR. 2004.12 February 21st. Fixed #opts from #opt.0. Updated #lHandID and #rHandID example to show the correct usage. Updated return and event PathFind.15 June. #maxFol.0. #sysTime. and #euoVer system variables. menu List. #maxDmg. 2003. ignoreItem.13 March 8th. 16th.10 1.

like the online reference and the old PDF manual. Spewy. misconceptions. 2004. iv .WZA. Description Added new event Macro values for Samurai Empire. and UncleDave. Parts were copied and inspired by previous EasyUO manuals. CEO. Imtcb. the.16 Date October. Examples created by ScriptFellow. 31st.WZA. Cheffe and Imtcb helped fix typos. bugs. Roadkill. Updated the example for #jIndex. Cheffe. Credits This documentation was written by ScriptFellow with the assistance of the.0.Preface Version 1. daemonknight provided an explaination for the fonts of event ExMsg. Kal In Ex provided the event Macro values for Samurai Empire. problems and the likes.

What can EasyUO do? The posibilities in EasyUO are. Simple answer. To get started. but what does that mean? An example: msg #smc Hello Sosaria$ halt This is a very simple example. and see more in the What can EasyUO do? section. only limited by your own imagination. Read on.Chapter 1. pretty much. pretty much. Here are a couple of ideas: • • • • Skill training Crafting Purchasing and anything else you might come up with A simple tutorial What do I need? In this tutorial we assume that you are running the latest Ultima Online client and that you have installed the latest EasyUO update. Getting Started Introduction What is EasyUO? EasyUO is a FREE piece of software. follow these simple guidelines: 1 . that enables you to write scripts that makes your characters in Ultima Online do. anything possible. The possibilities are endless and are really only limited by your imagination.

It consists of 6-8 letters. Start your Ultima Online client (Remeber it only works with the 2D client). 2. 3. Make sure you have the correct EasyUO version for the current client version. Open the mainpack by double clicking it in your paperdoll. Log in with a character. be sure to edit it where noted: initEvents 2 . Make sure you have the variable view open. calculate a new y coordinate based on our current position set %newY #charPosY + 2 . We will move the character using the move command: . calculate a new x coordinate based on our current position set %newX #charPosX + 2 . Getting Started 1. or type in the following program: msg #smc Hello there!$ halt Now press the Run icon or press F9 inside the EasyUO program. move the character to the new position move %newX %newY 0 10s halt Now we are going to open a pack using some of the event commands. 4. we need to identify the ID of your pack: 1. 4. That’s your packs ID. 2. Write down the value that’s next to #LOBJECTID. Your character will now whisper: "Hello there!". First. Your first EasyUO script Copy and Paste. Find the #LOBJECTID variable in the list. Start the EasyUO program.Chapter 1. Press Ctrl-R or choose View|Variables|Show. 3. Something useful Now we are going to try and do something more useful. Then copy and paste this script into EasyUO.

assign your pack’s ID to the last object id system variable set #lObjectID %pack . Download the zipped file from the EasyUO site (http://www. Installation Installation of EasyUO is extremely simple. Then simply run the EasyUO. Getting Started . You can also find other examples on the easyuo. 3 .easyuo.easyuo.com) website.exe file. the id of your pack. run UO’s client macro for "Use Last Object" event Macro 17 halt What’s next? With what you know now you should be able to understand most of the manual and also the various example scripts available in the example archives.com (http://www. REMEMBER! EasyUO only works with the 2D client.Chapter 1. change it to the value you wrote down set %pack XYZ .com) and unzip it to whatever directory you prefer.

Chapter 1. Getting Started 4 .

Persistant variables with an asteriks sign and System variables with an hash sign. Language Reference Variables Basics Variables in Easy UO come in four types.Chapter 2. Namespace variables visibility is affected by the nameSpace command. outputs "JOE JOE" set %4bank not_yet set %_4bank not_yet . Namespace variable name is case insensitive. Variable names follow the same rules as other labels in EasyUO. valid. Persistent Variables Persistent variables in EasyUO are represented by a asteriks sign (*) followed by a number between 1 and 1000 (both inclusive). Repectively Standard variables start with a percent sign. or underscores. Namespace Variables and Scope Namespace variables in EasyUO are represented by an exclamation mark (!) followed by the name of the variable. Namespace variables within a global namespace can be accessed by all scripts running in the same instance of EasyUO (not yet available). Standard. Namespace. The type of a variable is defined by its first character. set %var Bob set %Var Joe msg %var %Var . Namespace variables with an exclamation mark. Namespace variables within a local namespace can only be accessed by the current script. starts with an underscore Standard Variables Standard variables in EasyUO are represented by a percent sign (%) followed by the name of the variable. 5 . numbers. followed by any number of letters. The variable name is case insensitive. A valid variable name starts with a letter or underscore. starts with a number . Persistent and System. invalid.

System Variables are not saved by EasyUO upon exit. Scope is defined by using the nameSpace command. Persistent Variables are stored in the registry and not cleared when EasyUO exits. Persistent variables are stored in the registry under the key HKEY_CURRENT_USER\Software\EasyUO. Scope is typically defined by the current Ultima Online instance for the current script running. System variables are all described in detail in the System Variable Reference. Language Reference Persistent variables are shared between all instances of EasyUO running on the computer. System Variables System variables in EasyUO are represented by an hash sign (#) followed by a descriptive text. Namespace Variables are cleared when EasyUO exits. System variable name is case insensitive. Here is an explaination of how it works: Table 2-1.Chapter 2. A Global namespace is accessible to all scripts running in the same EasyUO instance (not yet available). Variable Scope The different variable types have different scope depending on different things. EasyUO Variables Type Standard Scope Scope is limited to the current script running. Standard Variables are cleared when EasyUO exits. Namespace Persistent System 6 . A Local namespace is accessible to the current script running only. Scope is limited to all scripts running on the same computer.

Remainder of %a divided by %b.Chapter 2. 7 . They can be used to create relatively advanced integer mathematics. Product of %a and %b. Language Reference Expressions Expressions are important building blocks in an EasyUO script. set %var 2 + 2 Operators Arithmetic Operators Remember basic arithmetic from school? These work just like those. allow you to compare two values. Table 2-3. Comparison Operators Comparison operators. #true if %a is not equal to %b. #true if %a is less than %b. Difference of %a and %b. Table 2-2.%b %a * %b %a / %b %a % %b Name Addition Subtraction Multiplication Division Modulo Result Sum of %a and %b. Arithmetic Operators Example %a + %b %a . Comparison Operators Example %a = %b %a <> %b %a < %b %a > %b Name Equal Not equal Less than Greater than Result #true if %a is equal to %b. #true if %a is greater than %b. Quotient of %a and %b. as their name implies. An expression can be a simple constant value or it can be a more advanced mathematical expression.

Chapter 2. Language Reference

Example %a <= %b %a >= %b %a in %b %a notIn %b

Name Less than or equal to Greater than or equal to Contained In Not contained in

Result
#true if %a is less than or

equal to %b.
#true if %a is greater than or

equal to %b.
#true if %a is a sub string in

%b.
#true if %a is not a sub string

in %b. The result will always be #false if invalid operands are used, e.g. "if hello > 33". With this you could also find out if a variable contains a valid number:
set %cnt invalid if ! ( %cnt > 0 || %cnt < 1 ) set %cnt 0 set %cnt %cnt + 1

Code Formatting Operators
Table 2-4. Code Formatting Operators Example + Name line concatenation Result (Must be used as the first operator on a line, except white space) Concatenates the current line to the previous line, so that EasyUO sees it as one long line.

display ok This + is + all + on + one + line.$ halt

8

Chapter 2. Language Reference

Logical Operators
Table 2-5. Logical Operators Example %a && %b %a || %b ! %a Name And Or Not Result
#true if both %a and %b are #true. #true if either %a or %b is #true. #true if %a is not #true

String Operators
Table 2-6. String Operators Example , Name concatenation Result Returns a concatenation of the left and the right arguments.

Array Operators
There is only one array operator in the EasyUO scripting language. The dot operator:
initEvents set %a1 10 set %a2 20 set %a3 40 for %i 1 3 { ; This sets the variable %a to the content of the %a[%i] set %a %a . %i event SysMessage %a }

Precedence and associativity
In an expression that contains multiple operators, EasyUO uses a number of rules to decide the order in whiche operators are evaluated. The first and most important rule is called operator precedence. Operators in an expression that higher precedence are executed before operators with

9

Chapter 2. Language Reference

lower precedence. For example multiplication has a higher precedence than addition. In the expression 2 + 3 * 4, the multiplication is done before the addition, producing a result of 14. If consecutive operators in an expression have the same precedence, a rule called associativity is used to decide the order in which those operators are evaluated. An operator can be left-associative, right-associative, or non-associative:

Left-associative operators of the same precedence are evaluated in order from left to right. For example, adition and substraction have the same precedence and they are left associative. In the expression 10 - 4 + 2, the substraction is done first because it is to the left of the addition, producing a value of 8. Right-associative operators of the same precedence are evaluated in order from right to left. A non-associative operator cannot be combined with other operators of the same precedence.

• •

Table 2-7. Operator precedence and associativity Precedence 1a 2a 3 4 5 6 7 8 9 10 Operator . , () - (unary) ! */% +< > <= >= in notIn = <> && || Associativity right-associative left-associative non-associative right-associative left-associative left-associative left-associative left-associative left-associative left-associative

Notes: a. Note about the dot (array operator) and comma (concatenation) operators: These operators have the highest precedence. They are special for they are evaluated before everything else (including commands). This property enable their use in any context like this:
dis . play yes , no ok h , a , l , t

Examples:
set %r 5 + 3 * 2 ; 5 + ( 3 * 2 ) = 11 set %r 8 - 3 - 2 ; ( 8 - 3 ) - 2 = 3 set %r 1 + 2 * 2 ; 1 + ( 2 * 2 ) = 5

10

Chapter 2. Language Reference

set %r 1 + 2 * 2 * 4 ; 1 + ( ( 2 * 2 ) * 4 ) = 17 set %r ( 1 + 2 ) * 2 * 4 ; ( ( 1 + 2 ) * 2 ) * 4 = 24 set %a 3 set %z3 8 ; z[a] set %w8 1337 ; w[z[a]] set %euo %w . %z . %a display ok %euo halt

Control Structures
if
The if construct is one of the most important feature of many languages, the EasyUO scripting language included. It allows for conditional execution of code fragments. The basic syntax of the command is:
if ( expression ) statement

As described in the section about expressions expr is evaluated to its boolean value. If it evaluates to #true the statement will be executed. The following code fragment will display ’a is bigger than b’ if %a is bigger than %b:
initEvents set %a 1 set %b 0 if %a > %b event SysMessage a is bigger than b

Often you would want to have more than one statement executed conditionally. Of course, there is no need to wrap each statement in an if clause. Instead, you can group several statements into a statement group. For example, this code would display a is bigger than b if %a is bigger than %b, and would then assign the value of %a into %b:
initEvents set %a 10 set %b 2 if %a > %b { event SysMessage a is bigger than b

11

Chapter 2. Language Reference

set %b %a }

if statements can be nested indefinitely within other if statements, which provides you with complete flexibility for conditional execution of the various parts of your script.

else
Often you would want to execute a statement if a certain condition is met, and a different statement if the condition is not met. This is what else is for. else extends an if statement to execute a statement in case the expression in the if statement evaluates to #false. For example, the following code would display a is bigger than b if %a is bigger than %b, and a is NOT bigger than b otherwise:
initEvents set %a 10 set %b 20 if %a > %b { event SysMessage a is bigger than b } else { event SysMessage a is NOT bigger than b } Note: Right now it is not possible to nest if commands and use else. Only one if, if you are using else.

for
The for loop is a loop that counts a variable either up or down.
for variable from_value to_value { statement }

The loop starts by assigning the from_value to the variable, runs the loop. Then it either increments or decrements, depening on which way the loop is going, running the loop for each value.
Note: At the moment, you must ALWAYS use brackets with FOR.

12

%1. As all variables are in the global scope. goto label_name 13 . a number of script lines and ends with a return statement.Chapter 2. A basic sub definition starts with a sub statement followed by the subs name (sub names are case insensitive). that will make your scripts more logically structured. Currently. easier to read. Subs are an important feature of the EasyUO script. return goto The goto command moves the execution to another part of the script.. %2. will be overwritten if you call another sub from inside a sub. Language Reference Subs The term sub is short for subroutine. inline comments don’t work with the sub command (this’ll get fixed in a future update). The variable %0 holds the number of parameters passed. Note: Don’t GOTO out of a sub. They will be transfered in the variables %1. sub testSub . return The return command transfers the execution back to where the sub was called using gosub. the %0. The destination point is given by a label. and will make you have to write less code. The variable %0 holds the number of parameters passed. Always use return! EasyUO will probably not crash but it is VERY bad programming style. %2.. and so on. %2. gosub sub_name Parameters can be added after the sub name. gosub The gosub command transfers the execution to a sub with the name given by the parameter. and so on.. return If parameters were added to the calling gosub command they will be present in the variables %1.

label_name: 14 . Language Reference Labels A label specifies a point in the code where you can goto to.Chapter 2.

Command Reference .I.

.

Control-flow commands .I.

.

txt recall %runebookid %runenum halt See Also exit cmpPix Name cmpPix — Compares a current pixel to a previously saved pixel.txt Example call subs. Therefore.call Name call — Transfers execution to another script file Synopsis call {file} [parameter. 19 .. wrong: C:\My Documents\blabla.txt correct: C:\MyDocu~1\blabla. Use the DOS short filename syntax to get around this problem. Note: Right now EasyUO doesn’t really support strings.] Description The call command will transfer execution to another script.. It will run the script until it meets the exit command or the end of the file. CALL won’t work if the path to a file contains any spaces.

. } Description The cmpPix command compares the pixel given by {number} previously saved with savePix command.sure your mouse cursor is not over the .Control-flow commands Synopsis cmpPix {number} [[[t] | [f]] | {[t] | [f]} {lines}] . The client will . If pixel does not compare to the previously saved pixel the statement or statement block is executed.Quit button (upper right corner) .Start the script and move your mouse .. or cmpPix {number} [[t] | [f]] { ...over the Quit button.close even if you don’t make a click. Example .Go to the client login screen and make . Table 1. savePix 580 13 1 comparePixelAgain: cmpPix 1 f 2 key F4 Alt halt 20 . cmpPix options Option t f Description If pixel compares to the previously saved pixel the statement or statement block is executed. If it evaluates to either true or false (given by the option) it will execute the next statement or statement block.

Control-flow commands goto comparePixelAgain See Also savePix. If it’s called from inside a script that was called using call it will resume execution from the line under the call statement. Example msg %pet %command $ if %pet = all exit msg %pet follow me $ See Also call 21 . the script will start over. If the exit is used from the main script. #pixCol exit Name exit — Stops the execution of the current script Synopsis exit Description exit will stop the execution of the current script.

. 22 . until it reaches the ending number. there after for each loop it either increments or decrements the variable. } Description The for command controls a loop that iterates a variable over a range of numbers (both up or down works). The loop starts assigning the variable with the starting number. Example for %i 1 20 { msg %i $ wait 10 } gosub Name gosub — Transfers execution to the matching sub..Control-flow commands for Name for — Creates a counting loop Synopsis for {variable} {start} {end} { .

then it returns to where it was called. and executes from the next line.Control-flow commands Synopsis gosub {sub name} [parameters. Synopsis goto {label name} Description The goto command moves the execution to another part of the script.. Example gosub gosub gosub gusub gosub halt Mine RecallHome GoInside Smelt PutInChest See Also return.] Description The gosub command transfers execution to sub with the name given (Read about subs). The destination point is given by a label. It will run the script until it meets the return. 23 . Subs goto Name goto — Moves execution to another part of the script given by a label..

Note: Don’t GOTO out of a sub. stop processing if #findKind = -1 goto done .Control-flow commands Note: Currently. do something to the item goto findAgain done: halt See Also Control Structures. inline comments don’t work with labels (this’ll get fixed in a future update). Always use return! EasyUO will probably not crash but it is VERY bad programming style. if there’s no more. Labels 24 . ignore it if it’s on the ground if #findKind = 1 { ignoreItem #findID goto findagain } . find an item by it’s type findItem XML . Example findAgain: .

See Also Control Structures. Synopsis halt Description The halt command ends the execution of the script. This command does exactly the same as stop. stop if Name if — Executes code based on the evaluation of an expression.Control-flow commands halt Name halt — Ends the script. The script cannot be restarted... Synopsis if {expression} [lines] . } 25 .. or if {expression} { ..

Please refill. the code-block is not evaluated. Control Structures pause Name pause — Temporarily stops the execution of the current script. Example findItem XML if #findKind = -1 { event SysMessage You are out of XML’s. If the expression evaluates to true. if the expression evaluates to false. Synopsis pause Description The pause command will stop the execution of the current script. See Also Expressions. pause } 26 . the code-block is evaluated.Control-flow commands Description The if command executes a block of code. but it can be resumed by pressing the "Play" button. depending on the evaluation of an expression.

.. Example gosub testSomething . #result stop Name stop — Ends the script.Control-flow commands return Name return [ expression ] — Returns from a sub. 27 .. return %a * %b See Also gosub. this line will be executed after return msg #result $ . halt sub testSomething .. If an expression is given the #result system variable is set to the result. Synopsis return [expression] Description The return command returns you from a sub to the line after the gosub that called the sub.

The script cannot be restarted. This command does exactly the same as halt. halt 28 .Control-flow commands Synopsis stop Description The stop command ends the execution of the script. See Also Control Structures.

II. Client commands .

.

Example chooseSkill mage if #skill < 700 { msg You don’t have enough magery $ halt } .chooseSkill Name chooseSkill — Reads the current skill value/lock status for a specific skill Synopsis chooseSkill {skill name} ["real"] Description The chooseSkill command reads the skill value for the specified skill and places the value into the #skill system variable. with the exception of animal lore (ANIL) and stealth (STLT). The current lock status is placed in the #skillLock system variable and the current skill cap is placed in the #skillCap system variable.. See Also #skill. #skillLock 31 .. #skillCap. The skill name is the first four characters of the actual skill name.

Note: Using the "Don’t Move Cursor" option can make the double clicking fail randomly. 32 . Synopsis click {X-coordinate} {Y-coordinate} [Modifiers] Description The click command mimics a click of the mouse in a specific position on the screen. Table 1. event Drag supports dragging an object by its ID instead.42 (build 7c)) Nothing (Just moves the cursor) Drop Right Click Multiple Fast Clicks Note: Using the drag and drop clicks is an obsolete way to move an object. Note: From version 1.Client commands click Name click — Clicks at a specific position in the UO client. It is much more reliable.42 (build 7c)) Fast Click Drag Move Cursor (New from 1.43 (build 7c) click now accepts multiple modifiers. click command options Option d dmc f g mc n p r x {count} Description Double Click Don’t Move Cursor (New from 1.

Synopsis contPos {X-Coordinate} {Y-Coordinate} Description The contPos command moves the currently active topmost gump to the coordinates specified. Example msg bank $ wait 20 contpos 10 10 halt See Also nextCPos. #nextCPosY 33 .Client commands Example . #contPosX. #nextCPosX. #contPosY. close open crafting gump click 150 150 r See Also event Drag contPos Name contPos — Moves the active topmost gump to a new position.

The very perceptive reader might be asking himself/herself why you cannot just specify the line number as a parameter of deleteJournal. As the For loop proceeds it will find the other two "Hails" and react as intended. The example script finds the first "Hail" on line 3.Client commands deleteJournal Name deleteJournal — Forgets the contents of the journal buffer. imagine that the journal gets two new entries right when script execution is between scanJournal and deleteJournal. Imagine you manage to say "Hail" three times in a very short time. Synopsis deleteJournal Description As of Build 0084 deleteJournal is to be considered obsolete and is only kept for backwards compatibility. 10 lines is a very good value to make sure you don’t miss any new journal text. says "Farewell" and forgets line 3 and everything above (because line 3 was the last line read by scanJournal). That is why deleteJournal determines itself which line is to be ignored. Example for %i 10 1 { scanJournal %i if hail in #journal { 34 . line 1 and 2 get moved up by two lines (because of those two new journal entries) and are now on line 3 and 4 which would then be ignored by "deleteJournal 3". So when the script recognizes the first "Hail" on line 3 and says the "Farewell". The deleteJournal command forgets the contents of the journal from the last read line (inclusive) and everything above so that it cannot be found using scanJournal. To answer that question. You must use deleteJournal to mark the text you have already processed so that it does not get interpreted multiple times. Here is how the example works: Since it happens quite often that several entries get written into the journal between two checks you should scan more than just the first line of the journal.

If an index is given. Only objects on the ground are returned. monsters. Only objects in the container given by {container id} are returned. and no farther than {dist} are returned. the {index}’th object is returned in the #FIND*. all items of all types will be returned. Synopsis findItem {{id} | {type} | *} [index] [[G] | [G_{dist}] | [C] | [C_{container id}]] Description The findItem command finds objects given by their ID (6-8 letters) or any object type (2-3 letters). Table 1. findItem options Argument C C_{container id} G G_{dist} Description Only objects in containers are returned. #journal. NPCs based on object ID or object type. #jColor findItem Name findItem — Finds items. If * is used instead of an id or an index.Client commands msg Farewell$ deleteJournal } } See Also scanJournal. Only objects on the ground. If no index is given the first object found is returned in the #FIND* variables. 35 . #jIndex. players.

#findID. Synopsis getUOTitle 36 .replace with your own bag . #findX. find a stack of black perl in a specific bag and moves it . #findCnt getUOTitle Name getUOTitle — Gets the text on the title bar of the client. find an dagger on the ground within 2 tiles (pickup distance) . to a specific position findItem KUF C_ . if #findkind <> -1 { event Drag #findID wait 20 click 200 300 p } . #findDist. and picks it up and drops it at a specific position findItem TSF G_2 .Client commands Example initEvents set %regbag XXXXX . #findKind. #findCol. <. #findBagID. #findY. #findRep. %regbag if #findkind <> -1 { event Drag #findID wait 20 click 200 300 p } See Also ignoreItem. #findZ. #findType. #findStack.

See Also setUOTitle.38) The getUOTitle command retrieves the title of the UO client. #strRes hideItem Name hideItem — Removes an items graphic from the client.Client commands Description (Added in 1. This will hide the item returned by they findItem command hideItem #findId ignoreItem Name ignoreItem — Removes items from the list searched by findItem. Synopsis hideItem {id} Description The hideItem command removes a specific items graphic from the client. Only items on the ground can be hidden. The title is returned in the system variable #strRes. it does NOTHING on the server. It can be used to unclutter things. Example findItem ABC . 37 .

Example . If no list number is given.42 (build 77) a list of ID’s separated by underscores can now be used with ignoreItem. Nothing will be found 38 . is the ability to reset one list. There are different lists of ignored items. . If an items id is added to any list. This script will demonstrate how ignoreItem can be used. . msg #SMC Use a dagger and target an NPC$ wait 3s msg #SMC (Press play to continue) pause set %npc1 #lTargetID msg #SMC Use a dagger and target another NPC$ wait 3s msg #SMC (Press play to continue) pause set %npc2 #lTargetID ignoreItem %npc1 1 ignoreItem %npc2 2 . Note: From version 1.Client commands Synopsis ignoreItem {{id} | {id-list} | {type} | {type-list} | {"reset"}} [list] Description The ignoreItem command removes specific items from the list of items searched by findItem. while still keeping some other items ignored. go to a shop and follow the instructions. it will not be returned from subsequent calls to findItem. . If reset is given with a list number. it is the global list. The idea behind this. IgnoreItem. Press start. only the specific list is cleared. If the option reset is given.txt . all previously ignored items will be returned on the list.

Client commands

findItem msg #SMC findItem msg #SMC

%npc1 1: #findID $ %npc2 2: #findID $

ignoreItem reset 1 ; NPC 1 will be found findItem %npc1 msg #SMC 1: #findID $ findItem %npc2 msg #SMC 2: #findID $ ignoreItem %npc1 1 ignoreItem reset 2 ; NPC 2 will be found findItem %npc1 msg #SMC 1: #findID $ findItem %npc2 msg #SMC 2: #findID $ halt

See Also
findItem

key
Name
key — Sends a key-stroke to the client.

Synopsis
key {key-specifier} [[ alt ] | [ ctrl ] | [ shift ]]

39

Client commands

Description
The key command sends a keystroke of your choice to the client. The key-specifier can either be A-Z, 0-9, F1-F12 and ESC, BACK, TAB, ENTER, PAUSE, CAPSLOCK, SPACE, PGDN, PGUP, END, HOME, LEFT, RIGHT, UP, DOWN, PRNSCR, INSERT, DELETE, NUMLOCK or SCROLLLOCK.
Note: If you are running more than one client, the modifier key (alt, control, shift) can sometimes not work as its supposed to.

Example
; This will hold the ALT key down and press the F4 key. key F4 ALT

move
Name
move — Moves the character to a specified location.

Synopsis
move {X-Coordinate} {Y-Coordinate} [tolerance] [timeout]

Description
The move command moves the character to a specified position. No pathfinding is done, so you should probably use event PathFind instead.
Note: Please note that if you are using UOAssist, you need to make sure these keys are not assigned to anything: Cursor Up, Cursor Down, Cursor Left, Cursor Right, Home, End, Page Up and Page Down. EasyUO uses these keys to move your character.

40

Client commands

Example
; This will attempt to get within 2 tiles of location 1234 1234. ; If it does not get there within 3 seconds it will give up. ; The closest it will get is 2 tiles away, lower that arguement to get closer. move 1234 1234 2 3s

See Also
event PathFind, #charPosX, #charPosY, #charPosZ

msg
Name
msg — Sends a string to the client as keystrokes.

Synopsis
msg {message}

Description
The msg command sends a series of key-strokes to the client. The ’$’ sign denotes carriage return.

Example
initEvents ; Locks Last Target Down msg I wish to lock this down$ target 5s event Macro 22 halt

41

Client commands

nextCPos
Name
nextCPos — Denotes where the next opened container/gump will open.

Synopsis
nextCPos {X-coordinate} {Y-coordinate}

Description
The nextCPos sets the position where the next container/gump will open at.
Note: The "Offset interface windows rather than perfectly stacking them" option, in Interface options (Mouse Icon) must be turned on for this to work.

Example
nextCPos 10 10 wait 20 msg bank $ halt

See Also
contPos, #contPosX, #contPosY, #nextCPosX, #nextCPosY

onHotKey
Name
onHotKey — Performs a line of code if a specific key is pressed.

42

Client commands

Synopsis
onHotKey {key-specifier] [[alt] | [ctrl] | [shift]]

Description
The onHotKey command performs the following line of code (brackets does NOT work) when a certain key is pressed.
Note: From version 1.42 (build 77) onHotKey supports brackets.

The key-specifier can either be A-Z, 0-9, F1-F12 and ESC, BACK, TAB, ENTER, PAUSE, CAPSLOCK, SPACE, PGDN, PGUP, END, HOME, LEFT, RIGHT, UP, DOWN, PRNSCR, INSERT, DELETE, NUMLOCK or SCROLLLOCK.
Note: The code is only executed when the parser passes it, if you want a key-press to perform a certain action you have to make a loop. See the example.

Example
keyloop: onHotKey F1 gosub F1 onHotKey F2 gosub F2 goto keyloop sub F1 msg #SMC You pressed F1.$ return sub F2 msg #SMC You pressed F2.$ return

See Also
key, gosub, goto

43

The color is also saved to #pixCol. savePix #cursX #cursY 1 See Also cmpPix.Client commands savePix Name savePix — Saves the color of a pixel in a specified location. Synopsis setUOTitle {title} 44 . Example . the number 1 pixel slot to be used with the cmpPix command. This will save the color on the screen where your cursor is into . into the memory slot given by number. Synopsis savePix {X-coordinate] {Y-coordinate] [number] Description The savePix command saves the pixel given by the coordinates. #pixCol setUOTitle Name setUOTitle — Sets the text on the title bar of the client.

2 is the second to the last line and so on. This will set the title of your UO Client window to Easy UO rox your sox! setUOTitle Easy UO rox your sox! See Also getUOTitle scanJournal Name scanJournal — Scans the users journal and stores the string for examination. The system variable #jColor is updated with the line’s color. If the index is 1000 or over it is considered a #jIndex value. 1 is the bottom line. Note: If you are using UOAssist. 45 . Example . The index specifies which line in the journal to use. Synopsis scanJournal {index} Description The scanJournal command scans the users journal and puts the matching string into the #journal system variable. you should turn off the "Use titlebar for display" option on the "Display" tab.Client commands Description The setUOTitle command changes the title bar on the client window.

46 . . Example . Time is either given in miliseconds. #jIndex. Note: For values above 50 ms you should use the command wait..Client commands Example waitForAttack: scanjournal 1 if is_attacking_you in #journal msg guards $ goto waitForAttack See Also deleteJournal.. #jColor sleep Name sleep — Waits a specified amount of time.. Wait for 5 miliseconds sleep 5 . Synopsis sleep {ms} Description The sleep command waits for a specified amount of time. #journal..

Synopsis target {timeout} Description The target command waits for a target cursor to appear. event Sleep target Name target — Waits for a target cursor to appear. If no timeout is given. or 3 seconds passes. target 3s See Also #targCurs 47 . This will pause the script until either the target cursor is displayed. the default timeout is 2 seconds. otherwise . Example . you may miss the target cursor and cause errors in your script. Set the timout just over what you expect the delay to take.Client commands See Also wait. . .

Client commands terminate Name terminate — Terminates the current client. 48 . automatically save your work! terminate euo See Also uoXL. Synopsis terminate [{"uo"} | {"euo"}] Description The terminate command terminates the current client or the current EasyUO instance. Value uo (default) euo Description Closes the current UO client Closes the current EasyUO instance. #cliCnt uoXL Name uoXL — Start/manage clients. terminate Options. Table 1. Example . If the current client is terminated the system variables #cliNr and #cliCnt are updated accordingly. This will cause the script containing this line to close and will NOT . #cliNr.

uoXL Options.Client commands Synopsis uoXL {{"new"} | {"swap"}] Description The uoXL command starts and swaps between open clients. 49 . #cliCnt wait Name wait — Waits a specified amount of time. Value new swap Description Starts a new client Swaps to the next client Example See Also terminate. Table 1. The system variables #cliNr and #cliCnt are updated accordingly. The steps are given with just a number and seconds with an added s to the number. Synopsis wait {time} [random time] Description The wait command waits for a specified amount of time. Time is either given in steps of 50 miliseconds or in seconds. #cliNr.

event Sleep 50 .Client commands Random time addes to the time waited. Wait for 1 second wait 20 . Wait for 2 seconds with a random length of 1 second wait 2s 1s See Also sleep. with a random time between 0 and the random time given. Example . Wait for 5 seconds wait 5s .

Event commands .III.

.

Example initEvents event Drag %ore wait 20 click 100 100 p halt See Also initEvents.event Drag Name event Drag — Drags an object Synopsis event Drag {object id} Description The event Drag command drags an object given by its id. click event ExMsg Name event ExMsg — Shows a message over the object given by the ID. 53 .

Table 1. Big font with white drop shadow. (130). 9 Example initEvents event ExMsg #charID 3 0 Welcome to my world! halt See Also initEvents 54 . ]. (133). Small font with dark edges. Tiny font.Event commands Synopsis event ExMsg {object ID} {font} {color} {message} Description The event ExMsg command shows a message as over the object given by the object ID. (135). _. \. Small font with white drop shadow. Runic font replacing the following: Capital A-Z. Medium font. (132). (134). Tiny font. Small font with recessed look. ExMsg fonts Index 0 1 2 3 4 5 6 7 8 Description Big font with dark edges. The font and color arguments give different fonts and colors to the text. ^. [. Big fancy font. (129). Moon Phases replacing the following: (128).

Table 1. event Macro options Param 1 1 2 3 4 5 5 5 5 5 5 5 5 6 7 8 8 8 8 Param 2 0 0 0 0 0 1 2 3 4 5 6 7 0 0 0 1 2 3 Param 3 ^ ^ ^ ^ Description say emote whisper yell walk North West walk North walk North East walk East walk South East walk South walk South West walk West toggle War/Peace paste open Configuration open Paperdoll open Status open Journal 55 . The second parameter will default to 0.Event commands event Macro Name event Macro — Performs a UO internal macro. Synopsis event Macro {param 1} [param 2] [param 3] Description The event Macro command performs a UO macro. if ommitted.

Event commands Param 1 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 Param 2 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 Param 3 Description open Skills open Spellbook open Chat open Backpack open Overview open Mail open Party Manifest open Party Chat open Necro Spellbook open Paladin Spellbook open Combat Book close Configuration close Paperdoll close Status close Journal close Skills close Spellbook close Chat close Backpack close Overview close Mail close Party Manifest close Party Chat close Necro Spellbook close Paladin Spellbook close Combat Book minimize Configuration minimize Paperdoll minimize Status minimize Journal 56 .

Event commands Param 1 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 Param 2 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Param 3 Description minimize Skills minimize Spellbook minimize Chat minimize Backpack minimize Overview minimize Mail minimize Party Manifest minimize Party Chat minimize Necro Spellbook minimize Paladin Spellbook minimize Combat Book maximize Configuration maximize Paperdoll maximize Status maximize Journal maximize Skills maximize Spellbook maximize Chat maximize Backpack maximize Overview maximize Mail maximize Party Manifest maximize Party Chat maximize Necro Spellbook maximize Paladin Spellbook maximize Combat Book 57 .

Event commands Param 1 12 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 14 15 15 15 Param 2 0 1 2 35 4 6 12 14 15 16 19 21 23 3 46 9 30 22 48 32 33 47 36 38 0 0 1 2 Param 3 Description opendoor use skill Anatomy use skill Animal Lore use skill Animal Taming use skill Arms Lore use skill Begging use skill Cartography use skill Detecting Hidden use skill Discordance use skill Evaluating Intelligence use skill Forensic Evaluation use skill Hiding use skill Inscription use skill Item Identification use skill Meditation use skill Peacemaking use skill Poisoning use skill Provocation use skill Remove Trap use skill Spirit Speak use skill Stealing use skill Stealth use skill Taste Identification use skill Tracking last skill cast spell Clumsy cast spell Create Food cast spell Feeblemind 58 .

Event commands Param 1 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 Param 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Param 3 Description cast spell Heal cast spell Magic Arrow cast spell Night Sight cast spell Reactive Armor cast spell Weaken cast spell Agility cast spell Cunning cast spell Cure cast spell Harm cast spell Magic Trap cast spell Magic Untrap cast spell Protection cast spell Strength cast spell Bless cast spell Fireball cast spell Magic Lock cast spell Poison cast spell Telekinesis cast spell Teleport cast spell Unlock cast spell Wall Of Stone cast spell Arch Cure cast spell Arch Protection cast spell Curse cast spell Fire Field cast spell Greater Heal cast spell Lightning cast spell Mana Drain 59 .

Event commands Param 1 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 Param 2 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 Param 3 Description cast spell Recall cast spell Blade Spirits cast spell Dispel Field cast spell Incognito cast spell Magic Reflection cast spell Mind Blast cast spell Paralyze cast spell Poison Field cast spell Summon Creature cast spell Dispel cast spell Energy Bolt cast spell Explosion cast spell Invisibility cast spell Mark cast spell Mass Curse cast spell Paralyze Field cast spell Reveal cast spell Chain Lightning cast spell Energy Field cast spell Flame Strike cast spell Gate Travel cast spell Mana Vampire cast spell Mass Dispel cast spell Meteor Swarm cast spell Polymorph cast spell Earthquake 60 .

Event commands Param 1 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 Param 2 57 58 59 60 61 62 63 101 102 103 104 105 106 107 108 109 110 111 Param 3 Description cast spell Energy Vortex cast spell Resurrection cast spell Air Elemental cast spell Summon Daemon cast spell Earth Elemental cast spell Fire Elemental cast spell Water Elemental cast spell [N] Animate Dead cast spell [N] Blood Oath cast spell [N] Corpse Skin cast spell [N] Curse Weapon cast spell [N] Evil Omen cast spell [N] Horrific Beast cast spell [N] Lich Form cast spell [N] Mind Rot cast spell [N] Pain Spike cast spell [N] Poison Strike cast spell [N] Strangle 61 .

Event commands Param 1 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 16 17 18 19 20 21 22 Param 2 112 113 114 115 116 201 202 203 204 205 206 207 208 209 210 0 0 0 0 0 0 0 Param 3 Description cast spell [N] Summon Familiar cast spell [N] Vampiric Embrace cast spell [N] Vengeful Spirit cast spell [N] Wither cast spell [N] Wraith Form cast spell [C] Cleanse by Fire cast spell [C] Close Wounds cast spell [C] Consecrate Weapon cast spell [C] Dispel Evil cast spell [C] Divine Fury cast spell [C] Enemy of One cast spell [C] Holy Light cast spell [C] Noble Sacrifice cast spell [C] Remove Curse cast spell [C] Sacred Journey last spell last object bow salute quit game all names last target 62 .

Event commands Param 1 23 24 24 25 26 27 28 29 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 49 49 Param 2 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 Param 3 Description target self arm/disarm Left arm/disarm Right wait for target target next attack last ^ delay circletrans close gumps always run save desktop kill gump open primary ability secondary ability ^ ^ set update range modify update range increase update range decrease update range maximum update range minimum update range default update range update update range enable update range color disable update range color toggle update range color invoke honor virtue invoke sacrifice virtue invoke valor virtue 63 .

Take a look at the example below which mimics the way that the move command works. Synopsis event PathFind {X-Coordinate} {Y-Coordinate} [Z-Coordinate] Description The event PathFind moves you to the position given by the coordinates. event PathFind Name event PathFind — Moves you to a specified position if it is possible. uses a shovel and targets ground at 1000. Note: Please note that your script will keep on executing while the character is moving. it is assumed to be -1. 1000 set #lObjectID %shovel event Macro 17 target 5s event macro 22 halt See Also initEvents.Event commands Example initEvents set #lTargetX 1000 set #lTargetY 1000 set #lTargetKind 3 . If the Z coordinate os omitted. 64 .

Return: %return (#true or #false ) .WZA) . %2 = Y . %5 = timeout (in seconds) .=========================================================== . Purpose: Pathfind to the given coordinates . Author: ScriptFellow (the. Name: pathFind . %4 = tolerance .----------------------------------------------------------sub pathFind set %_x %1 set %_y %2 if %0 <= 2 || %2 = N/A set %_z -1 else set %_z %3 if %0 <= 3 || %3 = N/A set %_tolerance 0 else set %_tolerance %4 if %0 <= 4 set %_endTime #sCnt + 15 else set %_endTime #sCnt + %5 set %return #false deleteJournal scanJournal 2 event PathFind %_x %_y %_z _pathFindScanAgain: scanJournal 1 if pathfinding in #journal goto _pathFindOkay if can’t_get_there in #journal || #sCnt > %_endTime return goto _pathFindScanAgain _pathFindOkay: gosub _pathFindDist %_x %_y %_z #charPosX #charPosY #charPosZ 65 . If you need to move longer you need to break up the path in to several calls.Event commands Note: The event PathFind command only works within one screen. %3 = Z . Parameters: %1 = X . Example .

1 else { if #charDir > 1 && #charDir < 5 set %2 %2 + 1 } click %1 %2 R } return } if #sCnt > %_endTime return goto _pathFindOkay sub _pathFindDist set %1 %1 . %_idx > %return set %return % .1 } if #charDir = 0 || #charDir = 6 set %2 %2 . to be defined sub max set %return %1 for %_idx 2 %0 { if % . %_idx } return 66 .Event commands set %return %return <= %_tolerance if %return { if %_tolerance > 0 { set %1 #cliLeft + #cliXRes / 2 set %2 #cliTop + #cliYRes / 2 if #charDir < 3 set %1 %1 + 1 else { if #charDir > 3 && #charDir < 7 set %1 %1 .%6 abs gosub max %1 %2 %3 return .%4 abs set %2 %2 .%5 abs set %3 %3 .

into the #property variable.39) The event Property command reads the description and properies of an item and places the information in the system variable #property. Synopsis event Property {ID} Description (Added in 1. Each line in the #property variable is seperated by ’$’. findItem ABC event Property #findID See Also #property 67 . This will use the item returned by the findItem command and save . Example .Event commands See Also initEvents. move event Property Name event Property — Reads the property description of an item. the information displayed in game by the property pop-up widow .

Synopsis event SkillLock {skill name} {up | down | locked} Description The event SkillLock command changes the skill lock on the specified skill to either: up. locks armlore event SkillLock armslore locked See Also initEvents. changes magery to down event SkillLock mage down .Event commands event SkillLock Name event SkillLock — Changes the skill locks on the different skills. 68 . chooseSkill. down or locked. #skillLock event Sleep Name event Sleep — Suspends the client for a specified time. Example initEvents .

Event commands Synopsis event Sleep {ms} Description The event Sleep command suspends the client for a specified number of miliseconds. sleep for one minute event Sleep 60000 } . Synopsis event SysMessage {message} 69 .. See Also sleep. but will use 0% CPU time. The client will be completely unresponsive.. wait event SysMessage Name event SysMessage — Outputs text to the client as a system message. Example initEvents if %waitForVendorRespawn = #true { .

70 .Event commands Description The event SysMessage command outputs a message as a system message inside the client. You should only call initEvents once per script. Example initEvents event SysMessage Welcome to EasyUO! halt See Also initEvents. Synopsis initEvents Description The initEvents command initializes all event commands. Note: This command does NOT work unless you have enabled the "Enable Event Sysmessage" configuration option. If it is not run once per script. none of the event commands will function. event ExMsg initEvents Name initEvents — Initializes all event commands.

Event commands See Also event Drag. event Macro. event SkillLock. event SysMessage 71 . event PathFind.

Event commands 72 .

IV. Shop Commands .

.

When it is called it fills all the #shop* system variables with their appropriate infomration. #shopItemPrice. #shopItemName. #shopCnt. Note: Every time you scroll to a new entry.getShopInfo Name getShopInfo — Retrieves information from the client about the currently shown top entry on a shopping gump. See Also setShopItem. Synopsis getShopInfo Description The getShopInfo command retrives information about the currently shown top entry on an open gump. #shopItemMax setShopItem Name setShopItem — Sets the number of items to purchase given by ID. Synopsis setShopItem {ID} {amount} 75 . #shopItemID. you have to call getShopInfo to update the #shop* system variables. #shopItemType. #shopCurPos.

#shopItemType. #shopItemID. This will set the amount to buy of the top item to the total number that . is available to be bought. #shopCnt. The ID is usually gotten from the system variable #shopItemID. #shopItemMax 76 . #shopCurPos. getShopInfo setShopItem #shopItemID #shopItemMax See Also getShopInfo.Shop Commands Description The setShopItem command sets the amount to purchase given by an items ID. Note: The setShopItem command does NOT update the graphics in UO. Example . #shopItemName. The amount is still set though. #shopItemPrice.

V. Menu Commands .

.

menu Font Transparent. menu Set. menu Font Name. menu Show. box as the script runs. menu Font Color. menu Font BGColor. menu Font Size. menu HideEUO. menu GetNum. menu Window Color. This is . useful if you want your script to type something into an edit . Example . This will will choose the menu element called EditBox. menu Window Title. 79 . menu Activate EditBox See Also menu Button. menu Edit. menu List.menu Activate Name menu Activate — Activates a window element in the EasyUO menu window. Synopsis menu Activate {name} Description The menu Activate command activates the window element given by its name. menu Check. menu Font Style. menu Get. #menuRes menu Button Name menu Button — Creates a button at position x/y with specified size on the EasyUO menu window. menu Text. in the EasyUO menu window. menu Font Align. menu Clear. menu Combo menu Delete. menu Window Size. menu Shape. menu Hide.

This will create a button named button_1 in position 10 20 . menu Font Style. menu HideEUO. menu Font Color. menu Shape. menu Font Align. menu GetNum. menu Combo. menu Show. menu Hide. menu Font Transparent. menu Get. menu Check. Example . menu Font Name. Synopsis menu Check { name } { x } { y } { width } { height } { checked } { text } 80 . will say Click me! . The text on the button . menu Button button_1 10 20 50 25 Click me! See Also menu Activate. menu Font Size. you will reference the NAME and not the displayed TEXT. menu Text. menu Window Color. menu Edit. menu Window Size.Menu Commands Synopsis menu Button {name} {x} {y} {width} {height} {text} Description The menu Button command creates a button on the EasyUO menu window at the specified postion with the specified size. menu List. menu Delete. with a width of 50 and hight of 25. menu Set. menu Font BGColor. menu Window Title. #menuRes. menu Clear. #menuButton menu Check Name menu Check — Creates a checkbox at position x/y with specified size on the EasyUO menu window. Note that when refering to this button later in the script .

menu Combo. menu HideEUO. menu Shape. menu Window Color. menu Text. text. menu Window Title 81 . menu Delete. menu Get. menu Font Name. menu Hide.Menu Commands Description (Added in 1. menu Font Color. menu Combo. menu Get. menu Font BGColor. menu Font Style. edit) from the EasyUO menu window. menu Font Name. menu Delete. so you might want to put menu Clear at the top of your script to preserve memory. menu Font Color. menu GetNum. menu Button. menu Font Size. menu Button. menu Clear. menu Font Align. menu Check. See Also menu Activate.42 (build 78)) The menu Check creates a checkbox on the EasyUO menu. menu Font Transparent. button. menu Font BGColor. menu Font Size. menu Font Style. menu Shape. menu Window Size. menu Set. menu Window Color. menu Font Transparent. menu Window Title menu Clear Name menu Clear — Clears all window elements from the EasyUO menu window. menu Edit. menu Window Size. menu Font Align. menu Hide. menu GetNum. See Also menu Activate.e. Note: Stopping your EasyUO script will not clear the current menu. menu List. menu Show. menu Text. menu Show. menu Edit. Synopsis menu Clear Description The menu Clear command clears all window elements (i.

menu Font Name. 82 . menu Text. menu Get. menu Show. menu Font Color. menu Button. menu Font Align. menu Font Style. See Also menu Activate. menu Hide. menu Set. menu Shape. Select defines what entry is currently showing. menu GetNum. menu Edit. menu Clear.Menu Commands menu Combo Name menu Combo — Creates a combobox at position x/y with specified size on the EasyUO menu window or adds entires to the combobox. menu List. menu Delete. menu Font Transparent. menu Window Title menu Delete Name menu Delete — Deletes a window element from the EasyUO menu window. menu Font BGColor. menu Window Color. Synopsis menu Combo ( {"Create"} {name} {x} {y} {width} ) | ( "Add" {name} {text} | {"SELECT"} {name} {index} ) Description (Added in 1. menu HideEUO.41) The menu Combo command creates a combobox at position x/y with specified size on the EasyUO menu window or adds entires to the combobox. menu Font Size. menu Window Size. similar to menu Set. menu Check.

menu HideEUO. menu Button. menu Font Size. menu Font Transparent. menu Text items. menu Get. menu Show. menu Clear. new items over old ones. menu GetNum. menu Window Title menu Edit Name menu Edit — Creates a edit field at position x/y with specified width in the EasyUO menu window.e. This will remove the menu item named button_1 from the current menu .Menu Commands Synopsis menu Delete {name} Description The menu Delete command deletes a window element (i. This is expecially important when using . edit) from the EasyUO window menu. button. menu Font BGColor. menu Set. as they sometimes need to be updated regularly. Synopsis menu Edit {name} {x} {y} {width} {text} 83 . menu Combo. Example . menu Hide. menu Edit. menu Font Style. menu Window Color. menu List. menu Font Color. menu Check. menu Shape. menu Delete button_1 See Also menu Activate. menu Window Size. menu Text. and from memory. text. menu Font Align. menu Font Name. Please use this command and do not just create .

menu HideEUO. menu Window Color. 84 . Synopsis menu Font Align {{left} | {center} | {right}} Description The menu Font Align command sets the alignment of the font used in the EasyUO menu window. menu Font Transparent. will say Change me! . you will reference the NAME and not the displayed TEXT. menu Show. menu Text. menu Set. Example . menu Combo. menu GetNum. The text in the field . menu Font Style. menu Hide. with a width of 50 and hight of 25. menu Font BGColor. menu Delete. menu Font Name. This will create an editable field named edit_1 in position 10 20 . menu Clear. #spc . me! See Also menu Activate. menu Font Size. menu Font Align. #menuButton menu Font Align Name menu Font Align — Changes the font alignment in the EasyUO menu window. Note that when refering to this field later in the script . menu Shape. menu Window Title. menu Check.Menu Commands Description The menu Edit command creates an edit field at the specified postion and with the specified dimensions in the EasyUO window menu. menu Font Color. menu Window Size. menu List. menu Edit edit_1 10 20 150 Change . menu Get. menu Button.

menu List. menu Text. menu HideEUO. menu Get. menu Text. red. menu Combo. menu Edit. menu Button. menu Set. menu Font Size. menu Hide. menu Window Color. menu Font Name. menu Check. menu Font Align. menu Edit.Menu Commands See Also menu Activate. menu Shape. menu Font Style. $aabbcc). menu Set. menu Font Color. btnface or a hexadecial (i. menu Font Color.e. menu Get. menu Font BGColor. menu List. menu Font Transparent. menu Clear. menu Font Style. menu Window Size. menu GetNum. menu Clear. menu Font Size. menu Button. menu Window Title 85 . menu Show. menu Shape. menu HideEUO. menu Font Name. menu Hide. menu Combo. menu Window Size. Synopsis menu Font BGColor {color-descriptor} Description The menu Font BGColor command changes the background color of the font used in the EasyUO menu window. menu Font Transparent. menu Window Title menu Font BGColor Name menu Font BGColor — Changes the font background color in the EasyUO menu window. menu Delete. menu Delete. menu Show. color-descriptor can be a few different things: black. menu GetNum. menu Check. See Also menu Activate. menu Window Color.

$aabbcc). menu Font Size.Menu Commands menu Font Color Name menu Font Color — Changes the font color in the EasyUO menu window. menu Set. menu Button. menu Show. menu Clear. menu Font Transparent. menu Font Align. menu Window Size. menu List. btnface or a hexadecial (i. menu Combo. menu Hide. menu GetNum. See Also menu Activate. menu Font Style. menu Delete. menu Font BGColor. menu Shape. Synopsis menu Font Name {font-descriptor} 86 . color-descriptor can be a few different things: black.e. Synopsis menu Font Color {color-descriptor} Description The menu Font Color command changes the color of the font used in the EasyUO menu window. menu Window Title menu Font Name Name menu Font Name — Changes the font in the EasyUO menu window. menu Text. menu Check. menu Font Name. menu Window Color. menu HideEUO. menu Edit. red. menu Get.

menu Window Size. menu Show. menu Font Align. menu Check. menu Window Size. menu Set. menu Font Color. menu Delete. menu Font BGColor. menu Combo. menu Font Align. menu GetNum.Menu Commands Description The menu Font Name command changes the font used in the EasyUO menu window. menu Edit. menu Shape. menu Clear. menu Delete. menu HideEUO. menu Set. menu Font Name. Synopsis menu Font Size {point-size} Description The menu Font Size command changes the font size used in the EasyUO menu window. menu Window Color. menu Button. menu Hide. menu Check. menu Shape. See Also menu Activate. menu Button. menu Hide. menu List. menu Font Transparent. menu Window Title 87 . menu Window Title menu Font Size Name menu Font Size — Changes the font size in the EasyUO menu window. menu Edit. menu Font BGColor. See Also menu Activate. menu Combo. menu Font Style. menu Clear. menu Window Color. menu HideEUO. menu Font Transparent. menu Get. menu Text. menu Font Color. menu Show. menu List. menu Text. menu GetNum. menu Get. menu Font Size. menu Font Style.

menu HideEUO. menu Delete. menu Set. 88 . menu Font Style Values. menu Clear. Table 1. menu Font Transparent. menu Edit. menu Text. menu Font BGColor. menu Font Color. menu Hide. Synopsis menu Font Style { "b" } | { "i" } | { "u" } | { "s" } Description The menu Font Style command changes the font style used in the EasyUO menu window. menu List. menu Font Size. menu Get. menu Font Align. Value b i u s Description Bold Italics Underline Strikeout See Also menu Activate. menu Font Name.Menu Commands menu Font Style Name menu Font Style — Changes the font style in the EasyUO menu window. menu GetNum. menu Button. menu Window Color. menu Combo. menu Window Title menu Font Transparent Name menu Font Transparent — Sets the transparency of the background color of the font. menu Shape. menu Show. menu Window Size. menu Check.

menu Window Size. Note: Note that transparency for fonts only works for labels. If the window is closed "Closed" is returned.Menu Commands Synopsis menu Font Transparent {#true|#false} Description (Added in 1. menu HideEUO. menu Hide. menu Shape. menu Font Size. menu Font Style. Synopsis menu Get {name} Description The menu Get command returns value associated with a control in the EasyUO menu window in the #menuRes system variable. menu Clear. menu Show. 89 . menu Combo. menu Font Name. menu List. menu Font Transparent. menu Set. menu Font Align. menu Button. menu Text. menu Check. menu Edit. menu Font Color. See Also menu Activate. menu Delete. menu Font BGColor. menu Window Title menu Get Name menu Get — Returns the value associated with a control in the EasyUO menu window. menu GetNum. menu Get.41) The menu Font Transparent command sets the transparency of the background color of the font. menu Window Color.

#menuRes will return as a number. menu Font Transparent. menu List. This will save the text in the edit field named edit_1 into the . menu Delete. variable #menuRes. menu Button. variable #menuRes. menu Window Title. menu GetNum. This will only work for edit field items. Synopsis menu GetNum {name} {default} Description The menu GetNum command returns the number in an edit field in the EasyUO menu window in the #menuRes system variable. menu Font Name. This will only work for edit field items. . menu Font Color. menu Font Style. menu Window Color. menu HideEUO. menu Combo. #menuRes menu GetNum Name menu GetNum — Returns the number in an edit field in the EasyUO menu window. menu Get edit_1 See Also menu Activate. menu Text. . menu Font Align. menu Font BGColor. menu Clear. If the edit field does not hold a number. menu Show. menu Check. the variable #menuRes. menu Set. menu Window Size.Menu Commands Example . menu GetNum edit_1 144 90 . #menuRes will return as a string. menu Font Size. menu Edit. the default value is returned. If the field is blank it will save 144 into . Example . This will save the text in the edit field named edit_1 into the . menu Shape. menu Hide.

menu Font Style. menu Font BGColor. menu Hide. menu Show. Synopsis menu Hide Description The menu Hide command hides the EasyUO menu window. menu GetNum. menu Font BGColor. menu Button. menu Font Align. menu Font Transparent. menu Text. menu Font Transparent. menu Clear. menu Text. menu HideEUO. menu Button. menu Window Size. menu Font Size. menu Set. menu Set. menu Window Title. menu Font Style.Menu Commands See Also menu Activate. menu Delete. menu Check. menu Edit. menu Edit. menu Get. Note: Calling menu Show is the only way to make the menu visible again See Also menu Activate. menu Font Color. menu List. menu Window Title 91 . menu Font Align. menu Window Size. menu Font Color. menu Delete. menu Check. menu Clear. menu Combo. #menuRes menu Hide Name menu Hide — Hides the EasyUO menu window. menu Shape. menu Font Name. menu Window Color. menu List. menu Window Color. menu Shape. menu Font Name. menu Combo. menu Font Size. menu HideEUO. menu Get. menu Show.

menu Font Align. menu Hide. menu Font Name. menu Text. menu Get. menu List. menu Shape. menu Font Transparent. See Also menu Activate. menu Delete. menu Font Style. Note: The only way to make the EasyUO window visible again is to close the current menu and restore the EasyUO window. menu Window Title menu List Name menu List — Creates a listbox at position x/y with specified size on the EasyUO menu window or adds entires to the listbox. menu GetNum. menu Edit. menu Set. menu Button. menu Font Color. menu Font BGColor. menu Font Size. menu Show.Menu Commands menu HideEUO Name menu HideEUO — Hides the main EasyUO window. Synopsis menu List { "Create" { name } { x } { y } { width } { height } | "Add" { name } { string } } 92 . Synopsis menu HideEUO Description The menu HideEUO command hides the main EasyUO window. menu Clear. menu Window Size. menu Check. menu Combo. menu Window Color.

menu Hide. menu Font Style. menu GetNum. menu Hide. menu Font Align. menu Font Size. menu Font BGColor. menu Font Name. menu Edit. menu Get. menu Combo. menu Shape. menu Clear. menu Font Style. menu Check. menu Window Title 93 . See Also menu Activate. menu Button. menu Font Color. menu Window Color. Synopsis menu Set { name } { text } Description (Added in 1. menu Edit.Menu Commands Description (Added in 1. menu Set. menu Show. menu Button. See Also menu Activate. menu Font Size. menu Window Title menu Set Name menu Set — Sets the text of a control. menu HideEUO. menu List. menu Font BGColor.42 (build 78)) The menu List creates a listbox at position x/y with specified size on the EasyUO menu window or adds entires to the listbox. menu Window Size. menu Font Transparent.42 (build 78)) The menu Set command sets the text of a control. menu Delete. menu Font Color. menu Window Color. menu Font Transparent. menu Get. menu Shape. menu GetNum. menu Text. menu Clear. menu Font Align. menu Delete. menu Font Name. menu Text. menu Window Size. menu Check. menu Combo.

Menu Commands menu Shape Name menu Shape — Creates a shape in the EasyUO menu window. menu Shape linetype Value 1 2 3 4 5 6 7 Table 3. Table 1.41) The menu Shape command creates a shape in the EasyUO menu window. Synopsis menu Shape {name} {left} {top} {width} {height} {shapetype} {linetype} {linewidth} {linecolor} {filltype} {fillcolor} Description (Added in 1. menu Shape filltype Description Clear Dash Dash Dot Dash Dot Dot Dot Inside Frame Solid Description Circle Ellipse Rectangle Round Rectangle Round Square Square 94 . menu Shape shapetype Value 1 2 3 4 5 6 Table 2.

menu Hide. menu Font Color. Synopsis menu Show {x} {y} Description The menu Show command shows the main EasyUO window at the specified position. menu Window Color. Note: Calling menu Show is the only way to make a menu. hidden by calling menu Hide visible again. menu Window Size. menu Font Name. menu Combo. menu List. menu Delete. menu Font BGColor. menu Button. menu Check. menu Font Align. menu Font Style. menu Get. menu GetNum. 95 . menu Set.Menu Commands Value 1 2 3 4 5 6 7 8 Description BDiagonal Clear Cross Diagonal Cross FDiagonal Horizontal Solid Vertical See Also menu Activate. menu Edit. menu Font Size. menu HideEUO. menu Text. menu Font Transparent. menu Show. menu Window Title menu Show Name menu Show — Shows the EasyUO menu window. menu Clear. menu Set.

menu Font Name. menu Font BGColor. menu Font Size.Menu Commands See Also menu Activate. Example . menu Font Color. menu Edit. Synopsis menu Text {name} {x} {y} {text} Description The menu Text command creates a label at the specified position in the EasyUO menu window. menu Hide. menu Button. menu Edit. menu Set. menu List. menu Button. menu Show. menu Check. menu Window Color. menu Delete. menu GetNum. menu GetNum. menu HideEUO. menu Font Style. This will create a text line named text_1 at position 10 20 . menu Font Name. menu Shape. menu Combo. menu Combo. menu Clear. menu Check. with the words Read me! . menu Font Align. menu Font Size. menu Text text_1 10 20 Read me! See Also menu Activate. menu Text. menu List. menu Window Title 96 . menu Get. you will reference the NAME and not the displayed TEXT. menu Delete. menu Clear. menu Set. menu Font BGColor. menu Hide. menu Font Style. menu Window Size. menu Font Color. menu Window Title menu Text Name menu Text — Creates a label at the specifed postion in the EasyUO menu window. Note that when refering to this field later in the script . menu HideEUO. menu Font Transparent. menu Window Color. menu Shape. menu Get. menu Font Align. menu Window Size. menu Font Transparent.

See Also menu Activate. menu Clear. menu Font Color. menu List. red. menu Check. menu Edit.e. menu Delete. menu Text. menu Set. menu Font Transparent. Synopsis menu Window Color {color-descriptor} Description The menu Window Color command changes the color of the EasyUO menu window. menu Combo. menu Button. color-descriptor can be a few different things: black. menu Font Style. menu Font BGColor. menu GetNum. btnface or a hexadecial (i. menu Window Size. menu Font Name. menu Hide. menu Show. menu Window Title menu Window Size Name menu Window Size — Changes the size of the EasyUO menu window. menu Font Align. menu HideEUO.Menu Commands menu Window Color Name menu Window Color — Changes the color of the EasyUO menu window. menu Get. $aabbcc). menu Shape. menu Font Size. Synopsis menu Window Size {width} {height} 97 .

menu Get. menu Show. menu Window Color. Synopsis menu Window Title {title} Description The menu Window Title command changes the window title of the EasyUO menu window. menu Text. menu GetNum. menu Edit. menu Clear. menu List. menu Combo. menu Clear. menu Font Color. menu Button. menu Check. menu Font BGColor. menu GetNum.Menu Commands Description The menu Window Size command changes the size of the EasyUO menu window. menu Font Size. menu Delete. menu Hide. menu HideEUO. menu Check. menu Window Color. menu Button. menu List. menu Font Transparent. menu Font Style. menu Hide. menu Combo. menu Text. menu Edit. menu Shape. menu Font Align. menu Set. menu Font Name. menu Font Style. menu Font Size. menu Font Align. menu Font Transparent. menu HideEUO. menu Window Title menu Window Title Name menu Window Title — Changes the title of the EasyUO menu window. menu Delete. menu Get. menu Set. menu Shape. menu Window Size 98 . menu Font Color. menu Font Name. menu Show. See Also menu Activate. menu Font BGColor. See Also menu Activate.

Namespace commands .VI.

.

Synopsis nameSpace {local | global} {namespace name} Description (Added in 1. Global scope is to be introduced in a future version of EasyUO.nameSpace {local | global} Name nameSpace {local | global} — Defines the current namespace and its scope. The {namespace name} must be a valid EasyUO name.39) The nameSpace {local | global} commands defines the current namespace name and scope. A Local namespace can only be accessed by the script that defined it. A Global namespace can be accessed by any script running witihn the same EasyUO instance. The scope is either Local or Global. The default namespace is local and named STD. This setting is restored when then script is stopped. Note: Note: currently only Local scope is available. Example namespace local ns1 set !test test1 namespace local ns2 set !test test2 namespace local ns3 set !test test3 namespace local ns1 display ok !test namespace local ns2 display ok !test namespace clear ns2 101 .

The default namespace is local and named STD. #nsName. Note: Note: currently only Local scope is available. #nsType. nameSpace {push | pop}. Example set !return . nameSpace copy. Global scope is to be introduced in a future version of EasyUO.Namespace commands namespace local ns2 display ok !test namespace local ns3 display ok !test halt See Also nameSpace clear. This setting is restored when then script is stopped. the Section called Namespace Variables and Scope in Chapter 2 nameSpace clear Name nameSpace clear — Clears every variables within the current namespace. Synopsis nameSpace clear Description (Added in 1.39) The nameSpace command clears every variables within the current namespace. make sure !return is empty gosub test display ok !return 102 .

saves current namespace nameSpace Local Test . 103 .40) The nameSpace {push | pop} commands respectively store and restore the current namespace name and scope in and from an internal stack. Global scope is to be introduced in a future version of EasyUO.Namespace commands halt sub test nameSpace Push . restore previous namespace return See Also nameSpace {local | global}. #nsType. free memory used by temporary namespace nameSpace Pop . Synopsis nameSpace {push | pop} Description (Added in 1. copy variables to the original namespace nameSpace Push . nameSpace copy. restore previous namespace nameSpace Copy ret* From Local Test . #nsName. Note: Note: currently only Local scope is available. create a new temporary namespace to work with set !return this_is_a_test nameSpace Pop . nameSpace {push | pop}. the Section called Namespace Variables and Scope in Chapter 2 nameSpace {push | pop} Name nameSpace {push | pop} — Store and restore the current namespace name and scope. saves current namespace nameSpace Local Test nameSpace Clear .

free memory used by temporary namespace nameSpace Pop . restore previous namespace nameSpace Copy ret* From Local Test . #nsName. the Section called Namespace Variables and Scope in Chapter 2 nameSpace copy Name nameSpace copy — Copy variables from one namespace to another. #nsType. create a new temporary namespace to work with set !return this_is_a_test nameSpace Pop . saves current namespace nameSpace Local Test nameSpace Clear . This setting is restored when then script is stopped. saves current namespace nameSpace Local Test . restore previous namespace return See Also nameSpace {local | global}. Example set !return . copy variables to the original namespace nameSpace Push . Synopsis nameSpace copy {filter} {from | to} {local | global} {namespace name} 104 . nameSpace copy. make sure !return is empty gosub test display ok !return halt sub test nameSpace Push . nameSpace clear.Namespace commands The default namespace is local and named STD.

Global scope is to be introduced in a future version of EasyUO. saves current namespace nameSpace Local Test nameSpace Clear . The {from | to} parameter defines the direction for the copy.e.Namespace commands Description (Added in 1. To: copies variables from the current namespace into the specified namespace.40) The nameSpace copy command allows to copy all or part of variables within a namespace into another. Example set !return . create a new temporary namespace to work with set !return this_is_a_test nameSpace Pop . The default namespace is local and named STD.e. it will be created. Note: Note: currently only Local scope is available. saves current namespace nameSpace Local Test . "return?" will match any variable whose name start with "return" and has one additional character. restore previous namespace return 105 . restore previous namespace nameSpace Copy ret* From Local Test . The "?" character matches any single character and can be use multiple times within one {filter} expression.to be used. free memory used by temporary namespace nameSpace Pop . copy variables to the original namespace nameSpace Push . The {filter} parameter is use to specify which variables should be copied and accepts two special characters "?" and "*". "return*" will match any variable whose name start with "return". It can only appear but once within a {filter} expression. From: copies variables from the specified namespace into the current namespace. If the specified namespace doesn’t exist at this time. while the {local | global} {namespace name} parameters define the name and scope of the namespace. I. This setting is restored when then script is stopped. The "*" character matches zero or more unspecified character. I. make sure !return is empty gosub test display ok !return halt sub test nameSpace Push .

the Section called Namespace Variables and Scope in Chapter 2 106 .Namespace commands See Also nameSpace {local | global}. nameSpace clear. #nsName. nameSpace {push | pop}. #nsType.

VII. Miscellaneous commands .

.

set %test to something set %test TEST . Note: The content can only be deleted if the variable has already been assigned to.. .deleteVar Name deleteVar — Sets a variable to an empty string Synopsis deleteVar {variable name} Description The deleteVar command deletes the content of a variable. Note: The deleteVar command is deprecated since the set command can now assign an empty string value to a variable.. deleteVar test . See Also the Section called Variables in Chapter 2. set 109 . %test now holds nothing .. note there is no % char in front.. Example .

. Do you want to end the script? if #dispRes = yes halt .Miscellaneous commands display Name display — Shows a message Synopsis display {ok | okcancel | yesno | yesnocancel} {message} Description The display command displays a standard Windows messagebox with a set of buttons of your choice... Synopsis execute {filename} [argument.] 110 . See Also #dispRes execute Name execute — Executes an external program. Example display yesno You have run out of ingots..

Miscellaneous commands Description The execute command executes an external command with the argunments given. Example execute EasyUO. Note: This command does NOT work unless you have enabled the "Allow Execute" configuration option.euo execute cmd.exe /c echo >>rail. The default value is 10 and is reset when you stop the script. Synopsis linesPerCycle {linespercycle} Description The linespercycle command sets the number of lines that the EasyUO parser runs through for every cycle.txt move #charPosX #charPosY 0 linesPerCycle Name linesPerCycle — Sets the execution speed.exe healthWatch. See Also #lpc 111 .

Synopsis playCD {drive-spec} Description The playCD command plays an audio CD in the drive denoted by the drive-spec...Miscellaneous commands playCD Name playCD — Starts playing an audio CD in a CD-Rom drive.. Synopsis set {!namespaceVariable | %standardVariable | *persistantVariable | #systemVariable} [expression] [abs] 112 . if #hits < 30 playCD D: . set Name set — sets a variable to a value (variable assignment). Example ..

Miscellaneous commands Description The set command. set %f to use hexadecimal too + 1 . 113 . the absolute (mathimatically) value will be assigned. we can ( %a * %b ) %a * ( %b + %a * %b + 1 . Example set %a set %b set %c set %d set %e set %f halt 2 $a . Note: Allow Send must be enabled for this command to work. Ommitting the expression will set the variable to a blank string. %e is 21 a blank string See Also Expressions send Name send — Sends a HTTP request to a server and runs the code that is returned. sets a varible to what an expression evaluates to. %c is 21 1 ) . Synopsis send {{"HTTPPost[port]"} | {"DebugHTTPPost[port]"} {site} {path} {post data} Description The send command sends a HTTP request to a web server and executes the code that is returned. If the abs option is specified. %d is 22 .

****************************** menu menu menu menu menu menu Clear Window Size 500 230 Font BGColor White Edit e1 20 180 360 Font BGColor BtnFace Button b1 400 180 80 25 Send! set #menuButton 0 N2: N3: if #scnt2 > 30 { send HTTPPost www. EUO Chat V1.0 by Cheffe .com /webscripts/euochat.easyuo. .****************************** .0 Show 200 200 HideEUO Text 1 20 20 Font BGColor Edit 2 20 40 Font BGColor Button 3 130 Please enter your nickname: White 200 BtnFace 70 90 25 OK set #menuButton 0 N1: if #menuButton = closed halt if #menuButton <> 3 goto N1 menu Get 2 set %nickname #menuRes .****************************** . Allow send must be enabled!!! menu menu menu menu menu menu menu menu menu menu Clear Window Size 245 120 Window Title EUO Chat V1.Miscellaneous commands Example .pl R set #scnt2 0 } 114 .

Synopsis shutDown ["force"] Description The shutDown command shuts your computer down. The option force forces non-responsive application to shut down.easyuo.Miscellaneous commands if #menuButton = CLOSED halt if #menuButton <> b1 goto N3 set #menuButton 0 menu Get e1 send HTTPPost www. : #menuRes menu Activate e1 goto N2 shutDown Name shutDown — Shuts your computer down. sound Name sound — Plays a wave file or the SystemDefault beep.com /webscripts/euochat. as well. 115 .pl S %nickname .

Synopsis str {"Len"} {string} str {"Pos"} {string} {sub string} str {"Left"} {string} {length} str {"Right"} {string} {length} str {"Mid"} {string} {start} {length} str {"Lower"} {string} str {"Ins"} {string} {sub string} {start} str {"Del"} {string} {start} [length} Description (Added in 1.38) The str command performs a string operation on the string given and stores the result in #strRes. String Operations Option Description 116 .38. Table 1. updated with filename in 1.39) The sound command plays a wave file or the SystemDefault beep.Miscellaneous commands Synopsis sound [filename] Description (Added in 1. str Name str — performs a operation on a string.

Stores a part of the string taken from the middle. Stores a part of the string taken from the left. . in the #strRes system variable. Inserts a string into the string and stores it in the #strRes system variable. Stores the position of the sub string in the #strRes system variable. #strRes #strRes #strRes #strRes #strRes #strRes #strRes #strRes = = = = = = = = 5 3 HELL LO ELL hello HELILO HEO See Also #strRes 117 . . . in the #strRes system variable. . Example set str str str str str str str str %string HELLO Len %string Pos %string LL Left %string 4 Right %string 2 Mid %string 2 3 Lower %string Ins %string I 3 Del %string 3 2 . Stores a part of the string taken from the right. Stores a lower case version of the string in the #strRes system variable. .Miscellaneous commands Option Len Pos Left Right Mid Lower Ins Del Description Stores the length of the string in the #strRes system variable. . in the #strRes system variable. Deletes a part of the string and stores it in the #strRes system variable. .

Tile Operations Option Init Description Initializes the tile information for retrieval in EasyUO. Retrieves the number of tiles for a specific position. The index goes from 1 to #tileCnt. Synopsis tile {"Init"} [noOverrides] tile {"Cnt"} {x} {y} [facet] tile {"Get"} {x} {y} {index} [facet] Description (Added in 1. The "noOverrides" options makes EasyUO not read the statics override files.42) The tile command retrieves information about tiles. Retrives the tile type and z value. #cursKind 118 . #tileZ.Miscellaneous commands tile Name tile — retrieves information about tiles. The default value for facet is the current facet. Otherwise follows the values for #cursKind. The values in #tileType and #tileZ are updated. Table 1. The default value for facet is the current facet. The value in #tileCnt is updated. Otherwise follows the values for #cursKind. this could be useful for freeshards that does not use the overrides. #tileCnt. Cnt Get See Also #tileType.

II. System Variable Reference .

.

Character Info System Variables .VIII.

.

Description The #charPosX system variable determines the characters world X-coordinate. #charPosZ 123 . It is the same coordinate system as used in UO Auto Map. See Also #charPosX. Description The #charPosY system variable determines the characters world X-coordinate. See Also #charPosY. It is the same coordinate system as used in UO Auto Map.#charPosX Name #charPosX — (readonly) Determines the characters world X-coordinate. #charPosZ #charPosY Name #charPosY — (readonly) Determines the characters world Y-coordinate.

#charPosY #charDir Name #charDir — (readonly) Determines the direction the character is facing. See Also #charPosX. Value 0 1 2 3 4 5 6 7 Facing North North East East South East South South West West Noth West 124 . Description The #charPosZ system variable determines the characters world Z-coordinate (elevation). #charDir values. Description The #charDir system variable determines the direction the character is facing.Character Info System Variables #charPosZ Name #charPosZ — (readonly) Determines the characters world Z-coordinate. Table 1.

. Example . Character is hidden. #charStatus values. sub cureMe ..Character Info System Variables Example top: if #CHARDIR = 0 msg : Looking North $ wait 2s goto top #charStatus Name #charStatus — (readonly) Determines different states that the character can be in. Character is female. Description The #charStatus system variable determintes a number of different states that the character can be in: Table 1. Character is in war mode. Value C H B G Description Character is poisoned... if C in #charStatus { gosub cureMe } . 125 ...

txt if #charID <> %charID { event sysmessage You are using this script for the wrong character! halt } Halting Script! #charGhost Name #charGhost — (readonly) Determines if your character is dead. #sex #charID Name #charID — (readonly) Determines the id of the character. 126 . Example call specific_char_variables.Character Info System Variables return See Also #charGhost. Description The #charID system variable determines the id of your character. so it can be used to identify different characters and make specific actions depending on what character it is. This is a unique identifier.

. See Also #charStatus 127 . Example . if it is alive it holds "NO".Character Info System Variables Description The #charGhost system variable determines if your character is dead... If the character is dead it holds "YES". if #charGhost = YES { gosub logOut halt } ..

Character Info System Variables 128 .

Status Bar System Variables .IX.

.

Description The #charName system variable determines the name of the character. 131 . You can use "event Macro 8 2" to open it from your script. You can use "event Macro 8 2" to open it from your script. Description The #str system variable determines the strength of the character. Note: This variable will not work unless the character status bar is open. Example msg My name is #CHARNAME $ halt #str Name #str — (readonly) Determines the strength of the character.#charName Name #charName — (readonly) Determines the name of the character. Note: This variable will not work unless the character status bar is open.

. Example . #maxMana. #mana. You can use "event Macro 8 2" to open it from your script. #maxMana. #maxStam.. #maxStam. #dex. #maxStats #hits Name #hits — (readonly) Determines the current number of hitpoints of the character.. #maxHits. Note: This variable will not work unless the character status bar is open.Status Bar System Variables See Also #hits. #maxHits.. Description The #hits system variable determines the current number of hitpoints of the character. #stamina. #mana. if #hits < 30 goto recallHome . See Also #str. #int. #dex. #maxStats #maxHits Name #maxHits — (readonly) Determines the maximum number of hitpoints of the character. #int. #stamina. 132 .

#maxStats #dex Name #dex — (readonly) Determines the dexterity of the character. #maxMana. #maxStam. #mana. #mana. #maxHits. #hits. 133 . You can use "event Macro 8 2" to open it from your script.Status Bar System Variables Description The #maxHits system variable determines the maximum number of hitpoints of the character. Description The #dex system variable determines the dexterity of the character. See Also #str. Note: This variable will not work unless the character status bar is open. #maxMana. Note: This variable will not work unless the character status bar is open. #int. You can use "event Macro 8 2" to open it from your script. #dex. #stamina. #maxStam. #int. #hits. See Also #str. #stamina. #maxStats #stamina Name #stamina — (readonly) Determines the current stamina level or the character.

#maxStam.41) The #maxStam system variable determines the maximum stamina level of the character. #maxStats #maxStam Name #maxStam — (readonly) Determines the maximum stamina level or the character. Example . #hits.. if #stamina < #maxStam gosub drinkRefresh 134 . #maxMana. See Also #str.. #mana.. Example .. Note: This variable will not work unless the character status bar is open. #int. #maxHits. #dex. You can use "event Macro 8 2" to open it from your script..Status Bar System Variables Description The #stamina system variable determines the current stamina level of the character. Note: This variable will not work unless the character status bar is open. Description (Added in 1.. You can use "event Macro 8 2" to open it from your script. if #stamina < 30 gosub drinkRefresh .

#dex. #hits. #maxMana. #maxStats #int Name #int — (readonly) Determines the inteligence of the character. #maxStats #mana Name #mana — (readonly) Determines the current mana pool for the character. Note: This variable will not work unless the character status bar is open. #stamina. #maxStam. Description The #mana system variable determines the current mana pool for the character. #stamina. #dex. #int. 135 .. #maxHits.Status Bar System Variables .. #hits. See Also #str. Description The #int system variable determines the inteligence of the character. #mana. #mana. #maxMana. See Also #str. You can use "event Macro 8 2" to open it from your script. #maxHits.

. You can use "event Macro 8 2" to open it from your script. #hits. See Also #str. You can use "event Macro 8 2" to open it from your script. if #mana < 30 gosub meditate . Note: This variable will not work unless the character status bar is open.Status Bar System Variables Note: This variable will not work unless the character status bar is open..41) The #maxMana system variable determines the maximum mana pool for the character. #maxStam. Example . Example . #maxStats #maxMana Name #maxMana — (readonly) Determines the maximum mana pool for the character. Description (Added in 1... #int. #stamina. 136 . #maxMana.... #dex.. if #mana < #maxMana gosub meditate . #maxHits.

Description The #maxStats system variable determines the current maximum stats of the character. #maxHits. #hits. Note: This variable will not work unless the character status bar is open. #maxHits. #int. #maxStam. #dex. #stamina. See Also #str. #stamina. 137 . #mana. #int. #hits. Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script. #maxStats #maxStats Name #maxStats — (readonly) Determines the current maximum stats of the character. Description The #sex system variable determines the sex of the character. #dex. #maxStam.Status Bar System Variables See Also #str. #mana. You can use "event Macro 8 2" to open it from your script. #maxMana #sex Name #sex — (readonly) Determines the sex of the character.

Value 0 1 Description Character is male. #sex values.Status Bar System Variables Table 1. #CR. Note: This variable will not work unless the character status bar is open. Example msg My Physical Resist is #AR $ halt See Also #FR. Description The #AR system variable determines the Armor Rating (Physical Resistance with AoS system) of the character. See Also #charStatus #AR Name #AR — (readonly) Determines the Armor Rating of the character. Character is female. You can use "event Macro 8 2" to open it from your script. #ER 138 . #PR.

Example msg My Fire Resist is #FR $ halt See Also #AR. You can use "event Macro 8 2" to open it from your script. #CR. Note: This variable will not work unless the character status bar is open. Description (Added in 1.41) The #CR system variable determines the Cold Resist of the character. #ER #CR Name #CR — (readonly) Determines the Cold Resist of the character. #PR. You can use "event Macro 8 2" to open it from your script. Note: This variable will not work unless the character status bar is open. 139 . Description (Added in 1.Status Bar System Variables #FR Name #FR — (readonly) Determines the Fire Resist of the character.41) The #FR system variable determines the Fire Resist of the character.

Note: This variable will not work unless the character status bar is open.Status Bar System Variables Example msg My Cold Resist is #CR $ halt See Also #AR.41) The #PR system variable determines the Poison Resist of the character. #FR. Description (Added in 1. #ER 140 . #PR. #FR. You can use "event Macro 8 2" to open it from your script. Example msg My Poison Resist is #PR $ halt See Also #AR. #ER #PR Name #FR — (readonly) Determines the Poison Resist of the character. #CR.

Status Bar System Variables

#ER
Name
#ER — (readonly) Determines the Energy Resist of the character.

Description
(Added in 1.41) The #ER system variable determines the Energy Resist of the character.
Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script.

Example
msg My Energy Resist is #ER $ halt

See Also
#AR, #FR, #CR, #PR

#gold
Name
#gold — (readonly) Determines the amount of gold on the character.

Description
The #gold system variable determines the amount of gold on the character.
Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script.

141

Status Bar System Variables

Example
... if #gold < 1000 gosub gotoBank ...

#weight
Name
#weight — (readonly) Determines the current weight of the character.

Description
The #weight system variable determines the current weight of the character.
Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script.

Example
... if #weight > 350 gosub gotoBank ...

See Also
#maxWeight

142

Status Bar System Variables

#maxWeight
Name
#maxWeight — (readonly)Determines the maximum weight of the character.

Description
The #maxWeight system variable determines the maximum weight of the character.
Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script.

See Also
#weight

#followers
Name
#followers — (readonly) Determines the current number of followers of the character.

Description
The #followers system variable determines the current number of followers of the character.
Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script.

See Also
#maxFol

143

Status Bar System Variables

#maxFol
Name
#maxFol — (readonly) Determines the maximum number of followers of the character.

Description
(Added in 1.41) The #maxFol system variable determines the maximum number of followers of the character.
Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script.

See Also
#followers

#luck
Name
#luck — (readonly) Determines the current luck of the character.

Description
(Added in 1.41) The #luck system variable determines the current luck of the character.
Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script.

144

Status Bar System Variables

#minDmg
Name
#minDmg — (readonly) Determines the minimum damage done with the currently yielded weapon.

Description
(Added in 1.41) The #minDmg system variable determines the minimum damage done with the currently yielded weapon.
Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script.

See Also
#maxDmg

#maxDmg
Name
#maxDmg — (readonly) Determines the maximum damage done with the currently yielded weapon.

Description
(Added in 1.41) The #maxDmg system variable determines the maximum damage done with the currently yielded weapon.
Note: This variable will not work unless the character status bar is open. You can use "event Macro 8 2" to open it from your script.

145

Status Bar System Variables See Also #minDmg 146 .

Container Info System Variables .X.

.

nextCPos #nextCPosY Name #nextCPosY — (read/write) Determines the y-coordinate of where the next containter/gump will open.#nextCPosX Name #nextCPosX — (read/write) Determines the x-coordinate of where the next containter/gump will open. 149 . Description The #nextCPosX system variable determines the x-coordinate of where the next container/gump will open. in Interface options (Mouse Icon) must be turned on for this to work. Note: The "Offset interface windows rather than perfectly stacking them" option. Open bank box at 10.10 set #nextCPosX 10 set #nextCPosY 10 msg bank$ halt See Also #nextCPosY. contPos. Example .

#contID. Example .Container Info System Variables Description The #nextCPosY system variable determines the y-coordinate of where the next container/gump will open. #contKind. nextCPos #contSize Name #contSize — (readonly) Determines the size of the currently selected container/gump. contPos. in Interface options (Mouse Icon) must be turned on for this to work. Note: The "Offset interface windows rather than perfectly stacking them" option.10 set #nextCPosX 10 set #nextCPosY 10 msg bank$ halt See Also #nextCPosX. The format is as follows: "{Width}_{Height}". See Also #contPosY. Open bank box at 10. #contType 150 . Description The #contSize system variable determines the size of the currently selected container/gump.

#contID. #contType 151 . #contPosY. See Also #contSize. #contID. See Also #contSize. #contKind. #contPosX. #contKind. Description The #contPosX system variable determines the x-coordinate of the currently selected container/gump. #contType #contPosY Name #contPosY — (read/write) Determines the y-coordinate of the currently selected container/gump. Description The #contPosY system variable determines the y-coordinate of the currently selected container/gump.Container Info System Variables #contPosX Name #contPosX — (read/write) Determines the x-coordinate of the currently selected container/gump.

Example . #contPosY. if something is being dragged.. Most menus have a kind attached to them.. This way they can easily be updated if the client is patched. #contID.Container Info System Variables #contKind Name #contKind — (readonly) Determines the kind of the currently selected container/gump. #contType #contID Name #contID — (readonly) Determines the id of the currently selected container/gump.. The can be utilized to find out if a crafting menu is open. #contPosX. Good scripting standards dictate that you use variables in top of your script for #contKind’s. if a runebook is open and many other things. Note: This variable can change every time a new patch is released for the client. if #contKind <> %craftMenuKind gosub useNewTool . See Also #contSize. Description The #contKind system variable determines the kind of the currently selected container/gump.. 152 .

#contPosY. #contPosY. The following values have been found so far (not all are identified): 153 . #contPosX. Description (Added in 1. #contKind. #contType #contType Name #contType — (readonly) Determines the object type of the currently selected container/gump.41) The #contName system variable determines the name of the currently selected container/gump. Description The #contType system variable determines the object type of the currently selected container/gump. #contPosX. See Also #contSize. #contID #contName Name #contName — (readonly) Determines the name of currently selected container/gump. #contKind. See Also #contSize.Container Info System Variables Description The #contID system variable determines the id of the currently selected container/gump.

#contName values. Pretty much indicitive of the answers you get too! lol. shows up when something if flying through the air. shardselect from a journal open from a logout Description comes up for amount input when dragging a stack when something is dragged on the cursor missile_gump normal_gump container_gump MainMenu_gump waiting_gump login_gump GameAreaEdgeGump radar_gump DamageNumbers_gump skillcon_gump spellcon_gump party_gump profile_gump combat_ability_book_gump spellbook_gump Course_gump Bill_gump hue_gump this one comes up for stuff like bad password very quick. name might be wrong The map comes up when doing damage to a target for setting special moves Treasure Map Buy/Sell set the color of dye tub 154 .Container Info System Variables Table 1. Also from runebooks and tailoring/blacksmith menus. Value stack_gump drag_gump paperdoll_gump status_gump skill_gump text_gump YesNo_gump OptionsGump generic_gump from a help request. seen with: chat. seems to be an intermediate/transitional status. hard to catch.

when you choose the city to start Codex of Wisdom. #contPosX. #contType 155 . #contKind... character creation resizing journal. skill gump. Character creation. #contPosY... etc. See Also #contSize. #contID.Container Info System Variables Value CharCreation_gump ListBoxControl_gump resize_gump map_gump CONTEXT_HELP Description character creation it can be found on option gump.

Container Info System Variables 156 .

XI. Last Action System Variables .

.

Example set #lObjectID %carpentryTool event macro 17 . crafting menu is now open .#lObjectID Name #lObjectID — (read/write) Determines the id of the last used object... 159 . which will use the object as if it was double-clicked with the mouse. See Also event Macro #lObjectType Name #lObjectType — (readonly) Determines the type of the last used object. Description The #lObjectType system variable determines the type of the last used object. You can also write to this variable and use it in conjuction with "event Macro 17" (LastObject). Description The #lObjectID system variable determines the id of the last used object.

make sure it targets an object event Macro 22 . Description The #lTargetID system variable determines the id of the last target used. #lTargetKind 160 . carve the hides from the corpse set #lTargetID %cowCorpse set #lTargetKind 1 .Last Action System Variables #lTargetID Name #lTargetID — (read/write) Determines the id of the last target used.. See Also event Macro. Example . use the dagger set #lObjectID %dagger event Macro 17 .. wait for target cursor target 5s . Be aware: #lTargetKind must be set to 1 for event Macro 22 to use the target id. which will target the object as if it was clicked with the mouse. You can also write to this variable and use it in conjuction with "event Macro 22" (LastTarget).

. mine a spot set #lTargetX 1000 set #lTargetY 1000 set #lTargetZ -1 set #lTargetKind 3 event Macro 22 .Last Action System Variables #lTargetX Name #lTargetX — (read/write) Determines the world x-coordinate of the last target used. wait for target cursor target 5s . #lTargetKind. Example . See Also event Macro. Be aware: #lTargetKind must be set to 2 or 3 for event Macro 22 to use the target position.. #lTargetZ 161 . Description The #lTargetX system variable determines the world x-coordinate of the last target used. use the shovel set #lObjectID %shovel event Macro 17 . #lTargetY.

#lTargetKind. Be aware: #lTargetKind must be set to 2 or 3 for event Macro 22 to use the target position. wait for target cursor target 5s .Last Action System Variables #lTargetY Name #lTargetY — (read/write) Determines the world y-coordinate of the last target used. 162 .. event Macro. Description The #lTargetY system variable determines the world y-coordinate of the last target used. #lTargetX.. use the shovel set #lObjectID %shovel event Macro 17 . Example . mine a spot set #lTargetX 1000 set #lTargetY 1000 set #lTargetZ -1 set #lTargetKind 3 event Macro 22 . #lTargetZ #lTargetZ Name #lTargetZ — (read/write) Determines the world z-coordinate of the last target used.

Description The #lTargetKind system variable determines the kind of what was last targeted: 163 . Be aware: #lTargetKind must be set to 2 or 3 for event Macro 22 to use the target position. #lTargetKind. Example . use the shovel set #lObjectID %shovel event Macro 17 . #lTargetY #lTargetKind Name #lTargetKind — (read/write) Determines the kind of what was last targeted. wait for target cursor target 5s .. #lTargetX.Last Action System Variables Description The #lTargetZ system variable determines the world z-coordinate of the last target used.. mine a spot set #lTargetX 1000 set #lTargetY 1000 set #lTargetZ -1 set #lTargetKind 3 event Macro 22 . event Macro.

use the dagger set #lObjectID %dagger event Macro 17 . #lTargetKind values. use the shovel set #lObjectID %shovel event Macro 17 .. Value 1 2 3 Description Description Object. Resource/Tree. Ground/Mountains/Caves... wait for target cursor target 5s . make sure it targets an object event Macro 22 . World Position Example . carve the hides from the corpse set #lTargetID %cowCorpse set #lTargetKind 1 . Object Example . mine a spot set #lTargetX 1000 set #lTargetY 1000 set #lTargetZ -1 set #lTargetKind 3 event Macro 22 .. 164 .Last Action System Variables Value Table 1. wait for target cursor target 5s .

The number in this variable is determined by the graphic of the tile. Description The #lLiftedID system variable determines the id of the object last dragged/lifted. #lTargetX. Description The #lTargetTile system variable determines the tile last targeted. #lTargetY.Last Action System Variables See Also #lTargetID. #lTargetZ #lTargetTile Name #lTargetTile — (read/write) Determines the tile last targeted. #lLiftedID Name #lLiftedID — (readonly) Determines the id of the object last dragged/lifted. Example initEvents finditem JTL event Drag #findID wait 20 msg The ID of the item you lifted is #lLiftedID $ halt 165 .

41) The #lLiftedType system variable determines the type of the object last dragged/lifted. 166 . Example initEvents finditem JTL event Drag #findID wait 20 msg The type of the item you lifted is #lLiftedType $ halt See Also #lLiftedType. #lLiftedKind #lLiftedType Name #lLiftedType — (readonly) Determines the type of the object last dragged/lifted.Last Action System Variables See Also #lLiftedID. Description (Added in 1. #lLiftedKind #lLiftedKind Name #lLiftedKind — (readonly) Determines if an object is being dragged/lifted.

Last Action System Variables Description (Added in 1. #lLiftedType #lSkill Name #lSkill — (read/write) Determines the skill last used. Table 1. #lSkill values Skill Number 1 2 35 4 6 12 14 Skill Name Anatomy Animal Lore Animal Taming Arms Lore Begging Cartography Detecting Hidden 167 .41) The #lLiftedKind system variable determines if an object is being dragged/lifted. Table 1. #lLiftedKind values Value 0 1 Description An object is not on the cursor An object is on the cursor See Also #lLiftedID. which will perform the skill as if you clicked the blue diamond in the skill list. You can also write to this variable and use it in conjuction with "event Macro 14" (LastSkill). Description The #lSkill system variable determines the skill last used.

Description The #lSpell system variable determines the last spell cast. #lSpell values 168 .Last Action System Variables Skill Number 15 16 19 21 23 3 46 9 30 22 48 32 33 47 36 38 Skill Name Discordance Evaluating Intelligence Forensic Evaluation Hiding Inscription Item Identification Meditation Peacemaking Poisoning Provocation Remove Trap Spirit Speak Stealing Stealth Taste Identification Tracking See Also event Macro #lSpell Name #lSpell — (read/write) Determines the last spell cast. which will cast the spell. Table 1. You can also write to this variable and use it in conjuction with "event Macro 16" (LastSpell).

Last Action System Variables Spell Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Spell Name Clumsy Create Food Feeblemind Heal Magic Arrow Night Sight Reactive Armor Weaken Agility Cunning Cure Harm Magic Trap Magic Untrap Protection Strength Bless Fireball Magic Lock Poison Telekinesis Teleport Unlock Wall Of Stone Arch Cure Arch Protection Curse Fire Field Greater Heal Lightning Mana Drain Recall Blade Spirits 169 .

Last Action System Variables Spell Number 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 101 102 Spell Name Dispel Field Incognito Magic Reflection Mind Blast Paralyze Poison Field Summon Creature Dispel Field Energy Bolt Explosion Invisibility Mark Mass Curse Paralyze Field Reveal Chain Lightning Energy Field Flame Strike Gate Travel Mana Vampire Mass Dispel Meteor Swarm Polymorph Earthquake Energy Vortex Resurrection Air Elemental Summon Daemon Earth Elemental Fire Elemental Water Elemental [N] Animate Dead [N] Blood Oath 170 .

Last Action System Variables Spell Number 103 104 105 106 107 108 109 110 111 112 113 114 115 116 201 202 203 204 205 206 207 208 209 210 Spell Name [N] Corpse Skin [N] Curse Weapon [N] Evil Omen [N] Horrific Beast [N] Lich Form [N] Mind Rot [N] Pain Spike [N] Poison Strike [N] Strangle [N] Summon Familiar [N] Vampiric Embrace [N] Vengeful Spirit [N] Wither [N] Wraith Form [C] Cleanse by Fire [C] Close Wounds [C] Consecrate Weapon [C] Dispel Evil [C] Divine Fury [C] Enemy of One [C] Holy Light [C] Noble Sacrifice [C] Remove Curse [C] Sacred Journey See Also event Macro 171 .

Last Action System Variables 172 .

FindItem System Variables .XII.

.

#findKind. 175 . #findType. #findZ. #findCol. Description The #findID system variable determines the id of the object returned by findItem. #findDist.#findID Name #findID — (readonly) Determines the id of the object returned by findItem. #findY. I have exactly #findstack gold on me. #findMod. Example findAgain: finditem POF if #findkind = 1 { ignoreitem #findid goto findAgain } if findkind = -1 halt msg #findid is the ID of the gold in my bag. #findBagID. #findX.$ halt See Also findItem. #findRep. #findCnt #findType Name #findType — (readonly) Determines the type of the object returned by findItem. #findStack.

#findID. #findStack. #findCol. #findDist. #findCol. See Also findItem. the coordinate is a screen coordinate. #findStack. #findID. See Also findItem.FindItem System Variables Description The #findType system variable determines the type of the object returned by findItem. #findCnt #findY Name #findY — (readonly) Determines the y-coordinate of the object returned by findItem. #findMod. #findBagID. #findZ. #findMod. #findDist. If #findKind equals 0. #findCnt #findX Name #findX — (readonly) Determines the x-coordinate of the object returned by findItem. Description The #findX system variable determines the x-coordinate of the object returned by findItem. #findY. the coordinate is a world coordinate. #findKind. #findKind. #findX. #findY. #findType. #findRep. #findBagID. #findRep. 176 . if #findKind equals 1. #findZ.

#findCnt #findZ Name #findZ — (readonly) Determines the z-coordinate of the object returned by findItem. #findRep. If #findKind equals 0. #findType. #findCol. Description The #findZ system variable determines the x-coordinate of the object returned by findItem. #findCnt #findDist Name #findDist — (readonly) Determines the distance from the character to the object returned by findItem. #findID. #findKind. #findMod. the coordinate is a world coordinate. #findType. #findX. #findDist. #findY. the coordinate is a world coordinate. #findZ. #findKind. the coordinate is a screen coordinate. #findID. the coordinate is not valid. See Also findItem. 177 . #findRep. #findCol. #findX. #findBagID. #findStack. See Also findItem.FindItem System Variables Description The #findY system variable determines the x-coordinate of the object returned by findItem. #findDist. #findMod. #findBagID. If #findKind equals 0. if #findKind equals 1. #findStack. if #findKind equals 1.

#findType. Object is on the ground. Object is in a container. #findCol. #findKind values. #findRep. Description The #findKind system variable determines the kind of the object returned by findItem. #findZ. #findBagID. #findY. #findCnt 178 . Table 1. See Also findItem. #findZ. #findMod. #findStack. #findMod. Value -1 0 1 Description No objects found. #findKind. See Also findItem. #findY. #findCol. #findDist. #findID. #findCnt #findKind Name #findKind — (readonly) Determines the kind of the object returned by findItem.FindItem System Variables Description The #findDist system variable determines the distance from the character to the object returned by findItem. #findX. #findRep. #findType. #findID. #findX. #findStack. #findBagID.

#findX. #findCnt 179 . #findDist. #findType. #findCol. #findStack. #findCol. #findY. See Also findItem. #findDist. #findRep. #findRep. #findID. #findKind. #findMod. #findID. #findCnt #findBagID Name #findBagID — (readonly) Determines the bag the object returned by findItem is contained in. Description The #findStack system variable determines the number of stacked items in the object returned by findItem. #findX. #findY. #findZ. See Also findItem. #findType.FindItem System Variables #findStack Name #findStack — (readonly) Determines the number of stacked items in the object returned by findItem. Description The #findBagID system variable determines the bag the object returned by findItem is contained in. #findBagID. #findMod. #findKind. #findZ.

#findID. #findStack. The displacement is added to #findX and #findY respectively. #findCnt #findRep Name #findRep — (readonly) Determines the reputation of the object returned by findItem.FindItem System Variables #findMod Name #findMod — (read/write) Determines displacement for #findX and #findY. See Also findItem. #findRep values. #findY. #findX. #findDist. #findCol. Description The #findMod system variable Determines displacement for #findX and #findY. #findKind.Animal) Criminal (Grey) Enemy (Orange) 180 . #findZ. #findBagID. Value 1 2 3 4 5 Description Innocent (Blue) Friend (Green) Grey (Grey . The displacement is in the format {X}_{Y}. Description The #findRep system variable determines the reputation of the object returned by findItem: Table 1. #findType. #findRep.

#findX. #findStack. #findBagID. #findCnt #findCol Name #findCol — (readonly) Determines the color of the object returned by findItem. #findType. #findMod. #findY. Description The #findCol system variable determines the color of the object returned by findItem. #findID. #findID. #findZ. #findDist.FindItem System Variables Value 6 7 Description Murderer (Red) Invulnerable (Yellow) See Also findItem. #findZ. 181 . #findCol. See Also findItem. #findDist. #findKind. #findY. #findCnt #findCnt Name #findCnt — (readonly) Determines the number of objects that matches what was searched for with the findItem command. #findType. #findBagID. #findMod. #findX. #findStack. #findKind.

#findType. #findMod. #findY. See Also findItem. #findX. #findKind. #findStack. #findBagID.FindItem System Variables Description The #findCnt system variable determines the number of objects that matches what was searched for with the findItem command. #findCol 182 . #findZ. #findDist. #findID.

XIII. Shop Info System Variables .

#shopCurPos
Name
#shopCurPos — (readonly) Determines the current position on the shop menu

Description
The #shopCurPos system variable determines the current position on the shop menu.

See Also
getShopInfo, #shopCnt, #shopItemType, #shopItemID, #shopItemName, #shopItemPrice, #shopItemMax

#shopCnt
Name
#shopCnt — (readonly) Determines the total number of lines on the shop menu.

Description
The #shopCnt system variable determines the total number of lines on the shop menu.

See Also
getShopInfo, #shopCurPos, #shopItemType, #shopItemID, #shopItemName, #shopItemPrice, #shopItemMax

185

Shop Info System Variables

#shopItemType
Name
#shopItemType — (readonly) Determines the item type of the current line on the shop menu.

Description
The #shopItemType
Note: To initialize this variable, you need to call getShopInfo.

See Also
getShopInfo, #shopCurPos, #shopCnt, #shopItemID, #shopItemName, #shopItemPrice, #shopItemMax

#shopItemID
Name
#shopItemID — (readonly) Determines the item ID of the current line on the shop menu.

Description
The #shopItemID system variable determines the item ID of the current line on the shop menu.
Note: To initialize this variable, you need to call getShopInfo.

See Also
getShopInfo, #shopCurPos, #shopCnt, #shopItemType, #shopItemName, #shopItemPrice, #shopItemMax

186

Shop Info System Variables

#shopItemName
Name
#shopItemName — (readonly) Determines the name of the item the current line on the shop menu.

Description
The #shopItemName system variable determines the name of the item the current line on the shop menu.
Note: To initialize this variable, you need to call getShopInfo.

See Also
getShopInfo, #shopCurPos, #shopCnt, #shopItemType, #shopItemID, #shopItemPrice, #shopItemMax

#shopItemPrice
Name
#shopItemPrice — (readonly) Determines the price of the current line in the shop menu.

Description
The #shopItemPrice system variable determines the price of the current line in the shop menu.
Note: To initialize this variable, you need to call getShopInfo.

187

Shop Info System Variables

See Also
getShopInfo, #shopCurPos, #shopCnt, #shopItemType, #shopItemID, #shopItemName, #shopItemMax

#shopItemMax
Name
#shopItemMax — (readonly) Determines the number of items in the stack of the current line in the shop menu.

Description
The #shopItemMax system variable determines the number of items in the stack of the current line in the shop menu.
Note: To initialize this variable, you need to call getShopInfo.

See Also
getShopInfo, #shopCurPos, #shopCnt, #shopItemType, #shopItemID, #shopItemName, #shopItemPrice

188

XIV. Extended Info System Variables .

.

#skillLock #skillCap Name #skillCap — (readonly) Determines the current skill cap for a skill chosen with chooseSkill command.#skill Name #skill — (readonly) Determines the current skill level for a skill chosen with chooseSkill command. See Also chooseSkill. Description The #skill system variable determines the current skill level for a skill chosen with chooseSkill command. event SkillLock. Example chooseSkill taming if #skill < 1000 event SysMessage You need to tame bulls. if #skill >= 1000 event SysMessage You need to tame ridgebacks. Description The #skillCap system variable determines the current skill cap for a skill chosen with chooseSkill command. 191 .

Skill lock is locked. Table 1. Description The #skillLock system variable determines the current lock status of the skill chosen with chooseSkill command. Cannot continue. Skill lock is pointing down. Example chooseSkill taming if #skillLock = locked { event SysMessage Your taming is locked. Value up down locked Description Skill lock is pointing up.Extended Info System Variables See Also chooseSkill. event SkillLock. #skill 192 . halt } See Also chooseSkill. event SkillLock. #skillLock #skillLock Name #skillLock — (readonly) Determines the current lock status of the skill chosen with chooseSkill command. #skillLock values.

Example loop: scanJournal 1 if is_attacking_you in #journal { msg Guards$ call recallme } delteJournal goto loop See Also deleteJournal. 193 . scanJournal. #jColor #jIndex Name #jIndex — (readonly) Determines the index of the current journal entry. Description The #journal system variable determines the journal line selected using the scanJournal command.Extended Info System Variables #journal Name #journal — (readonly) Determines the journal line selected using the scanJournal command. #jIndex.

By calling scanJournal with #jIndex as the parameter you will get the last line in the journal. #jColor #jColor Name #jColor — (read/write) Determines the color of the text in the journal. 194 . Example initEvents set %success #false set %js #jIndex + 1 msg #smc TestA$ msg #smc TestB$ msg #smc TestC$ wait 1s set %je #jIndex for %ji %js %je { scanJournal %ji if TestB in #journal set %success #true msg #smc Interference$ } if %success = #true display Ok Success else display Ok Failure halt See Also deleteJournal. scanJournal.Extended Info System Variables Description The #jIndex system variable determines the index of the current journal entry. #journal. By saving the value of #jIndex at appropriate times you can scan a section of the journal without ever losing a string.

#journal #sysMsg Name #sysMsg — (readonly) Determines the current system message. 195 . Description The #sysMsgCol system variable determines the current system message color. See Also deleteJournal.Extended Info System Variables Description The #jColor system variable determines the color of the text in the journal. scanJournal. See Also #sysMsgCol #sysMsgCol Name #sysMsgCol — (read/write) Determines the current system message color. Description The #sysMsg system variable determines the current system message.

Extended Info System Variables Example set #sysmsgcol 1264 halt See Also #sysMsg #targCurs Name #targCurs — (read/write) Determines if cursor is a target cursor. Cursor is a target cursor. It can also be written to. to get a target cursor. #targCurs values. Table 1. Description The #targCurs system variable determines if cursor is a target cursor. Example initevents event SysMessage Target something! set #targCurs 1 targLoop if #targCurs = 1 goto targLoop event SysMessage The ID of the target is #lTargetID 196 . Value 0 1 Description Cursor is a normal cursor.

#cursKind values. Description The #cursKind system variable determines the facet where the character is. Value 0 1 2 3 Description Felucca Trammel Ilshenar Malas Example _PROGRAM_cursKind 197 .Extended Info System Variables halt See Also target #cursKind Name #cursKind — (readonly) Determines the facet where the character is. Table 1.

Extended Info System Variables 198 .

Client Info System Variables .XV.

.

#cliNr 201 .0.0e.0. Example if #cliVer <> 4. terminate.#cliVer Name #cliVer — (readonly) Determines the version of the client. Description The #cliCnt system variable determines the number of clients currently running. Description The #cliVer system variable determines the version of the client. Be aware of any change pause } #cliCnt Name #cliCnt — (readonly) Determines the number of clients currently running.0e { event SysMessage This script was developed for client 4. See Also uoXL.

See Also uoXL. terminate. #cliTop 202 . Make the game play window small set #cliXRes 100 set #cliYRes 100 halt See Also #cliYRes. Example . #cliLeft. #cliCnt #cliXRes Name #cliXRes — (read/write) Determines the width of the gameplay window.Client Info System Variables #cliNr Name #cliNr — (readonly) Determines which client is currently active for EasyUO. Description The #cliXRes system variable determines the width of the gameplay window. Description The #cliNr system variable determines which client is currently active for EasyUO.

Example . Description The #cliLeft system variable determines the X coordinate of the left edge of the gameplay window. 203 . #cliTop #cliLeft Name #cliLeft — (read/write) Determines the X coordinate of the left edge of the gameplay window.Client Info System Variables #cliYRes Name #cliYRes — (read/write) Determines the height of the gameplay window. Make the game play window small set #cliXRes 100 set #cliYRes 100 halt See Also #cliXRes. Description The #cliYRes system variable determines the height of the gameplay window. #cliLeft.

Client Info System Variables Example . Description The #cliTop system variable determines the Y coordinate of the top edge of the gameplay window. #cliLeft 204 . Move the gameplay window to the top/left corner set #cliLeft 0 set #cliTop 0 halt See Also #cliXRes. Example . #cliYRes. #cliYRes. #cliTop #cliTop Name #cliTop — (read/write) Determines the Y coordinate of the top edge of the gameplay window. Move the gameplay window to the top/left corner set #cliLeft 0 set #cliTop 0 halt See Also #cliXRes.

Value 0 1 Description Not logged in Logged in 205 . Description (Added in 1. Table 1. #cliLogged values.41) The #cliLogged system variable determines if a character is logged into the game.Client Info System Variables #cliLogged Name #cliLogged — (readonly) Determines if a character is logged into the game.

Client Info System Variables 206 .

XVI. Combat Info System Variables .

.

209 .#lHandID Name #lHandID — (read/write) Determines the ID of the item to be armed in the left hand. Description The #rHandID system variable determines the ID of the item to be armed in the right hand. Description The #lHandID system variable determines the ID of the item to be armed in the left hard. #rHandID #rHandID Name #rHandID — (read/write) Determines the ID of the item to be armed in the right hand. Example initEvents set #lHandID %shield event Macro 24 1 halt See Also event Macro.

See Also #enemyID #enemyID Name #enemyID — (readonly) Determines the ID of the current enemy. Description The #enemyHits system variable determines the percentage of hit points left on the current enemy.Combat Info System Variables Example initEvents set #rHandID %dagger event Macro 24 2 halt See Also event Macro. 210 . #lHandID #enemyHits Name #enemyHits — (readonly) Determines the percentage of hit points left on the current enemy.

constants set %_NORTHWEST 0 set %_NORTH 1 set %_NORTHEAST 2 set %_EAST 3 set %_SOUTHEAST 4 set %_SOUTH 5 set %_SOUTHWEST 6 set %_WEST 7 set %_SAMETILE 8 .=========================================================== . Unfortunately it is only possible to see on enemy at a time using this variable. Author: Roadkill . and you will notice if you have more than one enemy. 3=finddist . the variable will switch around by random. 9=totalfound . 4=findrep . Status: Still being reviewed . 1=enemyid . %_idx #findRep gosub findDirectionTo #findX #findY set %enemyArray5 . 2=enemytype . Name: findEnemyArray .----------------------------------------------------------sub findEnemyArray set %_objectTypes %1 set %_idx 0 _findEnemyArray: set %_idx %_idx + 1 findItem %_objectTypes %_idx if #findKind = 1 { set %enemyArray1 . %_idx #findType set %enemyArray3 . Parameters: %1 = objectTypes . Purpose: find objects of %_objectTypes and arrange data into array . %_idx #findID set %enemyArray2 . Instead a solution like below can be used: .Combat Info System Variables Description The #enemyID system variable determines the ID of the current enemy. %_idx #findDist set %enemyArray4 . %_idx %thingsDirection 211 . indexes are: . Return: array is %enemyArray. 5=direction .

=========================================================== . %_WEST or %_SAMETILE) . %_NORTH. . these will be a number 0 thru 8 0-nw 1-n 2-ne 3-e 4-se . as above . use FINDITEM to get it’s coords . %_idx 0 .put a 0 after valid spots set %enemyArray9 %_idx . . Name: findDirectionTo . Purpose: find the direction from character to something. %_SOUTHEAST. %_EAST.puts total found enemy position 9 return .1 . 5-s 6-sw 7-w 8-same . %2 = world y-coordinate . %_SOUTH.%_NORTHEAST. Return: %thingsDirection.----------------------------------------------------------sub findDirectionTo if %1 < #charPosX { if %2 < #charPosY set %thingsDirection %_NORTHWEST if %2 > #charPosY set %thingsDirection %_SOUTHWEST if %2 = #charPosY set %thingsDirection %_WEST } if %1 > #charPosX { if %2 < #charPosY set %thingsDirection %_NORTHEAST if %2 > #charPosY set %thingsDirection %_SOUTHEAST if %2 = #charPosY set %thingsDirection %_EAST } if %1 = #charPosX { if %2 < #charPosY set %thingsDirection %_NORTH if %2 > #charPosY set %thingsDirection %_SOUTH if %2 = #charPosY set %thingsDirection %_SAMETILE } 212 . %_SOUTHWEST. Parameters: %1 = world x-coordinate. can use FINDITEM to get this as #FINDX .Combat Info System Variables goto _findEnemyArray } set %enemyArray1 . Author: Roadkill . (%_NORTHWEST.

Combat Info System Variables return See Also #enemyHits 213 .

Combat Info System Variables 214 .

XVII. Namespace System Variables .

.

nameSpace clear.#nsName Name #nsName — (readonly) Determines the name of the currently active namespace. nameSpace copy. Local Variables #nsType Name #nsType — (readonly) Determines the type of the currently active namespace. Description (Added in 1. nameSpace clear. nameSpace {local | global}. nameSpace {local | global}. nameSpace copy. 217 .39) The #nsType system variable determines the type of the currently active namespace. This variable is either LOCAL or GLOBAL. nameSpace {push | pop}. See Also #nsType. nameSpace {push | pop}. See Also #nsName. but will be available later. Description (Added in 1. Local Variables Note: Global namespace is not available in the current EasyUO.39) The #nsName system variable determines the name of the currently active namespace.

Namespace System Variables 218 .

Miscellaneous System Variables .XVIII.

.

where YY is the year. The format is YYMMDD. Description The #shard system variable determines which shard you are logged into. #sCnt2. #date Name #date — (readonly) Determines the local date on your computer. MM is the month and DD is the day. Example if #date = 24122003 { event SysMessage Merry christmas! pause } See Also #sCnt.#shard Name #shard — (readonly) Determines which shard you are logged into. #time 221 . Description The #date system variable determines the local date on your computer. #sysTime.

41) The #sysTime system variable counts the number of milliseconds since 01/Jan/1980 UTC (it is timezone independant). and is not affected by overflow issues or speedhack tools. where HH is the hour in 24 hour format. Description The #time system variable determines the local time on your computer. time calculations. Description (Added in 1. #sCnt2 #sysTime Name #sysTime — (readonly) Counts the number of milliseconds since 01/Jan/1980 UTC.. It can be useful for timing. #sysTime. #sCnt. Example if #time = 120000 { event SysMessage Time for lunch! pause } See Also #date. The format is HHMMSS.Miscellaneous System Variables #time Name #time — (readonly) Determines the local time on your computer. MM is the minutes and SS is the seconds. 222 .

Miscellaneous System Variables See Also #date. #sCnt. if #scnt < %timeOut goto waitForSomething .. set %timeOut #sCnt + 10 waitForSomething: . #time. #sCnt2 #sCnt Name #sCnt — (read/write) Timer in seconds since Windows boot. #time. Example .. #sCnt2 #sCnt2 Name #sCnt2 — (read/write) Timer in tenths of seconds since Windows boot.. #sysTime.. Description The #sCnt system variable is a timer in seconds since Windows boot. 223 .. See Also #date..

#time. See Also #date. Description The #pixCol system variable determines the color of the pixel last saved with the savePix command. savePix #cursorX Name #cursorX — (readonly) Determines the x-coordinate of the cursor. 224 . #sysTime. #sCnt #pixCol Name #pixCol — (readonly) Determines the color of the pixel last saved with savePix.Miscellaneous System Variables Description The #sCnt2 system variable is a timer in tenths of seconds since Windows boot. See Also cmpPix. Description The #cursorX system variable determines the x-coordinate of the cursor.

Description The #cursorY system variable determines the y-coordinate of the cursor. See Also #cursorX #random Name #random — (readonly) Holds a random number. set %a #random % 100 225 .Miscellaneous System Variables See Also #cursorY #cursorY Name #cursorY — (readonly) Determines the y-coordinate of the cursor. Description The #random system variable holds a random number. Example . make a random number between 0 and 99.

Description The #menuButton system variable determines the name of the last menu button clicked.Miscellaneous System Variables #dispRes Name #dispRes — (readonly) Determines button clicked in last call to display. Note: You should set #menuButton to N/A when you have read which button was clicked. so you can distinguish between two seperate clicks 226 . Table 1. Value ok cancel yes no Description "Ok" was clicked. "Cancel" was clicked. "Yes" was clicked. See Also display #menuButton Name #menuButton — (read/write) Determines the name of the last menu button clicked. #dispRep values. Description The #dispRes system variable determines button clicked in last call to display. "No" was clicked.

Each line must be finished with a $ to mark the end. #spc . menu GetNum #sendHeader Name #sendHeader — (read/write) Determines http header information for the send command. Description The #menuRes system variable determines the content of last menu Get or menu GetNum. menu GetNum #menuRes Name #menuRes — (readonly) Determines the content of last menu Get or menu GetNum. See Also menu Get. menu Get. blabla2$ If #sendheader doesn’t contain any $ signs at all then no additional lines will be added to the header. Description The system variable #sendHeader is a variable that lets you add additional header lines to the post request sent by the send command. set #sendheader content-type: . Setting #sendheader to $$$ will obviously mess up the outgoing packet so that is not recommended.Miscellaneous System Variables See Also menu Button. 227 . #spc . blabla$line2: .

#spc .php?getVar=getValue postVar=postValue halt Outgoing HTTP request: POST /euo/action. $ . #cliVer . #cliVer . Warning: Two consecutive ’$’ will break the header structure and are likely to cause inpredictable results! • • If you need to specify more than one http directive.php?getvar=getvalue HTTP/1. + Content-type: . EasyUO . Without this symbol. #sendHeader value will be ignored and not added to the HTTP header. it must be terminated by a single end-of-line symbol ’$’.php?getVar=getValue postVar=postValue halt Outgoing HTTP request: POST /euo/action.0 Host: localhost Content-Length: 17 user-agent: easyuo 4. test2 set #sendHeader User-Agent: . you may use the following syntax: set #sendHeader User-Agent: . $ send debugHTTPPost localhost /euo/action. #spc .0. application/x-www-form-urlencoded$ or 228 .Miscellaneous System Variables First let’s look at EUO default format for http requests: .php?getvar=getvalue HTTP/1. test1 send debugHTTPPost localhost /euo/action. #spc . #spc .0e postVar=postValue A few things are worth mentioning here: • you cannot SET a value containing spaces to #sendHeader without ’escaping’ them using the #spc constant. #spc . the value of #sendHeader is converted to lowercase when added to the HTTP header. EasyUO .0 Host: localhost Content-Length: 17 postVar=postValue Supposing you want your HTTP request to be identifiied as issued by EasyUO by adding the directive "User-Agent: EasyUO #cliVer" to the HTTP header: .

#spc . #spc . See Also str 229 . application/x-www-form-urlencoded$ See Also send #strRes Name #strRes — (read/write) Determines the result of last str command. try any of these: set #sendHeader N/A set #sendHeader invalid content Example set #sendHeader Content-type: . Description The #strRes system variable determines the result of last str command. Content-type: . #cliVer . #spc .Miscellaneous System Variables set #sendHeader User-Agent: . $ set #sendHeader #sendHeader . #spc . application/x-www-form-urlencode In order to reset #sendHeader. EasyUO .

39) The #property system variable determines the result of last event Property command. See Also event Property #result Name #result — (read/write) Determines the result of last return command.40) The #result system variable determines the result of last return command. Description (Added in 1. Each property line is seperated by ’$’.Miscellaneous System Variables #property Name #property — (readonly) Determines the result of last event Property command. See Also return 230 . Description (Added in 1.

231 .Miscellaneous System Variables #opts Name #opts — (readonly) Determines which EasyUO configuration options are active.$ halt } #euoVer Name #euoVer — (readonly) Determines the current EasyUO version. Description (Added in 1. #opts values. Value SOT SYS DMC EXEC SEND Facing Stay on top event SysMessage Don’t Move Cursor Allow Execute Allow Send Example if DMC notin #opts { display ok This script requires "Don’t move cursor" enabled!$ +Enable this option in the EasyUO Tools menu and restart the script.40) The #opt system variable determines which EasyUO configuration options are active. Table 1.

#euo = 1_40_88 .com.40 (build 0058) 58 hex = 88 dec set %euoBuildRequired $ .which is version 1.easyuo. 58 set %euoVersionRequired 1_40 str Left #euoVer 4 set %_euover #strRes str Right #euover 2 set %_euoBuild #strRes if %_euoVer <> %euoVersionRequired || %_euoBuild < %euoBuildRequired { display ok This program requires EUO version 1.4 (build 0058) or higher in order$ + to work. Description (Added in 1. Example . .40) The #euoVer system variable determines the current EasyUO version.$ halt } #lpc Name #lpc — (read/write) Determines the current linesPerCycle setting. Download the latest version from www. The format is as follows: (MAJOR)_(MINOR)_(BUILD).Checks to make sure the correct version of EUO is used for your script requirements. See Also linesPerCycle 232 .41) The #lpc system variable determines the current linesPerCycle setting.Miscellaneous System Variables Description (Added in 1.

See Also tile. #tileCnt 233 . build 7F) The #tileType system variable determines the type for the currently read tile. Description (Added in 1.42. See Also tile. For more information. please see the command tile. For more information.Miscellaneous System Variables #tileType Name #tileType — (readonly) Determines the type for the currently read tile. #tileCnt #tileZ Name #tileZ — (readonly) Determines the z-coordinate for the currently read tile.42. build 7F) The #tileZ system variable determines the z-coordinate for the currently read tile. #tileZ. #tileType. Description (Added in 1. please see the command tile.

build 80) The #tileCnt system variable determines the name for the currently read tile. #tileZ #tileName Name #tileName — (readonly) Determines the name for the currently read tile. Description (Added in 1. For more information. See Also tile. please see the command tile. See Also tile. #tileType. #tileType.42.42) The #tileCnt system variable determines the number of tiles in the currently read position. please see the command tile. #tileZ 234 . For more information.Miscellaneous System Variables #tileCnt Name #tileCnt — (readonly) Determines the number of tiles in the currently read position. Description (Added in 1.

build 80) The #tileFlags system variable determines the flags for the currently read tile. #tileFlags values. Description (Added in 1.Miscellaneous System Variables #tileFlags Name #tileFlags — (readonly) Determines the flags for the currently read tile. Value Background Weapon Transparent Translucent Wall Damaging Impassable Wet Unknown Surface Bridge GenericStackable Window NoShoot PrefixA PrefixAn Internal Foliage PartialHue Unknown1 Map Container Description 235 . Table 1.42.

#tileType.Miscellaneous System Variables Value Wearable LightSource Animated NoDiagonal Unknown2 Armor Roof Door StairBack StairRight Description See Also tile. #tileZ 236 .

Constants System Variables .XIX.

.

#false is represented by the integer value 0. Example display yesno Do you have a pet? if #dispRes = yes { set %petOwner #true } else { set %petOwner #false } 239 .#dot Name #dot — (readonly) A constant that represents a dot character. Internally. Description The constant #dot is used to assign or compare a variable or an expression with the dot character. Description The constant #false is used to assign or compare a variable or an expression with the boolean false value. See Also #smc. #spc #false Name #false — (readonly) A constant that represents boolean false.

Constants System Variables See Also #true #smc Name #smc — (readonly) A constant that represents semi-colon character. This constant is needed since the semi-colon character ’. #dot #spc Name #spc — (readonly) A constant that represents space character. 240 .’ is used for inline comments. value of user variable is now the semi-colon character See Also #spc. Description The constant #smc is used to assign or compare a variable or an expression with the semi-colon character. Example set %var #smc .

Description The constant #true is used to assign or compare a variable or an expression with the boolean true value. #spc . #dot #true Name #true — (readonly) A constant that represents boolean true. Internally. #true is represented by the integer value -1.Constants System Variables Description The constant #spc is used to assign or compare a variable or an expression with the space character. Example display yesno Do you have a pet? if #dispRes = yes { set %petOwner #true } else { set %petOwner #false } 241 . Example set %message hello . world See Also #smc.

Constants System Variables See Also #false 242 .

Appendix A. and system variables enclosed in <> will be replaced with their current value Consider this extremely easy. rail maker: move <#charPosX> <#charPosY> 243 . Design Hotkey Manager The design hotkey manager is a little tool in EasyUO that can help you assign often repeated code to a hotkey. The code is inserted at the bottom of the EasyUO window.

Design Hotkey Manager 244 .Appendix A.

It complements the GNU General Public License.2002 Free Software Foundation. either copied verbatim. textbook. if the Document is in part a textbook of mathematics. or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it. Any member of the public is a licensee. But this License is not limited to software manuals. 59 Temple Place.) The relationship could be a matter of historical connection with 245 . which is a copyleft license designed for free software. either commercially or noncommercially. Inc. and is addressed as "you". below. Boston. A "Modified Version" of the Document means any work containing the Document or a portion of it. PREAMBLE The purpose of this License is to make a manual. We have designed this License in order to use it for manuals for free software. it can be used for any textual work. which means that derivative works of the document must themselves be free in the same sense. or with modifications and/or translated into another language. but changing it is not allowed. Suite 330.2001. a Secondary Section may not explain any mathematics. refers to any such manual or work. Secondarily. (Thus. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject.Appendix B. We recommend this License principally for works whose purpose is instruction or reference. this License preserves for the author and publisher a way to get credit for their work. GNU Free Documentation License Copyright (C) 2000. Such a notice grants a world-wide. unlimited in duration. because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. with or without modifying it. modify or distribute the work in a way requiring permission under copyright law. This License is a kind of "copyleft". that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. regardless of subject matter or whether it is published as a printed book. in any medium. The "Document". while not being considered responsible for modifications made by others. to use that work under the conditions stated herein. MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work. royalty-free license. You accept the license if you copy.

PostScript or PDF produced by some word processors for output purposes only. commercial. for a printed book. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. has been arranged to thwart or discourage subsequent modification by readers is not Transparent. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. in the notice that says that the Document is released under this License. or "History". legibly. The "Title Page" means. in the notice that says that the Document is released under this License. "Endorsements". A copy made in an otherwise Transparent file format whose markup. the material this License requires to appear in the title page. ethical or political position regarding them. that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor. A Front-Cover Text may be at most 5 words. philosophical. For works in formats which do not have any title page as such. and standard-conforming simple HTML.) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. or of legal. These Warranty Disclaimers are considered to be included by reference in this License. the title page itself. represented in a format whose specification is available to the general public. such as "Acknowledgements". The Document may contain zero Invariant Sections. "Title Page" means the text near the most prominent appearance of the work’s title. "Dedications". A "Transparent" copy of the Document means a machine-readable copy. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". plus such following pages as are needed to hold. preceding the beginning of the body of the text. as being those of Invariant Sections.Appendix B. (Here XYZ stands for a specific section name mentioned below. Texinfo input format. or absence of markup. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. XCF and JPG. LaTeX input format. If the Document does not identify any Invariant Sections then there are none. GNU Free Documentation License the subject or with related matters. and the machine-generated HTML. but only as regards disclaiming warranties: any other implication that these 246 . and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. Examples of transparent image formats include PNG. as Front-Cover Texts or Back-Cover Texts. The "Cover Texts" are certain short passages of text that are listed. SGML or XML for which the DTD and/or processing tools are not generally available. The "Invariant Sections" are certain Secondary Sections whose titles are designated. Examples of suitable formats for Transparent copies include plain ASCII without markup. PostScript or PDF designed for human modification. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors. and a Back-Cover Text may be at most 25 words. SGML or XML using a publicly available DTD.

and that you add no other conditions whatsoever to those of this License. and the Document’s license notice requires Cover Texts. You may also lend copies. and continue the rest onto adjacent pages. provided that this License. you must either include a machine-readable Transparent copy along with each Opaque copy. when you begin distribution of Opaque copies in quantity. GNU Free Documentation License Warranty Disclaimers may have is void and has no effect on the meaning of this License. or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document. can be treated as verbatim copying in other respects. Copying with changes limited to the covers. free of added material. either commercially or noncommercially. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document. Both covers must also clearly and legibly identify you as the publisher of these copies. and Back-Cover Texts on the back cover. you may accept compensation in exchange for copies. you must enclose the copies in covers that carry. numbering more than 100. If the required texts for either cover are too voluminous to fit legibly.Appendix B. to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. to give them a chance to provide you with an updated version of the Document. and the license notice saying this License applies to the Document are reproduced in all copies. all these Cover Texts: Front-Cover Texts on the front cover. as long as they preserve the title of the Document and satisfy these conditions. the copyright notices. If you use the latter option. 247 . If you publish or distribute Opaque copies of the Document numbering more than 100. The front cover must present the full title with all words of the title equally prominent and visible. and you may publicly display copies. but not required. under the same conditions stated above. If you distribute a large enough number of copies you must also follow the conditions in section 3. clearly and legibly. you should put the first ones listed (as many as fit reasonably) on the actual cover. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. VERBATIM COPYING You may copy and distribute the Document in any medium. It is requested. you must take reasonably prudent steps. that you contact the authors of the Document well before redistributing any large number of copies. However. You may add other material on the covers in addition.

in the form shown in the Addendum below. with the Modified Version filling the role of the Document. D. and likewise the network locations given in the Document for previous versions it was based on. Preserve its Title. year. Include an unaltered copy of this License. For any section Entitled "Acknowledgements" or "Dedications". authors. You may use the same title as a previous version if the original publisher of that version gives permission. Preserve the Title of the section. and preserve in the section all the substance and tone of each of the contributor 248 . G. a license notice giving the public permission to use the Modified Version under the terms of this License. new authors. you must do these things in the Modified Version: A. create one stating the title. and publisher of the Document as given on its Title Page. be listed in the History section of the Document). F. Preserve the network location. and add to it an item stating at least the title. together with at least five of the principal authors of the Document (all of its principal authors. C. K. and publisher of the Modified Version as given on the Title Page. immediately after the copyright notices. thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition. State on the Title page the name of the publisher of the Modified Version. given in the Document for public access to a Transparent copy of the Document. List on the Title Page. Preserve all the copyright notices of the Document. if there were any. unless they release you from this requirement. Include. and from those of previous versions (which should. or if the original publisher of the version it refers to gives permission. Use in the Title Page (and on the covers. E. if any) a title distinct from that of the Document. These may be placed in the "History" section. B. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice. as the publisher. If there is no section Entitled "History" in the Document. Preserve the section Entitled "History". Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. if it has fewer than five). year. GNU Free Documentation License MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above. as authors.Appendix B. H. then add an item describing the Modified Version as stated in the previous sentence. J. I. if any. You may omit a network location for a work that was published at least four years before the Document itself. provided that you release the Modified Version under precisely this License. one or more persons or entities responsible for authorship of the modifications in the Modified Version.

N. If there are multiple Invariant Sections with the same name but different contents. you may not add another. Preserve any Warranty Disclaimers. These titles must be distinct from any other section titles. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. under the terms defined in section 4 above for modified versions. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document. but you may replace the old one. you may at your option designate some or all of these sections as invariant. and a passage of up to 25 words as a Back-Cover Text. to the end of the list of Cover Texts in the Modified Version. and multiple identical Invariant Sections may be replaced with a single copy. and list them all as Invariant Sections of your combined work in its license notice. You may add a section Entitled "Endorsements". O. L. You may add a passage of up to five words as a Front-Cover Text. previously added by you or by arrangement made by the same entity you are acting on behalf of. provided it contains nothing but endorsements of your Modified Version by various parties--for example. in parentheses. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. Such a section may not be included in the Modified Version. make the title of each such section unique by adding at the end of it. add their titles to the list of Invariant Sections in the Modified Version’s license notice. Section numbers or the equivalent are not considered part of the section titles. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. The combined work need only contain one copy of this License. Preserve all the Invariant Sections of the Document. provided that you include in the combination all of the Invariant Sections of all of the original documents. COMBINING DOCUMENTS You may combine the Document with other documents released under this License. the name of the original author or publisher of that section if known. on explicit permission from the previous publisher that added the old one. and that you preserve all their Warranty Disclaimers. unaltered in their text and in their titles. unmodified. If the Document already includes a cover text for the same cover. Delete any section Entitled "Endorsements". M. GNU Free Documentation License acknowledgements and/or dedications given therein. or else a unique 249 . statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. To do this.Appendix B.

If the Cover Text requirement of section 3 is applicable to these copies of the Document. then if the Document is less than one half of the entire aggregate. and follow this License in all other respects regarding verbatim copying of that document. or the electronic equivalent of covers if the Document is in electronic form. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works. and any Warranty 250 . When the Document is included in an aggregate. the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate.Appendix B. is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. GNU Free Documentation License number. in or on a volume of a storage or distribution medium. Replacing Invariant Sections with translations requires special permission from their copyright holders. you must combine any sections Entitled "History" in the various original documents. provided you insert a copy of this License into the extracted document. You must delete all sections Entitled "Endorsements". and replace the individual copies of this License in the various documents with a single copy that is included in the collection. likewise combine any sections Entitled "Acknowledgements". and any sections Entitled "Dedications". and distribute it individually under this License. so you may distribute translations of the Document under the terms of section 4. provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may extract a single document from such a collection. forming one section Entitled "History". In the combination. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License. You may include a translation of this License. Otherwise they must appear on printed covers that bracket the whole aggregate. and all the license notices in the Document. TRANSLATION Translation is considered a kind of modification.

or rights. you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation.gnu. Such new versions will be similar in spirit to the present version. However. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer. If the Document does not specify a version number of this License. GNU Free Documentation License Disclaimers. sublicense. or "History". TERMINATION You may not copy. you may choose any version ever published (not as a draft) by the Free Software Foundation. parties who have received copies. Any other attempt to copy. modify. or distribute the Document except as expressly provided for under this License. the original version will prevail.org/copyleft/. Each version of the License is given a distinguishing version number. revised versions of the GNU Free Documentation License from time to time. sublicense or distribute the Document is void. and will automatically terminate your rights under this License. If a section in the Document is Entitled "Acknowledgements". provided that you also include the original English version of this License and the original versions of those notices and disclaimers.Appendix B. modify. but may differ in detail to address new problems or concerns. 251 . the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. "Dedications". See http://www. from you under this License will not have their licenses terminated so long as such parties remain in full compliance. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new. If the Document specifies that a particular numbered version of this License "or any later version" applies to it.

Appendix B. GNU Free Documentation License 252 .

Sign up to vote on this title
UsefulNot useful