Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Galera queria 2 scripts, 1 o player ao dar use em um bau ele ira virar akatsuki, mudando sua roupa para a da akatsuki (cada vocação tem sua roupa) iria aparecer no look, que o playerpertence a akatsuki e também dará 10 a mais de magic level sword fight e distance fight.

2 o player dara use no bau e ele ira virar anbu, mudando sua roupa para anbu (cada vocação tem sua roupa) iria aparecer no look, que o player pertence a akatsuki e tambem dará 10 a mais de magic level, axe fight e distance fight.

Obrigado.

Obs.o player nao podera mudar a organizaçâo ou seja se ele for akatsuki ele n podera mudar para anbu e vice versa

Link para o post
Compartilhar em outros sites

matheuspeixoto12, em 18 Out 2014 - 10:31 PM, disse:

o player ao dar use em um bau ele ira virar akatsuki, mudando sua roupa para a da akatsuki (cada vocação tem sua roupa) iria aparecer no look, que o playerpertence a akatsuki e também dará 10 a mais de magic level sword fight e distance fight

Obs.o player nao podera mudar a organizaçâo ou seja se ele for akatsuki ele n podera mudar para anbu e vice versa

akatsukichest.lua (data/actions/scripts):

local tab = {
    [1] = {outfit = 123}, -- [vocationid] = {outfit = outfitnumber}
    [2] = {outfit = 231},
    [3] = {outfit = 321}
}

function onUse(cid, item, frompos, item2, topos)
    local voc, playerid = tab[getPlayerVocation(cid)], getPlayerGUID(cid)
    local sto = 32100
        if not voc then
            doPlayerSendCancel(cid, "Sua vocação não pode entrar para a Akatsuki.")
            return true
        elseif getPlayerStorageValue(cid, sto) > 0 then
            doPlayerSendCancel(cid, "Você já pertence a uma organização.")
            return true
        end
    
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você entrou para a Akatsuki!! Seu personagem será deslogado em 5 segundos.")
    addEvent(function()
         if isCreature(cid) then
                db.executeQuery("UPDATE `players` SET `description` = ' Akatsuki Member' WHERE `players`.`id`= ".. playerid .."")
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
                doPlayerAddSkillTry(cid, SKILL__MAGLEVEL, 10)
                doPlayerAddSkillTry(cid, SKILL_DISTANCE, 10)
                doPlayerAddSkillTry(cid, SKILL_SWORD, 10)
                setPlayerStorageValue(cid, sto, 1)
                doCreatureChangeOutfit(cid, {lookType = voc.outfit})
                doRemoveCreature(cid)
        end
    end, 5000)
    return true
end

 

 

 

matheuspeixoto12, em 18 Out 2014 - 10:31 PM, disse:

o player dara use no bau e ele ira virar anbu, mudando sua roupa para anbu (cada vocação tem sua roupa) iria aparecer no look, que o player pertence a akatsuki e tambem dará 10 a mais de magic level, axe fight e distance fight

Obs.o player nao podera mudar a organizaçâo ou seja se ele for akatsuki ele n podera mudar para anbu e vice versa

anbuchest.lua (data/actions/scripts):

local tab = {
    [1] = {outfit = 123}, -- [vocationid] = {outfit = outfitnumber}
    [2] = {outfit = 231},
    [3] = {outfit = 321}
}

function onUse(cid, item, frompos, item2, topos)
    local voc, playerid = tab[getPlayerVocation(cid)], getPlayerGUID(cid)
    local sto = 32100
        if not voc then
            doPlayerSendCancel(cid, "Sua vocação não pode se tornar um Anbu.")
            return true
        elseif getPlayerStorageValue(cid, tab[stor]) > 0 then
            doPlayerSendCancel(cid, "Você já pertence a uma organização.")
            return true
        end
    
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você se tornou um Anbu!! Seu personagem será deslogado em 5 segundos.")
    addEvent(function()
        if isCreature(cid) then
                db.executeQuery("UPDATE `players` SET `description` = ' Anbu Member' WHERE `players`.`id`= ".. playerid .."")
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
                doPlayerAddSkillTry(cid, SKILL__MAGLEVEL, 10)
                doPlayerAddSkillTry(cid, SKILL_DISTANCE, 10)
                setPlayerStorageValue(cid, sto, 1)
                doPlayerAddSkillTry(cid, SKILL_AXE, 10)
                doCreatureChangeOutfit(cid, {lookType = voc.outfit})
                doRemoveCreature(cid)
        end
    end, 5000)
    return true
