Fixed !
Thnx Ground-Zero
+rep
Fixed !
Thnx Ground-Zero
+rep
Last edited by Diemen; 02-20-2010 at 07:46 AM.
Could some one take a look please....
those functions arent set to do anythingCode:function Item_Menu(item, player) item:GossipCreateMenu(3543, player, 0) item:GossipMenuAddItem(4, "Alliance City's", 1, 0) item:GossipMenuAddItem(4, "Horde City's", 2, 0) item:GossipMenuAddItem(4, "Dream World", 3, 0) item:GossipSendMenu(player) end
Last edited by mag1212; 02-17-2010 at 07:51 AM.
Yes they are.
Your problem is you havn't registered the first event.
Another problem is more than likely you're item isn't set to do anything on use, you need to bind it to a item which does something on use, eg Hearthstone.
Edit:
Fixed;
Code:local itemid = 210798 function Item_Menu(item, player) if player:IsInCombat() == false then item:GossipCreateMenu(3543, player, 0) item:GossipMenuAddItem(4, "Alliance City's", 1, 0) item:GossipMenuAddItem(4, "Horde City's", 2, 0) item:GossipMenuAddItem(4, "Dream World", 3, 0) item:GossipSendMenu(player) else player:SendAreaTriggerMessage("You can't use that item while in combat!") end end function Item_OnSelect (item, event, player, id, intid, code) local plyr = player:GetPlayerRace() local x, y, z, o = player:GetX(), player:GetY(), player:GetZ(), player:GetO() if (intid == 1) then -- Alliance Cities if (plyr == 1) or (plyr == 3) or (plyr == 4) or (plyr == 7) or (plyr == 11) then item:GossipCreateMenu(5668, player, 0) item:GossipMenuAddItem(2, "Stormwind", 19, 0) item:GossipMenuAddItem(2, "Ironforge", 20, 0) item:GossipMenuAddItem(2, "Darnassus", 21, 0) item:GossipMenuAddItem(2, "Exodar", 22, 0) item:GossipSendMenu(player) end -- Horde Cities if (plyr == 2) or (plyr == 5) or (plyr == 6) or (plyr == 8) or (plyr == 10) then item:GossipCreateMenu(5668, player, 0) item:GossipMenuAddItem(2, "Orgrimmar", 23, 0) item:GossipMenuAddItem(2, "Thunderbluff", 24, 0) item:GossipMenuAddItem(2, "Undercity", 25, 0) item:GossipMenuAddItem(2, "Silvermoon", 26, 0) item:GossipSendMenu(player) end end if (intid == 3) then player:Teleport(560, 2530.332275, 2651.880127, 67.779137, 4.658195) -- Dream world player:GossipComplete() end if (intid == 19) then -- Stormwind player:Teleport(0, -8913.23, 554.63, 93.79) player:GossipComplete() end if (intid == 20) then -- Ironforge player:Teleport(0, -4982.16, -880.75, 501.65) player:GossipComplete() end if (intid == 21) then -- Darnassus player:Teleport(1, 9945.49, 2609.89, 1316.26) player:GossipComplete() end if (intid == 22) then -- Exodar player:Teleport(530, -4002.67, -11875.54, -0.71) player:GossipComplete() end -- Horde Cities if (intid == 23) then -- Orgimmar player:Teleport(1, 1502.71, -4415.41, 21.77) player:GossipComplete() end if (intid == 24) then -- Thunderbluff player:Teleport(1, -1285.23, 117.86, 129.99) player:GossipComplete() end if (intid == 25) then -- Undercity player:Teleport(0, 1831.26, 238.52, 60.52) player:GossipComplete() end if (intid == 26) then -- Silvermoon player:Teleport(530, 9398.75, -7277.41, 14.21) player:GossipComplete() end end RegisterItemGossipEvent(210798, 1, "Item_Trigger")RegisterItemGossipEvent(210798, 2, "Item_OnSelect")
Last edited by Ground Zero; 02-17-2010 at 11:31 PM.
Sorry for all these numbers but i can't get it as a SQL , i imported the item myself.Code:210798 15 0 -1 Draconic Artifact 9129 5 64 0 0 0 0 -1 -1 254 1 0 0 0 0 0 0 0 1 1 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33208 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 This Artifact can teleport you back and forth to dream world. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0
This is the Item the Script above is made for.
But it still doesn't work..
Lol i got an Error That Item_Trigger is not a valid function :P
EDIT : Trigger Error Fixed.
New error now :P
Posted my Edited script in my first Post.Code:script\Draconic Scroll.lua:2: attempt to index local 'player' (a number value)
Last edited by Diemen; 02-17-2010 at 11:23 AM.
I could give you a .lua I use, it uses the item Hearthstone but i'm sure you can change that along with the other stuff if you'd like.
Do you want it?
Just Can't get them to work... i think it would be just a little mistake in the Script but i can't find it.
No errors on Start-up and in World.
Item use does not work.
No pop-up menu
Draconic Artifact:
Draconic Scroll :Code:function Item_Trigger(item, event, player) if (player:IsInCombat() == true) then player:SendAreaTriggerMessage("Good try, we do not tolerate people using this in combat!") else item:GossipCreateMenu(100, player, 0) item:GossipMenuAddItem(2, "Alliance City's", 1, 0) item:GossipMenuAddItem(2, "Horde City's", 2, 0) item:GossipMenuAddItem(2, "Dream World", 3, 0) item:GossipSendMenu(player) end end function Item_OnSelect(item, event, player, id, intid, code) if (intid == 1) then -- Alliance Cities player:GetPlayerRace() if (player == 1) or (player == 3) or (player == 4) or (player == 7) or (player == 11) then item:GossipCreateMenu(100, player, 0) item:GossipMenuAddItem(2, "Stormwind", 19, 0) item:GossipMenuAddItem(2, "Ironforge", 20, 0) item:GossipMenuAddItem(2, "Darnassus", 21, 0) item:GossipMenuAddItem(2, "Exodar", 22, 0) item:GossipSendMenu(player) end -- Horde Cities if (player == 2) or (player == 5) or (player == 6) or (player == 8) or (player == 10) then item:GossipCreateMenu(100, player, 0) item:GossipMenuAddItem(2, "Orgrimmar", 23, 0) item:GossipMenuAddItem(2, "Thunderbluff", 24, 0) item:GossipMenuAddItem(2, "Undercity", 25, 0) item:GossipMenuAddItem(2, "Silvermoon", 26, 0) item:GossipSendMenu(player) end end if (intid == 3) then -- Dream world player:Teleport(560, 2530.332275, 2651.880127, 67.779137) player:GossipComplete() end if (intid == 19) then -- Stormwind player:Teleport(0, -8913.23, 554.63, 93.79) player:GossipComplete() end if (intid == 20) then -- Ironforge player:Teleport(0, -4982.16, -880.75, 501.65) player:GossipComplete() end if (intid == 21) then -- Darnassus player:Teleport(1, 9945.49, 2609.89, 1316.26) player:GossipComplete() end if (intid == 22) then -- Exodar player:Teleport(530, -4002.67, -11875.54, -0.71) player:GossipComplete() end -- Horde Cities if (intid == 23) then -- Orgimmar player:Teleport(1, 1502.71, -4415.41, 21.77) player:GossipComplete() end if (intid == 24) then -- Thunderbluff player:Teleport(1, -1285.23, 117.86, 129.99) player:GossipComplete() end if (intid == 25) then -- Undercity player:Teleport(0, 1831.26, 238.52, 60.52) player:GossipComplete() end if (intid == 26) then -- Silvermoon player:Teleport(530, 9398.75, -7277.41, 14.21) player:GossipComplete() end end RegisterItemGossipEvent(210795, 1, "Item_Trigger") RegisterItemGossipEvent(210795, 2, "OnSelect")
Code:function Item_Trigger(item, event, player) if (player:IsInCombat() == true) then player:SendAreaTriggerMessage("Good try, we do not tolerate people using this in combat!") else item:GossipCreateMenu(3543, player, 0) item:GossipMenuAddItem(2, "Dream World", 3, 0) item:GossipSendMenu(player) end end function OnSelect(item, event, player, id, intid, code) if(intid == 3) then -- Dream World player:Teleport(560, 2530.332275, 2651.880127, 67.779137) end end RegisterItemGossipEvent(210795, 1, "Item_Trigger") RegisterItemGossipEvent(210795, 2, "OnSelect")
This Thread can be Closed/Removed now!