#include "inc_isdm" #include "sha_disallo_devc" void main() { // ExecuteScript("ff_on_cl_enter", OBJECT_SELF); CheckForDevestatingCritical(GetEnteringObject()); object oPC = GetEnteringObject(); if(GetIsDM(oPC)) return;//dont mess with DMs if(GetXP(oPC)== 0) { //first entry // Check Equip Items and get rid of them int i; for(i=0; i<14; i++) { object oEquip = GetItemInSlot(i,oPC); if(GetIsObjectValid(oEquip)) { SetPlotFlag(oEquip,FALSE); DestroyObject(oEquip); GiveXPToCreature(oPC,1); } } // Check general Inventory and clear it out. object oItem = GetFirstItemInInventory(oPC); while(GetIsObjectValid(oItem)) { SetPlotFlag(oItem,FALSE); if(GetHasInventory(oItem)) { object oItem2 = GetFirstItemInInventory(oItem); while(GetIsObjectValid(oItem2)) { SetPlotFlag(oItem2,FALSE); DestroyObject(oItem2); oItem2 = GetNextItemInInventory(oItem); } } DestroyObject(oItem); oItem = GetNextItemInInventory(oPC); } //Take their Gold int nAmount = GetGold(oPC); if(nAmount > 0) { AssignCommand(oPC,TakeGoldFromCreature(nAmount,oPC,TRUE)); } object oClothes = CreateItemOnObject("nw_cloth022", oPC); AssignCommand(oPC, ActionEquipItem(oClothes, INVENTORY_SLOT_CHEST)); SetLocalInt(oPC, "League", 0); } else { //add code to jump to module start here AssignCommand(oPC, JumpToLocation(GetLocation(GetWaypointByTag("WP_RealStart")))); } object PC = GetEnteringObject(); SetPlotFlag(PC, FALSE); SetImmortal(PC, FALSE); ExecuteScript("fixitems", PC); if (GetItemPossessedBy(PC, "EmoteWand") == OBJECT_INVALID) CreateItemOnObject("emotewand", PC); if (GetItemPossessedBy(PC, "whostone") == OBJECT_INVALID) CreateItemOnObject("whostone", PC); if (GetItemPossessedBy(PC, "NW_IT_RECALL") == OBJECT_INVALID) CreateItemOnObject("recall", PC); int toys = GetCampaignInt(GetModuleName(), "toys", PC); SetLocalInt(PC, "toys", toys); int dm = isdm(PC); int s, tcnt = GetLocalInt(GetModule(), "tcnt"); string ref; object item; for(s=0; s