93 lines
2.3 KiB
Plaintext
93 lines
2.3 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Generic on_activate script - by tjm
|
|
//:://////////////////////////////////////////////
|
|
|
|
//file header for Dom's Climbing System:
|
|
#include "gz_inc_onact"
|
|
|
|
|
|
|
|
//Wizard Teleport Staff
|
|
|
|
|
|
void WizTPActivate(object oPC, string sItemTag)
|
|
{
|
|
|
|
if (GetLevelByClass(CLASS_TYPE_WIZARD, oPC) >= 7)//check if player has sufficient level
|
|
{
|
|
AssignCommand (oPC, ActionStartConversation (oPC, "wiz_teleport", FALSE));
|
|
SetLocalInt (oPC, "wiz_level", GetLevelByClass(CLASS_TYPE_WIZARD, oPC)); //set the level to check later if he can teleport to that area
|
|
return;
|
|
}
|
|
|
|
//if (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 7)//check if player has sufficient level
|
|
//{
|
|
// AssignCommand (oPC, ActionStartConversation (oPC, "wiz_teleport", FALSE));
|
|
// SetLocalInt (oPC, "wiz_level", GetLevelByClass(CLASS_TYPE_SORCERER, oPC)); //set the level to check later if he can teleport to that area
|
|
// return;
|
|
//}
|
|
|
|
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
// main onactivate
|
|
|
|
void main()
|
|
{
|
|
|
|
|
|
/* Dom Queron's Climbing Rope */
|
|
if (CheckRopeTarget())
|
|
return;
|
|
|
|
|
|
//Wizard's Teleport Staff
|
|
string sItemTag = GetTag(GetItemActivated());
|
|
object oPC = GetItemActivator();
|
|
object oItem=GetItemActivated();
|
|
|
|
if (sItemTag == "wiztpstaff")//check if the activated item was the staff
|
|
{
|
|
WizTPActivate(oPC,sItemTag);
|
|
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
//DM FX Wand
|
|
|
|
if(GetTag(oItem)=="DMsEffectWand") // DM Effect Wand code here
|
|
{
|
|
|
|
// get the wand's activator and target, put target info into local vars on activator
|
|
object oMyActivator = GetItemActivator();
|
|
object oMyTarget = GetItemActivatedTarget();
|
|
SetLocalObject(oMyActivator, "dmfx_wandtarget", oMyTarget);
|
|
location lMyLoc = GetItemActivatedTargetLocation();
|
|
SetLocalLocation(oMyActivator, "dmfx_wandloc", lMyLoc);
|
|
|
|
//Make the activator start a conversation with itself
|
|
AssignCommand(oMyActivator, ActionStartConversation(oMyActivator, "conv_dmfxwand", TRUE));
|
|
return;
|
|
}
|
|
|
|
|
|
//Dye Kit
|
|
if (sItemTag == "DyeKit")
|
|
|
|
{
|
|
AssignCommand(oPC, ActionStartConversation(oPC, "dye_dyekit", TRUE));
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Allows items to activate via their tag
|
|
ExecuteScript(GetTag(GetItemActivated()), OBJECT_SELF);
|
|
|
|
} |