27 lines
909 B
Plaintext
27 lines
909 B
Plaintext
//Monster Death Script - Using variables
|
|
void main()
|
|
{
|
|
object oDead = OBJECT_SELF;
|
|
|
|
object oPC = GetLastKiller();
|
|
|
|
object oParty = GetFirstFactionMember(oPC);
|
|
|
|
string sVarName = GetLocalString(oDead,"quest_tag"); //This gets the name of the variable we are setting to 1. You would set this variable in toolset when creating the Boss Creature
|
|
|
|
object oDatabase = GetItemPossessedBy(oPC,"Database");
|
|
SetLocalInt(oDatabase, sVarName , 1);
|
|
|
|
while(GetIsObjectValid(oParty))// make sure they are in the party
|
|
{
|
|
if(GetArea(oPC)==GetArea(oParty)) //checks to make sure the party member is in range
|
|
{
|
|
object oDatabase = GetItemPossessedBy(oPC,"Database");
|
|
SetLocalInt(oDatabase, sVarName , 1);// if in range give integer to that party member
|
|
}
|
|
oParty = GetNextFactionMember(oPC); // finds next member
|
|
}
|
|
|
|
}
|
|
|