Ghostcrawler336
Epic Member
As the title says!
Last edited by a moderator:
PLAYER_EVENT_ON_FIRST_LOGIN = 30, // (event, player)
Player Gossip
[LIST]
[*]GossipMenuAddItem
[*]GossipSendMenu
[*]GossipComplete
[*]GossipClearMenu
[/LIST]
You should probably consider doing some research before asking these questions.
Code:PLAYER_EVENT_ON_FIRST_LOGIN = 30, // (event, player)
Code:Player Gossip [LIST] [*]GossipMenuAddItem [*]GossipSendMenu [*]GossipComplete [*]GossipClearMenu [/LIST]
https://github.com/ElunaLuaEngine/Eluna/blob/master/LuaFunctions.cpp#L587
did u tried sendlistinventory ?
-- by Runemaster
local Stan = {4080, 13955, 23087, 1154, 10740, 14621, 23577, 10835, 19031}
local Cartman = {14806, 2575, 8312, 23663, 8318, 8316, 4072, 3198}
local Kyle = {21157, 14289, 20654}
local Kenny = {10261, 10056, 6526, 6594, 5963, 10257, 12522, 21697, 15289}
function southpark_GossipOnTalk(Event, player, Unit)
player:GossipClearMenu()
player:GossipMenuAddItem(0, "Give Me Stan's Armor! (Warrior)", 0, 101)
player:GossipMenuAddItem(0, "Give Me Cartman's Armor! (Paladin)", 0, 102)
player:GossipMenuAddItem(0, "Give Me Kyle's Armor! (Mage)", 0, 103)
player:GossipMenuAddItem(0, "Give Me Kenny's Armor! (Range)", 0, 104)
player:GossipMenuAddItem(7, "Nevermind...", 0, 105)
player:GossipSendMenu(1, Unit)
end
function southpark_GossipOnSelect(Event, player, Unit, id, intid, code)
if(intid == 100) then
for i=1, #Stan do
player:AddItem(Stan[i], 1)
player:SendBroadcastMessage("Here is your armor, Stan!")
player:GossipComplete()
end
end
if(intid == 102) then
for i=1, #Cartman do
player:AddItem(Cartman[i], 1)
player:SendBroadcastMessage("Here is your armor, Cartman!")
player:GossipComplete()
end
end
if(intid == 103) then
for i=1, #Kyle do
player:AddItem(Kyle[i], 1)
player:SendBroadcastMessage("Here is your armor, Kyle!")
player:GossipComplete()
end
end
if(intid == 104) then
for i=1, #Kenny do
player:AddItem(Kenny[i], 1)
player:SendBroadcastMessage("Here is your armor, Kenny!")
player:GossipComplete()
end
end
if(intid == 105) then
player:GossipComplete()
end
end
RegisterPlayerGossipEvent(100, 1, southpark_GossipOnTalk)
RegisterPlayerGossipEvent(100, 2, southpark_GossipOnSelect)
here is an example of a creature based vendor script that auto gives armor upon choice:
http://emudevs.com/showthread.php/2641-South-Park-Vendor-Pack
Yeah, well I should've asked my question better. How would I set that up, since I tried it but it was unsuccessful.
PLAYER_EVENT_ON_FIRST_LOGIN = 30, // (event, player)
RegisterPlayerEvent(30, southpark_GossipOnTalk)
function FirstLogin (event, player)
player:GossipMenuAddItem(0, "Test", 0, 1)
end
RegisterPlayerEvent(30, FIrstLogin)
I deleted the script I made early. However, it was something like this below.
Code:function FirstLogin (event, player) player:GossipMenuAddItem(0, "Test", 0, 1) end RegisterPlayerEvent(30, FIrstLogin)
Perhaps sending the menu would be a great idea.
In addition to that, you should take a look at the name you register and the name of the function.
Indeed, that's what I need help with. Since I had it typed out like I was making a "gossip npc". And that's not how it was setup, I just typed that out when I posted it.
Indeed, that's what I need help with. Since I had it typed out like I was making a "gossip npc". And that's not how it was setup, I just typed that out when I posted it.
I don't want to use the playercreateinfo_item database table because I have gear setup for each spec. However, since I don't understand how to set this script up, nor does anyone want to explain or show me a example. You can close this thread, as this is my last reply to it.