Postado Janeiro 21, 2021 4 anos .Qual servidor ou website você utiliza como base? TFS 1.3 TibiaGlobal 12.60 Qual o motivo deste tópico? Estou usando um talkaction para mudar de vocação em modal window mas quando confirmo nada acontece talkactions Spoiler local vocations = TalkAction("!vocations") function vocations.onSay(player, words, param) if getPlayerVocation == 1 or 5 or 9 then local window = ModalWindow(1000,"Selecione a vocation que deseja") window:addButton(100, "Confirm") window:addButton(101, "Cancel") window:addChoice(1, "Elementalist") window:addChoice(2, "Necromancer") window:addChoice(3, "Sorcerer") window:setDefaultEnterButton(100) window:setDefaultEscapeButton(101) window:sendToPlayer(player) return true end end vocations:register() creaturescripts Spoiler local modalWindowVocation = CreatureEvent("ModalWindowVocation") function onModalWindow(player, modalWindowId, buttonId, choiceId) player:unregisterEvent("ModalWindowVocation") local mensagem = { [1] = "Voce Virou ELementalista", [2] = "Voce virou Necromancer", [3] = "Voce virou Sorcerer", [4] = "Voce virou Healer", [5] = "Voce virou Enchanter", [6] = "Voce virou Druid", } if modalWindowId == 1000 then if buttonId == 100 then for x = 1,#mensagem do if choiceId == x then cid:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, mensagem[x]) player:setVocation(6) end for x = 4,#mensagem do if choiceId == x then cid:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, mensagem[x]) player:setVocation(6) end end end end end end modalWindowVocation:register() Editado Janeiro 22, 2021 4 anos por Lethal M (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.