okay I kinda forgot how to add one script to another script without pasting the entire thing at the bottom of the script....
kinda wanna replace the old subrace system with the new one (Shayan's) seeing that I keep having trouble with it.
#include "x2_inc_switches"#include "habd_include"#include "subdual_inc"#include "fugue_xpdebt_inc"#include "vg_pal_include"#include "ww_inc"#include "sha_subr_methds"void main(){object oItem = GetItemActivated();object oPC = GetItemActivator();object oTarget = GetItemActivatedTarget();string sTag = GetTag(oItem);string sPCName;string sPlayerName;if (sTag == "faction_editor")ExecuteScript("faction_editor", oPC);// Subrace system: Some player models normally used were changed due to lack of CEPif(GetLocalInt(GetModule(),"Subraces")==1){ExecuteScript("_cb_activateitem",oPC);}// Werewolf System Addonif(GetLocalInt(GetModule(),"Werewolf")==1){Werewolf_Form(oPC,oItem,oTarget);Wolf_Form(oPC,oItem,oTarget);Belladonna(oPC,oItem,oTarget);}// Vampire PC subrace Addonif(GetLocalInt(GetModule(),"Vampire")==1){ExecuteScript("vamp_on_used", OBJECT_SELF);}// Bleeding/Death system item activation managerif (HABDOnActivateItem(oPC, oTarget, oItem)) return;// Subdual Tool Mode Switchif(sTag=="pcsubdualtool"){int iMode = GetLocalInt(oPC,"SUBDUAL");int iNextMode;// Only three possible optionsiNextMode = (iMode + 1) % 3;// Advance the state of the toggle item by setting the state of it up as an INTSetLocalInt(oItem,"Mode",iNextMode);// Inform them about the notification switchswitch (iNextMode){case 0:SetLocalInt(oPC,"SUBDUAL",0);SendMessageToPC(oPC,"You are currently doing full damage.");break;case 1:SetLocalInt(oPC,"SUBDUAL",1);SendMessageToPC(oPC,"You are currently doing subdual damage.");break;case 2:SetLocalInt(oPC,"SUBDUAL",2);SendMessageToPC(oPC,"You are currently in sparring mode.");break;}return;}// This handles the canteen for the dehydration systemif (GetStringLeft(sTag,4)=="DH2_") ExecuteScript("vg_source_act",OBJECT_SELF);// This handles the items for the "PnP" Door systemif (sTag=="IDSBook")AssignCommand(oPC, ActionStartConversation(oPC,"ids_book_conv",TRUE,FALSE));else if (sTag=="HoldPortal"){if (GetObjectType(oTarget) == OBJECT_TYPE_DOOR){SetLocalInt(oTarget,"Magic Lock",1);ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), oTarget);}}//Paladin's Badge of Courage scriptif (sTag=="vg_pal_courage"){vg_pal_courage(oPC);return;}//Enchant Rod scriptif (sTag=="EnchantRod"){ExecuteScript("ench_start", oPC);return;}//Soul Stone scriptif (sTag=="SoulStone"){SetLocalObject(oPC, "SoulStone", oItem);AssignCommand(oPC, ActionStartConversation(oPC, "SoulStoneConv", TRUE, FALSE));return;}// DM Epic Level Allow Wandif(sTag=="dm_epic_tool" && GetIsDM(oPC) && oTarget!=oPC && GetIsObjectValid(oTarget) && GetIsPC(oTarget)){sPCName = GetName(oTarget);sPlayerName = GetPCPlayerName(oTarget);int iMode = GetLocalInt(oTarget,"Allow_Level");int iNextMode;// Only two possible optionsiNextMode = (iMode + 1) % 2;// Advance the state of the toggle item by setting the state of it up as an INTSetLocalInt(oItem,"Mode",iNextMode);// Inform them about the notification switchswitch (iNextMode){case 0:SetDBInt("EpicPCs","Allow_Level",0,oTarget);SetLocalInt(oTarget,"Allow_Level",0);SendMessageToAllDMs("The PC '"+sPCName+"' belonging to '"+sPlayerName+"' is not currently allowed to take epic levels");SendMessageToPC(oTarget,"You are not currently allowed to take epic levels");break;case 1:SetDBInt("EpicPCs","Allow_Level",1,oTarget);SetLocalInt(oTarget,"Allow_Level",1);SendMessageToAllDMs("The PC '"+sPCName+"' belonging to '"+sPlayerName+"' is allowed to take epic levels");SendMessageToPC(oTarget,"You are now allowed to take epic levels");break;}return;}if (sTag=="dm_epic_tool" && GetIsDM(oPC) && oTarget==oPC && GetIsObjectValid(oTarget)){SendMessageToAllDMs("The DM '"+sPCName+"' belonging to '"+sPlayerName+"' is trying to give themselves Epic Level Permission!");SendMessageToPC(oTarget,"You are not allowed to give yourself Epic Level Permission!!!");return;}if (sTag=="dm_epic_tool" && !GetIsDM(oPC)){SendMessageToAllDMs("The PC '"+sPCName+"' belonging to '"+sPlayerName+"' has a DM Epic Level Allow Tool!");SendMessageToPC(oPC,"Only DMs may use this tool!!!");return;}// DM Item Modifierif(sTag=="dm_item_manipula"&&GetIsDM(oPC)){if(GetIsObjectValid(oTarget) == TRUE && GetObjectType(oTarget) == OBJECT_TYPE_ITEM){SetLocalObject(oPC, "TARGETED_ITEM", oTarget);AssignCommand(oPC, ActionStartConversation(oPC, "dm_wand_item", TRUE, FALSE));}elseSendMessageToPC(oPC, "That is not a valid item");return;}if (sTag=="dm_item_manipula"&&!GetIsDM(oPC)){SendMessageToAllDMs("The PC '"+sPCName+"' belonging to '"+sPlayerName+"' has a DM Item Manipulation Tool!");SendMessageToPC(oPC,"Only DMs may use this tool!!!");}// This will allow DMs to clear XP Debts as a VERY special reward.if (GetTag(oItem)=="xpdebtclearer"){if ((oTarget!=oPC)&&GetIsDM(oPC)){//to clear out xp via a dm wandClearDebt(oTarget);SendMessageToPC(oTarget,"Your XP Debt has been cleared!");SendMessageToAllDMs(GetName(oTarget)+" has had their XP Debt cleared by "+GetName(oPC));}if ((oTarget==oPC)&&GetIsDM(oPC)){//to clear out xp via a dm wandSendMessageToPC(oPC,"Your XP Debt has NOT been cleared! Do not try to clear your own debt . . . it is just wrong!");SendMessageToAllDMs(GetName(oPC)+" has tried to clear their own XP Debt! Go smack them!");}if ((oTarget==oPC)&&(!GetIsDM(oPC))){//to clear out xp via a dm wandSendMessageToPC(oPC,"Your XP Debt has NOT been cleared! This tool is for DM use only!");SendMessageToAllDMs(GetName(oPC)+" has tried to clear their own XP Debt! They are not a DM so go take the tool from them!");}}// * 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.nssif (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE){SetUserDefinedItemEventNumber(X2_ITEM_EVENT_ACTIVATE);int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF);if (nRet == X2_EXECUTE_SCRIPT_END){return;}}ExecuteScript ("cnr_module_onact", OBJECT_SELF);ExecuteScript ("zep_on_activate", OBJECT_SELF);}
this script added....
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://:::::::::::::::::::::::: Shayan's Subrace Engine:::::::::::::::::::::::::::::://:::::::::::::::::File Name: sha_on_itemactiv ::::::::::::::::::::::::::::::::://::::::::::::::::::::: OnItemActivated script ::::::::::::::::::::::::::::::::://:: Written By: Shayan.//:: Contact: mail_shayan@yahoo.com#include "sha_subr_methds"void main(){SubraceOnItemActivated();}
anyone wanna help me out with this? ![]()





Retour en haut






