I am trying to add the script below to the one below that. I think my if statements are off I am trying to make it so that if the PC is elven, and does not have the amulet he is given it. Then I am trying to add it to my current on enter script. Thankyou, Dragon-Blade suckish scripter
'>
The item script.
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if ((GetRacialType(oPC)==RACIAL_TYPE_ELF))
{
if (GetItemPossessedBy(oPC, "Ammy_Elf")== OBJECT_INVALID)
{
CreateItemOnObject("elf_ammy", oPC);
}
}
}
Script trying to add it to
#include "gs_inc_common"
#include "gs_inc_text"
void main()
{
object oEntering = GetEnteringObject();
if (GetIsDM(oEntering)) return;
//check if cd key is banned
object oBanishment = GetLocalObject(OBJECT_SELF, "GS_BANISHMENT");
if (GetIsObjectValid(oBanishment))
{
string sCDKey = GetPCPublicCDKey(oEntering);
if (GetIsObjectValid(GetItemPossessedBy(oBanishment, "GS_BA_" + sCDKey)))
{
SendMessageToAllDMs(
gsCMReplaceString(
GS_T_16777425,
GetName(oEntering),
GetPCPlayerName(oEntering),
sCDKey));
BootPC(oEntering);
return;
}
}
AddJournalQuestEntry("GS_DIARY_001", 1, oEntering, FALSE);
AddJournalQuestEntry("GS_DIARY_002", 1, oEntering, FALSE);
if (GetLocalInt(oEntering, "GS_ENABLED"))
{
//restore health
int nHealth = GetLocalInt(OBJECT_SELF, "GS_HEALTH_" + ObjectToString(oEntering));
gsCMSetHitPoints(nHealth, oEntering);
SetLocalInt(oEntering, "GS_ENABLED", -1);
}
//activity
SetLocalInt(oEntering, "GS_ACTIVE", TRUE);
ExecuteScript("activateclimbing",OBJECT_SELF);
}