Ir para conteúdo

elitevini

Campones
  • Total de itens

    31
  • Registro em

  • Última visita

Histórico de Reputação

  1. Upvote
    elitevini deu reputação a Blazingfire em Como Eu Faço Para Clika No Item E Tranformar   
    Em actions.xml coloque isso:

    <action itemid="7365;7839;7840;7838" script="changearrow.lua"/>
    Na pasta scripts crie um arquivo com extensão .lua chamado changearrow e coloque isso dentro:

    -- blazingfire -- local elementos = { terra = 7850, -- earth arrow id gelo = 7839, -- shiver arrow id fogo = 7840, -- flaming arrow id raio = 7838 -- flash arrow id } function onUse(cid, item, fromPosition, itemEx, toPosition) if(itemEx.itemid == elementos.terra) then novoelemento = elementos.gelo elseif(itemEx.itemid == elementos.gelo) then novoelemento = elementos.fogo elseif(itemEx.itemid == elementos.fogo) then novoelemento = elementos.raio elseif(itemEx.itemid == elementos.raio) then novoelemento = elementos.terra end doTransformItem(itemEx.uid, novoelemento) doDecayItem(itemEx.uid) doSendMagicEffect(toPosition, CONST_ME_POFF) end return TRUE -- blazingfire --
    Pronto, agora, quando você encantar a arrow, cada vez que você clicar nela ela se transformará em um elemento diferente.
     
    Se por acaso você clicar na Earth Arrow e não funcionar, deve escolher outra arrow no lugar dela, a não ser que você baixe um Item Editor e deixe ela como usable.
  2. Upvote
    elitevini recebeu reputação de Rafisusk em [Efeitos Por Favor Ajuda]   
    vc queria tipow uma lista de efeitos ?
     
    http://www.xtibia.com/forum/topic/129140-lista-de-efeitos-854-e-como-usa-los/page__p__851245__hl__%2Blista+%2Bde+%2Befeitos__fromsearch__1#entry851245
  3. Upvote
    elitevini deu reputação a MatheusGlad em Sistema De Novos Items   
    Bem, como todos sabem, não da pra criar 2 items com o mesmo sprite, somente editando a source e o dat etc...
     
    Usando esse sistema que eu fiz voce nao precisara editar nada somente adicionar os scripts.
     
    Primeiramente vá na pasta lib e crie um arquivo ItemsEditedLib.lua e adicione isso dentro:

    function doPlayerAddEditedItem(cid, itemid) local newxml = io.open("data/items/newitems.xml", "r") local configs = {} for i in newxml:read("*a"):gmatch("<item (.-)</item>") do local itemid = tonumber(i:match('id="(.-)"')) local itemconfig = { ["spriteid"] = tonumber(i:match('spriteid.-=.-"(.-)"')), ["article"] = i:match('article.-=.-"(.-)"'), ["name"] = i:match('name.-=.-"(.-)"'), ["description"] = i:match('key.-=.-"description".-value.-=.-"(.-)"'), ["defense"] = tonumber(i:match('key.-=.-"defense".-value.-=.-"(.-)"')), ["attack"] = tonumber(i:match('key.-=.-"attack".-value.-=.-"(.-)"')), ["extradefense"] = tonumber(i:match('key.-=.-"extradef".-value.-=.-"(.-)"')), ["armor"] = tonumber(i:match('key.-=.-"armor".-value.-=.-"(.-)"')), ["extraattack"] = tonumber(i:match('key.-=.-"extraatk".-value.-=.-"(.-)"')), } configs[itemid] = itemconfig end if configs[itemid] then local item = doPlayerAddItem(cid, configs[itemid].spriteid) for i,x in pairs(configs[itemid]) do doItemSetAttribute(item, i, x) end end end
     
    Depois vá na pasta items e adicione um arquivo newitems.XML (XML NAO LUA!!!) e adicione isso dentro:

    <?xml version="1.0" encoding="UTF-8"?> <items> <item id="100" spriteid="2400" article="a" name="magic edited sword"> <attribute key="description" value="Arma editada." /> <attribute key="defense" value="45" /> <attribute key="attack" value="100" /> <attribute key="extradef" value="10" /> <attribute key="extraatk" value="10" /> </item> <item id="101" spriteid="2472" article="a" name="master plate armor"> <attribute key="description" value="Armor editada." /> <attribute key="armor" value="19" /> </item> </items>
     
    Bem como voces podem ver, o xml guarda os novos items, o xml funciona praticamente como o items.xml so que tem um novo campo o "spriteid", nele fica o itemid original.
     
    Eu sei que ainda faltam atributos, com o tempo e com os pedidos eu vou adicionando. (É importante que voces peçam por novos atributos, porque os outros são mais complicados e eu nao vou faze-los para ninguem usar)
     
    Atributos:

    "description"
    "defense"
    "attack"
    "extradefense"
    "armor"
    "extraattack"

     
    Para adicionar os novos itemids aos players use doPlayerAddEditedItem(cid, ITEMID) em vez de doPlayerAddItem...
  4. Upvote
    elitevini deu reputação a Vodkart em [ Talkaction ] !guild List   
    Fala galera vim lhe apresentar 2 comando para seu servidor.
     
     
     
     
     
    talkactions\script
     
    guildlist.lua
     

    function onSay(cid, words, param, channel) local str = "" if param == '' then local lista = db.getResult("SELECT `name` FROM `guilds`;") if(lista:getID() ~= -1) then repeat str = str .. lista:getDataString("name") .. "\n" until not lista:next() lista:free() doShowTextDialog(cid, 2529, str == "" and "Não existem guilds no servidor." or str) return true end end local id = getGuildId(param) if id then local lista = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. id .. ");") if(lista:getID() ~= -1) then repeat local rank = db.getResult("SELECT `name`, `level` FROM `guild_ranks` WHERE `id` = " .. lista:getDataInt("rank_id") .. " ORDER BY `level` DESC, `name` ASC;") str = str .. lista:getDataString("name") .. " [" .. rank:getDataString("name") .. "]\n" rank:free() until not lista:next() lista:free() doShowTextDialog(cid, 2529, str) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não há jogadores nesta guild.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Está Guild não existe.") end return true end
     
    talkactions.xml adicione a tag:
     

    <talkaction words="!glist" script="guildlist.lua"/>  
     
    ---
     
    Deletar guilds do server que não tem mais players(foram deletadas):
     
    Data/globalevents/script
     
    deleteguild.lua

    function onThink(interval, lastExecution) local guilds = db.getResult("SELECT `name` FROM `guilds`;") if(guilds:getID() ~= -1) then repeat local delete = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. getGuildId(guilds:getDataString("name")) .. ");") if(delete:getID() < 1) then db.executeQuery("DELETE FROM guilds WHERE id = "..getGuildId(guilds:getDataString("name"))) end until not guilds:next() guilds:free() end return true end
     
    globalevents.xml

    <globalevent name="Guild Delete" interval="36000" event="script" value="deleteguild.lua"/>
  5. Upvote
    elitevini deu reputação a Henrique Moura em [Encerrado] Gates Of Expertize Tibia   
    Veja se isso pode te ajudar:
    http://www.xtibia.com/forum/topic/145999-vocation-e-level-door-em-854/
     
    http://www.xtibia.com/forum/topic/101737-colocando-level-door-pelo-map-editor/
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...