Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
34
_module/nss/htca_exit.nss
Normal file
34
_module/nss/htca_exit.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
void main()
|
||||
{
|
||||
object oClicker = GetClickingObject();
|
||||
object oTarget = GetTransitionTarget(OBJECT_SELF);
|
||||
object oArea = GetArea(oClicker);
|
||||
object oMob;
|
||||
int iFights;
|
||||
int iFlag;
|
||||
|
||||
iFlag = TRUE;
|
||||
|
||||
oMob = GetFirstObjectInArea(oArea);
|
||||
while (GetIsObjectValid(oMob))
|
||||
{
|
||||
if (GetObjectType(oMob) == OBJECT_TYPE_CREATURE && !GetIsPC(oMob) && !GetIsPC(GetMaster(oMob)))
|
||||
iFlag = FALSE;
|
||||
oMob = GetNextObjectInArea(oArea);
|
||||
}
|
||||
|
||||
if (iFlag == TRUE)
|
||||
{
|
||||
GiveGoldToCreature(oClicker,GetHitDice(oClicker) * 25);
|
||||
iFights=GetLocalInt(oClicker,"PCFights");
|
||||
iFights++;
|
||||
SetLocalInt(oClicker,"HTCArena",0);
|
||||
SetLocalInt(oClicker,"PCFights",iFights);
|
||||
SetLocalInt(oClicker,"ArenaHasFought",1);
|
||||
if (GetLocalInt(oClicker,"QuestFights") > 0 && GetLocalInt(oClicker,"QuestFights") > iFights)
|
||||
SetLocalInt(oClicker,"ArenaHasFought",0);
|
||||
SetAreaTransitionBMP(AREA_TRANSITION_RANDOM);
|
||||
AssignCommand(oClicker,JumpToObject(oTarget));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user