Hello Iam new to Scripting and Lua scripts and I have had many problems that havent be solved yet like the hide and seek by murlock.
So I wonder what is needed to make a lua command work
In the Murlocks Hide and seek script it was like this:
Code:
function On_Gossip (pUnit, event, player)
pUnit:GossipCreateMenu(100, player, 0)
pUnit:GossipMenuAddItem(9, "Claim Your Prize!", 1, 0)
pUnit:GossipSendMenu(player)
end
function Gossip_Submenus(pUnit, event, player, id, intid, code)
if(intid == 1) then
pUnit:GossipCreateMenu(101, player, 0)
pUnit:GossipMenuAddItem(9, "ITEM_NAME", 2, 0)
pUnit:GossipMenuAddItem(9, "ITEM_NAME", 3, 0)
pUnit:GossipMenuAddItem(9, "ITEM_NAME", 4, 0)
pUnit:GossipSendMenu(player)
end
if(intid == 2) then
pUnit:SendChatMessage(14, 0, "I have been found! The event is over!")
player:AddItem(ITEMID, 1)
pUnit:Despawn(0, 0)
end
if(intid == 3) then
pUnit:SendChatMessage(14, 0, "I have been found! The event is over!")
player:AddItem(ITEMID, 1)
pUnit:Despawn(0, 0)
end
if(intid == 4) then
pUnit:SendChatMessage(14, 0, "I have been found! The event is over!")
player:AddItem(ITEMID, 1)
pUnit:Despawn(0, 0)
end
end
RegisterUnitGossipEvent(NPCID, 1, "On_Gossip")
RegisterUnitGossipEvent(NPCID, 2, "Gossip_Submenus")
So I changed the things in the red marked to my id and name of weapon and also my id to my npc. Than i restarted my server and it stood that the lua script was loaded. But than the mob didnt say anything and didnt disapear though i did exactly as it stood in the guide. So i tried to add the items to the vendor in the db and he showed the items but still no disapearing or yelling. So after all try i decided to get help. So what do i need to do? Do i need to download any special program for making this working? Have had problems with all scripts I made though I followed the guides. + rep for help