Originally Posted by
kreegoth
Ive written alot of Creature encounters in LUA and portals and such have had no issues with it.. For some reason i cannot get the item scripting to work for me at all.. Any idea what ive done wrong?
Code:
function Item_OnUse(Item,Event,player)
item:GossipCreateMenu(100, player, 0)
item:GossipMenuAddItem(0, "Bring me to the Bomb Site", 1, 0)
item:GossipSendMenu(player)
end
function Item_OnSelect(item,Event,Player)
if intid == 1 then
player:Teleport (1, -3113.75, 839.355, 91.6668)
end
end
RegisterItemGossipEvent(118728, 1, "Item_OnUse")
RegisterItemGossipEvent(118728, 2, "Item_OnUse")
try
Code:
function Item_OnUse(Item, Event, player)
item:GossipCreateMenu(100, player, 0)
item:GossipMenuAddItem(0, "Bring me to the Bomb Site", 1, 0)
item:GossipSendMenu(player)
end
function Item_OnSelect(item, Event, Player)
if (intid == 1) then
player:Teleport (1, -3113.75, 839.355, 91.6668)
end
end
RegisterItemGossipEvent(118728, 1, "Item_OnUse")
RegisterItemGossipEvent(118728, 2, "Item_OnSelect")
i think that should do it. ive only been using lua for a day now. you just left out spaces and parenthesis, and i changed 2nd register to onselect, since that was your second function. if its wrong, someone please tell me, im still new to this :/