#include "fr_i0_subraces" #include "x2_inc_itemprop" #include "hx_inc_craftfix" #include "hx_sc_sec_check" #include "hx_inc_spellfix" void RemoveTempEffects(object oItem) { itemproperty ItemPTemp = GetFirstItemProperty(oItem); while (GetIsItemPropertyValid(ItemPTemp)) { if (GetItemPropertyDurationType(ItemPTemp)==DURATION_TYPE_TEMPORARY) RemoveItemProperty(oItem,ItemPTemp); ItemPTemp = GetNextItemProperty(oItem); } }
void main() { object oPC = GetEnteringObject(); object oStore = GetModule();
string sStoreName = GetName(oPC) + GetPCPlayerName(oPC); // =[PC name] + [login name] SetLocalString(oPC, "_MyIdString", sStoreName); SendMessageToPC(oPC, "Taganrog Cormyrean Prophecies v3.7.2c"); AssignCommand(GetModule(), DelayCommand(0.0f, SecBegin(oPC))); /// if(GetIsDM(oPC)) { if(GetItemPossessedBy(oPC, "dmfi_emote") == OBJECT_INVALID) CreateItemOnObject("dmfi_emote", oPC); if(GetItemPossessedBy(oPC, "dmfi_dmw") == OBJECT_INVALID) CreateItemOnObject("dmfi_dmw", oPC); return; }
DelayCommand(0.0, InitializeSubrace(oPC)); AssignCommand(GetModule(), DelayCommand(0.0f, CraftCheck(oPC)));
object oOdeyalo = GetItemPossessedBy(oPC, "odeyalo"); if (GetIsObjectValid(oOdeyalo) == TRUE) DestroyObject(oOdeyalo);
if(GetIsPC(oPC)) { SetLocalInt(oPC, "IsAPC", TRUE);
RestoreTalents(oPC, sStoreName);
int iSavedHP = GetLocalInt(oStore,"HP_"+sStoreName); // SendMessageToAllDMs(IntToString(iSavedHP)); if(iSavedHP != 0) { effect efDamage = EffectDamage(GetMaxHitPoints(oPC)-iSavedHP,DAMAGE_TYPE_MAGICAL,DAMAGE_POWER_ENERGY); DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, efDamage, oPC)); }
if(GetItemPossessedBy(oPC, "dmfi_emote") == OBJECT_INVALID) CreateItemOnObject("dmfi_emote", oPC);
if(!GetXP(oPC)) { CreateItemOnObject("bedroll", oPC); CreateItemOnObject("NW_IT_GOLD001", oPC, 300); CreateItemOnObject("kr_food", oPC, 10); SetXP(oPC, 1); } ////check on temp properties object oItem=GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); RemoveTempEffects(oItem); oItem=GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC); RemoveTempEffects(oItem); oItem=GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC); RemoveTempEffects(oItem); ////End check on temp properties
}
// wtf? :P
SetLocalInt(oPC, "CB_XP_SETTING", 0); SetLocalInt(oPC, "CB_ITEM1", 0); SetLocalInt(oPC, "CB_ITEM2", 0); SetLocalInt(oPC, "CB_ITEM3", 0); SetLocalInt(oPC, "CB_ITEM4", 0); SetLocalInt(oPC, "CB_ITEM5", 0); SetLocalInt(oPC, "CB_ITEM6", 0);
// int ECL = core(oPC); // SetLocalInt(oPC, "CB_ECL", ECL); // laggy stuff
if(GetLocalInt(oStore, "CB_EXECUTE") != 1) { ExecuteScript("_cb_ecl", oStore); SetLocalInt(oStore, "CB_EXECUTE", 1); } } |