![]() |
Event Functions
2 Attachment(s)
Event Functions
I made some basic event functions, for use in many different events. I'll explain each one below. Keep in mind: all means every player in the level name is the player by name. This uses my findName method. You can see it here. It basically allows you to ":kick cbk" to kick cbk1994 or ":kick Chris Vi" to kick me. For every one of these listed without a code example, you simply need: PHP Code:
This allows you to kick a player from the event. You change the position where they go to in the database NPC. You can say ":kick" and click the player, say ":kick name", or say ":kick all". event_gather This allows you to gather a player. It can be used to summon a player from another level (e.g. ":gather cbk") or to gather players in a level (":gather" and click, or ":gather all"). event_sort This allows you to sort the players in the event into different groups, and possibly warp them to the correct place. The first command is ":sort #". If no number is included, it uses two by default. Default team names are declared in the database NPC. The preferable way to use this is to set up a local list of teams (and where to warp them to). It looks like this: PHP Code:
event_warp This warps all the players in a level (including staff) into a different level. For example, if you want to go from the arena to the lobby, say ":warp". The code looks like this: PHP Code:
This is pretty self-explanatory. Say ":cleartags" to remove the guild of all players in the level (not including staff). event_focus Put this in an NPC at the location you want to focus at. Then, just say ":focus" to toggle focus on/off. event_heal This allows you to heal the players in the level. You can use ":heal name", ":heal all", or say ":heal" and click someone. The healing variables can be changed in the database NPC. event_leave Add this to a level to add a "leave" command. This basically just sends players to the kick location (changed in the database NPC). Setting Up the Database NPC The database NPC must be named "EventSystem". If you want, you can change every instance of this in the scripts and then rename it, but I don't recommend that. Paste in the code from the attached script. The part you need to change looks like this: PHP Code:
I've attached the scripts in an archive, and the database NPC as a text file. |
Seems interesting, did take a fast look and it seems good, but you should of explained us how to make an event with an example =o
I don't like your findname functon/method though ;o |
Quote:
What's wrong with the findName? :( |
Quote:
Quote:
|
Quote:
|
Quote:
Why |
Quote:
And why? Why not? :p Quote:
|
Quote:
Quote:
|
Quote:
|
Great Scripts, they all works perfectly, good job. :)
|
| All times are GMT +2. The time now is 06:22 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.