Neverwinter Nights > Script Request
420's Duel Management System
420:
OK, it's complicated and probably has all sorts of problems, but here is the duel management system I use, altered for anyone to include in their mod.
First, you must have "tag based scripts" enabled. If your mod was created after HotU then this should be enabled by default. If your mod is older then make sure you put the script "x2_mod_def_load" into the OnModuleLoad event trigger in the module properties.
All of the following scripts have been packed into one .erf file and can be imported into a NWN module:
onmodentduel - Include the lines of this code into your moduels OnClientEnter event trigger.
NOTE: see "OPTIONS" in the script for info on how to give people your duel managing item automatically when they join the server.
exitmod - This script goes in your modules OnClientLeave event trigger
endduel - This script must be named "endduel", doesn't need to be attached to an event
duelitem - This script must have the same name as the tag of the item used to manage duels. (Item must have a Unique Power or Activate Item property to work)
NOTE: See "OPTIONS" in the script to add dueling arenas to the list, the duel managing system will not work unless you enter at least 1 area into the list
exitarea - Put this script in the OnExit event trigger of any areas where dueling is allowed. (The duel will end if one of the duelers leaves the area)
ondeath - Replace the OnDeath module event trigger with this script because Bioware sucks. (also it's needed for the duel managing system)
NOTE: See the "NOTE" for duelitem, you must enter all areas where dueling is allowed.
Good luck,
420
Summit:
Ok, but where is the erf package?
420:
--- Quote ---Ok, but where is the erf package?
[snapback]8345[/snapback]
--- End quote ---
DAMMIT! It says I attach it then it doesn't show up!!
Xen, fix it!!!!
-420
Illutian:
would there be a way to script it to work in only certain areas
*has a OnRespawn script that's SUPPOSE to transport you to a temple*
420:
--- Quote ---would there be a way to script it to work in only certain areas
*has a OnRespawn script that's SUPPOSE to transport you to a temple*
[snapback]8359[/snapback]
--- End quote ---
OK, I posted the file as a .zip (thanks for the tip Khadgar).
Yes, the duel manager only works in the areas that you specify in the "duelitem" and "ondeath" scripts. You'll probably want to alter your "OnRespawn" script so that players don't go to the temple if they died in an arena.
EDIT: Correction, if you add the area tags to the OnDeath script your shouldn't have to alter the OnRespawn, my bad. The OnDeath script makes it so that you auto resurrect 1 round (6 seconds) after you die in an arena area, so the OnRespawn never fires.
-420
Navigation
[0] Message Index
[#] Next page
Go to full version