Ir para conteúdo

Featured Replies

Postado

Faz o seguinte,

Vá em data/talkaction/scritps/crie um arquivo chamado testando.lua

e cole isso lá dentro

 

local config = {
promotion = 1, -- nível de promoção, padrão = 1. Ignore se você não tem novas vocações.
minLevel = 20, -- Level pra usar o comando
cost = 20000, -- Preço que precisa pra usar o comando
premium = "no"  -- Premium account para usar o comando
}
 
local disabledVocations = {0}
 
config.premium = getBooleanFromString(config.premium)
 
function onSay(cid, words, param)
if(isInArray(disabledVocations, getPlayerVocation(cid)) == TRUE) then
doPlayerSendCancel(cid, "Your vocation cannot buy promotion.")
elseif(config.premium == TRUE and isPremium(cid) == FALSE) then
doPlayerSendCancel(cid, "Voce precisa ser donate para comprar promotion.")
elseif(getPlayerPromotionLevel(cid) >= config.promotion) then
doPlayerSendCancel(cid, "You are already promoted.")
elseif(getPlayerLevel(cid) < config.minLevel) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need level " .. config.minLevel .. " to get promotion.")
elseif(doPlayerRemoveMoney(cid, config.cost) ~= TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You do not have enought money! (Promotion cost " .. config.cost .. " gp.")
else
setPlayerPromotionLevel(cid, config.promotion)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been succesful promoted to " .. getVocationInfo(getPlayerVocation(cid)).name .. ".")
end
return TRUE
end

E em Data/talkaction/talkaction.xml adicione essa tag

	<talkaction words="!promotion" script="testando.lua"/>

após isso usa o comando !promotion e ve se o bug continua ocorrendo.

  • Respostas 22
  • Visualizações 794
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @douglasfamil1 veja se é isso local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onC

  • @douglasfamil1   assim?   local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} f

Postado
  • Autor
2 horas atrás, Gnius disse:

Faz o seguinte,

Vá em data/talkaction/scritps/crie um arquivo chamado testando.lua

e cole isso lá dentro

 


local config = {
promotion = 1, -- nível de promoção, padrão = 1. Ignore se você não tem novas vocações.
minLevel = 20, -- Level pra usar o comando
cost = 20000, -- Preço que precisa pra usar o comando
premium = "no"  -- Premium account para usar o comando
}
 
local disabledVocations = {0}
 
config.premium = getBooleanFromString(config.premium)
 
function onSay(cid, words, param)
if(isInArray(disabledVocations, getPlayerVocation(cid)) == TRUE) then
doPlayerSendCancel(cid, "Your vocation cannot buy promotion.")
elseif(config.premium == TRUE and isPremium(cid) == FALSE) then
doPlayerSendCancel(cid, "Voce precisa ser donate para comprar promotion.")
elseif(getPlayerPromotionLevel(cid) >= config.promotion) then
doPlayerSendCancel(cid, "You are already promoted.")
elseif(getPlayerLevel(cid) < config.minLevel) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need level " .. config.minLevel .. " to get promotion.")
elseif(doPlayerRemoveMoney(cid, config.cost) ~= TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You do not have enought money! (Promotion cost " .. config.cost .. " gp.")
else
setPlayerPromotionLevel(cid, config.promotion)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been succesful promoted to " .. getVocationInfo(getPlayerVocation(cid)).name .. ".")
end
return TRUE
end

E em Data/talkaction/talkaction.xml adicione essa tag


	<talkaction words="!promotion" script="testando.lua"/>

após isso usa o comando !promotion e ve se o bug continua ocorrendo.

Acho que voce não entendeu oque esta ocorrendo.. Aliás isso ai é para que ??

Postado
29 minutos atrás, douglasfamil1 disse:

Acho que voce não entendeu oque esta ocorrendo.. Aliás isso ai é para que ??

Vai em data/creature scripts/login.lua e poste ele aaqui.

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo