Script fixes, additions, and area changes

This commit is contained in:
EpicValor
2023-09-03 21:12:26 -05:00
parent b3a5e77663
commit 430f3102d9
100 changed files with 40112 additions and 1032 deletions

View File

@@ -1,50 +1,10 @@
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());
AssignCommand(oPlayer, SurrenderToEnemies());
@@ -58,7 +18,8 @@ SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 74, oPlayer);
}
else
{
//SurrenderToEnemies();
DelayCommand(3.0,ExecuteScript("prc_ondeath",oPlayer));
AssignCommand(GetLastPlayerDying(), ClearAllActions());
AssignCommand(GetLastPlayerDying(),SpeakString( "I Dying"));
PopUpGUIPanel(GetLastPlayerDying(),GUI_PANEL_PLAYER_DEATH);
}
}