Files
HeroesStone_PRC8/_module/nss/unaquandmoesbius.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

98 lines
3.2 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Example XP2 OnItemUnAcquireScript
//:: x2_mod_def_unaqu
//:: (c) 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
Put into: OnItemUnAcquire Event
*/
//:://////////////////////////////////////////////
//:: Created By: Georg Zoeller
//:: Created On: 2003-07-16
//:://////////////////////////////////////////////
#include "x2_inc_switches"
#include "habd_include"
#include "omw_plns"
void main()
{
RunLootNotificationOnUnAcquire();
object oItem = GetModuleItemLost();
// * Generic Item Script Execution Code
// * If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module,
// * it will execute a script that has the same name as the item's tag
// * inside this script you can manage scripts for all events by checking against
// * GetUserDefinedItemEventNumber(). See x2_it_example.nss
if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
{
SetUserDefinedItemEventNumber(X2_ITEM_EVENT_UNACQUIRE);
int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF);
if (nRet == X2_EXECUTE_SCRIPT_END)
{
return;
}
if (HABDOnUnAcquiredItem(GetModuleItemLostBy(), GetModuleItemLost())) return;
object oItem;
string sTag;
string sTa2;
location lLoc;
object aArea;
oItem = GetModuleItemLost();
lLoc = GetLocation(GetModuleItemLost());
sTag = GetTag(GetModuleItemLost());
sTa2 = GetTag(GetAreaFromLocation(lLoc));
if (GetIdentified(GetModuleItemLost()))
if (sTag == "port_item11")
if (sTa2 != "Moebiustower")
{
DestroyObject(GetModuleItemLost());
ActionWait(5.0);
object oPC=GetModuleItemLostBy();
object oPortable=CreateObject(OBJECT_TYPE_PLACEABLE,"portablegate",lLoc,TRUE);
DelayCommand(0.5,AssignCommand(oPortable,SetFacingPoint(GetPosition(oPC))));
DelayCommand(0.51,AssignCommand(oPortable,SetFacing(GetFacing(oPortable)+180.0)));
}
if (GetIdentified(GetModuleItemLost()))
if (sTag == "port_item11")
if (sTa2 == "Moebiustower")
{
DestroyObject(GetModuleItemLost());
ActionWait(5.0);
object oPC=GetModuleItemLostBy();
object oPortable=CreateObject(OBJECT_TYPE_PLACEABLE,"portablegate",lLoc,TRUE);
DelayCommand(0.5,AssignCommand(oPortable,SetFacingPoint(GetPosition(oPC))));
DelayCommand(0.51,AssignCommand(oPortable,SetFacing(GetFacing(oPortable)+180.0)));
}
if (GetIdentified(GetModuleItemLost()))
if (sTag == "port_item22")
if (sTa2 != "Moebiustower")
{
DestroyObject(GetModuleItemLost());
ActionWait(5.0);
object oPC=GetModuleItemLostBy();
object oPortable=CreateObject(OBJECT_TYPE_PLACEABLE,"portablegate",lLoc,TRUE);
DelayCommand(0.5,AssignCommand(oPortable,SetFacingPoint(GetPosition(oPC))));
DelayCommand(0.51,AssignCommand(oPortable,SetFacing(GetFacing(oPortable)+180.0)));
}
if (GetIdentified(GetModuleItemLost()))
if (sTag == "port_item22")
if (sTa2 == "Moebiustower")
{
DestroyObject(GetModuleItemLost());
ActionWait(5.0);
object oPC=GetModuleItemLostBy();
object oPortable=CreateObject(OBJECT_TYPE_PLACEABLE,"portablegate",lLoc,TRUE);
DelayCommand(0.5,AssignCommand(oPortable,SetFacingPoint(GetPosition(oPC))));
DelayCommand(0.51,AssignCommand(oPortable,SetFacing(GetFacing(oPortable)+180.0)));
}
}
}