i am currently coding a "Teleportation" stone for my server but i can't seem to fix the "buff" problem i have...
here is the code
Thanks in advance
Bump
(i have fixed it )
here is the code
Code:
function Item_Trigger(item, event, player)
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("Nice try... We don't allow people to escape combats via the stone")
else
item:GossipCreateMenu(3000, player, 0)
item:GossipMenuAddItem(1, "Teleporter", 100, 0)
item:GossipMenuAddItem(1, "Buffer", 101, 0)
item:GossipMenuAddItem(1, "Starter Items", 102, 0)
item:GossipMenuAddItem(0, "Server Information", 103, 0)
item:GossipMenuAddItem(3, "Learn Dual Wield", 104, 0)
item:GossipSendMenu(player)
end
end
function OnSelect(item, event, player, id, intid, code)
if(intid == 999) then
item:GossipCreateMenu(3000, player, 0)
item:GossipMenuAddItem(1, "Teleporter", 100, 0)
item:GossipMenuAddItem(1, "Buffer", 101, 0)
item:GossipMenuAddItem(1, "Starter Items", 102,0)
item:GossipMenuAddItem(0, "Server Information", 103, 0)
item:GossipMenuAddItem(3, "Learn Dual Wield", 104, 0)
item:GossipSendMenu(player)
end
if(intid == 100) then
item:GossipCreateMenu(3000, player, 0)
item:GossipMenuAddItem(2, "Alliance Major Towns", 200, 0)
item:GossipMenuAddItem(2, "Horde Major Towns", 201, 0)
item:GossipMenuAddItem(2, "Farming Locations", 202, 0)
item:GossipMenuAddItem(2, "Quest Zones", 203, 0)
item:GossipMenuAddItem(0, "[Back]", 999, 0)
item:GossipSendMenu(player)
end
if(intid == 104) then
item:GossipCreateMenu(62, player, 0)
player:LearnSpell(86629)
item:GossipSendMenu(player)
end
--Alliance Major Towns
if(intid == 200) then
item:GossipCreateMenu(3000, player, 0)
item:GossipMenuAddItem(2, "Stormwind", 500, 0)
item:GossipMenuAddItem(2, "Ironforge", 501, 0)
item:GossipMenuAddItem(2, "Darnassus", 502, 0)
item:GossipMenuAddItem(2, "Exodar", 503, 0)
item:GossipMenuAddItem(0, "[Back]", 999, 0)
item:GossipSendMenu(player)
end
--Alliance end
--Horde Major Towns
if(intid == 201) then
item:GossipCreateMenu(3000, player, 0)
item:GossipMenuAddItem(2, "Orgrimmar", 504, 0)
item:GossipMenuAddItem(2, "Undercity", 505, 0)
item:GossipMenuAddItem(2, "Thunder Bluff", 506, 0)
item:GossipMenuAddItem(2, "Silvermoon", 507, 0)
item:GossipMenuAddItem(0, "[Back]", 999, 0)
item:GossipSendMenu(player)
end
--Horde end
--(mapid,X,Y,Z)
if(intid == 500) then
player:Teleport(0, -8823.780273, 630.429993, 94.200600)
item:GossipComplete(player)
end
if(intid == 501) then
player:Teleport(0, -4977.259277, -887.176758, 501.628052)
item:GossipComplete(player)
end
if(intid == 502) then
player:Teleport(1, 9946.639648, 2610.149414, 1316.256348)
item:GossipComplete(player)
end
if(intid == 503) then
player:Teleport(530, -4008.085205, -11885.257813, -1.419589)
item:GossipComplete(player)
end
if(intid == 101) then
item:GossipCreateMenu(3000, player, 0)
item:GossipMenuAddItem(1, "Health Buff", 300, 0)
item:GossipMenuAddItem(1, "Strength Buff", 301, 0)
item:GossipMenuAddItem(1, "Intelligence Buff", 302, 0)
item:GossipMenuAddItem(1, "Agility Buff", 303, 0)
item:GossipMenuAddItem(1, "Spirit Buff", 304, 0)
item:GossipMenuAddItem(1, "All Buffs on list", 305, 0)
item:GossipMenuAddItem(0, "[Back]", 999, 0)
item:GossipSendMenu(player)
end
if(intid == 300) then
item:GossipCreateMenu(62, player, 0)
item:FullCastSpellOnTarget(21562, player)
item:GossipComplete(player)
end
if(intid == 301) then
item:GossipCreateMenu(62, player, 0)
item:FullCastSpellOnTarget(19740, player)
item:GossipComplete(player)
end
if(intid == 302) then
item:GossipCreateMenu(62, player, 0)
item:FullCastSpellOnTarget(51799, player)
item:GossipComplete(player)
end
if(intid == 303) then
item:GossipCreateMenu(62, player, 0)
item:FullCastSpellOnTarget(80472, player)
item:GossipComplete(player)
end
if(intid == 305) then
item:GossipCreateMenu(62, player, 0)
item:FullCastSpellOnTarget(21562, player)
item:FullCastSpellOnTarget(19740, player)
item:FullCastSpellOnTarget(51799, player)
item:FullCastSpellOnTarget(80472, player)
item:GossipComplete(player)
end
if(intid == 102) then
item:GossipCreateMenu(3000, player, 0)
item:GossipMenuAddItem(3, "Warrior Starter Gear", 400, 0)
item:GossipMenuAddItem(3, "Paladin Starter Gear", 401, 0)
item:GossipMenuAddItem(3, "Mage Starter Gear", 402, 0)
item:GossipMenuAddItem(3, "Druid Starter Gear", 403, 0)
item:GossipMenuAddItem(3, "Warlock Starter Gear", 404, 0)
item:GossipMenuAddItem(3, "Shaman Starter Gear", 405, 0)
item:GossipMenuAddItem(3, "Death Knight Starter Gear", 406, 0)
item:GossipMenuAddItem(3, "Rogue Starter Gear", 407, 0)
item:GossipMenuAddItem(3, "Hunter Starter Gear", 408, 0)
item:GossipMenuAddItem(3, "Priest Starter Gear", 409, 0)
item:GossipMenuAddItem(0, "[Back]", 999, 0)
item:GossipSendMenu(player)
end
if(intid == 103) then
item:GossipCreateMenu(3000, player, 0)
item:GossipMenuAddItem(0, "Server information here", 999, 0)
item:GossipMenuAddItem(0, "More server information here", 999,0)
item:GossipSendMenu(player)
end
end
--180000
RegisterItemGossipEvent(180000, 1, "Item_Trigger")
RegisterItemGossipEvent(180000, 2, "OnSelect")
Thanks in advance
Bump
(i have fixed it )
Last edited by a moderator: