Hi
Just thought ill release a few mods ive made and use on my server
1. Eventhandler - Handy script that handles the reborn events and makes it easy for people to add script to , with a nice feedback options && Auto Load Feature
2. Mine mod -Includes Proxy Mine, Stickybombs with adjustable timers , and C4 !!!!!!
3. Weapon & Ammo Limiter - My weapon limiter - Completely CVAR controlled , including Ammo !!!! :P
- NOW with on demand Swap weapon feature
- CKR Realism Support Built In, no need to have it separate, just enable is via set ckr_realism "1"
please note: this is not a forced weapon swap, it gives the player the choice to swap or not, but the admin can decide what weapons are allowed to be swapped through an array
Mods
1. PurpleEventhandler v 1.02 .rar v1.02 16/11/14
2. PurpleMine Mod.rar
3. PurpleWeapon Mod v 1.02 .rar v1.02 19/11/14
Note: The Weapon mod and Mine mod are set up to load into my eventhandler auto once you exec the script from dmprecache.scr, if the eventhandler isnt running , it registers the event for you but its highly recommended to use my Eventhandler
Event Readme.txt
Code:
////////////////////////////////////////////////////////////////////
//////////// Purple EventHandler //////////////////////////////////
///////////////////////////////////////////////////////////////////
Purple Elephants Eventhandler
Purple Elephants Eventhandler 1.02
Very helpful script to help organise the Reborn events
-------- Changelog 16/11/2014 -----
v1.02
*Added Auto_Load feature
- will automatically load scripts within the selected event folders
under global/events/<eventname>/
*fixed bug when thread not included ie main thread
-------- Changelog 25/09/2013 -----
v1.01
--Added the following fixes--
* Bugged scores when starting map
* Freezetag spectators being affected by spawn event
* Freezetag first round, spawn event not triggered for already spawned players
* Elgbot Support
* Adds state tags to player for spawn, disconnect and connected
- local.player.spawned
- local.player.connected
Then removes it after a set time , level.tagwait , advised not to go higher then 10.
Useful if you want to just check if a player spawned without registering an event.
------------------------------------
Usage :
First Add the following to your dmprecache.scr
-------------------------------
exec global/eventhandler.scr
-------------------------------
Also Fixed the problem that spawn events are triggered at map change and/or restarts , so no need to add it twice.
NOTE:: You CAN use both methods below, you are not limited to one or the other.
/////////////////////////////////////////////////////////
**** Auto Load Feature
This feature is limited to the main thread of each script, so 1 event per script, if you require thread based event scripts, please see the Advanced Registering mode
TO TURN ON THIS FEATURE >> Go to the event_handler settings, and set level.auto_load to 1
With this feature, it makes loading event scripts even easier, does not require them to be registered like in the Advanced Registering mode.
All you have to do is place the script you want to load within the given event folder.
under global/events/<eventname>/
and will automatically load scripts within the selected event folder
Example:
If you place a file names spawn.scr inside the global/events/spawn/ folder, it will load when the spawn event is triggered.
So any script within the global/events/spawn/ folder will be triggered on spawn
///////---------------------//////// Advanced Registering /////////-----------------------------------//////
This method is for advanced users who require the event to be triggered on a certain thread inside the script, or would rather a different directory to load the scripts from. This method lets you set the path and thread of each event manually.
Add to any script in which you want the event to be registered
waitexec global/eventhandler.scr::register event script
Examples::
waitexec global/eventhandler.scr::register spawn global/testscript.scr::main
or
waitexec global/eventhandler.scr::register connected global/testscript.scr::connected
Your script should look like
global/yourscript.scr::yourlabel local.player:
/////////---------------///////////////////////////////////////////-----------------------------////////////
Weapon Mod Readme]
Code:
/*
Purple Elephants Complete Weapon Limiter
Version 1.02
19 Novemeber 2014
*Added CKR Realism Support
Version 1.01
14 Novemeber 2014
*Added Weapon swap
Usage:
Place
-------------------------------
exec global/weapons.scr::main
-------------------------------
In global/dmprecache.scr
If you are NOT using my eventhandler, you will need to place
-------------------------------------------
local.result = registerev "spawn" global/weapons.scr::spawn
local.result = registerev "keypress" global/weapons.scr::swap
------------------------------------------
to your global/dmprecache.scr
////////////////////////////////////////////////////////////////
Cvar settings
-------------
Each weapon and its ammo are controlled via cvars.
Example for sniper
set pe_sniper 1_2_3
1 = On or off 0 or 1
2 = Clipsize - Amount of rounds are in one clip
3 = Starting Amount - This is the Starting amount of ammo given BEFORE clip is loaded, clip amount is then taken from Starting amount.
Note: Grenades and Rockets DO NOT use the clipsize amount, they are limited to 1 only, so for them you would just use 1_2
ie
set pe_grenade 1_2
1 for ON
2 for Amount of grenades
Other Cvars include:
-----------------
set ckr_realism "1" 1 ON 0 OFF - If ON, CKR Realism Settings are applied, note this removed the settings like clipsize and dmstartammo from the other cvars
Both of these are triggered if the player chooses a weapon which is turned OFF
set pe_weapon_message "1" 1 ON 0 OFF - If ON , player will be displayed a list of allowed weapons, if OFF , no message will be displayed
set pe_weapon_choice "0" 1 ON 0 OFF - If ON , a player will get to choose another weapon and respawn , if OFF , players will be forced to a Sniper as default
set pe_weapon_swap "1" 1 ON 0 OFF - If ON , player will be allowed to swap his weapon for the other teams equilivent weapon
set pe_weapon_swap_time # - Sets the time in Seconds of how long between weapon swaps , set high if you only want them to be able to swap once
set pe_weapon_swap_key 'key' - Sets the keybinded key players use to swap weapons
set pe_allweapons # 1 = All weapons - Player gets all weapons , including those of the other team
2 = All Team Weapons - Player gets all weapons of their team
3 = All Allowed Team Weapons - Player gets all of the Allowed weapons of their team
4 = All Allowed Weapons - Player gets all of the Allowed weapons , including those of the other teams
So you can have a variety of different weapon variations
Say you want sniper only , you set
pe_sniper 1_5_47
and all others off
OR
If you wanted dual rifles, you would set
pe_rifle 1_10_60
All others off,
and Also
pe_allweapons 4
Example Config:
------------------------------
set ckr_realism "0"
set pe_weapon_message "1"
set pe_weapon_choice "0"
set pe_weapon_swap "1"
set pe_weapon_swap_time = "10"
set pe_weapon_swap_key = "i"
set pe_shotgun "0_5_35"
set pe_rifle "1_5_55"
set pe_sniper "1_5_47"
set pe_smg "1_20_140"
set pe_mg "0_30_180"
set pe_pistol "1_8_16"
set pe_rocket "0_6"
set pe_grenade "1_2"
------------------------------
Mine Mod Readme
Code:
/////////////////////////////////////////////////////////////
////////////////// Purple Mines Mod ////////////////////////
////////////////////////////////////////////////////////////
/*
Mine Mod V1
16th June 2013
Adds 3 types of mines to the game
1. Proximity Mine
2. StickyBomb
3. C4
All in the grenade weaponslot , can be used alongside normal grenades
PRequires Reborn Patch 1.12 >>> www.x-null.net
Place
-------------------------------
exec global/mines/main.scr::main
-------------------------------
In global/dmprecache.scr
----- Suggested to Also download my EventHandler for reborn events ----------------
If you are NOT using my eventhandler, this will use the spawn event
-------------------------------------------
Mine Usage:
------------
Select Mines ( use weaponclass grenade ) or scroll weapons until you get them
Press [Fire] to place a mine,
When a player steps on the mine , it will explode. Can have multiple mines out on the battlefield at one time
Stickybomb Usage:
-----------------
Select Stickybomb ( use weaponclass grenade ) or scroll weapons until you get them
Time Delay --- Players can choose what time they want the stickybomb to go off at
Press [Secondary Fire] to toggle between times ( displayed bottom right ) Min = 5 seconds , Max = 30 seconds , Times goes up by 5 each time.
Press [Fire] to throw the Stickybomb
Once Timer has been reached , Stickybomb will explode
OR
If the Stickybomb is Shot , it will explode immediately
Note: It will remember your last timedelay setting , until you die that is
C4 Usage:
---------
Select C4 ( use weaponclass grenade ) or scroll weapons until you get them
Press [Fire] to throw the C4
Press [Secondary Fire] to Set off the C$
Once Trigger has been pushed , C4 will explode
OR
If the C4 is Shot , it will explode immediately
CVARS
------
set pe_mine_mod 1 // On of Off
set pe_mine_instructions // On or Off === Displays instructions on how to use each weapon as they select them
set pe_mines 1 // On of Off
set pe_mine_amount # // Number of Mines available , === Max Being 8 IF you DONT have any other mines === ( or you could adjust the huds yourself if you want more with other mines )
set pe_stickybomb 1 // On of Off
set pe_sticky_amount # // Number of Stickybombs available , === Max Being 8 IF you DONT have any other mines === ( or you could adjust the huds yourself if you want more with other mines )
set pe_c4 1 // On or Off
set pe_c4_amount # // Number of C4available , === Max Being 8 IF you DONT have any other mines === ( or you could adjust the huds yourself if you want more with other mines )
Example Config:
------------------------------
set pe_mine_mod "1"
set pe_mine_instructions "1"
set pe_mines 1
set pe_stickybomb_amount 4
set pe_c4 0
------------------------------
Conflicts
----------
Uses ihuddraws indexs 100 - 131 , depending on settings above
Credits
--------
Proximity Mine - Elgan & ArMaGedDoN
StickyBomb - Elgan
C4 - Elgan && PurpleElephant
Weapon.tiks - PurpleElephant
Mod by PurpleElephant
*/
Also The Eventhandler comes with a settings.txt file , and has a nice feedback portion to help scripters, here is what the settings and feedback looks like
Code:
//// 1 = ON , 0 = OFF //////////////////
level.reg_spawn = 1
level.reg_connected = 1
level.reg_disconnected = 1
level.reg_intermission = 1
level.reg_damage = 1
level.reg_kill = 1
level.reg_keypress = 1
level.reg_servercommand = 0
///Auto Load Feature
level.auto_load = 1
///wait time
level.tagwait = 10
/// Basic Feedback Settings
/// Displays if the events were successfully registered , already registered , Error occured or Not Event wasnt called
level.event_feedback = 1
/// ^^^ Basic Feedback has to be 1 aswell ^^^ //////
/// Displays what scripts are currently exec from each event
level.event_advancedfeedback = 1
The Feedback looks like this in console logs
Basic Feedback SHows what events have been registered and which ones didnt
//////////////////////////////////////////////////////////////////////
~~~~~~~~~~~~~~~~~ Event Handler FeedBack ~~~~~~~~~~~~~~~~~~~~
~~~~Successful Registered Events~~~~
Spawn || Connected || Disconnected || Intermission || Damage || Kill Event || Keypress ||
~~~~Already Registered Events~~~~
None
~~~~Unsuccessful Registered Events~~~~
None
~~~~Events Not Called~~~~
Servercommand
~~~~~~~~~~~~~~~~~ End Handler FeedBack ~~~~~~~~~~~~~~~~~~~~
//////////////////////////////////////////////////////////////////////////////
Advanced Feedback includes each script which which is exec in each event
//////////////////////////////////////////////////////////////////////////////
~~~~~~~~~~~~~ Advanced Event Handler FeedBack ~~~~~~~~~~~~~~~~
~~~~Spawn Events~~~~
global/weapons.scr::spawn || global/mines/main.scr::spawn ||
~~~~Connection Events~~~~
None
~~~~Disconnected Events~~~~
None
~~~~Intermission Events~~~~
None
~~~~Damage Events~~~~
None
~~~~Kill Events~~~~
None
~~~~Keypress Events~~~~
None
~~~~Servercommand Events~~~~
None
~~~~Duplicates Errors ~~~~
None
~~~~~~~~~~~~~ End Advanced FeedBack ~~~~~~~~~~~~~~~~
*/
Note: Duplicate errors occur when you have added the same script twice, it will only let you add one , to avoid scripts running twice, this is very common with scripts exec from dmprecache, a good way to avoid it is to have
Code:
if(level.yourscript_run)
end
level.yourscript_run=1
At the start of the mod so it only runs once per round/map
I have tested them and it works fine for me , but they might still have a few minor problems , feel free to tell me lol