Ir para conteúdo

Featured Replies

Postado

Galera Eu To Com Um Sistema Akatsuki Q Peguei AKi No Tibia King So Q Quando Coloco Ele No Meu Jogo Algums Player Q Ja Tinha Conta Antes Deu Colocar O Sistema Nao Consegue Fazer A Quest Poq Fala Q O Player Ja Fez Sendo Q O Player Nao Fez ... Os Q Criaram Char Dps Do Sistema Consegue De Boa Alguem Pode AJudar Vou Postar O Script Abaixo EH Por Npc !

 

Script :

-- Script Akatsuki System Advance 1.0 --
-- By RigBy --
-- tibiaking.com --
 
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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 level = 600 -- Level preciso pra entra para akatsuki
local itemid = 5943 -- id do coração
local quantidade =1 -- quantos hearts e preciso
local bonushp = 300000 -- quanto de bonus de life vai ganha
local bonusmp = 30000 -- quanto de bonus de mana vai ganha
local experience = 20 -- Experience rates no caso 2x a experiencia do seu servidor.
local config = {
--[Vocation] = ( Nova Vocation, New Outfit )
[230] = { 500, 704}, -- Naruto
[24] = { 502, 700}, -- Sasuke
[328] = { 506, 736}, -- Lee
[42] = { 504, 170}, -- Sakura
[61] = { 508, 719}, -- Gaara
[78] = { 514, 754}, -- Neji
[98] = { 510, 710}, -- Kiba
[116] = { 512, 729}, -- Shikamaru
[135] = { 516, 717}, -- Hinata
[158] = { 544, 725}, -- Tenten
[177] = { 518, 589}, -- Itachi
[196] = { 520, 722}, -- Killer Bee
[231] = { 522, 744}, -- Kakashi
[246] = { 538, 705}, -- Minato
[260] = { 546, 709}, -- Kisame
[275] = { 548, 629}, -- Raikage
[287] = { 526, 891}, -- Yahiko
[297] = { 530, 713}, -- Kankuro
[314] = { 528, 396}, -- Kakuzo
[325] = { 532, 726}, -- Temari
[229] = { 524, 481}, -- Obito
[372] = { 550, 520}, -- Jiraya
[348] = { 542, 876}, -- Shisui
[404] = { 540, 630}, -- Tobirama
[427] = { 534, 718}, -- Kabuto
[391] = { 536, 721}, -- Chouji
[382] = { 552, 650}, -- Deidara
[414] = { 555, 892}, -- Hashirama
}
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
 return false
end
 
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 1 or cid
 
 
if msgcontains(msg, 'akatsuki') then
    if getPlayerVocation(cid) ~= config then
        if getPlayerStorageValue(cid, 89745) == -1 then
            if getPlayerLevel(cid) >= level then
                selfSay('Tem certeza de que quer se juntar a Akatsuki?.', cid)
                talkState[talkUser] = 1
            else
                selfSay('Você nem sabe o nível que é pra entrar na akatsuki, suma da minha frente seu idiota.', cid)
            end
        else
            selfSay('Você já faz parte da Akatsuki!', cid)
        end
    else
        selfSay('Não preciso de você agora!', cid)
    end
end
 
if talkState[talkUser] == 1 and msgcontains(msg, 'yes') then
    selfSay('Para provar a sua lealdade, você tem que trazer '..quantidade..' {coraçao}.', cid)
    talkState[talkUser] = 2
end
 
if talkState[talkUser] == 2 and msgcontains(msg, 'coraçao') then
    if getPlayerItemCount(cid, 5943) >= 1 then
    local voc = config[getPlayerVocation(cid)]
        doPlayerSetVocation(cid, voc[1])
    local outfit = {lookType = voc[2]}
        doCreatureChangeOutfit(cid, outfit)
        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonushp)
        setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonusmp)
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
        doPlayerRemoveItem(cid, 5943, 1)
        doCreatureAddMana(cid, getCreatureMaxMana(cid))
        setPlayerStorageValue(cid,89745,6)
        doPlayerSetExperienceRate(cid, experience)
        selfSay('Parabéns agora você faz parte da Akatsuki.', cid)
        talkState[talkUser] = 0
    else
        selfSay('Não adianta me enganar, você não tem '..quantidade..' corações, vai atrás, e só volte com eles.', cid)
    end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

  • 1 month later...
Postado

Cara você pode mudar o "if getPlayerStorageValue(cid, 89745) == -1 then" este Storage pode estar sendo usado em outra quest e pode atrapalhar ;).

 

tbm pode ser isso "setPlayerStorageValue(cid,89745,6)" tente tirar o 7 e colocar 1 no lugar ;).

Editado por MadaraOt
um erro (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.

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.7k

Informação Importante

Confirmação de Termo