Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-11-2011, 08:09 PM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Smile Events System

Every UC server I've been on to seems to want an events system of their own without a lot of hassle involved in developing it. My main purpose in this task was to make it as simple as possible for everyone to use. Well, this is what I have created:
An events system that is handled solely by one weapon which has to be added to every player when they log in. Not only does this system handle hosting of events, it handles warping players, kicking players, adding EC to players, and pretty much everything you'd expect out of an events system.
To make sure no-one goes into observer mode and disrupts gameplay for other players, players using a trial account cannot join events.
It also prevents events team members stealing EC, and prevents players setting nicks or issuing commands in events that start with "/".
It's also very flexible, and takes the event names from the level name itself.
Give it a go and see what you make of it.
There are a few commands, both events team and players will need to know, and they are included in the instructions.txt file at the bottom of this post, as well as a few pointers for events developers creating events with this system.

The only few things you need to do are:

- Save the script into a weapon with a name starting with "-".

- Set up an EC database so that EC can be stored by doing the following:

1. Opening up NPCs list.
2. Creating a new object NPC named EC_Database.

- Create a text file called "ec_log.txt" so that EC giveouts can be logged.

- Change the 4 constant variables in the script (which are just under the
clientside marker) to suit your server.
Also, just to spice it up, I created a simple image to make the event
masses look just a bit more appealing, so download that too.
Name it "kavan_eventcoin.png" unless you want to root through the script
and change the showimg. (index 3004)

Here's a screenshot of this in action:



I hope you enjoy this. Please post any bugs/feedback/problems that you have and I will do my best to help you.
Attached Images
 
Attached Files
File Type: txt Events_System.txt (8.0 KB, 578 views)
File Type: txt Instructions.txt (2.0 KB, 507 views)
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.