@emersongo
Vai no config.lua e procura por premiumForPromotion = false e troca o false por true.
- Fórum
- OTServ
- Pedidos
- Resolvidos
- [Resolvido] {PEDIDO} Preciso de um npc promotion que só promova se a conta for premium
EM
[Resolvido] {PEDIDO} Preciso de um npc promotion que só promova se a conta for premium
Por emersongo, 06 de abr. de 2019 em Resolvidos
npc
8.6
ot
6
1.4k
info
Grupo: Visconde
Registrado: 26/08/10
Posts: 431
Reputação: +60
Gênero: Masculino
Char no Tibia: Gabriel Rookgaardian

06 de abril de 2019 às 20:14
06 de abril de 2019 às 20:16
1 minuto atrás, gabriel28 disse:@emersongo
Vai no config.lua e procura por premiumForPromotion = false e troca o false por true.
Ja alterei e mesmo assim continua promovendo acc free.
info
Grupo: Visconde
Registrado: 26/08/10
Posts: 431
Reputação: +60
Gênero: Masculino
Char no Tibia: Gabriel Rookgaardian

06 de abril de 2019 às 20:17
Melhor resposta
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, premium = true, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) npcHandler:addModule(FocusModule:new())
06 de abril de 2019 às 20:21
2 minutos atrás, gabriel28 disse:
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, premium = true, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) npcHandler:addModule(FocusModule:new())
Obrigado, nem tinha percebido o premium = true, Rep+
info
Grupo: Diretor
Registrado: 12/05/12
Posts: 818
Reputação: +578
Gênero: Masculino
Char no Tibia: [ADM] Night

06 de abril de 2019 às 22:51
O pedido neste tópico de foi atendido e/ou o autor do tópico resolveu sua duvida. Este tópico está fechado e foi movido para Pedidos - Resolvidos. Se você tiver outros pedidos, crie um novo tópico.




info
Grupo: Campones
Registrado: 02/10/13
Posts: 5
Reputação: 0
Olá, já tenho um script de um npc de promotions, porém ele promove tanto as acc premium quanto as free, preciso que ele promova exclusivamente as acc premium.
Segue o código que tenho abaixo.