Aschbourne_PRC8/_module/nss/on_client_enter.nss

32 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-06-14 10:48:20 -04:00
// Goes in the OnClientEnter event - Example for v1.3
#include "se_new_player"
void main()
{
object oMod = GetModule();
ExecuteScript("_cb_client_enter", oMod);
object oPC = GetEnteringObject();
if(GetIsPC(oPC)&& GetIsObjectValid(oPC))
{
SirElrics_SimplePlayerSetUp(oPC);
}
//Test to see if PC has a skill book.. if not, then create one.
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
{
CreateItemOnObject("skilllogbook",oPC,1);
}
//Delete persistent hooks which need to be 'gone' to begin with
//**this added due to HoTU effects on servervault characters
DeleteLocalInt(oPC,"iSkillGain");
DeleteLocalInt(oPC,"iPCUsedMap");
DeleteLocalInt(oPC,"iAmFollowingMap");
DeleteLocalInt(oPC,"iAmDiggingMap");
DeleteLocalInt(oPC,"iAmFishing");
DeleteLocalInt(oPC,"iCancelFishing");
DeleteLocalInt(oPC,"iAmInField");
DeleteLocalInt(oPC,"iAmInWaterField");
DeleteLocalInt(oPC,"iAmInCommodityArea");
DeleteLocalString(oPC,"sKillMe");
DeleteLocalInt(oPC,"iAmDigging");
DeleteLocalLocation(oPC,"lIWasHere");
}