end

 

Adicione as tags ao arquivo actions.xml (data/actions):

<action actionid="ACTIONID" event="script" value="akatsukichest.lua"/>
<action actionid="ACTIONID" event="script" value="anbuchest.lua"/>
Editado por Suicide (veja o histórico de edições)

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

infelizmente deu erro

 

[19/10/2014 04:48:29] [Error - Action Interface] 
[19/10/2014 04:48:29] data/actions/scripts/akatsukichest.lua
[19/10/2014 04:48:29] Description: 
[19/10/2014 04:48:29] data/actions/scripts/akatsukichest.lua:5: table index is nil
[19/10/2014 04:48:29] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/akatsukichest.lua)
 
[19/10/2014 04:54:43] [Error - Action Interface] 
[19/10/2014 04:54:43] data/actions/scripts/anbuchest.lua
[19/10/2014 04:54:43] Description: 
[19/10/2014 04:54:43] data/actions/scripts/anbuchest.lua:5: table index is nil
[19/10/2014 04:54:43] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/anbuchest.lua)
 
minha distro é a seven.exe 8.54, ela vem no server nto shinobi.
Link para o post
Compartilhar em outros sites

desta vez deu erro mas só quando dou use nas quests

 

[20/10/2014 02:28:41] [Error - Action Interface] 
[20/10/2014 02:28:41] data/actions/scripts/akatsukichest.lua:onUse
[20/10/2014 02:28:41] Description: 
[20/10/2014 02:28:41] data/actions/scripts/akatsukichest.lua:6: table index is nil
[20/10/2014 02:28:41] stack traceback:
[20/10/2014 02:28:41] data/actions/scripts/akatsukichest.lua:6: in function <data/actions/scripts/akatsukichest.lua:1>
 
[20/10/2014 02:28:50] [Error - Action Interface] 
[20/10/2014 02:28:50] data/actions/scripts/anbuchest.lua:onUse
[20/10/2014 02:28:50] Description: 
[20/10/2014 02:28:50] data/actions/scripts/anbuchest.lua:6: table index is nil
[20/10/2014 02:28:50] stack traceback:
[20/10/2014 02:28:50] data/actions/scripts/anbuchest.lua:6: in function <data/actions/scripts/anbuchest.lua:1>
Link para o post
Compartilhar em outros sites

agora, apareceu a mensagem que eu virei anbu e eu iria deslogar em 5 segundos, mas eu não deslogo, o char trava, depois de um tempo ele desloga e não loga até eu fechar e abrir o server, (porque dai ele volta sem salvar) e o server também não fecha, só consigo fecha-lo pelo gerenciador de tarefas. aparece apenas esse erro na distro e varias vezes, apenas depois que tento virar anbu/akatsuki

 

[20/10/2014 03:08:32] [Error - CreatureScript Interface] 
[20/10/2014 03:08:32] data/creaturescripts/scripts/advancesave.lua:onAdvance
[20/10/2014 03:08:32] Description: 
[20/10/2014 03:08:32] (luaSetConditionParam) This function can only be used while loading the script.
Link para o post
Compartilhar em outros sites

local tab = {
   vocations = {1, 2, 3},
    [1] = {outfit = 123}, -- [vocationid] = {outfit = outfitlooktype}
    [2] = {outfit = 231},
    [3] = {outfit = 321}
    }

function onUse(cid, item, frompos, item2, topos)

    local playerid = getPlayerGUID(cid)
    local sto = 32100
        if not isInArray(tab.vocations, getPlayerVocation(cid)) then
            doPlayerSendCancel(cid, "Sua vocação não pode entrar para a Akatsuki.")
            return true
            
        elseif getPlayerStorageValue(cid, sto) > 0 then
            doPlayerSendCancel(cid, "Você já pertence a uma organização.")
            return true
        end
  
    
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você entrou para a Akatsuki!! Seu personagem será deslogado em 5 segundos.")
        db.executeQuery("UPDATE `players` SET `description` = ' Akatsuki Member' WHERE `players`.`id`= ".. playerid .."")
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
        doPlayerAddSkillTry(cid, SKILL__MAGLEVEL, 10)
        doPlayerAddSkillTry(cid, SKILL_DISTANCE, 10)
        doPlayerAddSkillTry(cid, SKILL_SWORD, 10)
        setPlayerStorageValue(cid, sto, 1)
        doCreatureChangeOutfit(cid, {lookType = tab[getPlayerVocation(cid)].outfit})
        addEvent(doRemoveCreature, 5*1000, cid)

    return true
