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

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

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

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

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. follow these simple guidelines: 1 . The possibilities are endless and are really only limited by your imagination. Simple answer. pretty much.Chapter 1. anything possible. 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. only limited by your own imagination. What can EasyUO do? The posibilities in EasyUO are. Getting Started Introduction What is EasyUO? EasyUO is a FREE piece of software. Read on. To get started. that enables you to write scripts that makes your characters in Ultima Online do. pretty much.

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

com (http://www. Then simply run the EasyUO. Download the zipped file from the EasyUO site (http://www.exe file. Installation Installation of EasyUO is extremely simple.easyuo. You can also find other examples on the easyuo. Getting Started . REMEMBER! EasyUO only works with the 2D client.easyuo. 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) website. 3 . change it to the value you wrote down set %pack XYZ . assign your pack’s ID to the last object id system variable set #lObjectID %pack .Chapter 1. the id of your pack.com) and unzip it to whatever directory you prefer.

Getting Started 4 .Chapter 1.

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

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

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

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

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

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

I. Command Reference .

.

I. Control-flow commands .

.

.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.. CALL won’t work if the path to a file contains any spaces. wrong: C:\My Documents\blabla. 19 .txt Example call subs. It will run the script until it meets the exit command or the end of the file.txt recall %runebookid %runenum halt See Also exit cmpPix Name cmpPix — Compares a current pixel to a previously saved pixel.call Name call — Transfers execution to another script file Synopsis call {file} [parameter.] Description The call command will transfer execution to another script. Therefore.

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

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

22 . 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. } Description The for command controls a loop that iterates a variable over a range of numbers (both up or down works).Control-flow commands for Name for — Creates a counting loop Synopsis for {variable} {start} {end} { .. until it reaches the ending number.. there after for each loop it either increments or decrements the variable.

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

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

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

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

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

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

II. Client commands .

.

. The skill name is the first four characters of the actual skill name. #skillLock 31 .. The current lock status is placed in the #skillLock system variable and the current skill cap is placed in the #skillCap system variable. #skillCap. with the exception of animal lore (ANIL) and stealth (STLT). See Also #skill.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. Example chooseSkill mage if #skill < 700 { msg You don’t have enough magery $ halt } .

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 click {X-coordinate} {Y-coordinate} [Modifiers] Description The click command mimics a click of the mouse in a specific position on the screen.42 (build 7c)) Fast Click Drag Move Cursor (New from 1.Client commands click Name click — Clicks at a specific position in the UO client. Note: From version 1. Table 1. event Drag supports dragging an object by its ID instead.43 (build 7c) click now accepts multiple modifiers. Note: Using the "Don’t Move Cursor" option can make the double clicking fail randomly. 32 . It is much more reliable.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.

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

The example script finds the first "Hail" on line 3. The very perceptive reader might be asking himself/herself why you cannot just specify the line number as a parameter of deleteJournal. 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. As the For loop proceeds it will find the other two "Hails" and react as intended. 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. To answer that question.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. That is why deleteJournal determines itself which line is to be ignored. Example for %i 10 1 { scanJournal %i if hail in #journal { 34 . 10 lines is a very good value to make sure you don’t miss any new journal text. Synopsis deleteJournal Description As of Build 0084 deleteJournal is to be considered obsolete and is only kept for backwards compatibility. says "Farewell" and forgets line 3 and everything above (because line 3 was the last line read by scanJournal). You must use deleteJournal to mark the text you have already processed so that it does not get interpreted multiple times. 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".

the {index}’th object is returned in the #FIND*. findItem options Argument C C_{container id} G G_{dist} Description Only objects in containers are returned. players. Table 1.Client commands msg Farewell$ deleteJournal } } See Also scanJournal. 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). NPCs based on object ID or object type. If no index is given the first object found is returned in the #FIND* variables. #jIndex. all items of all types will be returned. Only objects on the ground. If an index is given. #journal. Only objects on the ground are returned. #jColor findItem Name findItem — Finds items. and no farther than {dist} are returned. If * is used instead of an id or an index. monsters. 35 . Only objects in the container given by {container id} are returned.

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

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

Press start. . There are different lists of ignored items. go to a shop and follow the instructions. If reset is given with a list number.txt . only the specific list is cleared.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. it is the global list. is the ability to reset one list. Note: From version 1. The idea behind this. Example . IgnoreItem. 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 . This script will demonstrate how ignoreItem can be used. all previously ignored items will be returned on the list. If an items id is added to any list. Nothing will be found 38 . If no list number is given. . . while still keeping some other items ignored. it will not be returned from subsequent calls to findItem.42 (build 77) a list of ID’s separated by underscores can now be used with ignoreItem. If the option reset is given.

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

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

Example . If the index is 1000 or over it is considered a #jIndex value. you should turn off the "Use titlebar for display" option on the "Display" tab. Synopsis scanJournal {index} Description The scanJournal command scans the users journal and puts the matching string into the #journal system variable.Client commands Description The setUOTitle command changes the title bar on the client window. 45 . The system variable #jColor is updated with the line’s color. 2 is the second to the last line and so on. Note: If you are using UOAssist. 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 index specifies which line in the journal to use. 1 is the bottom line.

Time is either given in miliseconds. Wait for 5 miliseconds sleep 5 . . #jColor sleep Name sleep — Waits a specified amount of time. #journal. Synopsis sleep {ms} Description The sleep command waits for a specified amount of time. 46 ... Example . 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.. #jIndex.

. you may miss the target cursor and cause errors in your script. otherwise . the default timeout is 2 seconds. . or 3 seconds passes. target 3s See Also #targCurs 47 . Example . Set the timout just over what you expect the delay to take. 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. This will pause the script until either the target cursor is displayed.Client commands See Also wait.

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

Table 1. The steps are given with just a number and seconds with an added s to the number.Client commands Synopsis uoXL {{"new"} | {"swap"}] Description The uoXL command starts and swaps between open clients. #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. uoXL Options. #cliNr. The system variables #cliNr and #cliCnt are updated accordingly. Time is either given in steps of 50 miliseconds or in seconds. Synopsis wait {time} [random time] Description The wait command waits for a specified amount of time. 49 .

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

Event commands .III.

.

click event ExMsg Name event ExMsg — Shows a message over the object given by the ID. Example initEvents event Drag %ore wait 20 click 100 100 p halt See Also initEvents. 53 .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.

Moon Phases replacing the following: (128). 9 Example initEvents event ExMsg #charID 3 0 Welcome to my world! halt See Also initEvents 54 . The font and color arguments give different fonts and colors to the text. (129). \. Small font with white drop shadow. (133).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. [. Medium font. Big font with white drop shadow. ]. ExMsg fonts Index 0 1 2 3 4 5 6 7 8 Description Big font with dark edges. Small font with recessed look. Runic font replacing the following: Capital A-Z. Tiny font. Table 1. (135). Big fancy font. (134). (132). Small font with dark edges. (130). ^. _. Tiny font.

Event commands event Macro Name event Macro — Performs a UO internal macro. 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. Synopsis event Macro {param 1} [param 2] [param 3] Description The event Macro command performs a UO macro. if ommitted. Table 1.

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

%3 = Z . Purpose: Pathfind to the given coordinates .WZA) . %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 . %5 = timeout (in seconds) . Author: ScriptFellow (the. Name: pathFind . Example . Parameters: %1 = X .=========================================================== . Return: %return (#true or #false ) . %2 = Y .Event commands Note: The event PathFind command only works within one screen. If you need to move longer you need to break up the path in to several calls.

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 .%5 abs set %3 %3 .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 % . to be defined sub max set %return %1 for %_idx 2 %0 { if % .%4 abs set %2 %2 . %_idx } return 66 .1 } if #charDir = 0 || #charDir = 6 set %2 %2 .

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

down or locked.Event commands event SkillLock Name event SkillLock — Changes the skill locks on the different skills. chooseSkill. changes magery to down event SkillLock mage down . Example initEvents . 68 . #skillLock event Sleep Name event Sleep — Suspends the client for a specified time. 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.

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

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

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

Event commands 72 .

Shop Commands .IV.

.

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

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

Menu Commands .V.

.

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

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

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

similar to menu Set. menu Hide. menu Font Transparent. menu Window Title menu Delete Name menu Delete — Deletes a window element from the EasyUO menu window. menu Text. menu Get. menu Window Size. menu GetNum. menu Edit. Synopsis menu Combo ( {"Create"} {name} {x} {y} {width} ) | ( "Add" {name} {text} | {"SELECT"} {name} {index} ) Description (Added in 1. See Also menu Activate. menu Font Style. menu HideEUO. menu Show. menu Clear. menu Font BGColor. menu Font Name. menu Font Align. menu Font Color.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. Select defines what entry is currently showing. menu Set. 82 . menu Button.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 Shape. menu Window Color. menu Check. menu Font Size. menu List. menu Delete.

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

menu Get. The text in the field . menu Shape. menu Font Size. menu Font Style. will say Change me! . menu HideEUO. menu Check. #spc . menu Clear.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 Align. menu Edit edit_1 10 20 150 Change . menu Hide. with a width of 50 and hight of 25. menu Button. menu Font Name. #menuButton menu Font Align Name menu Font Align — Changes the font alignment in the EasyUO menu window. menu Set. menu Delete. me! See Also menu Activate. menu Show. menu Font Transparent. menu Font BGColor. This will create an editable field named edit_1 in position 10 20 . you will reference the NAME and not the displayed TEXT. menu Window Title. Example . menu GetNum. menu Text. Note that when refering to this field later in the script . menu Window Size. 84 . menu Window Color. menu Font Color. 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 List. menu Combo.

menu Combo. menu Font Name. $aabbcc). btnface or a hexadecial (i. color-descriptor can be a few different things: black. menu Font Size. menu List. menu Window Title 85 . menu Show. menu List. red. menu Set. menu Font Name. menu Font Transparent. menu Text. menu Window Size. menu Font Style. menu Window Color. menu GetNum. menu Font BGColor. menu Text.Menu Commands See Also menu Activate. menu Get. menu Set. menu Window Title menu Font BGColor Name menu Font BGColor — Changes the font background color in the EasyUO menu window. menu Clear. menu Shape. menu Edit. menu Font Style. menu Button. menu Button. menu Combo. menu GetNum. menu Edit. menu Font Align. menu Clear. menu Font Transparent. See Also menu Activate. menu Check. menu Hide. menu Check. menu HideEUO. menu Show. menu Window Size.e. menu Font Color. menu Delete. menu Window Color. menu Get. menu Font Size. menu HideEUO. menu Delete. menu Font Color. menu Shape. 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 Hide.

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

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

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

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

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

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

menu Font Align. menu Font Color. menu Font Size. Synopsis menu List { "Create" { name } { x } { y } { width } { height } | "Add" { name } { string } } 92 . menu List. menu Combo. menu Text. menu Delete. menu Set. menu Clear. menu Shape. menu Window Color. menu Hide. menu Font Transparent. Synopsis menu HideEUO Description The menu HideEUO command hides the main EasyUO window. Note: The only way to make the EasyUO window visible again is to close the current menu and restore the EasyUO window. menu Button. menu Get. See Also menu Activate. menu Font Name. menu Window Size. menu Check.Menu Commands menu HideEUO Name menu HideEUO — Hides the main EasyUO window. menu Font BGColor. menu Edit. menu Show. menu GetNum. 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 Font Style.

menu Font Transparent. menu Edit. menu Hide. menu List. menu Delete. menu Check. 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 Set. menu Delete. menu Shape. menu Get. menu Font Name. menu Window Size. menu Font Align. menu HideEUO. menu Window Color. menu Window Title menu Set Name menu Set — Sets the text of a control. menu Font Size. menu Clear. menu Shape. menu Text.42 (build 78)) The menu Set command sets the text of a control. menu Combo. menu Check. menu Font Color. menu Get. menu Window Size. menu Font Style. menu Clear. menu Text. menu Font Style. menu Font BGColor. menu Font Size. menu Button. See Also menu Activate. menu Font Transparent. menu Font Name. menu Font Align. menu Window Color. menu Button. See Also menu Activate. Synopsis menu Set { name } { text } Description (Added in 1. menu Edit. menu Combo. menu GetNum. menu Window Title 93 . menu Hide. menu GetNum.Menu Commands Description (Added in 1. menu Font Color. menu Show.

menu Shape linetype Value 1 2 3 4 5 6 7 Table 3. Synopsis menu Shape {name} {left} {top} {width} {height} {shapetype} {linetype} {linewidth} {linecolor} {filltype} {fillcolor} Description (Added in 1.Menu Commands menu Shape Name menu Shape — Creates a shape in the EasyUO menu window.41) The menu Shape command creates a shape in the EasyUO menu window. Table 1. menu Shape shapetype Value 1 2 3 4 5 6 Table 2. 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 Show. menu HideEUO. menu Clear. menu Font Name. hidden by calling menu Hide visible again. menu Font BGColor. menu Edit. menu Combo. menu Text. menu Font Style. Synopsis menu Show {x} {y} Description The menu Show command shows the main EasyUO window at the specified position. menu Window Color. menu List. menu Font Size. 95 . menu Window Size. menu Get.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 GetNum. menu Font Transparent. menu Delete. menu Hide. menu Set. menu Button. menu Font Align. menu Window Title menu Show Name menu Show — Shows the EasyUO menu window. menu Set. Note: Calling menu Show is the only way to make a menu. menu Check. menu Font Color.

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

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

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

Namespace commands .VI.

.

The default namespace is local and named STD. The scope is either Local or Global. A Local namespace can only be accessed by the script that defined it. Synopsis nameSpace {local | global} {namespace name} Description (Added in 1. Note: Note: currently only Local scope is available.39) The nameSpace {local | global} commands defines the current namespace name and scope. This setting is restored when then script is stopped. Global scope is to be introduced in a future version of EasyUO. A Global namespace can be accessed by any script running witihn the same EasyUO instance.nameSpace {local | global} Name nameSpace {local | global} — Defines the current namespace and its scope. The {namespace name} must be a valid EasyUO name. 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 .

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

#nsType.Namespace commands halt sub test nameSpace Push . restore previous namespace nameSpace Copy ret* From Local Test . saves current namespace nameSpace Local Test . copy variables to the original namespace nameSpace Push . 103 . saves current namespace nameSpace Local Test nameSpace Clear . restore previous namespace return See Also nameSpace {local | global}. Note: Note: currently only Local scope is available. nameSpace copy. Synopsis nameSpace {push | pop} Description (Added in 1. #nsName. create a new temporary namespace to work with set !return this_is_a_test nameSpace 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. free memory used by temporary namespace nameSpace Pop .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 {push | pop}.

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

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

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

VII. Miscellaneous commands .

.

note there is no % char in front. See Also the Section called Variables in Chapter 2. . Note: The deleteVar command is deprecated since the set command can now assign an empty string value to a variable.. deleteVar test .... set %test to something set %test TEST . set 109 . %test now holds nothing . 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. Example .

Example display yesno You have run out of ingots.. See Also #dispRes execute Name execute — Executes an external program.. Synopsis execute {filename} [argument.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..] 110 .. Do you want to end the script? if #dispRes = yes halt .

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

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

we can ( %a * %b ) %a * ( %b + %a * %b + 1 .Miscellaneous commands Description The set command. Ommitting the expression will set the variable to a blank string. set %f to use hexadecimal too + 1 . sets a varible to what an expression evaluates to. If the abs option is specified. Example set %a set %b set %c set %d set %e set %f halt 2 $a . 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. Note: Allow Send must be enabled for this command to work. %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. %c is 21 1 ) . the absolute (mathimatically) value will be assigned. 113 . %d is 22 .

. 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.com /webscripts/euochat.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 .easyuo.****************************** 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.pl R set #scnt2 0 } 114 .****************************** .0 by Cheffe .****************************** .Miscellaneous commands Example .

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

38. String Operations Option Description 116 . Table 1.Miscellaneous commands Synopsis sound [filename] Description (Added in 1.39) The sound command plays a wave file or the SystemDefault beep. 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. updated with filename in 1.38) The str command performs a string operation on the string given and stores the result in #strRes. str Name str — performs a operation on a string.

in the #strRes system variable. . Stores the position of the sub string in the #strRes system variable. in the #strRes system variable. Stores a part of the string taken from the right. . . 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 . . Deletes a part of the string and stores it in the #strRes system variable. Stores a part of the string taken from the left. Inserts a string into the string and stores it in the #strRes system variable. 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 . Stores a part of the string taken from the middle. . 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.

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

II. System Variable Reference .

.

Character Info System Variables .VIII.

.

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

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

Value C H B G Description Character is poisoned. 125 . if C in #charStatus { gosub cureMe } .. Example . #charStatus values.... Character is hidden.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... Description The #charStatus system variable determintes a number of different states that the character can be in: Table 1. Character is in war mode. sub cureMe . Character is female.

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.Character Info System Variables return See Also #charGhost. This is a unique identifier. so it can be used to identify different characters and make specific actions depending on what character it is. Example call specific_char_variables. #sex #charID Name #charID — (readonly) Determines the id of the character. 126 . Description The #charID system variable determines the id of your character.

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

Character Info System Variables 128 .

IX. Status Bar System Variables .

.

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

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

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

#hits.41) The #maxStam system variable determines the maximum stamina level of the character.. #mana.. Example .. #maxHits. Example . #int. 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. #maxMana... Note: This variable will not work unless the character status bar is open. #dex. Description (Added in 1. if #stamina < #maxStam gosub drinkRefresh 134 . See Also #str. if #stamina < 30 gosub drinkRefresh . Note: This variable will not work unless the character status bar is open.. #maxStats #maxStam Name #maxStam — (readonly) Determines the maximum stamina level or the character.Status Bar System Variables Description The #stamina system variable determines the current stamina level of the character. #maxStam.

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

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

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

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

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

Example msg My Poison Resist is #PR $ halt See Also #AR. #FR. Description (Added in 1. #FR. #CR.Status Bar System Variables Example msg My Cold Resist is #CR $ halt See Also #AR. #ER 140 .41) The #PR system variable determines the Poison 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. #ER #PR Name #FR — (readonly) Determines the Poison Resist of the character.

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

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

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

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

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

seems to be an intermediate/transitional status. 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 . Also from runebooks and tailoring/blacksmith menus. #contName values. seen with: chat. Pretty much indicitive of the answers you get too! lol. Value stack_gump drag_gump paperdoll_gump status_gump skill_gump text_gump YesNo_gump OptionsGump generic_gump from a help request. hard to catch. 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. shows up when something if flying through the air.Container Info System Variables Table 1.

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... #contID. when you choose the city to start Codex of Wisdom. Character creation. #contKind.. See Also #contSize. character creation resizing journal. #contPosY. skill gump. #contType 155 .. etc. #contPosX.

Container Info System Variables 156 .

XI. Last Action System Variables .

.

159 . crafting menu is now open . 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. Example set #lObjectID %carpentryTool event macro 17 . 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. which will use the object as if it was double-clicked with the mouse.#lObjectID Name #lObjectID — (read/write) Determines the id of the last used object.

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

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

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

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

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

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

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

#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 . Table 1.Last Action System Variables Description (Added in 1. #lLiftedKind values Value 0 1 Description An object is not on the cursor An object is on the cursor See Also #lLiftedID. #lLiftedType #lSkill Name #lSkill — (read/write) Determines the skill last used. Table 1. 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).41) The #lLiftedKind system variable determines if an object is being dragged/lifted. Description The #lSkill system variable determines the skill last used.

Description The #lSpell system variable determines the last spell cast. which will cast the spell. You can also write to this variable and use it in conjuction with "event Macro 16" (LastSpell). #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. Table 1.

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.

.

#findX. #findCol. #findDist. I have exactly #findstack gold on me. 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. #findRep. #findType. #findBagID. #findY. Description The #findID system variable determines the id of the object returned by findItem. #findStack. 175 .#findID Name #findID — (readonly) Determines the id of the object returned by findItem. #findZ. #findCnt #findType Name #findType — (readonly) Determines the type of the object returned by findItem.$ halt See Also findItem. #findKind. #findMod.

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

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

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

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

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

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

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

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 .

.

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

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

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

Extended Info System Variables Description The #jIndex system variable determines the index of the current journal entry. #jColor #jColor Name #jColor — (read/write) Determines the color of the text in the journal. 194 . scanJournal. #journal. By saving the value of #jIndex at appropriate times you can scan a section of the journal without ever losing a string. 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. By calling scanJournal with #jIndex as the parameter you will get the last line in the journal.

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

It can also be written to. 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 . to get a target cursor. Table 1. Value 0 1 Description Cursor is a normal cursor. Cursor is a target cursor.Extended Info System Variables Example set #sysmsgcol 1264 halt See Also #sysMsg #targCurs Name #targCurs — (read/write) Determines if cursor is a target cursor. #targCurs values. Description The #targCurs system variable determines if cursor is a target 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 . Table 1.Extended Info System Variables halt See Also target #cursKind Name #cursKind — (readonly) Determines the facet where the character is.

Extended Info System Variables 198 .

XV. Client Info System Variables .

.

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

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

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

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

Table 1. Description (Added in 1. Value 0 1 Description Not logged in Logged in 205 . #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 .

Combat Info System Variables .XVI.

.

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

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

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

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

Combat Info System Variables return See Also #enemyHits 213 .

Combat Info System Variables 214 .

XVII. Namespace System Variables .

.

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

Namespace System Variables 218 .

XVIII. Miscellaneous System Variables .

.

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

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

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

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

See Also #cursorX #random Name #random — (readonly) Holds a random number. make a random number between 0 and 99. set %a #random % 100 225 . Example .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. Description The #cursorY system variable determines the y-coordinate of the cursor.

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

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

it must be terminated by a single end-of-line symbol ’$’. #spc .0 Host: localhost Content-Length: 17 user-agent: easyuo 4.php?getVar=getValue postVar=postValue halt Outgoing HTTP request: POST /euo/action. #sendHeader value will be ignored and not added to the HTTP header. + Content-type: .0. #spc .php?getvar=getvalue HTTP/1. 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. test2 set #sendHeader User-Agent: . #spc . #cliVer . you may use the following syntax: set #sendHeader User-Agent: .php?getvar=getvalue HTTP/1.php?getVar=getValue postVar=postValue halt Outgoing HTTP request: POST /euo/action. $ . EasyUO . the value of #sendHeader is converted to lowercase when added to the HTTP header.Miscellaneous System Variables First let’s look at EUO default format for http requests: . application/x-www-form-urlencoded$ or 228 .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 .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. EasyUO . $ send debugHTTPPost localhost /euo/action. #spc . Without this symbol. #cliVer . test1 send debugHTTPPost localhost /euo/action.

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

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

#opts values.40) The #opt system variable determines which EasyUO configuration options are active.$ halt } #euoVer Name #euoVer — (readonly) Determines the current EasyUO version. 231 . Description (Added in 1.Miscellaneous System Variables #opts Name #opts — (readonly) Determines which EasyUO configuration options are active. Table 1. 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 (build 0058) 58 hex = 88 dec set %euoBuildRequired $ .41) The #lpc system variable determines the current linesPerCycle setting. The format is as follows: (MAJOR)_(MINOR)_(BUILD). Download the latest version from www. Description (Added in 1. See Also linesPerCycle 232 . .$ halt } #lpc Name #lpc — (read/write) Determines the current linesPerCycle setting.#euo = 1_40_88 .which is version 1.4 (build 0058) or higher in order$ + to work.Miscellaneous System Variables Description (Added in 1. 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.Checks to make sure the correct version of EUO is used for your script requirements.easyuo.com. Example .40) The #euoVer system variable determines the current EasyUO version.

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

please see the command tile. #tileType.Miscellaneous System Variables #tileCnt Name #tileCnt — (readonly) Determines the number of tiles in the currently read position. Description (Added in 1. See Also tile.42. please see the command tile. See Also tile.42) The #tileCnt system variable determines the number of tiles in the currently read position. #tileType. #tileZ 234 . 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. For more information. For more information. Description (Added in 1.

#tileFlags values. build 80) The #tileFlags system variable 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 .42. Description (Added in 1.Miscellaneous System Variables #tileFlags Name #tileFlags — (readonly) Determines the flags for the currently read tile. Table 1.

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

XIX. Constants System Variables .

.

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

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

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

Constants System Variables See Also #false 242 .

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

Appendix A. Design Hotkey Manager 244 .

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

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

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

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

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

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

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

Appendix B. GNU Free Documentation License 252 .

Sign up to vote on this title
UsefulNot useful