PvP Region To ID
PostPosted: Thu Sep 08, 2011 3:24 am
Atm, i'm working on a Queue/Mapchanger script to releaes but ran into a small problem i'm stuck on
What i'm trying to do is get the ID off the region of the Current PvP Zone, but if the Voting System is constantly rotating maps. How do I get it to check for the ID whenever the Map Changes?
and just so you can review.
Would be great if you can help.
Regards
-Sensi
- Code: Select all
public override bool Interact(GamePlayer player)
{
if (!base.Interact(player)) return false;
player.Out.SendMessage("Greetings!" + player.Name + "\n Where would you like to teleport?\n\n - [PvP] -\n ["+ PvPHandler.currentPvPPort() +"] - (" + PvPHandler.currentPvPPort(GameNPC.CurrentZone.ID) +"/" + MaxPlayers + ") ", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
Utils.ClearChat(player);
return true;
}
What i'm trying to do is get the ID off the region of the Current PvP Zone, but if the Voting System is constantly rotating maps. How do I get it to check for the ID whenever the Map Changes?
- Code: Select all
(" + WorldMgr.GetClientsOfRegionCount() + "/" + MaxPlayers + ")
and just so you can review.
- Code: Select all
public static GameNPC currentPvPPort()
{
GameNPC[] npcs = WorldMgr.GetNPCsByName(m_PvPZone, eRealm.None);
if (npcs.Length > 0 && npcs != null)
{
GameNPC theNPC = npcs[0];
if (theNPC != null)
{
if (theNPC.GuildName == "PvP Setup")
{
return theNPC;
}
}
}
return null;
}
}
Would be great if you can help.
Regards
-Sensi