Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
54
_module/nss/jw_unacquire_mod.nss
Normal file
54
_module/nss/jw_unacquire_mod.nss
Normal file
@@ -0,0 +1,54 @@
|
||||
#include "jw_persist_store"
|
||||
//
|
||||
void main()
|
||||
{
|
||||
object oObject=GetModuleItemLost();
|
||||
object oPC=GetModuleItemLostBy();
|
||||
object oStore=GetItemPossessor(oObject);
|
||||
string sDTag=GetTag(oObject);
|
||||
|
||||
/// This is when the store BUYS an item
|
||||
/*
|
||||
if (GetTag(oStore)=="jw_perst_store")
|
||||
{
|
||||
JWStoreBoughtItem(oObject);
|
||||
}
|
||||
else
|
||||
*/
|
||||
if (GetObjectType(oStore)==OBJECT_TYPE_STORE&&GetIsPC(oPC))
|
||||
{
|
||||
//JWOtherStoreBoughtItem(oObject);
|
||||
DestroyObject(oObject);
|
||||
return;
|
||||
}
|
||||
|
||||
//unpolymorph when imp
|
||||
if (GetTag(oObject)=="NK_FP_POLY")
|
||||
{
|
||||
//SendMessageToPC(oPC, "You should unpolymorph now.");
|
||||
effect eEffect = GetFirstEffect(oPC);
|
||||
int nCounter = 1;
|
||||
object oNewPossessor = GetLocalObject(GetModule(), "NK_FP_POLY_ENEMY");
|
||||
|
||||
while(GetIsEffectValid(eEffect))
|
||||
{
|
||||
if (GetEffectCreator(eEffect) == oNewPossessor)
|
||||
{
|
||||
RemoveEffect(oPC, eEffect);
|
||||
}
|
||||
eEffect = GetNextEffect(oPC);
|
||||
}
|
||||
SetStandardFactionReputation(STANDARD_FACTION_HOSTILE , 0, oPC);
|
||||
DestroyObject(oObject, 5.0);
|
||||
object oEnemy = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oPC, nCounter, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
|
||||
|
||||
while(oEnemy != OBJECT_INVALID)
|
||||
{
|
||||
nCounter = nCounter + 1;
|
||||
AssignCommand (oEnemy, ActionAttack(oPC));
|
||||
oEnemy = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oPC, nCounter, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user