This has been driving me crazy, because I thought my script was broken, but when I tested it in a local game (just going new game, picking my PW module, playing single player) it works perfectly. I can't tell why it would work in one case but not the other.
This is the main script that doesn't work in the dedicated server, it is simply placed on a trigger that covers the starting location:
//This script will take affect as soon as the PC enters the module//Place this script on the OnEnter event of a generic trigger placed over//the module starting point//The purpose of this script is to send new players to the Welcome area,//and to send older players to the proper starting waypoint depending on//which faction they belong to.
#include "nw_i0_tool"void main() {
//define player object oPC = GetEnteringObject(); object oFaction = GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC); //define waypoint object oStart00 = GetWaypointByTag("ZKW_STARTNEW"); //define Faction Objects /*object oFDuergar = GetObjectByTag("ZK_F_DUERGAR"); object oFBandit = GetObjectByTag("ZK_F_BANDIT"); object oFBlkwdgypsy = GetObjectByTag("ZK_F_BLKWDGYPSY"); object oFBugbear = GetObjectByTag("ZK_F_BUGBEAR"); object oFGoblin = GetObjectByTag("ZK_F_GOBLIN"); object oFIcecavern = GetObjectByTag("ZK_F_ICECAVERN"); object oFKalarok = GetObjectByTag("ZK_F_KALAROK"); object oFKalarokbndt = GetObjectByTag("ZK_F_KALAROKBNDT"); object oFKandorgnoll = GetObjectByTag("ZK_F_KANDORGNOLL"); object oFNhanimal = GetObjectByTag("ZK_F_NHANIMAL"); object oFNhostevils = GetObjectByTag("ZK_F_NHOSTEVILS"); object oFNhostgobl = GetObjectByTag("ZK_F_NHOSTGOBL"); object oFShadowfrst = GetObjectByTag("ZK_F_SHADOWFRST"); object oFSthrnallnce = GetObjectByTag("ZK_F_STHRNALLNCE"); object oFUgroundfrst = GetObjectByTag("ZK_F_UGROUNDFRST"); object oFMyrath = GetObjectByTag("ZK_F_MYRATH"); object oFKayketh = GetObjectByTag("ZK_F_KAYKETH"); */
if (oFaction == OBJECT_INVALID) { object item = GetFirstItemInInventory(oPC); if(GetXP(oPC) == 0) { while (item != OBJECT_INVALID) { DestroyObject(item); item = GetNextItemInInventory(oPC); } GiveXPToCreature(oPC, 700); GiveGoldToCreature( oPC, 300); } AssignCommand(oPC,ActionJumpToObject(oStart00)); }
else { string sFactionSkin = GetTag(oFaction); //Tag of PC's Faction item string sLeft = GetStringLeft(sFactionSkin, ; string sBindLoc; string sBase = "ZK_BIND_"; if (sFactionSkin == "ZK_F01__________________________") { string sBindLoc = "S0"; //FloatingTextStringOnCreature("if statement triggered", oPC, TRUE); string sJumpTag = sBase + sBindLoc; string sFaction = GetStringLeft(sFactionSkin, 6); // Actual Faction of PC //FloatingTextStringOnCreature("sJumpTag- "+sJumpTag, oPC, TRUE); object oJump = GetWaypointByTag(sJumpTag); if (sFaction == "ZK_F01") { /*AdjustReputation(oPC,oFKalarokbndt,80); AdjustReputation(oPC,oFKalarok,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */ } if (sFaction == "ZK_F02") { } if (sFaction == "ZK_F03") { } if (sFaction == "ZK_F04") { } if (sFaction == "ZK_F05") { } if (sFaction == "ZK_F06") { } if (sFaction == "ZK_F07") { /*AdjustReputation(oPC,oFMyrath,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F08") { } if (sFaction == "ZK_F09") { /*AdjustReputation(oPC,oFKalarokbndt,80); AdjustReputation(oPC,oFKalarok,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F10") { /*AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F11") { } if (sFaction == "ZK_F12") { } if (sFaction == "ZK_F13") { /*AdjustReputation(oPC,oFKalarokbndt,80); AdjustReputation(oPC,oFKalarok,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F14") { } if (sFaction == "ZK_F15") { /*AdjustReputation(oPC,oFKayketh,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F16") { } if (sFaction == "ZK_F17") { } if (sFaction == "ZK_F18") { } AssignCommand (oPC,ActionJumpToObject(oJump)); } else { string sBindLoc = GetStringRight (sFactionSkin, 2); // stored bind location //FloatingTextStringOnCreature("else triggered", oPC, TRUE); string sJumpTag = sBase + sBindLoc; string sFaction = GetStringLeft(sFactionSkin, 6); // Actual Faction of PC //FloatingTextStringOnCreature("sJumpTag- "+sJumpTag, oPC, TRUE); object oJump = GetWaypointByTag(sJumpTag); if (sFaction == "ZK_F01") { /*AdjustReputation(oPC,oFKalarokbndt,80); AdjustReputation(oPC,oFKalarok,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F02") { } if (sFaction == "ZK_F03") { } if (sFaction == "ZK_F04") { } if (sFaction == "ZK_F05") { } if (sFaction == "ZK_F06") { } if (sFaction == "ZK_F07") { /*AdjustReputation(oPC,oFMyrath,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F08") { } if (sFaction == "ZK_F09") { /*AdjustReputation(oPC,oFKalarokbndt,80); AdjustReputation(oPC,oFKalarok,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F10") { /*AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F11") { } if (sFaction == "ZK_F12") { } if (sFaction == "ZK_F13") { /*AdjustReputation(oPC,oFKalarokbndt,80); AdjustReputation(oPC,oFKalarok,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F14") { } if (sFaction == "ZK_F15") { /*AdjustReputation(oPC,oFKayketh,80); AdjustReputation(oPC,oFSthrnallnce,-100); AdjustReputation(oPC,oFDuergar,-100); */} if (sFaction == "ZK_F16") { } if (sFaction == "ZK_F17") { } if (sFaction == "ZK_F18") { } AssignCommand (oPC,ActionJumpToObject(oJump)); } } }
Modifié par Drakantus, 01 septembre 2010 - 01:26 .