MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides  
Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > WoW Emulator Server > Emulator Server Discussion
Reload this Page [Release] Skill Npc 2.0
Emulator Server Discussion World of Warcraft Emulator Server general chat .
[NO Questions here]

Reply
 
LinkBack Thread Tools
[Release] Skill Npc 2.0
(#1)
Old
Sylex's Avatar
Sylex is Offline
Banned
Rep Power: 0
Reputation: 101
Sylex will become famous soon enoughSylex will become famous soon enough
 
Posts: 141
Join Date: May 2007
Location: Localhost
[Release] Skill Npc 2.0 - 03-01-2008

Completely redone by me. I wrote this WHOLE script. Everyone on my servers say its a big help for them!

What's new in Ver. 2.0?
  • All class spells
  • New layout
  • Major cpu fixes
  • Spells that cannot be trained by regular trainers
  • Mount spells
  • Pet spells


SkillNPC.cpp
Code:
// Major Updates, Fixes, and Core by Nebels
// Some help by insanesk8123 <3

#include "StdAfx.h"
#include "Setup.h"

class SCRIPT_DECL SkillNPC : public GossipScript{
public:
    void GossipHello(Object *pObject, Player *Plr, bool AutoSend);
    void GossipSelectOption(Object *pObject, Player *Plr, uint32 Id, uint32 IntId, const char *Code);
    void GossipEnd(Object *pObject, Player *Plr);
	void Destroy(){ delete this; }
};
void SkillNPC::GossipEnd(Object * pObject, Player* Plr){ GossipScript::GossipEnd(pObject, Plr); }
void SkillNPC::GossipHello(Object *pObject, Player *Plr, bool AutoSend){
	GossipMenu *Menu;
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
				if (Plr->getClass() == 1) 
 { 
Menu->AddItem(0, "What spells can warriors learn?", 1);
 } 
				if (Plr->getClass() == 2)
 { 
Menu->AddItem(0, "What spells can paladins learn?", 2);
 }
				if (Plr->getClass() == 3)
 { 
Menu->AddItem(0, "What spells can hunters learn?", 3);
 }
				if (Plr->getClass() == 9)
 { 
Menu->AddItem(0, "What spells can warlocks learn?", 4);
 }
				if (Plr->getClass() == 11)
 { 
Menu->AddItem(0, "What spells can druids learn?", 5);
 }
				if (Plr->getClass() == 4) 
 { 
Menu->AddItem(0, "What spells can rogues learn?", 6);
 } 
				if (Plr->getClass() == 5) 
 { 
Menu->AddItem(0, "What spells can priests learn?", 7);
 } 
				if (Plr->getClass() == 7) 
 { 
Menu->AddItem(0, "What spells can shamans learn?", 8);
 } 
				if (Plr->getClass() == 8) 
 { 
Menu->AddItem(0, "What spells can mages learn?", 9);
 } 

    Menu->SendTo(Plr);
}


void SkillNPC::GossipSelectOption(Object *pObject, Player *Plr, uint32 Id, uint32 IntId, const char *Code){
	Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT) ? ((Creature*)pObject) : NULL;
	GossipMenu * Menu;
	switch(IntId){
	case 0:     // Return to start
				GossipHello(pObject, Plr, true);
            break;

case 1:
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
Menu->AddItem(5, "Taunt", 10);
Menu->AddItem(5, "Intercept", 13);
Menu->AddItem(5, "Mortal Strike", 14);
Menu->AddItem(5, "Defensive Stance", 11);
Menu->AddItem(5, "Beserker Stance", 12);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
break;

case 2:
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
Menu->AddItem(5, "Redemption", 22);
Menu->AddItem(5, "Summon Warhorse", 20);
Menu->AddItem(5, "Summon Charger", 21);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
break;

case 3:
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
Menu->AddItem(5, "Pet spells", 30);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
break;

case 4:
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
Menu->AddItem(5, "Pet Spells", 40);
Menu->AddItem(5, "Summon Felstead", 41);
Menu->AddItem(5, "Summon Dreadstead", 42);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
break;

case 5:
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
Menu->AddItem(5, "Growl", 50);
Menu->AddItem(5, "Bear Form", 51);
Menu->AddItem(5, "Normal Flight Form", 52);
Menu->AddItem(5, "Epic Flight Form", 53);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
break;

case 6:
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
break;

case 7:
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
break;

case 8:
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
break;

case 9:
objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
break;

        case 10:     // Warrior-Taunt
			if(Plr->getLevel() >= 10)
			{
				Plr->addSpell(355);
				Plr->BroadcastMessage("You have learned Taunt.");
			}else{
				Plr->BroadcastMessage("You must be level 10 to learn Taunt.");
				}
			break;

	case 11:     // Warrior-Defensive Stance
			if(Plr->getLevel() >= 10)
			{
				Plr->addSpell(71);
				Plr->BroadcastMessage("You have learned Defensive Stance.");
			}else{
				Plr->BroadcastMessage("You must be level 10 to learn Defensive Stance.");
				}
			break;

	case 12:     // Warrior-Beserker Stance
			if(Plr->getLevel() >= 30)
			{
				Plr->addSpell(2458);
				Plr->BroadcastMessage("You have learned Berseker Stance.");
			}else{
				Plr->BroadcastMessage("You must be level 30 to learn Berseker Stance.");
				}
			break;

	case 13:     // Warrior-Intercept
			if(Plr->getLevel() >= 10)
			{
				Plr->addSpell(25275);
				Plr->BroadcastMessage("You have learned Intercept.");
			}else{
				Plr->BroadcastMessage("You must be level 10 to learn Intercept.");
				}
			break;

	case 14:     // Warrior-Mortal Strike
			if(Plr->getLevel() >= 40)
			{
				Plr->addSpell(30330);
				Plr->BroadcastMessage("You have learned Mortal Strike.");
			}else{
				Plr->BroadcastMessage("You must be level 40 to learn Mortal Strike.");
				}
			break;

        case 20:     // Paladin-Warhorse
			if(Plr->getLevel() >= 40)
			{
                		Plr->addSpell(13819);
            			Plr->BroadcastMessage("You have learned Summon Warhorse.");
			}else{ 
				Plr->BroadcastMessage("You must be level 40 to learn Summon Warhorse."); 
				}
			break;

	case 21:     // Paladin-Charger
			if(Plr->getLevel() >= 60)
			{
                		Plr->addSpell(34767);
            			Plr->BroadcastMessage("You have learned Summon Charger.");
			}else{ 
				Plr->BroadcastMessage("You must be level 60 to learn Summon Charger."); 
				}			
			break;

	case 22:     // Paladin-Redemption
			if(Plr->getLevel() >= 10)
			{
                		Plr->addSpell(20773);
            			Plr->BroadcastMessage("You have learned Redemption.");
			}else{ 
				Plr->BroadcastMessage("You must be level 10 to learn Redemption."); 
				}			
			break;
        
        case 30:     // Hunter-Pet Spells
	        	if(Plr->getLevel() >= 10)
	        	{
				Plr->addSpell(1515);
				Plr->addSpell(883);
				Plr->addSpell(5149);
				Plr->BroadcastMessage("You have learned your Hunter Pet Spells.");
				Plr->Gossip_Complete();
			}else{
				Plr->BroadcastMessage("You are below level 10.");
				Plr->Gossip_Complete();
				}
            		break;

	case 40:     // Warlock-Pet Spells
	        	if(Plr->getLevel() >= 10)
	        	{
				Plr->addSpell(688);
				Plr->addSpell(697);
				Plr->addSpell(712);
				Plr->addSpell(691);
				Plr->BroadcastMessage("You have learned your Warlock Pet Spells.");
				Plr->Gossip_Complete();
			}else{
				Plr->BroadcastMessage("You are below level 10.");
				Plr->Gossip_Complete();
			}
			break;

	case 41:     // Warlock-Felsteed
	        	if(Plr->getLevel() >= 40)
	        	{
				Plr->addSpell(5784);
				Plr->BroadcastMessage("You have learned Summon Felsteed.");
				Plr->Gossip_Complete();
			}else{
				Plr->BroadcastMessage("You must be level 40 to learn Summon Felsteed.");
				Plr->Gossip_Complete();
			}
			break;

	case 42:     // Warlock-Dreadsteed
	        	if(Plr->getLevel() >= 60)
	        	{
				Plr->addSpell(23161);
				Plr->BroadcastMessage("You have learned Summon Dreadsteed.");
				Plr->Gossip_Complete();
			}else{
				Plr->BroadcastMessage("You must be level 60 to learn Summon Dreadsteed.");
				Plr->Gossip_Complete();
			}
            		break;

	case 50:     // Druid-Growl
	        	if(Plr->getLevel() >= 10)
	        	{
				Plr->addSpell(6795);
				Plr->BroadcastMessage("You have learned Growl.");
				Plr->Gossip_Complete();
			}else{
				Plr->BroadcastMessage("You must be level 10 to learn Growl.");
				Plr->Gossip_Complete();
			}
            		break;

	case 51:     // Druid-Dire Bear Form
	        	if(Plr->getLevel() >= 30)
	        	{
				Plr->addSpell(9634);
				Plr->BroadcastMessage("You have learned Dire Bear Form.");
				Plr->Gossip_Complete();
			}else{
				Plr->BroadcastMessage("You must be level 30 to learn Dire Bear Form.");
				Plr->Gossip_Complete();
			}
            		break;

	case 52:     // Druid-Normal Flight Form
	        	if(Plr->getLevel() >= 68)
	        	{
				Plr->addSpell(33943);
				Plr->BroadcastMessage("You have learned Summon Normal Flight Form.");
				Plr->Gossip_Complete();
			}else{
				Plr->BroadcastMessage("You must be level 68 to learn Normal Flight Form.");
				Plr->Gossip_Complete();
			}
            		break;

	case 53:     // Druid-Epic Flight Form
	        	if(Plr->getLevel() >= 70)
	        	{
				Plr->addSpell(40120);
				Plr->BroadcastMessage("You have learned Summon Epic Flight Form.");
				Plr->Gossip_Complete();
			}else{
				Plr->BroadcastMessage("You must be level 60 to learn Epic Flight Form.");
				Plr->Gossip_Complete();
			}
            		break;
	case 99:    //Main Menu
			objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
				if (Plr->getClass() == 1) 
 { 
Menu->AddItem(0, "What spells can warriors learn?", 1);
 } 
				if (Plr->getClass() == 2)
 { 
Menu->AddItem(0, "What spells can paladins learn?", 2);
 }
				if (Plr->getClass() == 3)
 { 
Menu->AddItem(0, "What spells can hunters learn?", 3);
 }
				if (Plr->getClass() == 9)
 { 
Menu->AddItem(0, "What spells can warlocks learn?", 4);
 }
				if (Plr->getClass() == 11)
 { 
Menu->AddItem(0, "What spells can druids learn?", 5);
 }
				if (Plr->getClass() == 4) 
 { 
Menu->AddItem(0, "What spells can rogues learn?", 6);
 } 
				if (Plr->getClass() == 5) 
 { 
Menu->AddItem(0, "What spells can priests learn?", 7);
 } 
				if (Plr->getClass() == 7) 
 { 
Menu->AddItem(0, "What spells can shamans learn?", 8);
 } 
				if (Plr->getClass() == 8) 
 { 
Menu->AddItem(0, "What spells can mages learn?", 9);
 } 
Menu->SendTo(Plr);
break;

			
		}
	}

