Indestructible
06-10-2009, 01:06 AM
Hey,
I know it's pretty useless, but for some servers, the retail riding skills trainer don't work. It was the case on my server, so I made this NPC and decided to share it with you guys!
He teaches the 5 spells/riding skills and if the player already knows the spells, he won't learn them.
LUA Script:
function On_Gossip(unit, event, player)
unit:GossipCreateMenu(50, player, 0)
unit:GossipMenuAddItem(0, "Riding Skills!", 1, 0)
unit:GossipSendMenu(player)
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if(intid == 1) then
player:LearnSpell(33389)
player:LearnSpell(34093)
player:LearnSpell(33392)
player:LearnSpell(34092)
player:LearnSpell(54197)
player:GossipComplete()
end
end
RegisterUnitGossipEvent(76666, 1, "On_Gossip")
RegisterUnitGossipEvent(76666, 2, "Gossip_Submenus")
SQL Script:
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('76666', "Riding Skills", "", '', '0', '7', '0', '1', '0', '0', '2591', '0', '0', '0', '1', '1', '0', '0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('76666', '80', '80', '35', '50000', '50000', '100', '1.5', '1', '2000', '0', '50000', '100000', '0', '0', '0', '0', '300000', '100000', '500', '500', '500', '500', '500', '500', '0', '0', "0", '0', '100000', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
Instructions:
1) Open Notepad.
2) Copy and Paste the LUA script in the Notepad
3) Save the Notepad as "Riding.lua" .lua is VERY important.
4) Go in your DB using SQL.
5) Go in query, copy-paste the SQL script and press F9
6) Place the "Riding.lua" in the 'scripts' folder of your server's folder.
7) Restart your server and you're done!
http://i194.photobucket.com/albums/z283/Dadouboy/WoWScrnShot_060909_213920.jpg
Hope it can help some of you!
I know it's pretty useless, but for some servers, the retail riding skills trainer don't work. It was the case on my server, so I made this NPC and decided to share it with you guys!
He teaches the 5 spells/riding skills and if the player already knows the spells, he won't learn them.
LUA Script:
function On_Gossip(unit, event, player)
unit:GossipCreateMenu(50, player, 0)
unit:GossipMenuAddItem(0, "Riding Skills!", 1, 0)
unit:GossipSendMenu(player)
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if(intid == 1) then
player:LearnSpell(33389)
player:LearnSpell(34093)
player:LearnSpell(33392)
player:LearnSpell(34092)
player:LearnSpell(54197)
player:GossipComplete()
end
end
RegisterUnitGossipEvent(76666, 1, "On_Gossip")
RegisterUnitGossipEvent(76666, 2, "Gossip_Submenus")
SQL Script:
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('76666', "Riding Skills", "", '', '0', '7', '0', '1', '0', '0', '2591', '0', '0', '0', '1', '1', '0', '0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('76666', '80', '80', '35', '50000', '50000', '100', '1.5', '1', '2000', '0', '50000', '100000', '0', '0', '0', '0', '300000', '100000', '500', '500', '500', '500', '500', '500', '0', '0', "0", '0', '100000', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
Instructions:
1) Open Notepad.
2) Copy and Paste the LUA script in the Notepad
3) Save the Notepad as "Riding.lua" .lua is VERY important.
4) Go in your DB using SQL.
5) Go in query, copy-paste the SQL script and press F9
6) Place the "Riding.lua" in the 'scripts' folder of your server's folder.
7) Restart your server and you're done!
http://i194.photobucket.com/albums/z283/Dadouboy/WoWScrnShot_060909_213920.jpg
Hope it can help some of you!