Aschbourne_PRC8/_module/nss/vamp_on_used.nss
GetOffMyYarn 69879d6957 Areas and Fixes
Added CCOH and missing areas
Changed some areas to be craftable,
Fixed some on death issues,
Fixed the Gaurd
2024-08-30 11:38:44 -04:00

132 lines
3.9 KiB
Plaintext

// Vampire System
#include "vamp_domination"
#include "vamp_form"
#include "vamp_children"
#include "vamp_blooddrain"
#include "vamp_coffintoken"
#include "vamp_stake"
#include "vamp_bottleblood"
#include "vamp_drinkblood"
#include "vamp_gaseous"
#include "vamp_lineage"
#include "vamp_death2undth"
#include "vamp_slamattack"
// Hordes of the Underdark switches
#include "x2_inc_switches"
void main()
{
object oItem = GetItemActivated();
object oPC = GetItemActivator();
object oTarget = GetItemActivatedTarget();
location lLocation = GetItemActivatedTargetLocation();
string oItemTag = GetTag(oItem);
// if the player is a vampire, check vampire specific items.
if (GetSubRace(oPC) == "Vampire")
{
if (oItemTag=="BloodBottle")
{
vamp_drinkblood(oPC);
return;
}
if (oItemTag=="VampireCoffinToken")
{
coffin_token(oPC,lLocation);
return;
}
// if they need to rest / are dead, don't let them use the following items.
if (GetCampaignInt("Vampire", "VampireMustRest", oPC)==1)
{
SendMessageToPC(oPC,"You must rest before you can do this. Find your coffin.");
return;
}
if (oItemTag=="VampireLineage")
{
vamp_lineage(oPC,oTarget);
return;
}
if (oItemTag=="VampireDomination")
{
vamp_domination(oPC,oTarget);
return;
}
if (oItemTag=="VampireAlternateWolfForm")
{
vamp_form_wolf(oPC);
return;
}
if (oItemTag=="VampireAlternateFormDireWolf")
{
vamp_form_direwolf(oPC);
return;
}
if (oItemTag=="VampireChildrenoftheNight")
{
vamp_children_wolf(oPC,lLocation);
return;
}
if (oItemTag=="ChildrenoftheNightRat")
{
vamp_children_rat(oPC,lLocation);
return;
}
if (oItemTag=="BloodDrain")
{
vamp_blooddrain(oPC,oTarget);
return;
}
if (oItemTag=="SlamAttack")
{
vamp_slamattack(oPC,oTarget);
return;
}
if (oItemTag=="WoodenStake")
{
vamp_stake(oPC,oTarget);
return;
}
if (oItemTag=="EmptyBottle")
{
vamp_bottleblood(oItem, oTarget, oPC);
return;
}
if (oItemTag=="gaseous")
{
vamp_gaseous(oPC);
return;
}
if (oItemTag == "vamp_death2undeath")
{
vamp_death2undeath(oPC,oTarget);
}
}
/********** HORDES OF THE UNDERDARK CODE *******************/
// * Generic Item Script Execution Code
// * If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module,
// * it will execute a script that has the same name as the item's tag
// * inside this script you can manage scripts for all events by checking against
// * GetUserDefinedItemEventNumber(). See x2_it_example.nss
// object oItem = GetItemActivated();
/*
PrintString("on_used: Perhaps Hordes can take care of: "+GetTag(GetItemActivated()));
if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
{
SetUserDefinedItemEventNumber(X2_ITEM_EVENT_ACTIVATE);
int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF);
if (nRet == X2_EXECUTE_SCRIPT_END)
{
return;
}
}
*/
/********** HORDES OF THE UNDERDARK CODE *******************/
//DAVIDBEOULVE
//I think all of that stuff kind of does this:
PrintString("on_used: I can't figure out what script this item needs, so I am going to try to execute a script of the same tag: "+GetTag(GetItemActivated()));
ExecuteScript( GetTag( GetItemActivated() ), OBJECT_SELF );
}