Ir para conteúdo

Angellgreen

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    Angellgreen deu reputação a J.L em [Ajuda] Como adicionar novos items no server poketibia   
    quando eu quero criar um novo item eu vo no Object Builder, adiciono uma nova sprite no client depois vo no Item Editor e duplico um item que pareça com o que eu quero criar (Ex: Se eu quero criar uma nova mesa eu pego uma mesa qualquer e duplico)  depois apenas substituo a sprite dele pelo Item Editor Mesmo !
     
    Depois só ir no diretório: servidor/data/items/  Abra o arquivo Items.xml Copie um script de uma mesa. Ex:
    e  cola ele logo em baixo e edita o ID do item e coloca o ID do que você Criou (No caso é o vermelho ali)
    dai é só salvar e ir no jogo e sumonar o item que você quer com o comando /i 
     
     
    Se Ajudei De um REP+ e marque como melhor resposta !
  2. Gostei
    Angellgreen deu reputação a Viny 13 em SISTEMA DE ADDON COMPLETO   
    Bom gente esses dias o @Ceetros  postou um sistema de Addon, que funciona no fly, ride e surf

    Só vou repostar aqui pra vocês, pois ele só postou no outro forum
     
    Vá em actions/scripts e crie um arquivo chamado addon.lua.
    Adicione isso lá:
    function onUse(cid, item, fromPosition, itemEx, toPosition) local addons = { [ID DO ITEM] = {pokemon= "NOME DO POKEMON" , looktype = LOOKTYPE NORMAL, fly = FLY, SE NÃO TIVER PONHA 0, ride = RIDE, SE NÃO TIVER PONHA 0, surf = SE NÃO TIVER SURF PONHA 0}, } if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, "Please back your pokemon.") return false end local addon = addons[item.itemid].looktype local fly = addons[item.itemid].fly local ride = addons[item.itemid].ride local surf = addons[item.itemid].surf local pb = getPlayerSlotItem(cid, 8).uid local pk = addons[item.itemid].pokemon if getItemAttribute(pb,"poke") ~= pk then doPlayerSendCancel(cid, "Sorry, you can't use this addon on this poke.") return false end if getItemAttribute(pb,"addon") >= 0 then doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, 27, "Congratulations! Now your pokemon will use the addon.") doSetItemAttribute(pb,"addon",addon) doSetItemAttribute(pb,"addonfly",fly) doSetItemAttribute(pb,"addonride",ride) doSetItemAttribute(pb,"addonsurf",surf) return true end return true end
     
    Em actions.xml adicione:
    <action itemid="ID;ID;ID" event="script" value="addon.lua"/> Agora em actions/goback.lua antes de:
    else doPlayerSendCancel(cid, "This pokemon is fainted.") end return true end Adicione:
    local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) end Em lib/order.lua encontre:
    local pokemon = flys[getPokemonName(getCreatureSummons(cid)[1])] doPlayerSendTextMessage(cid, 27, "Type \"up\" or \"h1\" to fly higher and \"down\" or \"h2\" to fly lower.") doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 500 + PlayerSpeed/5 + getSpeed(sid) * 6 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17000, 1) Abaixo adicione:
    local addonfly= getPlayerSlotItem(cid, 8).uid local addofly = getItemAttribute(addonfly,"addonfly") if not addofly then doSetItemAttribute(addonfly,"addonfly",0) end if addofly > 0 then doSetCreatureOutfit(cid, {lookType = addofly}, -1) end Continuando em order.lua Encontre:
    local pokemon = rides[getPokemonName(getCreatureSummons(cid)[1])] doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 150 + PlayerSpeed + getSpeed(sid) * 5 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17001, 1) Em baixo adicione:
    local addonride = getPlayerSlotItem(cid, 8).uid local addoride = getItemAttribute(addonride,"addonride") if not addoride then doSetItemAttribute(addonride,"addonride",0) end if addoride > 0 then doSetCreatureOutfit(cid, {lookType = addoride}, -1) end Agora em movements/surf.lua encontre:
    doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1) doChangeSpeed(cid, -(getCreatureSpeed(cid)))
    E troque por:
    local addonsurf = getPlayerSlotItem(cid, 8).uid local addosurf = getItemAttribute(addonsurf,"addonsurf") if not addosurf then doSetItemAttribute(addonsurf,"addonsurf",0) doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) end if addosurf > 0 then doSetCreatureOutfit(cid, {lookType = addosurf}, -1) end doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1) doChangeSpeed(cid, -(getCreatureSpeed(cid))) No mesmo arquivo ache:
    doSummonMonster(cid, pokemon) Logo abaixo adicione:
    local pk = getCreatureSummons(cid)[1] local balla = getPlayerSlotItem(cid, 8).uid local balladdon = getItemAttribute(balla,"addon") if not balladdon then doSetItemAttribute(balla,"addon",0) end if balladdon > 0 then doSetCreatureOutfit(pk, {lookType = balladdon}, -1) end Por ultimo em actions/order.lua encontre:
    doPlayerSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", let me get down!", 1) doRegainSpeed(cid) --alterado v1.7 doRemoveCondition(cid, CONDITION_OUTFIT) Abaixo adicione:
    local pkjg = getCreatureSummons(cid)[1]                local pkza = getPlayerSlotItem(cid, 8).uid                 local pkxd = getItemAttribute(pkjg,"addon")                 if not pkxd then                                 doSetItemAttribute(pkza,"addon",0)                   elseif pkxd > 0 then                                 doSetCreatureOutfit(pkjg, {lookType = pkxd}, -1) end Caso não tenha addon  box vá data/actions/scripts e adicione isso:
     
    Explicando:
    local addons = {12803,12804,12805,12806,12807,2135,2136,2137,2138,2139,2142}   ( Onde tá os numeros é o id da sua addon )
    onde tá 12802 ( é o id da addon box )
    Onde tá (1, 11 ) é a quantidade de items que tem na box,sempre que for adicionar uma aumente  o  numero   pois pode falhar.

    EM DATA/ACTIONS/ACTIONS.XML

    ADICIONE ESTA TAG :
        <action itemid="ID DA SUA ADDON BOX" event="script" value="addon box.lua"/>

    Pra finalizar Vá em creaturescripts/scripts/login.lua Troque tudo por:

     
     

Informação Importante

Confirmação de Termo