end

 

 

local tab = {
   vocations = {1, 2, 3},
    [1] = {outfit = 123}, -- [vocationid] = {outfit = outfitlooktype}
    [2] = {outfit = 231},
    [3] = {outfit = 321}
    }

function onUse(cid, item, frompos, item2, topos)

    local playerid = getPlayerGUID(cid)
    local sto = 32100
        if not isInArray(tab.vocations, getPlayerVocation(cid)) then
            doPlayerSendCancel(cid, "Sua vocação não pode se tornar um Anbu.")
            return true
            
        elseif getPlayerStorageValue(cid, sto) > 0 then
            doPlayerSendCancel(cid, "Você já pertence a uma organização.")
            return true
        end
  
    
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você se tornou um Anbu!! Seu personagem será deslogado em 5 segundos.")
        db.executeQuery("UPDATE `players` SET `description` = ' Anbu Member' WHERE `players`.`id`= ".. playerid .."")
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
        doPlayerAddSkillTry(cid, SKILL__MAGLEVEL, 10)
        doPlayerAddSkillTry(cid, SKILL_DISTANCE, 10)
        doPlayerAddSkillTry(cid, SKILL_AXE, 10)
        setPlayerStorageValue(cid, sto, 2)
        doCreatureChangeOutfit(cid, {lookType = tab[getPlayerVocation(cid)].outfit})
        addEvent(doRemoveCreature, 5*1000, cid)

    return true
end

F5MHzGo.gif

Link para o post
Compartilhar em outros sites

akatsukichest.lua

local tab = {
    [1] = {outfit = 123}, -- [vocationid] = {outfit = outfitnumber}
    [2] = {outfit = 231},
    [3] = {outfit = 321}
}

function onUse(cid, item, frompos, item2, topos)
    local sto = 32100
        if not (tab[getPlayerVocation(cid)]) then
            return doPlayerSendCancel(cid, "Sua vocação não pode entrar para a Akatsuki.")
        elseif getPlayerStorageValue(cid, sto) > 0 then
            return doPlayerSendCancel(cid, "Você já pertence a uma organização.")
        end
        
    setPlayerStorageValue(cid, sto, 1)
    doPlayerAddSkillTry(cid, SKILL_SWORD, 10)
    doPlayerAddSkillTry(cid, SKILL_DISTANCE, 10)
    doPlayerAddSkillTry(cid, SKILL__MAGLEVEL, 10)
    doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você entrou para a Akatsuki!! Seu personagem será deslogado em 5 segundos.")
    addEvent(function()
        if isCreature(cid) then
            doRemoveCreature(cid)
            db.executeQuery("UPDATE `players` SET `description` = ' Akatsuki Member' WHERE `players`.`id`= "..getPlayerGUID(cid).."")
        end
    end, 5000)
    return true
end




anbuchest.lua

local tab = {
    [1] = {outfit = 123}, -- [vocationid] = {outfit = outfitnumber}
    [2] = {outfit = 231},
    [3] = {outfit = 321}
}

function onUse(cid, item, frompos, item2, topos)
    local sto = 32100
        if not (tab[getPlayerVocation(cid)]) then
            return doPlayerSendCancel(cid, "Sua vocação não pode se tornar um Anbu.")
        elseif getPlayerStorageValue(cid, sto) > 0 then
            return doPlayerSendCancel(cid, "Você já pertence a uma organização.")
        end
        
    setPlayerStorageValue(cid, sto, 1)
    doPlayerAddSkillTry(cid, SKILL_AXE, 10)
    doPlayerAddSkillTry(cid, SKILL_DISTANCE, 10)
    doPlayerAddSkillTry(cid, SKILL__MAGLEVEL, 10)
    doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você se tornou um Anbu!! Seu personagem será deslogado em 5 segundos.")
    addEvent(function()
        if isCreature(cid) then
            doRemoveCreature(cid)
            db.executeQuery("UPDATE `players` SET `description` = ' Anbu Member' WHERE `players`.`id`= "..getPlayerGUID(cid).."")
        end
    end, 5000)
    return true
