Treasure Hunting
Information:
This is a event that occours all over Tanaris.
You start the event by talking to the Treasure Hunter in Gadzetown (sorry I cant spell) who will then give you directions to places all over tanaris, after visiting each one you will be given somewhere else to go till eventually you are led to the final place. At the final place is a weird statue which will give you weird special effects and cast spells on you, as soon as you get within talking range of it though it will stop. You can then claim your reward (which you can define in the script).
Screenshots:
Note: I am only showing the first and last place since I am to lazy to put up about 20 screenshots
Sql:
Code:insert into `creature_spawns` (`id`, `entry`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes0`, `bytes1`, `bytes2`, `emote_state`, `npc_respawn_link`, `channel_spell`, `channel_target_sqlid`, `channel_target_sqlid_creature`, `standstate`, `mountdisplayid`, `slot1item`, `slot2item`, `slot3item`) values('94661194','50','1','-7184.26','-3769.91','9.17177','5.86772','0','19159','35','0','65536','0','0','0','0','0','0','0','0','0','0','0','0'); insert into `creature_spawns` (`id`, `entry`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes0`, `bytes1`, `bytes2`, `emote_state`, `npc_respawn_link`, `channel_spell`, `channel_target_sqlid`, `channel_target_sqlid_creature`, `standstate`, `mountdisplayid`, `slot1item`, `slot2item`, `slot3item`) values('94661195','51','1','-6868.76','-4355.34','17.1046','3.12274','0','10150','35','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); insert into `creature_spawns` (`id`, `entry`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes0`, `bytes1`, `bytes2`, `emote_state`, `npc_respawn_link`, `channel_spell`, `channel_target_sqlid`, `channel_target_sqlid_creature`, `standstate`, `mountdisplayid`, `slot1item`, `slot2item`, `slot3item`) values('94661196','52','1','-7450.51','-2868.95','8.69787','4.56102','0','18250','35','0','65536','0','0','0','0','0','0','0','0','0','0','0','0'); insert into `creature_spawns` (`id`, `entry`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes0`, `bytes1`, `bytes2`, `emote_state`, `npc_respawn_link`, `channel_spell`, `channel_target_sqlid`, `channel_target_sqlid_creature`, `standstate`, `mountdisplayid`, `slot1item`, `slot2item`, `slot3item`) values('94661197','53','1','-8827.09','-4769.23','2.5658','0.393091','0','23909','35','0','65536','0','0','0','0','0','0','0','0','0','0','0','0'); insert into `creature_spawns` (`id`, `entry`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes0`, `bytes1`, `bytes2`, `emote_state`, `npc_respawn_link`, `channel_spell`, `channel_target_sqlid`, `channel_target_sqlid_creature`, `standstate`, `mountdisplayid`, `slot1item`, `slot2item`, `slot3item`) values('94661198','57','1','-10264','-3886.47','1.70079','3.70852','0','15899','35','0','65536','0','0','0','0','0','0','0','0','0','0','0','0'); insert into `creature_spawns` (`id`, `entry`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes0`, `bytes1`, `bytes2`, `emote_state`, `npc_respawn_link`, `channel_spell`, `channel_target_sqlid`, `channel_target_sqlid_creature`, `standstate`, `mountdisplayid`, `slot1item`, `slot2item`, `slot3item`) values('94661199','58','1','-8431.92','-3497.26','17.6875','4.57159','0','21979','35','0','0','0','0','0','0','0','0','0','0','0','0','0','0'); 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('50','Treasure Hunter','','','0','7','0','1','0','0','19159','19159','0','0','1','1',NULL,NULL); 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('51','Stalker','Treasure Hunter','','0','7','0','1','0','0','10150','10150','0','0','1','1',NULL,NULL); 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('52','Captain Milla','Treasure Hunter','','0','7','0','1','0','0','18250','18250','0','0','1','1',NULL,NULL); 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('53','Olivier','Treasure Hunter','','0','7','0','1','0','0','23909','23909','0','0','1','1',NULL,NULL); 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('57','Holly','Treasure Hunter','','0','7','0','1','0','0','15899','15899','0','0','1','1',NULL,NULL); 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('58','Treasure Reward','','','0','5','0','3','0','0','21979','21979','0','0','1','1',NULL,NULL); 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('50','43','43','35','10000','10000','0','1','1','1500','0','500','500','0','0','0','0','360000','500','0','0','0','0','0','0','1','1','','0','0','0','0','2.5','8','14','0','0','0','0','0','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('51','42','42','35','10000','10000','0','1','1','1500','0','50','5000','0','0','0','0','360000','53933','0','0','0','0','0','0','1','1','','0','0','0','0','2.5','8','14','0','0','0','0','0','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('52','40','40','35','10000','10000','0','1','1','1500','0','100','58272','0','0','0','0','360000','833','0','0','0','0','0','0','1','1','','0','0','0','0','2.5','8','14','0','0','0','0','0','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('53','42','42','35','10000','10000','0','1','1','1500','0','500','73333','0','0','0','0','360000','28622','0','0','0','0','0','0','1','1','','0','0','0','0','2.5','8','14','0','0','0','0','0','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('57','43','43','35','10000','10000','0','1','1','1500','0','500','500','0','0','0','0','360000','0','0','0','0','0','0','0','1','1','','0','0','0','0','2.5','8','14','0','0','0','0','0','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('58','80','80','35','10000','10000','0','1','1','1500','0','500','500','0','0','0','0','360000','500','0','0','0','0','0','0','1','1','','1','0','0','0','2.5','8','14','0','0','0','0','0','0','0');
Script:
Code:---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------- local LuaEngine = 18 -- 6 for default Aspire Lua engine, 18 for anything else, leave as 18 if your not sure :) local Treasure = 192 -- Reward for reaching the end local Amount = 1 -- the amount of items of the reward local Time = 0 -- Do not change this ---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------- function A_OnGossipTalk(pUnit, event, Player, pMisc) if (Player:IsInCombat() == true) then Player:SendAreaTriggerMessage("Please leave combat first.") Player:SendBroadcastMessage("Please leave combat first.") pUnit:GossipComplete(player) else pUnit:GossipCreateMenu(44424, Player, 0) pUnit:GossipMenuAddItem(0, "I want to go on a treasure hunt!", 12, 0) pUnit:GossipMenuAddItem(0, "No I don't want to go on a treasure hunt.", 9, 0) pUnit:GossipSendMenu(Player) end end function A_OnGossipSelect(pUnit, event, Player, id, intid, code, pMisc) if (intid == 12) and Player~= nil then Player:GossipSendPOI(Player, -6873.071167, -4354.071167, 7, 6, 0, "Checkpoint 1") local Name = Player:GetName() pUnit:SendChatMessage(12, 0, "Look on your map and minimap "..Name.." to see where to go first!") pUnit:GossipComplete(Player) end if (intid == 9) then pUnit:FullCastSpellOnTarget(11027, Player) pUnit:GossipComplete(Player) end end RegisterUnitGossipEvent(50, 1, "A_OnGossipTalk") RegisterUnitGossipEvent(50, 2, "A_OnGossipSelect") ---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------- print(" - ") function B_OnGossipTalk(pUnit, event, Player, pMisc) if (Player:IsInCombat() == true) then Player:SendAreaTriggerMessage("Please leave combat first.") Player:SendBroadcastMessage("Please leave combat first.") pUnit:GossipComplete(player) else pUnit:GossipCreateMenu(44425, Player, 0) pUnit:GossipMenuAddItem(0, "Where is the next part of the treasure hunt?", 13, 0) pUnit:GossipMenuAddItem(0, "I give up.", 8, 0) pUnit:GossipSendMenu(Player) end end function B_OnGossipSelect(pUnit, event, Player, id, intid, code, pMisc) if (intid == 13) and Player~= nil then Player:GossipSendPOI(Player, -7453.071167, -2881.071167, 7, 6, 0, "Checkpoint 2") local Name = Player:GetName() pUnit:SendChatMessage(12, 0, "Look on your map and minimap "..Name.." to see where to go now!") pUnit:GossipComplete(Player) end if (intid == 8) then pUnit:FullCastSpellOnTarget(11027, Player) pUnit:GossipComplete(Player) end end print(" Lua script made by stoneharry ") RegisterUnitGossipEvent(51, 1, "B_OnGossipTalk") RegisterUnitGossipEvent(51, 2, "B_OnGossipSelect") print(" Have fun ") ---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------- function C_OnGossipTalk(pUnit, event, Player, pMisc) if (Player:IsInCombat() == true) then Player:SendAreaTriggerMessage("Please leave combat first.") Player:SendBroadcastMessage("Please leave combat first.") pUnit:GossipComplete(player) else pUnit:GossipCreateMenu(44425, Player, 0) pUnit:GossipMenuAddItem(0, "Where is the next part?", 14, 0) pUnit:GossipMenuAddItem(0, "I am giving up on this.", 7, 0) pUnit:GossipSendMenu(Player) end end function C_OnGossipSelect(pUnit, event, Player, id, intid, code, pMisc) if (intid == 14) and Player~= nil then Player:GossipSendPOI(Player, -8821.071167, -4764.071167, 7, 6, 0, "Checkpoint 3") local Name = Player:GetName() pUnit:SendChatMessage(12, 0, "Look on your map and minimap "..Name.." to see where to go now!") pUnit:GossipComplete(Player) end if (intid == 7) then pUnit:FullCastSpellOnTarget(11027, Player) pUnit:GossipComplete(Player) end end RegisterUnitGossipEvent(52, 1, "C_OnGossipTalk") RegisterUnitGossipEvent(52, 2, "C_OnGossipSelect") ---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------- function D_OnGossipTalk(pUnit, event, Player, pMisc) if (Player:IsInCombat() == true) then Player:SendAreaTriggerMessage("Please leave combat first.") Player:SendBroadcastMessage("Please leave combat first.") pUnit:GossipComplete(player) else pUnit:GossipCreateMenu(44425, Player, 0) pUnit:GossipMenuAddItem(0, "Yet again, where is the next part?", 15, 0) pUnit:GossipMenuAddItem(0, "This isn't worth it, I give up.", 6, 0) pUnit:GossipSendMenu(Player) end end function D_OnGossipSelect(pUnit, event, Player, id, intid, code, pMisc) if (intid == 15) and Player~= nil then Player:GossipSendPOI(Player, -10268.071167, -3882.071167, 7, 6, 0, "Checkpoint 4") local Name = Player:GetName() pUnit:SendChatMessage(12, 0, "Look on your map and minimap "..Name.." to see where to go now! Your getting near.") pUnit:GossipComplete(Player) end if (intid == 6) then pUnit:FullCastSpellOnTarget(11027, Player) pUnit:GossipComplete(Player) end end RegisterUnitGossipEvent(53, 1, "D_OnGossipTalk") RegisterUnitGossipEvent(53, 2, "D_OnGossipSelect") ---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------- function E_OnGossipTalk(pUnit, event, Player, pMisc) if (Player:IsInCombat() == true) then Player:SendAreaTriggerMessage("Please leave combat first.") Player:SendBroadcastMessage("Please leave combat first.") pUnit:GossipComplete(player) else pUnit:GossipCreateMenu(44429, Player, 0) pUnit:GossipMenuAddItem(0, "Tell me where the final checkpoint is.", 16, 0) pUnit:GossipMenuAddItem(0, "This isn't worth it at all.", 5, 0) pUnit:GossipSendMenu(Player) end end print(" Report bugs to mmowned.com ") function E_OnGossipSelect(pUnit, event, Player, id, intid, code, pMisc) if (intid == 16) and Player~= nil then Player:GossipSendPOI(Player, -8433.071167, -3499.071167, 7, 6, 0, "Final Checkpoint") local Name = Player:GetName() pUnit:SendChatMessage(12, 0, "Look on your map and minimap "..Name.." to see where to go for the treasure!") pUnit:GossipComplete(Player) end if (intid == 5) then pUnit:FullCastSpellOnTarget(11027, Player) pUnit:GossipComplete(Player) end end RegisterUnitGossipEvent(57, 1, "E_OnGossipTalk") RegisterUnitGossipEvent(57, 2, "E_OnGossipSelect") ---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------- function WhenPlayerGetsNear_Treasure(pUnit,Event) Time = 0 pUnit:RegisterEvent("Attack_Treasure_Check", 1000, 0) end function Attack_Treasure_Check(pUnit, Event) if pUnit:GetClosestPlayer() == nil then else local Target = pUnit:GetClosestPlayer() Time = Time + 1 if Time == 1 then Target:SendBroadcastMessage("You will need to reach me to gain your reward!") Target:SendAreaTriggerMessage("You will need to reach me to gain your reward!") else pUnit:StopMovement(99999999) pUnit:SetCombatCapable(1) local Distance = pUnit:GetDistance(Target) if Distance > 15 then pUnit:RemoveEvents() pUnit:FullCastSpellOnTarget(47740, Target) pUnit:FullCastSpellOnTarget(48135, Target) pUnit:RegisterEvent("Attack_Treasure", 2000, 0) else end end end end print(" - ") function Attack_Treasure(pUnit, Event) local TargeTwo = pUnit:GetClosestPlayer() local DistancTwo = pUnit:GetDistance(TargeTwo) if DistancTwo < 2 then pUnit:RemoveEvents() else pUnit:FullCastSpellOnTarget(48135, TargeTwo) end end RegisterUnitEvent(58, LuaEngine, "WhenPlayerGetsNear_Treasure") RegisterUnitGossipEvent(58, 1, "F_OnGossipTalk") RegisterUnitGossipEvent(58, 2, "F_OnGossipSelect") function F_OnGossipTalk(pUnit, event, Player, pMisc) pUnit:GossipCreateMenu(44439, Player, 0) pUnit:GossipMenuAddItem(0, "Give the treasure please!", 17, 0) pUnit:GossipMenuAddItem(0, "I don't want the treasure.", 4, 0) pUnit:GossipSendMenu(Player) end function F_OnGossipSelect(pUnit, event, Player, id, intid, code, pMisc) if (intid == 17) then if Player:HasAura(47740) then Player:RemoveAura(44740) local Name = Player:GetName() pUnit:SendChatMessage(12, 0, "Well done "..Name.." you have gained the treasure!") Player:AddItem(Treasure, Amount) pUnit:GossipComplete(Player) pUnit:Despawn(0,30000) -- respawn in 30 secs else local Name = Player:GetName() pUnit:SendChatMessage(12, 0, "Well done "..Name.." you have gained the treasure!") Player:AddItem(Treasure, Amount) pUnit:GossipComplete(Player) pUnit:Despawn(0,30000) -- respawn in 30 secs end end if (intid == 4) then pUnit:FullCastSpellOnTarget(11027, Player) pUnit:GossipComplete(Player) end end ---------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------
Credits:
- Me
Have fun!
Note: This was made for ArcEmu using NCDB. Should work with other things but you may need to do a simple convertion if it gives you a error.