Scripts For Admins: Difference between revisions
imported>Hendrik Brummermann added AlterQuest and BetManager |
imported>Hendrik Brummermann →Scripts and Parameters: added NPCShout, Plauge and WhereWho |
||
| Line 48: | Line 48: | ||
Note: Betting is possible in "idle conversation state" to enable interaction of a large number of players in a short time. (The last time i did a show-fight i was losing count because there where more than 15 players) |
Note: Betting is possible in "idle conversation state" to enable interaction of a large number of players in a short time. (The last time i did a show-fight i was losing count because there where more than 15 players) |
||
=== NPC Shout === |
|||
; /script NPCShout.class ''npc'' ''text'' |
|||
: ''npc'' shouts: ''text'' |
|||
=== Plague === |
|||
; /script Plague.class ''ringcount'' ''creature'' |
|||
: summon a large numbers of ''creatures'' around you. Please note that ''ringcount'' must be below 3 in order to prevent the clients to die because of an OutOfMemoryError. |
|||
=== Where are the Players === |
|||
; /script WhereWho.class |
|||
: Tells the game master where all the players. This helps to decide whether to do a raid. |
|||
=== Portable Tavern Maid === |
=== Portable Tavern Maid === |
||
Revision as of 21:03, 21 September 2006
This articles describes the new scripting system since Stendhal 0.34 (upcomming release). See Stendhal:Groovy Scripts For Admins for current release.
General Info
Highlevel admins can invoke scripts using the /script-command:
/script [-execute|-load|-unload] scriptname [params]
The default action is execute with simply executes the script. If you use load then all the modifications done by a previous invokation of this script are removed. You can remove everything a script did by invoking it with unload. execute is targeted at admins while load/unload is for developers. (But an admin may want to remove all summoned monsters in case some surfied the raid and ran away).
As every admin action the invokation of scripts is logged. Do not abuse it.
Scripts and Parameters
Admin Signs
- /script AdminSign.class zone x y text
- Places a sign saying text in the zone at (x, y). The first three parameters can be "-" to place the sign next to the admin.
- /script AdminSign.class list
- Lists all sings created by admins
- /script AdminSign.class del signnumber
- Removes the sign with that number (see list)
Alter Quest State
- /script AlterQuest.class player questname state
- Manipulates the quest state of a player. Ommit state to remove the quest.
Bet Manager
This Script summons an NPC who will collect and pay bets at a raid:
- /script BetManager.class accept opponent1 opponent2 ...
- Summons the NPC and let it accept bets on opponent1, opponent2, ...
Then players can bet by saying something like:
- bet 50 ham on fire
- bet 5 cheese on water
- /script BetManager.class action
- The game master started the action closing the betting time
- /script BetManager.class winner opponent
- After the game the game master has to tell the NPC who won:
The NPC will than tell all players the results and give it to winners:
- mort betted 50 ham on fire and won an additional 50 ham
- hendrik lost 5 cheese betting on water
Note: Betting is possible in "idle conversation state" to enable interaction of a large number of players in a short time. (The last time i did a show-fight i was losing count because there where more than 15 players)
NPC Shout
- /script NPCShout.class npc text
- npc shouts: text
Plague
- /script Plague.class ringcount creature
- summon a large numbers of creatures around you. Please note that ringcount must be below 3 in order to prevent the clients to die because of an OutOfMemoryError.
Where are the Players
- /script WhereWho.class
- Tells the game master where all the players. This helps to decide whether to do a raid.
Portable Tavern Maid
- /script Maria.class
- Summons Maria, who sells food&drinks. Put here a way after use, by teleporting yourself to int_admin_playground and executing the script again or use -unload
Server Reset
- /script ServerReset.class
- Use it in an emergeny to shut down the server. If it is started in a loop, it will come back up otherwise it will stay down. If it is possible, please warn the players to logout and give them some time. Please note that it kills the server the hard way without doing a clean shutdown.