User:Una

From Wiki
Revision as of 08:47, 3 April 2006 by Una (Talk | contribs)

Jump to: navigation, search

Building up and finishing script. Basic and advanced tehcniques

First words

Purpose/Idea

Im writing this becouse so many beginner and even some Advanced scripters, build hard to edit and nonreadable code. Im trying to show some basic and advanced ideas about good code and teach you to script better scripts.

About author: Una

I have scripted more or less about 3 years now. I know couple of things from scripting and coding and i love to code ( and script ). Im not Pro and i dont claim to be one, but i think i can teach lots to beginners and even to people who have been in "business" for sometime already.

Target audience

In order to be able to read and fully understand this document, you are required to understand the very basics of EUO scripting language. If you are advanced writer and have already puplished some scripts, i think i can still give you something. Hope you like to read and find this "tutorial" usefull. Remember, what i show here, is only my way to do things but i have founded these to be good in my 3 year career with EUO.

Starting to write a script

Break your script to blocks ( in your head or paper ). Say you are building mining script, then it should look like this.

  • Check tools from backpack
  • Use mining tool and target ground
  • Check weight and if too heavy recall/unload

Now, you know where to start scripting. This is the heart of this script. We can now move it to next level. Pseudo- code.

Mainloop:
  gosub CheckForTools
  gosub Dig
  gosub CheckWeight
goto Mainloop