• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Gossip Menu Textbox

Status
Not open for further replies.

Rochet2

Moderator / Eluna Dev
No, not likely . Though you might be able to in c++ of you make use of the ui window showed by that packet.

Should check how that ui is sent to the player and if our is modifiable.


you could also just use the code box. See the parameters of gossip add item function in lua
 

Mathias

Exalted Member
player:GossipMenuAddItem(icon, msg, sender, intid[, code, popup, money]) this you mean but how do i use the popup part i dont really understood it

so if you see i want to make a kind of bounty system and a player write something in a textbox then it gets added to DB

all i dont know is how to get that textbox and save what the player write into the DB
 
Last edited:

Tommy

Founder
I wrote a small example. I didn't test it, just giving you a general idea on how to handle things.

Code:
local npcId = 10000

function GossipHello(event, plr, unit)
    plr:GossipMenuAddItem(0, "I would like to place a bounty", 1, 1, true, "Who would you like to place a bounty on?", 10000) -- icon, text, sender, intid, use code (true/false), prompt text, how much gold (amount)
    plr:GossipSendMenu(1, unit)
end

function GossipSelect(event, player, creature, sender, intid, code)
    if (intid == 1) -- Deal with code / bounty stuff
        local victim = GetPlayerByName(code)
        if (victim ~= nil)
            -- Continue
        end
    end
end

RegisterCreatureGossipEvent(npcId, 1, GossipHello)
RegisterCreatureGossipEvent(npcId, 2, GossipSelect)
 
Status
Not open for further replies.
Top