Initial upload
Initial upload.
This commit is contained in:
41
_module/nss/client_onleavedr.nss
Normal file
41
_module/nss/client_onleavedr.nss
Normal file
@@ -0,0 +1,41 @@
|
||||
// Module : OnClientLeave by Brian "spilth" Kelly
|
||||
// For Neverwinter Nights - Bleeding Tutorial
|
||||
|
||||
#include "bleeding_config"
|
||||
|
||||
void main() {
|
||||
// Remember what their hit points were at for when they next sign on...
|
||||
SetLocalInt(GetExitingObject(), "LastHitPoints", GetCurrentHitPoints(GetExitingObject()));
|
||||
|
||||
object oPC = GetExitingObject();
|
||||
|
||||
location lPClocation = GetLocation(oPC);
|
||||
object oInvItem = GetFirstItemInInventory(oPC);
|
||||
// object oLootBag = CreateObject(OBJECT_TYPE_PLACEABLE, "pclootbag", lPClocation);
|
||||
int nYes;
|
||||
string sItemTag;
|
||||
|
||||
while (GetIsObjectValid(oInvItem) == TRUE)
|
||||
{
|
||||
nYes = 0;
|
||||
sItemTag = "";
|
||||
sItemTag = GetTag(oInvItem);
|
||||
if(sItemTag == "FalseMark")
|
||||
nYes = 1;
|
||||
if(sItemTag == "MarkofOron")
|
||||
nYes = 1;
|
||||
if(sItemTag == "MarkofGamlee")
|
||||
nYes = 1;
|
||||
if(sItemTag == "MarkofMaro")
|
||||
nYes = 1;
|
||||
if(sItemTag == "MarkofZool")
|
||||
nYes = 1;
|
||||
if(nYes == 1) {
|
||||
// AssignCommand(oLootBag, ActionTakeItem(oInvItem, oPC));
|
||||
DestroyObject(oInvItem);
|
||||
}
|
||||
|
||||
oInvItem = GetNextItemInInventory(oPC);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user