void SetupSkillNPC(ScriptMgr * mgr)
{
	mgr->register_gossip_script(30010, (GossipScript*) new SkillNPC());
}
Setup.cpp
Code:
#include "StdAfx.h"
#include "Setup.h"
#include <scriptSetup.h>

extern "C" SCRIPT_DECL uint32 _exp_get_version()
{
    return MAKE_SCRIPT_VERSION(SCRIPTLIB_VERSION_MAJOR, SCRIPTLIB_VERSION_MINOR);
}

extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
    SetupSkillNPC(mgr);
}

#ifdef WIN32 

extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
{
return SCRIPT_TYPE_MISC;
}

#endif
Setup.h
Code:
#ifndef INSTANCE_SCRIPTS_SETUP_H
#define INSTANCE_SCRIPTS_SETUP_H

void SetupSkillNPC(ScriptMgr * mgr);

#endif
Sql Code
Code:
INSERT INTO `creature_names` VALUES ('30010', 'Mrs. Whatsitstoya', 'Skill NPC', ' ', '0', '7', '0', '0', '0', null, '0', '10432', '0', '0', '1', '1', '0', null);
INSERT INTO `creature_proto` VALUES ('30010', '1', '1', '35', '2300', '2300', '0', '1', '1', '1400', '0', '3', '3.87', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '20', '0', '0', '0', '0', '0', '0', '2', '0.3', '0', '0', '0', '0', '0', '2.5', '8', '14', '0');
This is tested and seems to be working. Hope you guys enjoy this one as much as the Twink Npc!


