rohezals script documentation
in general, scripts which are executed twice overwrite each others variables.
this is why you can just run one moveto script (or copy them and rename
the variables). this is (almost) how movetowalk was created.this is archieved by a lock. some script which affects only the player who execute it like holdspec. most time you see it when no index is given for a script like setangles (buildin).
walkto target id source id speed (int optional)
starts the movefwrd animation of source and moves it directly to target
can just move 1 object at one time. when multiple object are moved, the first object
stops after 10 milliseconds and the second one starts to move.
moveTo target id source id speed (int optional)
move an entity setposition. can go through walls etc. independent from walkto.
can handle just 1 object, until it arrives at target. other calls of the script are ignored
until it arrives.
isinregion id1 id2 radius (float)
checks if id2 is in radius of id1. can be moved. a selfwritten promity trigger.
can be used for falling rocks, moving things over bridges, cinematics etc.
a lock (set locked in gamestart to 0)
if [_locked== 1] goto Locked
set locked 1
some script stuff
set locked 0
used for cyclic waypoint moving. non cyclic / one way in tower defense.
on mapstart over writes each enemy_waypoint (number)with a script that overwrites the
ememy_target with a precomputed value.
move npcs or pets (must be changed by hand in setnpcjob / setpet)job,
of an npc with name (must be a number), to the enemy_waypoint, which was
set by the last waypoint it passed.
xchat playerid (int) lookatid(int ) topic (string)
look at position start dialog and hold spec. most time used from x(personname) for dialog.
teleports after dialog to (dialogname)_release. player. is invulnerable during dialog. vulnerable after it, even if he was invulnerable from an other source.
lookat (lookatx at project x for compatibility reason) dummyid (int)
2 subscrits one for x angel, one for y angle
look at the direction a dummy entity faces, in x and y diretcion. slow turning to the target.
popupx text string title string execute string (scriptname)
subscript popup (some interface code)
displays a popup with text and title can be empty, then diary is used as titile.
execute is the name of the script which is executed after the popup, is closed.
if execute is empty nothing is executed.
some code for interace stuff. written by pidgi modified by me.
it jumps to the @TOPIC (like merchant, its a string variable) anchor after it has inited his stuff.
its used via xchat. look at greenon, jolan for an easy example. its pretty powerful and call
itself for multi page dialogs. care with to long strings, they look ugly. the generic field,
is like popup, but its more integrated in ui. callback is the topic ( in ui) which should be displayed after generic . if call is not set generic closes the dialog after it is closed.
some interface code for popupx. if you don't want to modify it, you can just use popupx.
a player can't move or look around. can click on gui. used for dialogs.
release a holdspec. don't forget to use it.
playerTurnNorth, west, northwest etc. (clientscript)
turns the player slowly to north west east etc.
I love VOIP
sing: "base, base, base, base, base, base, base"
Why only 15 year old girls? Since 4 Years, damn I'm doing something wrong...
One day I will find out who is responsible for the K2 scripting "language" and the modding "support". And then...