Codeserver Forums: [Fix] Shattrath Guards - Codeserver Forums

Jump to content

Toggle shoutbox Shoutbox

Philywiskaz (Senior MOD/GM)  : (22 August 2010 - 01:42 PM) Boo! :D Hey all! Sorry I've been gone a long time, been busy with study and other life stuffs :( Just stopped by to check up on the site. Neos... You have done an amazing job in the time I've been gone, keep it up, but make sure you have some time off every now and then.
Froid  : (19 August 2010 - 02:15 AM) I'm still here DeVIL :)
Shandy  : (26 July 2010 - 11:30 PM) :) hi inma new member im looking forward to playing once i find the realmlist!
DeViLbOaRdZ  : (25 July 2010 - 09:41 PM) I will be playing in the server tomorrow ... hopefully I will see some guys again
DeViLbOaRdZ  : (07 July 2010 - 06:45 PM) Ahhhh you guys still here? How is code going? .. beein busy lately with school .. hopefully more time to get involved
Arvit  : (23 June 2010 - 06:19 PM) Best uptime I have ever seen :D
Froid  : (22 June 2010 - 06:34 PM) holy crap: uptime - 2525:03:10
Froid  : (05 June 2010 - 03:57 AM) Well nice to see you here finally neos :P Tell me when you get some more free time :)
Berserk  : (03 June 2010 - 03:08 PM) arararararar
Neos(Lead Devloper/Founder)  : (31 May 2010 - 11:26 PM) Forums have been fixed. Some random table in the database corrupted and needed a repair. No harm done to any of the data though. And yes Froid, it has been quiet, too quiet... But at this moment I don't have a lot any free time :( , hence the reason there there haven't been any updates from my side.
Froid  : (20 May 2010 - 07:49 PM) Wow this place is really dead...send me a PM or Email if you want me to work on the core for you. I really want the server to come back to life :(
Froid  : (05 May 2010 - 12:22 PM) If you need a little help with the core I can help you out ;)
Mantheren(Developer)  : (05 May 2010 - 10:03 AM) Heheh, I've been pretty busy myself lately... No time to play or program... :(
Froid  : (03 May 2010 - 03:31 AM) Neos we miss you :(
Arvit  : (30 April 2010 - 01:09 PM) I am now lvl 20 and hadn`t found any bugs
Arvit  : (30 April 2010 - 01:08 PM) If you want a nice blizzlike server go to ***.******.***
Froid  : (23 April 2010 - 10:06 PM) WTB: Community
Froid  : (19 April 2010 - 10:13 PM) So whose exited for 4/20 :D
Froid  : (13 April 2010 - 09:43 PM) As far as I know the people making the movie said they didn't have enough funding, so they stopped the production.
Mauri  : (12 April 2010 - 01:43 PM) and again, greetings to all codeserver players, GMs, Admins, and Developer :)
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Fix] Shattrath Guards

#1 User is offline   Froid 

  • Too low to rank
  • Pip
  • Group: Members
  • Posts: 18
  • Joined: 07-January 10
  • Gender:Male
  • Character: Damien

Posted 03 March 2010, 02:58

I went to shattrath today and the guards weren't scripted so I decided to make another script ( I could make better scripts if the server offered a little documentation or source code :P )

You will need to add a few things to GossipDefines
Here's what I added and their values:
GOSSIP_TEXT_WORLDSEND = "World's End Tavern",
GOSSIP_TEXT_MANALOOM = "Mana Loom",
GOSSIP_TEXT_GEMMERCHANT = "Gem Merchant",
GOSSIP_TEXT_ALDORBANK = "Aldor Bank",
GOSSIP_TEXT_SCRYERBANK = "Scryers Bank",
GOSSIP_TEXT_ALDORINN = "Aldor Inn",
GOSSIP_TEXT_SCRYERINN = "Scryers Inn",
GOSSIP_TEXT_ALDORSTABLE = "Aldor Stable",
GOSSIP_TEXT_SCRYERSTABLE = "Scryers Stable",
GOSSIP_TEXT_ALLIMASTER "Alliance Battlemasters",
GOSSIP_TEXT_HORDEMASTER = "Horde Battlemasters",
GOSSIP_TEXT_ARENAMASTER = "Arena Battlemasters",
GOSSIP_TEXT_ALDORGEM = "Aldor Gem Merchant",
GOSSIP_TEXT_SCRYERGEM = "Scryers Gem Merchant"


and here is the script:
using System;
using System.Collections.Generic;
using System.Text;

using Extension;
using Extension.Interfaces;
using Extension.Implementations;

/// <summary>
/// Script for guardgossiper, provides basic guard interaction at/for shattrath.
/// Created by Froid
/// </summary>
public class ShattrathGuard : GossipDefines, IGossip
{
	public void GossipHello(IScriptPlayer gossiper, IScriptCreature sender)
	{
		// IDK what the icons are supposed to be
	    gossiper.GossipAdd( GOSSIP_TEXT_WORLDSEND     , (GossipIcons) 6,  ACTION_DEFAULT_1  +  1);
	    gossiper.GossipAdd( GOSSIP_TEXT_BANK	      , (GossipIcons) 6,  ACTION_DEFAULT_1  +  2);
	    gossiper.GossipAdd( GOSSIP_TEXT_INN           , (GossipIcons) 1,  ACTION_DEFAULT_1  +  3);
	    gossiper.GossipAdd( GOSSIP_TEXT_WINDRIDER     , (GossipIcons) 2,  ACTION_DEFAULT_1  +  4);
	    gossiper.GossipAdd( GOSSIP_TEXT_MAILBOX       , (GossipIcons) 4,  ACTION_DEFAULT_1  +  5);
	    gossiper.GossipAdd( GOSSIP_TEXT_STABLEMASTER  , (GossipIcons) 5,  ACTION_DEFAULT_1  +  6);
	    gossiper.GossipAdd( GOSSIP_TEXT_BATTLEMASTER  , (GossipIcons) 8,  ACTION_DEFAULT_1  +  7);
	    gossiper.GossipAdd( GOSSIP_TEXT_MANALOOM	  , (GossipIcons) 8,  ACTION_DEFAULT_1  +  8);
	    gossiper.GossipAdd( GOSSIP_TEXT_ALCHEMYLAB	  , (GossipIcons) 8,  ACTION_DEFAULT_1  +  9);
	    gossiper.GossipAdd( GOSSIP_TEXT_GEMMERCHANT   , (GossipIcons) 3,  ACTION_DEFAULT_1  +  10);
	    gossiper.GossipAdd( GOSSIP_TEXT_PROFTRAINER   , (GossipIcons) 3,  ACTION_DEFAULT_1  +  11);
	    gossiper.GossipFlush(sender, 10321);
	
	}

	#region DEFAULT GOSSIP
	public void DefaultGossip(IScriptPlayer gossiper, IScriptCreature sender, int option)
	{
	    if (option == ACTION_DEFAULT_1 + 1)//tavern
	    {
	        gossiper.GossipPOI(-1760.4f, 5166.9f, "World's End Tavern");
	        gossiper.GossipFlush(sender, 10394);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 2)//bank menu
	    {
	        gossiper.GossipAdd( GOSSIP_TEXT_ALDORBANK       , (GossipIcons) 8,  ACTION_DEFAULT_4  +  1);
			gossiper.GossipAdd( GOSSIP_TEXT_SCRYERBANK       , (GossipIcons) 8,  ACTION_DEFAULT_4  +  2);
	        gossiper.GossipFlush(sender, 10379);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 3)//inns
	    {
	        gossiper.GossipAdd( GOSSIP_TEXT_ALDORINN      , (GossipIcons) 8,  ACTION_DEFAULT_4  +  3);
			gossiper.GossipAdd( GOSSIP_TEXT_SCRYERINN       , (GossipIcons) 8,  ACTION_DEFAULT_4  +  4);
	        gossiper.GossipFlush(sender, 10382);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 4)//Wind Rider
	    {
	        gossiper.GossipPOI(-1832f, 5299f, "Flight Master");
	        gossiper.GossipFlush(sender, 10385);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 5)//mailbox
	    {
	        gossiper.GossipAdd( GOSSIP_TEXT_ALDORBANK        , (GossipIcons) 8,  ACTION_DEFAULT_4  +  1);
			gossiper.GossipAdd( GOSSIP_TEXT_ALDORINN         , (GossipIcons) 8,  ACTION_DEFAULT_4  +  3);
			gossiper.GossipAdd( GOSSIP_TEXT_SCRYERBANK       , (GossipIcons) 8,  ACTION_DEFAULT_4  +  2);
			gossiper.GossipAdd( GOSSIP_TEXT_SCRYERINN        , (GossipIcons) 8,  ACTION_DEFAULT_4  +  4);
	        gossiper.GossipFlush(sender, 10386);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 6)//stable master
	    {
	        gossiper.GossipAdd( GOSSIP_TEXT_ALDORSTABLE       , (GossipIcons) 8,  ACTION_DEFAULT_4  +  5);
			gossiper.GossipAdd( GOSSIP_TEXT_SCRYERSTABLE      , (GossipIcons) 8,  ACTION_DEFAULT_4  +  6);
	        gossiper.GossipFlush(sender, 10387);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 7)//battle master
	    {
	        gossiper.GossipAdd( GOSSIP_TEXT_ALLIMASTER         , (GossipIcons) 8,  ACTION_DEFAULT_5  +  1);
			gossiper.GossipAdd( GOSSIP_TEXT_HORDEMASTER        , (GossipIcons) 8,  ACTION_DEFAULT_5  +  2);
			gossiper.GossipAdd( GOSSIP_TEXT_ARENAMASTER        , (GossipIcons) 8,  ACTION_DEFAULT_5  +  3);
	        gossiper.GossipFlush(sender, 10388);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 8)//mana loom
	    {
	        gossiper.GossipPOI(-2070f, 5265.5f, "Mana Loom");
	        gossiper.GossipFlush(sender, 10503);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 9)//alchemy lab
	    {
	        gossiper.GossipPOI(-1648.5f, 5540f, "Alchemy Lab");
	        gossiper.GossipFlush(sender, 10321);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 10)//gem merchant
	    {
	        gossiper.GossipAdd( GOSSIP_TEXT_ALDORGEM       , (GossipIcons) 8,  ACTION_DEFAULT_4  +  7);
			gossiper.GossipAdd( GOSSIP_TEXT_SCRYERGEM      , (GossipIcons) 8,  ACTION_DEFAULT_4  +  8);
	        gossiper.GossipFlush(sender, 10697);
	    }
	
	    if (option == ACTION_DEFAULT_1 + 11)//profession trainer
	    {
	        gossiper.GossipAdd( GOSSIP_TEXT_ALCHEMY              , (GossipIcons) 3,  ACTION_DEFAULT_3  +  1);
	        gossiper.GossipAdd( GOSSIP_TEXT_BLACKSMITHING        , (GossipIcons) 3,  ACTION_DEFAULT_3  +  2);
	        gossiper.GossipAdd( GOSSIP_TEXT_COOKING              , (GossipIcons) 3,  ACTION_DEFAULT_3  +  3);
	        gossiper.GossipAdd( GOSSIP_TEXT_ENCHANTING           , (GossipIcons) 3,  ACTION_DEFAULT_3  +  4);
	        gossiper.GossipAdd( GOSSIP_TEXT_FIRSTAID             , (GossipIcons) 3,  ACTION_DEFAULT_3  +  5);
	        gossiper.GossipAdd( GOSSIP_TEXT_JEWELCRAFTING        , (GossipIcons) 3,  ACTION_DEFAULT_3  +  6);
	        gossiper.GossipAdd( GOSSIP_TEXT_LEATHERWORKING       , (GossipIcons) 3,  ACTION_DEFAULT_3  +  7);
	        gossiper.GossipAdd( GOSSIP_TEXT_SKINNING             , (GossipIcons) 3,  ACTION_DEFAULT_3  +  8);
	        gossiper.GossipFlush(sender, 10391);
	    }
	
	}
	#endregion

	#region ALDOR AND SCRYERS GOSSIP
	public void AldorScryerGossip(IScriptPlayer gossiper, IScriptCreature sender, int option)
	{
	
	    if (option == ACTION_DEFAULT_4 + 1)//Aldor bank
	    {
	        gossiper.GossipPOI(-1730.8f, 5166.9f, "Aldor Bank");
	        gossiper.GossipFlush(sender, 10380);
	    }
	
	    if (option == ACTION_DEFAULT_4 + 2)//Scryer bank
	    {
	        gossiper.GossipPOI(-1999.6f, 5362.2f, "Scryers Bank");
	        gossiper.GossipFlush(sender, 10381);
	    }
	
	    if (option == ACTION_DEFAULT_4 + 3)//Aldor inn
	    {
	        gossiper.GossipPOI(-1895f, 5767f, "Aldor Inn");
	        gossiper.GossipFlush(sender, 10383);
	    }
		
		if (option == ACTION_DEFAULT_4 + 4)//Scryers inn
		{
			gossiper.GossipPOI(-2178f, 5405f, "Scryers Inn");
			gossiper.GossipFlush(sender, 10384);
		}
		
		if (option == ACTION_DEFAULT_4 + 5) // aldor stable
		{
			gossiper.GossipPOI(-1888.5f, 5761f, "Aldor Stable");
			gossiper.GossipFlush(sender, 10321);
		}
		
		if (option == ACTION_DEFAULT_4 + 6) // scryer stable
		{
			gossiper.GossipPOI(-2170f, 5404f, "Scryers Stable");
			gossiper.GossipFlush(sender, 10321);
		}
		
		if (option == ACTION_DEFAULT_4 + 7) // aldor gem merchant
		{
			gossiper.GossipPOI(-1645f, 5669.5f, "Aldor Gem Merchant");
			gossiper.GossipFlush(sender, 10698);
		}
		
		if (option == ACTION_DEFAULT_4 + 8) // scryer gem merchant
		{
			gossiper.GossipPOI(-2193f, 5424.5f, "Scryers Gem Merchant");
			gossiper.GossipFlush(sender, 10699);
		}
	}
	#endregion

	#region Battlemaster GOSSIP
	public void BattleMasterGossip(IScriptPlayer gossiper, IScriptCreature sender, int option)
	{
		if (option == ACTION_DEFAULT_5 + 1) // alliance master
		{
			gossiper.GossipPOI(-1774f, 5251f, "Alliance Battlemasters");
			gossiper.GossipFlush(sender, 10389);
		}
		
		if (option == ACTION_DEFAULT_5 + 2) // horde master
		{
			gossiper.GossipPOI(-1963f, 5263f, "Horde Battlemasters");
			gossiper.GossipFlush(sender, 10390);
		}
		
		if (option == ACTION_DEFAULT_5 + 3) // arena master
		{
			gossiper.GossipPOI(-1960f, 5175f, "Arena Battlemasters");
			gossiper.GossipFlush(sender, 12510);
		}
	}
	#endregion

	#region PROFESSION TRAINER GOSSIP
	public void ProfessionTrainerGossip(IScriptPlayer gossiper, IScriptCreature sender, int option)
	{
	
	    if (option == ACTION_DEFAULT_3 + 1)//Alchemy
	    {
	        gossiper.GossipPOI(-1648.5f, 5534f, "Lorokeem");
	        gossiper.GossipFlush(sender, 10392);
	    }
	
	    if (option == ACTION_DEFAULT_3 + 2)//Blacksmithing
	    {
	        gossiper.GossipPOI(-1847f, 5222f, "Kradu Grimblade and Zula Slagfury");
	        gossiper.GossipFlush(sender, 10400);
	    }
	
	    if (option == ACTION_DEFAULT_3 + 3)//Cooking
	    {
	        gossiper.GossipPOI(-2067.4f, 5316.5f, "Jack Trapper");
	        gossiper.GossipFlush(sender, 10393);
	    }
	
	    if (option == ACTION_DEFAULT_3 + 4)//Enchanting
	    {
	        gossiper.GossipPOI(-2263.5f, 5563.5f, "High Enchanter Bardolan");
	        gossiper.GossipFlush(sender, 10395);
	    }
	
	    if (option == ACTION_DEFAULT_3 + 5)//First Aid
	    {
	        gossiper.GossipPOI(-1591f, 5265.5f, "Mildred Fletcher");
	        gossiper.GossipFlush(sender, 10396);
	    }
	
	    if (option == ACTION_DEFAULT_3 + 6)//jewelcrafting
	    {
	        gossiper.GossipPOI(-1654f, 5667.5f, "Hamanar");
	        gossiper.GossipFlush(sender, 10397);
	    }
	
	    if (option == ACTION_DEFAULT_3 + 7)//Leatherworking
	    {
	        gossiper.GossipPOI(-2060.5f, 5256.5f, "Darmari");
	        gossiper.GossipFlush(sender, 10399);
	    }
	
	    if (option == ACTION_DEFAULT_3 + 8)//Skinning
	    {
	        gossiper.GossipPOI(-2048f, 5300f, "Seymour");
	        gossiper.GossipFlush(sender, 10398);
	    }

	}
	#endregion

	public void GossipSelect(IScriptPlayer gossiper, IScriptCreature sender, int option)
	{
		DefaultGossip(gossiper, sender, option);
		AldorScryerGossip(gossiper, sender, option);
		ProfessionTrainerGossip(gossiper, sender, option);
		BattleMasterGossip(gossiper, sender, option);
	}
}



edit: In your database this goes to NPC #'s 19687,18568,18549
Damien - Level 70 Undead Warlock <Legacy of the HORDE>
StonedMon - Alt Troll Shaman
GorillaZ - Alt Dwarf Warrior
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users