Downloads:

4.0 Stable
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]

Last edited by Sylex; 03-04-2008 at 12:19 AM..
Reply With Quote

Donate to remove ads.
(#2)
Old
Gastricpenguin's Avatar
Gastricpenguin is Offline
Why so serious...?
Legendary User

Rep Power: 7
Reputation: 787
Gastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to behold
 
Posts: 1,654
Join Date: Feb 2007
Location: 4Chan
03-01-2008

Excellent work.
Posted the source, credit given, and nice contribution
+6 rep


And the emulators shall tremble.
[Only registered and activated users can see links. ]
You are responsible for any broken rule, regardless if you "didn't know" or not.
Reply With Quote
(#3)
Old
Sylex's Avatar
Sylex is Offline
Banned
Rep Power: 0
Reputation: 101
Sylex will become famous soon enoughSylex will become famous soon enough
 
Posts: 141
Join Date: May 2007
Location: Localhost
03-01-2008

Thanks Gastricpenguin! :-)
Reply With Quote
(#4)
Old
Gastricpenguin's Avatar
Gastricpenguin is Offline
Why so serious...?
Legendary User

Rep Power: 7
Reputation: 787
Gastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to beholdGastricpenguin is a splendid one to behold
 
Posts: 1,654
Join Date: Feb 2007
Location: 4Chan
03-01-2008

You forgot one thing, add:
Code:

#include <scriptSetup.h> 


To the top of Setup.cpp. Or else you will get a "version mismatch" error in ascent.exe


And the emulators shall tremble.
[Only registered and activated users can see links. ]
You are responsible for any broken rule, regardless if you "didn't know" or not.
Reply With Quote
(#5)
Old
Sylex's Avatar
Sylex is Offline
Banned
Rep Power: 0
Reputation: 101
Sylex will become famous soon enoughSylex will become famous soon enough
 
Posts: 141
Join Date: May 2007
Location: Localhost
03-01-2008

In stable 4.0, it works fine without it :P But, I'll go ahead and add it to the script.
Reply With Quote
(#6)
Old
kanqaz's Avatar
kanqaz is Offline
Banned
Rep Power: 0
Reputation: 235
kanqaz has a spectacular aura aboutkanqaz has a spectacular aura aboutkanqaz has a spectacular aura about
 
Posts: 410
Join Date: Oct 2007
Location: Denmark
03-01-2008

awesome and thx for the source (: +rep 2x
Reply With Quote
(#7)
Old
Succy's Avatar
Succy is Offline
Contributor
Rep Power: 3
Reputation: 216
Succy has a spectacular aura aboutSuccy has a spectacular aura aboutSuccy has a spectacular aura about
 
Posts: 768
Join Date: Jun 2007
Location: Sweden
03-01-2008

Really Nice! A great contribution x2


Reply With Quote
(#8)
Old
Sylex's Avatar
Sylex is Offline
Banned
Rep Power: 0
Reputation: 101
Sylex will become famous soon enoughSylex will become famous soon enough
 
Posts: 141
Join Date: May 2007
Location: Localhost
03-01-2008

Your welcome kanqaz. If you have any problems, please post it and I'll try to answer it the best I can. Any suggestions are welcome too.
Reply With Quote
(#9)
Old
vb4evr's Avatar
vb4evr is Offline
Master Sergeant
Rep Power: 2
Reputation: 22
vb4evr is on a distinguished road
 
Posts: 113
Join Date: Oct 2007
03-01-2008

Very nice release Nebels. Goes above and beyond. + what little rep I can give. =)

Also,
Not sure if you want it, but I compiled up a pet trainer script a couple of weeks ago you are welcome to merge into yours if you wished. The thread was [Only registered and activated users can see links. ].
Reply With Quote
(#10)
Old
Sylex's Avatar
Sylex is Offline
Banned
Rep Power: 0
Reputation: 101
Sylex will become famous soon enoughSylex will become famous soon enough
 
Posts: 141
Join Date: May 2007
Location: Localhost
03-01-2008

Thanks vb4evr. If you want me to add it, get me the source through pm.
Reply With Quote
(#11)
Old
MysterioussouL's Avatar
MysterioussouL is Online
Elite User
Rep Power: 3
Reputation: 325
MysterioussouL is a jewel in the roughMysterioussouL is a jewel in the roughMysterioussouL is a jewel in the roughMysterioussouL is a jewel in the rough
 
Posts: 420
Join Date: Feb 2008
Location: HeaveN
03-01-2008

nice work x2 Nebels



[Only registered and activated users can see links. ]
Reply With Quote
(#12)
Old
Sylex's Avatar
Sylex is Offline
Banned
Rep Power: 0
Reputation: 101
Sylex will become famous soon enoughSylex will become famous soon enough
 
Posts: 141
Join Date: May 2007
Location: Localhost
03-01-2008

Thank you MysterioussouL. ))
Reply With Quote
(#13)
Old
vb4evr's Avatar
vb4evr is Offline
Master Sergeant
Rep Power: 2
Reputation: 22
vb4evr is on a distinguished road
 
Posts: 113
Join Date: Oct 2007
03-01-2008

Sure thing, although just tried to send it and is too large for PM.
I can send via email if you would like you can PM me your email and I can send it or I can post here?
Reply With Quote
(#14)
Old
Sylex's Avatar
Sylex is Offline
Banned
Rep Power: 0
Reputation: 101
Sylex will become famous soon enoughSylex will become famous soon enough
 
Posts: 141
Join Date: May 2007
Location: Localhost
03-01-2008

You can post it here if you want.
Reply With Quote
(#15)
Old
Sylex's Avatar
Sylex is Offline
Banned
Rep Power: 0
Reputation: 101
Sylex will become famous soon enoughSylex will become famous soon enough
 
Posts: 141
Join Date: May 2007
Location: Localhost
03-01-2008

No suggestions? That means its got everything? :P
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277