Postado Janeiro 1, 2018 7 anos 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.
Postado Janeiro 2, 2018 7 anos 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 Janeiro 2, 2018 7 anos 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.