forgottenserver/data/scripts/creaturescripts/player/#text_window_example.lua
Sarah Wesker 1387a7de2f
Text Window helper functions (#4668)
Helper functions in lua for Text Windows
2024-05-14 17:07:40 +02:00

19 lines
440 B
Lua

local reactWindow = TalkAction("!textWindow")
function reactWindow.onSay(player, words, param, type)
local txtWindow = TextWindow({
itemId = 1234,
text = "Write something here:",
canWrite = true,
length = 100,
callback = function(player, item, text)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You wrote: " .. text)
return true
end
})
txtWindow:sendToPlayer(player)
return false
end
reactWindow:register()