end
Editado por Suicide (veja o histórico de edições)

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

Nossa, ainda está dando erro, desta vez não chegou nem a aparecer a mensagem "Você se tornou anbu/akatsuki..." e consto esses erros:

 

20/10/2014 20:51:26] [Error - CreatureScript Interface] 
[20/10/2014 20:51:26] data/creaturescripts/scripts/advancesave.lua:onAdvance
[20/10/2014 20:51:26] Description: 
[20/10/2014 20:51:26] (luaSetConditionParam) This function can only be used while loading the script.
 
[20/10/2014 20:51:26] [Error - CreatureScript Interface] 
[20/10/2014 20:51:26] data/creaturescripts/scripts/PointsSystem.lua:onAdvance
[20/10/2014 20:51:26] Description: 
[20/10/2014 20:51:26] (luaSetConditionParam) This function can only be used while loading the script.
 
Obs. O que está  dando erro? as skills que são adicionadas ou o Akatsuki/anbu no look?
Link para o post
Compartilhar em outros sites

[20/10/2014 20:51:26] data/creaturescripts/scripts/advancesave.lua:onAdvance
[20/10/2014 20:51:26] data/creaturescripts/scripts/PointsSystem.lua:onAdvance
 
 
Quais scripts são esses?

F5MHzGo.gif

Link para o post
Compartilhar em outros sites

PointsSystem acabei de retirar pois veio no server e eu não utilizo.

O erro aparece depois que dou use nas quests e dou reload nos actions.

 

Esse advancesave é importante ou posso deletar?

 

Advancesave.lua

 

local config = {
savePlayersOnAdvance = true
}
 
function onAdvance(cid, skill, oldLevel, newLevel)
if(config.savePlayersOnAdvance) then
doPlayerSave(cid, true)
end
 
return true
end
Link para o post
Compartilhar em outros sites

Esse advancesave é importante ou posso deletar?

Esse creaturescript é o que salva o player assim que ele tem seus dados alterados (skills).

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

Nossa, separar as orgs das skills, tipo um action para as orgs e um npc para dar skill apenas se o player tiver tal storage, sera que funciona? Pois nao sei se é as orgs que não estão funcionando ou se é a parte da skill, você tem alguma ideia do que seja?

Editado por matheuspeixoto12 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Atualizei meu post, editei o script. Está tudo certo, e os erros no distro que você citou anteriormente não tem nenhuma ligação com essas actions.

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

vcs estao criando sistema igual o do wono pqp eu acho que è melhor npc, eu vou ver se eu crio como vc quer. mas primeiro eu vou testa esse ai

Editado por CreatServer (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

vc estao criando igual o do wono pqp eu acho que è melhor, eu vou ver se eu crio como vc quer.

?
Se você se referiu a mim (porque eu não entendi nada do que você disse), eu fiz o script do modo como o membro pediu.

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

?

Se você se referiu a mim (porque eu não entendi nada do que você disse), eu fiz o script do modo como o membro pediu.

primeiramente descupe pelos os erro jah editei a resposta.

o que quero disse que no pedido do meu amigo aii ele quer ao da look mostre que é da akatsuki, e vc colocou pra ganha storage e nos server nto na pasta creaturescript tem o showvoc. lah o cara colocar tb pra da look mosta que é da akatsuki basta o storage que vc colocou na script.

descupe qualquer coisa teste aqui funcionou prefeitamente otimo script vlw.

Editado por CreatServer (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

vc colocou pra ganha storage e nos server nto na pasta creaturescript tem o showvoc. lah o cara colocar tb pra da look mosta que é da akatsuki basta o storage que vc colocou na script. descupe qualquer coisa teste aqui funcionou prefeitamente otimo script vlw.

Certo, de qualquer forma eu fiz do modo geral. Não posso adivinhar o que tem nos arquivos do servidor dele.
Disponha.

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo