Initial Upload
Initial Upload
This commit is contained in:
62
_module/nss/_ondeath.nss
Normal file
62
_module/nss/_ondeath.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
void Stolen(object oPlayer)
|
||||
{
|
||||
object oStolen = GetFirstItemInInventory(oPlayer);
|
||||
while (oStolen != OBJECT_INVALID)
|
||||
{
|
||||
if (GetStolenFlag(oStolen) == TRUE)
|
||||
{
|
||||
SetDroppableFlag(oStolen,TRUE);
|
||||
}
|
||||
oStolen = GetNextItemInInventory(oPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
void Skull(object oPlayer)
|
||||
{
|
||||
object oPlayer = GetLastPlayerDied();
|
||||
object oArea = GetArea(oPlayer);
|
||||
vector vDead= GetPosition(oPlayer);
|
||||
float fFace = GetFacing(oPlayer);
|
||||
|
||||
vector vNew;
|
||||
vNew.x=vDead.x+1.0;
|
||||
vNew.y=vDead.y+1.0;
|
||||
vNew.z=vDead.z;
|
||||
object oItem = GetItemPossessedBy(oPlayer, "skullball");
|
||||
if (GetIsObjectValid(oItem))
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
location lLoc = Location( oArea, vNew, fFace);
|
||||
CreateObject(OBJECT_TYPE_ITEM,"skullball", lLoc);
|
||||
}
|
||||
}
|
||||
#include "nw_i0_plot"
|
||||
void main()
|
||||
{
|
||||
object oPlayer = GetLastPlayerDied();
|
||||
SetLocalInt(oPlayer, "PCDead", 1);
|
||||
|
||||
string sArea = GetTag(GetArea(oPlayer));
|
||||
if (sArea == "TheStadium") Skull(oPlayer);
|
||||
|
||||
if (sArea == "DrowDungeon")
|
||||
{
|
||||
SetLocalInt(oPlayer,"dungeon_died",1);
|
||||
}
|
||||
|
||||
Stolen(oPlayer);
|
||||
|
||||
AssignCommand(oPlayer, ClearAllActions());
|
||||
SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 74, oPlayer);
|
||||
SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 74, oPlayer);
|
||||
SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 74, oPlayer);
|
||||
|
||||
if(HasItem(oPlayer,"fairy_bottle") == TRUE)
|
||||
{
|
||||
DelayCommand(3.0,ExecuteScript("fairy_rez_bottle",oPlayer));
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayCommand(5.0, PopUpGUIPanel(oPlayer,GUI_PANEL_PLAYER_DEATH));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user