new: comp 2 21 20403 "medm" 23 0 5000
Installs the agent. As above mentioned the agent isn't a simple
agent (simp) but a compound part. So after the new command follows comp. Next there are family-
genus- and scriptnumber, the sprite_file and image_count, first_image, plane.
pat: dull 1 "medm" 1 57 71 0
This is the first DULL part. It's a red button which outputs medicine
bottles originally.
To add DULL part to an agent, following data is important:
pat: DULL, DULL_number, sprite_file, first_image, relative x-coordinate on the agent with respect to the
coordinates of part 0, relative y-coordinate on the agent with respect to the coordinates of part 0,
relative plane with respect to the plane of part 0.
Our first DULL part uses the images starting from 1 (second image in the sprite-file), has the coordinates
(57, 71) and the relative plane 0 with respect to the plane of part 0.
What relative plane 0 with respect to the plane of part 0 means, I don't know. I always use 0 and it works.
pat: dull 2 "medm" 4 0 35 0
This DULL part is the joist which shows how much energy the medicine-
machine has for its usage. The part has the same conditions as DULL part number 1.
It uses the images of the sprite-file beginning with number 4 and has the coordinates (0, 35).
pat: dull 3 "medm" 10 9 38 0
This DULL part is the area in which the medicine bottles appear. It has
the same conditions as DULL part number 1 and uses the images of the sprite-file beginning with number
10. Its coordinates are (9, 38).
clac 0
This command will cause a Activate 1 Event if you click the next time
on the agent. You can specify what happens in this event by editing scrp family, genus, scriptnumber, 1
(more about this see below, the command is explained).
scrp 2 21 20403 1
This is the Activate 1 Event. It will invoke if you click the first
time on the agent.
part 1
With part number you declare which part you will use. In this case it's
the first DULL part (the red button).
anim [0 1 255]
With the command anim a part will be animated. In the bracket you
declare which images will be shown one after another.
If you animate parts, image 0 is always that image that you specified as first_image in the command
pat: DULL.
You can start a loop with 255. The anim command will be executed over and over again.
At this concrete case:
Image 0 is the second imaage in the sprite-file (button off) and image 1 is the third one (button on).
Look at the sprite-file than you know what I mean. Both images were iterated over and over so that the
button blinks perpetually.
I don't explain the other anim commands because with this explanation you understand the others. Another
help is to look at the agent in the game. So you can find out what the agent does after which click.
clac 1
This command will cause a Activate 2 Event if you click the next time
on the agent.
Summarization Activate 1 Event:
The red button will be selected and will be animted in a loop. You
declare with the command clac 1 that by the next click another event will be invoked. If you left out
clac 1 only the red button would be animated and other parts would have no use.
scrp 2 21 20403 2
This is the Activate 2 Event.
part 2
The DULL part with the number 2 (the energy display) will be elected.
clac 2
This command will cause a Deactivate Event if you click the next time
on the agent.
Summarization Activate 2 Event:
The energy display will be elected and will be animatd in a loop.
You declare with the command clac 2 that by the next click another event will be invoked.
scrp 2 21 20403 0
The Deactivate Event. Don't be confused by the name. It doesn't mean
that this event will deactivate the agent. The event can do everything what you want it to do.
part 3
The DULL part with the number 3 (area in which the medicine bottles will
appear) will be elected.
clac 3
This command will cause a Hit Event if you click the next time
on the agent.
Summarization Deactivate Event:
The area in which the medicine bottles appear wil be elected and will
be animated in a loop.
scrp 2 21 20403 3
The Hit Event
pose 0
With this command the selected part (you always have to specify which
part you mean with part number) will be restored in image position 0.
Summarization Hit Event:
One after another all parts were selected and be restored in
image position 0. This has the effect that all animations will stop and the agent will look like at the
beginning.
At the end, there's the command clac 0 which we've seen in the installationscript. With this command
the next click on the agent will cause a Activate 1 Event and everything starts again.
rscr
The Uninstall Skript. I've explained it in the honeypot tutorial.
|