Ir para conteúdo

DevilMoon

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    DevilMoon recebeu reputação de Teddy Ursa em Ant Mage Bomb Kickers and MC   
    ola galera é um sistema que uso no meu server. se você nao gosta de mcs ou aqueles cara chato com magebomb que kika seu server com magebomb nos account manager aki está sua solução


    Vá em Data>Creaturescripts>Creaturescripts.xml adicione a tag:


    <event type="login" name="playercheck" script="playercheck.lua"/>


    Agora vá em Data>Creaturescripts>scripts e crie um arquivo chamado playercheck.lua e coloque isto dentro:




    Vermelho = Ali é o maximo que o player pode logar, se colocar 1 ele só pode logar o char dele, 2 ele pode logar o char dele + 1, recomendo colocar 1!! ou o maximo até 3/5
  2. Gostei
    DevilMoon recebeu reputação de Turati Junior em Ant Mage Bomb Kickers and MC   
    ola galera é um sistema que uso no meu server. se você nao gosta de mcs ou aqueles cara chato com magebomb que kika seu server com magebomb nos account manager aki está sua solução


    Vá em Data>Creaturescripts>Creaturescripts.xml adicione a tag:


    <event type="login" name="playercheck" script="playercheck.lua"/>


    Agora vá em Data>Creaturescripts>scripts e crie um arquivo chamado playercheck.lua e coloque isto dentro:




    Vermelho = Ali é o maximo que o player pode logar, se colocar 1 ele só pode logar o char dele, 2 ele pode logar o char dele + 1, recomendo colocar 1!! ou o maximo até 3/5
  3. Gostei
    DevilMoon recebeu reputação de Axion Nitron em [MoveEvent] Change outfit Tile   
    Eae Galera Tudo Bom? Entao vim Aqui Postar um Tile que Voce pisa em Cima dele e Ganha um Outfit.
    Voce coloca a ActionId 2020 num Item ou Tile, quando o Player Pisar nele ganhará um Outfit Escolhi Por voce.

    Vá em Data>MoveMents>Scripts crie uma pasta.lua chamada changetile.lua e coloque isso:



    -- { By: GOD Dreamer } --

    local female = {lookType = 269, lookHead = 79, lookBody = 91, lookLegs = 91, lookFeet = 91, lookTypeEx = 0, lookAddons = 3} -- Outfit Female
    local male = {lookType = 268, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 3} -- Outfit Male

    function onStepIn(cid, item, pos)
    if isPlayer(cid) == TRUE then
    if getPlayerSex(cid) == 0 then
    doCreatureChangeOutfit(cid, female)
    else
    doCreatureChangeOutfit(cid, male)
    end
    doSendMagicEffect(getThingPos(cid), 29) -- Efeito que dara quando o Player Pisar no Tile ou ItemId.
    doSendAnimatedText(getPlayerPosition(cid),"Wooaahh!", math.random(01,255)) -- Oque o Player vai Falar quando Mudar de Outfit.
    end
    return TRUE
    end
    [/codebox]

    Agora vá em Data>Movements.xml Adicione essa tag:


    [codebox]
    <movevent type="StepIn" actionid="2020" event="script" value="changetile.lua"/>


    Feche e Salve!!


    OBS: Veja se nao tenha a ActionId 2020 Primeiro antes de Salvar!!
    Agora Abra seu RME Coloque a ActionId no Tile e Seja Feliz.

    Duvidas Somente neste Topico.

    Abraços..
  4. Gostei
    DevilMoon deu reputação a grafit em Duvidas aos Mappers se tem alguma tecnica   
    Pega o items.otb do seu servidor e troca na pasta do RME na versão que você usa
  5. Gostei
    DevilMoon recebeu reputação de Reds em NPC QUIZ (ORIGINAL)   
    Olá,

    Este code que eu vou liberar agora, facilitar a qualquer um (até quem não sabe mexer com NPC) a fazer um npc de entertrenimento que faz perguntas.

    Primeiro mostrarei o NPC que eu fiz com perguntas sobre o tibiaking:

    ------NPC QUIZ BY COLEX------ focus = 0 talk_start = 0 target = 0 following = false attacking = false q = 1 w = 0 certas = 0 erradas = 0 question = {} question[1] = {p="Quem é o atual administrador do tibiaking sem ser o Gustavo?", r="don"} question[2] = {p="Quem é o coordenador registrado em julho de 2005?", r="caidera"} question[3] = {p="Como se chama o mascote do tibiaking?", r="x-boy"} question[4] = {p="Quem foi o primeiro colaborador de Actions do tibiaking", r="colex"} question[5] = {p="Quem foi o vencedor do 1º tibiaking Scripting Championship?", r="xxxhiagoxxx"} question[6] = {p="A regra número 3 da seção geral na parte OTServer fala sobre...", r="flood"} question[7] = {p="Qual o nome da rádio oficial do tibiaking?", r="jovemix"} question[8] = {p="Qual o nome da 1ª equipe a ter seu lugar no Incentivos tibiaking?", r="spol team"} question[9] = {p="Qual o username do antigo moderador atual apoio, cujo sua primeira letra é igual a primeira letra do nome do site?", r="x9kill"} question[10] = {p="Quem é o co-fundador da Spol Team?", r="bizugo"} question[11] = {p="Quem deu a idéia para o projecto X-OTS?", r="jvchequer"} question[12] = {p="Quem postou o code para NPCs venderem Bps de items?", r="frerety"} function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') selfLook(cid) focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if ((msgcontains(msg, 'hi')) and (focus == 0)) and getDistanceToCreature(cid) < 6 then selfSay('Olá, Eu sou um NPC de entertrenimento feito por Colex, para eu começar as perguntas digite: continuar.') focus = cid talk_start = os.clock() end if msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 6 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') end if (focus == cid) and getDistanceToCreature(cid) < 6 then if (w == 1) then if msgcontains(msg, question[q].r) then selfSay('Certa resposta, diz Continuar para passar-mos a próxima pergunta!') talk_start = os.clock() q = q+1 certas = certas + 1 w = 0 else selfSay('Resposta errada, diz Continuar para passar-mos a próxima pergunta!') talk_start = os.clock() q = q+1 w = 0 erradas = erradas + 1 end else if msgcontains(msg, 'continuar') then if question[q] then selfSay(question[q].p) talk_start = os.clock() w = 1 else selfSay('Esta foi a última pergunta, voce teve ' .. certas .. ' respostas certas e ' .. erradas .. ' respostas erradas.') focus = 0 talk_start = 0 q = 1 w = 0 certas = 0 erradas = 0 end end end if msgcontains(msg, 'bye') or msgcontains(msg, 'xau') then selfSay('Adeus, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 q = 1 w = 0 certas = 0 erradas = 0 end end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 120 then if focus > 0 then selfSay('Próxima...') q = 1 w = 0 certas = 0 erradas = 0 end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Adeus então.') q = 1 w = 0 certas = 0 erradas = 0 end end end ------------------------------------------------------------------ <span style='font-size:12pt;line-height:100%'>Tutorial - Fazendo seu NPC de perguntas facilmente</span> Este é um code de NPC Quiz virgem (sem perguntas) feito por mim: ------NPC QUIZ BY COLEX------ focus = 0 talk_start = 0 target = 0 following = false attacking = false q = 1 w = 0 certas = 0 erradas = 0 question = {} function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') selfLook(cid) focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if ((msgcontains(msg, 'hi')) and (focus == 0)) and getDistanceToCreature(cid) < 6 then selfSay('Olá, Eu sou um NPC de entertrenimento feito por Colex, para eu começar as perguntas digite: continuar.') focus = cid talk_start = os.clock() end if msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 6 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') end if (focus == cid) and getDistanceToCreature(cid) < 6 then if (w == 1) then if msgcontains(msg, question[q].r) then selfSay('Certa resposta, diz Continuar para passar-mos a próxima pergunta!') talk_start = os.clock() q = q+1 certas = certas + 1 w = 0 else selfSay('Resposta errada, diz Continuar para passar-mos a próxima pergunta!') talk_start = os.clock() q = q+1 w = 0 erradas = erradas + 1 end else if msgcontains(msg, 'continuar') then if question[q] then selfSay(question[q].p) talk_start = os.clock() w = 1 else selfSay('Esta foi a última pergunta, voce teve ' .. certas .. ' respostas certas e ' .. erradas .. ' respostas erradas.') focus = 0 talk_start = 0 q = 1 w = 0 certas = 0 erradas = 0 end end end if msgcontains(msg, 'bye') or msgcontains(msg, 'xau') then selfSay('Adeus, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 q = 1 w = 0 certas = 0 erradas = 0 end end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 120 then if focus > 0 then selfSay('Próxima...') q = 1 w = 0 certas = 0 erradas = 0 end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Adeus então.') q = 1 w = 0 certas = 0 erradas = 0 end end end para voce adicionar perguntas é mais facil que comer pão. a seguir ao: question = {} voce vai adicionando o seguinte: question[Nº DA PERGUNTA] = {p="PERGUNTA", r="RESPOSTA"} é só isso, podia ser mais facil? com esse code que eu fiz, voce só terá que escrever aquilo que o script faz o resto e voce pode adicionar quantas perguntas quiser. um exemplo de uma pergunta adicionada, neste exemplo a pergunta é a pergunta numero 5: question[5] = {p="Quem fez este code?", r="colex"}




    O code foi projetado para facilitar a criação desse tipo de NPC até a quem tem experiencia 0 com NPC's

    Espero que aproveitem bem!

    Alguma dúvida? sinta-se livre para perguntar!

    100% by Colex

    Atenciosamente,
    Colex
  6. Gostei
    DevilMoon recebeu reputação de Wolf Admin em [MoveEvent] Change outfit Tile   
    Eae Galera Tudo Bom? Entao vim Aqui Postar um Tile que Voce pisa em Cima dele e Ganha um Outfit.
    Voce coloca a ActionId 2020 num Item ou Tile, quando o Player Pisar nele ganhará um Outfit Escolhi Por voce.

    Vá em Data>MoveMents>Scripts crie uma pasta.lua chamada changetile.lua e coloque isso:



    -- { By: GOD Dreamer } --

    local female = {lookType = 269, lookHead = 79, lookBody = 91, lookLegs = 91, lookFeet = 91, lookTypeEx = 0, lookAddons = 3} -- Outfit Female
    local male = {lookType = 268, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 3} -- Outfit Male

    function onStepIn(cid, item, pos)
    if isPlayer(cid) == TRUE then
    if getPlayerSex(cid) == 0 then
    doCreatureChangeOutfit(cid, female)
    else
    doCreatureChangeOutfit(cid, male)
    end
    doSendMagicEffect(getThingPos(cid), 29) -- Efeito que dara quando o Player Pisar no Tile ou ItemId.
    doSendAnimatedText(getPlayerPosition(cid),"Wooaahh!", math.random(01,255)) -- Oque o Player vai Falar quando Mudar de Outfit.
    end
    return TRUE
    end
    [/codebox]

    Agora vá em Data>Movements.xml Adicione essa tag:


    [codebox]
    <movevent type="StepIn" actionid="2020" event="script" value="changetile.lua"/>


    Feche e Salve!!


    OBS: Veja se nao tenha a ActionId 2020 Primeiro antes de Salvar!!
    Agora Abra seu RME Coloque a ActionId no Tile e Seja Feliz.

    Duvidas Somente neste Topico.

    Abraços..
  7. Gostei
    DevilMoon recebeu reputação de Waaater em [TalkAction] Pet System ! Tfs= 0.3.4   
    PET SYSTEM..

    Comandos:

    !pet summon
    !pet buy Cat
    !pet release
    !pet move
    !pet say

    Começando:

    Vá em Data>Talkactions.xml Adicione Isso:



    <talkaction words="!pet" script="pet.lua"/>
    [/codebox]

    Agora em Data>Talkactions>Scripts crie uma pasta.lua chamada pet e coloque isso:


    [codebox]
    local PET =
    -- CONFIG --
    { -- storages
    name = 7700,
    petuid = 7701,
    online = 7702,
    damage = 7703,
    allowed = { -- allowed pets, costs & level required
    ["cat"] = {cost = 50, level = 1},
    ["dog"] = {cost = 50, level = 1},
    ["deer"] = {cost = 50, level = 1},
    ["pig"] = {cost = 50, level = 1},
    ["parrot"] = {cost = 50, level = 1},
    ["seagull"] = {cost = 50, level = 1},
    ["chicken"] = {cost = 50, level = 1},
    ["rabbit"] = {cost = 50, level = 1},
    ["squirrel"] = {cost = 50, level = 1},
    ["frog"] = {cost = 50, level = 1},
    ["rat"] = {cost = 50, level = 1},
    ["sheep"] = {cost = 100, level = 1},
    ["wolf"] = {cost = 300, level = 8},
    ["skeleton"] = {cost = 300, level = 15},
    ["war wolf"] = {cost = 1000, level = 20},
    ["demon skeleton"] = {cost = 3000, level = 25}
    },
    direction = {["up"] = NORTH, ["down"] = SOUTH, ["right"] = EAST, ["left"] = WEST}, -- used with !pet move
    help = { -- used with !pet say
    "Type '!pet summon' to summon your pet.",
    "Type '!pet buy [petname]' to buy a pet. e.g. '!pet buy war_wolf'",
    "Type '!pet move [direction]' to ask your pet to move.",
    "Type '!pet say \"text' to ask your pet to say something.",
    "Type '!pet release' to release your pet."
    }
    }
    function petHelp(p)
    doPlayerSendTextMessage(p.cid, 19, PET.help[p.i])
    end
    function onSay(cid, words, param)
    local p = {""}
    if param ~= "" then
    p = string.explode(param, " ")
    end
    local petuid = getPlayerStorageValue(cid, PET.petuid)
    local online = getPlayerStorageValue(cid, PET.online)
    if p[1] == "help" then
    for i = 1, #PET.help do
    addEvent(petHelp, 1000*i - 1000, {i = i, cid = cid})
    end
    elseif p[1] == "summon" then
    local name = getPlayerStorageString(cid, PET.name)
    if isCreature(petuid) == FALSE then
    if online == 1 then
    local tile = getClosestFreeTile(cid, getThingPos(cid), FALSE, FALSE)
    if getTilePzInfo(getThingPos(cid)) ~= 1 and getTilePzInfo(tile) ~= 1 then
    if name ~= "" then
    if getMonsterInfo(name) ~= nil then
    petuid = doSummonCreature(name, tile)
    doConvinceCreature(cid, petuid)
    doCreatureSay(petuid, 'hey, sup', TALKTYPE_ORANGE_1)
    doChangeSpeed(petuid, getCreatureBaseSpeed(cid) - getCreatureBaseSpeed(petuid))
    setPlayerStorageValue(cid, PET.online, 2)
    setPlayerStorageValue(cid, PET.petuid, petuid)
    doPlayerSendCancel(cid, 'Summoning '..name..'.')
    if getPlayerStorageValue(cid, PET.damage) > 0 then
    if getPlayerStorageValue(cid, PET.damage) < getCreatureMaxHealth(petuid) then
    doCreatureAddHealth(petuid, getPlayerStorageValue(cid, PET.damage)*-1)
    end
    end
    else
    doPlayerSendCancel(cid, 'Invalid pet name.')
    end
    else
    doPlayerSendCancel(cid, 'Invalid pet name.')
    end
    else
    doPlayerSendCancel(cid, 'You may not summon your pet here.')
    end
    else
    doPlayerSendCancel(cid, 'You do not have a pet. Type !pet <pet name> to get one.')
    end
    else
    setPlayerStorageValue(cid, PET.damage, getCreatureMaxHealth(petuid) - getCreatureHealth(petuid))
    doCreatureSay(petuid, 'gtg, cya', TALKTYPE_ORANGE_1)
    doSendMagicEffect(getThingPos(petuid),CONST_ME_POFF)
    doRemoveCreature(petuid)
    doPlayerSendCancel(cid, 'Retrieving '..name..'.')
    setPlayerStorageValue(cid, 7702, 1)
    end
    elseif p[1] == "buy" then
    local text
    if p[2] ~= nil then
    name = string.gsub(p[2], "_", " ")
    if (isCreature(petuid) ~= TRUE and online == 2) or online <= 0 then
    if PET.allowed[name] ~= nil then
    if getPlayerLevel(cid) >= PET.allowed[name].level then
    if getPlayerMoney(cid) >= PET.allowed[name].cost then
    doPlayerRemoveMoney(cid, PET.allowed[name].cost)
    setPlayerStorageValue(cid, PET.online, 1)
    setPlayerStorageValue(cid, PET.damage, 0)
    setPlayerStorageString(cid, PET.name, name)
    text = "You have bought a pet \""..name.."\" for "..PET.allowed[name].cost.." gold coins."
    else
    text = "You do not have enough money. It costs "..PET.allowed[name].cost.." gold coins to buy a "..name.."."
    end
    else
    text = "You need level "..PET.allowed[name].level.." to buy this pet."
    end
    else
    text = "You may not buy that pet."
    end
    else
    text = "You already have a pet."
    end
    else
    text = "!pet buy [petname]"
    end
    if text ~= nil then
    doPlayerSendTextMessage(cid, 19, text)
    end
    elseif p[1] == "move" then
    if isCreature(petuid) == TRUE then
    if p[2] ~= nil then
    if PET.direction[p[2]] ~= nil then
    if doTileQueryAdd(petuid, getPosByDir(getThingPos(petuid), PET.direction[p[2]], 1)) == 1 then
    doMoveCreature(petuid, PET.direction[p[2]])
    else
    doPlayerSendCancel(cid, 'Tile is blocked.')
    end
    else
    doPlayerSendCancel(cid, '!pet move [up/down/left/right]')
    end
    else
    doPlayerSendCancel(cid, '!pet move [up/down/left/right]')
    end
    else
    doPlayerSendCancel(cid, 'Summon a pet first.')
    end
    elseif p[1] == "say" then
    text = string.explode(param, "\"")
    if isCreature(petuid) == TRUE then
    if text[2] ~= nil then
    if string.len(text[2]) < 39 then
    doCreatureSay(petuid, text[2], TALKTYPE_ORANGE_1)
    else
    doPlayerSendCancel(cid, 'Too long text.')
    end
    else
    doPlayerSendCancel(cid, '!pet say "I am '..getCreatureName(cid)..'\'s pet.')
    end
    else
    doPlayerSendCancel(cid, 'Summon a pet first.')
    end
    elseif p[1] == "release" then
    if isCreature(petuid) == TRUE and getPlayerStorageValue(cid, PET.online) == 2 then
    doCreatureSay(petuid, ':\'(', TALKTYPE_ORANGE_1)
    doSendMagicEffect(getThingPos(petuid),CONST_ME_POFF)
    doRemoveCreature(petuid)
    doPlayerSendCancel(cid, 'Releasing '..name..'.')
    setPlayerStorageValue(cid, 7702, 1)
    end
    setPlayerStorageValue(cid, PET.online, 2)
    setPlayerStorageValue(cid, PET.damage, 0)
    doPlayerSendTextMessage(cid, 19, "You have released your pet \""..name.."\".")
    setPlayerStorageString(cid, PET.name, "")
    else
    doPlayerSendTextMessage(cid, 19, "!pet [help/summon/buy/move/say/release]")
    end
    return TRUE
    end


    Ok Acabamos com as Talkactions agora vá em Data>CreatureEvents.xml e Adicione Isso:

    Obs: ( Caso Ja Ouver a Pasta Logout.lua Delete Tudu dela e Coloque a Nova )



    <event type="logout" name="logout" event="script" value="logout.lua"/>
    [/codebox]

    Agora vá em Data>CreatureEvents>Scripts crie uma pasta.lua chamada logout e coloque isso:


    [codebox]
    local petuidstor = 7701 -- storages, have to be same as your other script.
    local onlinestor = 7702
    local damagestor = 7703
    function onLogout(cid)
    if isCreature(getPlayerStorageValue(cid, petuidstor)) == 1 then
    if getPlayerStorageValue(cid, onlinestor) == 2 then
    local petuid = getPlayerStorageValue(cid, petuidstor)
    setPlayerStorageValue(cid, damagestor, getCreatureMaxHealth(petuid) - getCreatureHealth(petuid))
    doSendMagicEffect(getThingPos(petuid),CONST_ME_POFF)
    setPlayerStorageValue(cid, onlinestor, 1)
    end
    end
    return TRUE
    end


    Abra a pata login.lua que se localiza em Data>CreatureEvents>Scripts abra ela e coloque isso:



    registerCreatureEvent(cid, "logout")
    [/codebox]


    Agora para Finalizar vá em Data>Lib>Function.lua e Acresente Isso:


    [codebox]
    string.explode = function (str, sep)
    local pos, t = 1, {}
    if #sep == 0 or #str == 0 then
    return
    end

    for s, e in function() return str:find(sep, pos) end do
    table.insert(t, str:sub(pos, s - 1):trim())
    pos = e + 1
    end

    table.insert(t, str:sub(pos):trim())
    return t
    end

    _warpzone = 2147483648 -- start storing strings here (THIS IS THE ABSOLUTE MAXIMUM VALUE FOR THIS)
    _maxlength = 1024 -- multiply by 3 to get the true length.

    setPlayerStorageInteger = setPlayerStorageValue
    getPlayerStorageInteger = getPlayerStorageValue

    function setPlayerStorageString(cid, key, value)
    if #value > (_maxlength-1) * 3 - 1 then -- Last word is reserved for 0 termination of the string.
    error("Storage string is too long")
    end
    if key > _warpzone / _maxlength then
    error("Storage string key is too large (" .. key .. ")")
    end
    key = _warpzone + key * _maxlength

    local word = 0
    local wordwrap = 0
    local wordcount = 0
    local i = 1
    while i <= #value do
    local byte = string.byte(string.sub(value, i, i))
    word = bit.bor(word, bit.lshift(byte, wordwrap))
    wordwrap = wordwrap + 8
    if wordwrap == 24 then
    --[[
    In the ideal world we would be able to store 4 characters per word,
    however, as the default return value for getPlayerStorageValue is
    -1, we can't use the last bit.
    ]]--
    setPlayerStorageInteger(cid, key + wordcount, word)
    word = 0
    wordwrap = 0
    wordcount = wordcount + 1
    end
    i = i + 1
    end
    -- store the last word
    setPlayerStorageInteger(cid, key + wordcount, word)
    end

    function getPlayerStorageString(cid, key)
    if key > _warpzone / _maxlength then
    error("Storage string key is too large (" .. key .. ")")
    end
    key = _warpzone + key * _maxlength

    local wordcount = 0
    local str = ""
    while true do
    if wordcount >= _maxlength then
    break
    end
    local word = getPlayerStorageInteger(cid, key + wordcount)
    if word == -1 then
    -- end of string
    break
    else
    -- Extract the 3 characters from the value
    byte = bit.band(word, 255)
    if byte == 0 then break else str = str .. string.char(byte) end
    byte = bit.rshift(bit.band(word, 65280), 8)
    if byte == 0 then break else str = str .. string.char(byte) end
    byte = bit.rshift(bit.band(word, 16711680), 16)
    if byte == 0 then break else str = str .. string.char(byte) end
    end
    wordcount = wordcount + 1
    end
    return str
    end


    Obs²: Delete Todos Arquivos de Pets System Velhos para nao Causar nem um Bug!!

    Creditos:

    jordanhenry.


    Sugestoes, Duvidas Somente neste Topico!!

    Abraços..
  8. Gostei
    DevilMoon recebeu reputação de igoriix em [TalkAction] Pet System ! Tfs= 0.3.4   
    PET SYSTEM..

    Comandos:

    !pet summon
    !pet buy Cat
    !pet release
    !pet move
    !pet say

    Começando:

    Vá em Data>Talkactions.xml Adicione Isso:



    <talkaction words="!pet" script="pet.lua"/>
    [/codebox]

    Agora em Data>Talkactions>Scripts crie uma pasta.lua chamada pet e coloque isso:


    [codebox]
    local PET =
    -- CONFIG --
    { -- storages
    name = 7700,
    petuid = 7701,
    online = 7702,
    damage = 7703,
    allowed = { -- allowed pets, costs & level required
    ["cat"] = {cost = 50, level = 1},
    ["dog"] = {cost = 50, level = 1},
    ["deer"] = {cost = 50, level = 1},
    ["pig"] = {cost = 50, level = 1},
    ["parrot"] = {cost = 50, level = 1},
    ["seagull"] = {cost = 50, level = 1},
    ["chicken"] = {cost = 50, level = 1},
    ["rabbit"] = {cost = 50, level = 1},
    ["squirrel"] = {cost = 50, level = 1},
    ["frog"] = {cost = 50, level = 1},
    ["rat"] = {cost = 50, level = 1},
    ["sheep"] = {cost = 100, level = 1},
    ["wolf"] = {cost = 300, level = 8},
    ["skeleton"] = {cost = 300, level = 15},
    ["war wolf"] = {cost = 1000, level = 20},
    ["demon skeleton"] = {cost = 3000, level = 25}
    },
    direction = {["up"] = NORTH, ["down"] = SOUTH, ["right"] = EAST, ["left"] = WEST}, -- used with !pet move
    help = { -- used with !pet say
    "Type '!pet summon' to summon your pet.",
    "Type '!pet buy [petname]' to buy a pet. e.g. '!pet buy war_wolf'",
    "Type '!pet move [direction]' to ask your pet to move.",
    "Type '!pet say \"text' to ask your pet to say something.",
    "Type '!pet release' to release your pet."
    }
    }
    function petHelp(p)
    doPlayerSendTextMessage(p.cid, 19, PET.help[p.i])
    end
    function onSay(cid, words, param)
    local p = {""}
    if param ~= "" then
    p = string.explode(param, " ")
    end
    local petuid = getPlayerStorageValue(cid, PET.petuid)
    local online = getPlayerStorageValue(cid, PET.online)
    if p[1] == "help" then
    for i = 1, #PET.help do
    addEvent(petHelp, 1000*i - 1000, {i = i, cid = cid})
    end
    elseif p[1] == "summon" then
    local name = getPlayerStorageString(cid, PET.name)
    if isCreature(petuid) == FALSE then
    if online == 1 then
    local tile = getClosestFreeTile(cid, getThingPos(cid), FALSE, FALSE)
    if getTilePzInfo(getThingPos(cid)) ~= 1 and getTilePzInfo(tile) ~= 1 then
    if name ~= "" then
    if getMonsterInfo(name) ~= nil then
    petuid = doSummonCreature(name, tile)
    doConvinceCreature(cid, petuid)
    doCreatureSay(petuid, 'hey, sup', TALKTYPE_ORANGE_1)
    doChangeSpeed(petuid, getCreatureBaseSpeed(cid) - getCreatureBaseSpeed(petuid))
    setPlayerStorageValue(cid, PET.online, 2)
    setPlayerStorageValue(cid, PET.petuid, petuid)
    doPlayerSendCancel(cid, 'Summoning '..name..'.')
    if getPlayerStorageValue(cid, PET.damage) > 0 then
    if getPlayerStorageValue(cid, PET.damage) < getCreatureMaxHealth(petuid) then
    doCreatureAddHealth(petuid, getPlayerStorageValue(cid, PET.damage)*-1)
    end
    end
    else
    doPlayerSendCancel(cid, 'Invalid pet name.')
    end
    else
    doPlayerSendCancel(cid, 'Invalid pet name.')
    end
    else
    doPlayerSendCancel(cid, 'You may not summon your pet here.')
    end
    else
    doPlayerSendCancel(cid, 'You do not have a pet. Type !pet <pet name> to get one.')
    end
    else
    setPlayerStorageValue(cid, PET.damage, getCreatureMaxHealth(petuid) - getCreatureHealth(petuid))
    doCreatureSay(petuid, 'gtg, cya', TALKTYPE_ORANGE_1)
    doSendMagicEffect(getThingPos(petuid),CONST_ME_POFF)
    doRemoveCreature(petuid)
    doPlayerSendCancel(cid, 'Retrieving '..name..'.')
    setPlayerStorageValue(cid, 7702, 1)
    end
    elseif p[1] == "buy" then
    local text
    if p[2] ~= nil then
    name = string.gsub(p[2], "_", " ")
    if (isCreature(petuid) ~= TRUE and online == 2) or online <= 0 then
    if PET.allowed[name] ~= nil then
    if getPlayerLevel(cid) >= PET.allowed[name].level then
    if getPlayerMoney(cid) >= PET.allowed[name].cost then
    doPlayerRemoveMoney(cid, PET.allowed[name].cost)
    setPlayerStorageValue(cid, PET.online, 1)
    setPlayerStorageValue(cid, PET.damage, 0)
    setPlayerStorageString(cid, PET.name, name)
    text = "You have bought a pet \""..name.."\" for "..PET.allowed[name].cost.." gold coins."
    else
    text = "You do not have enough money. It costs "..PET.allowed[name].cost.." gold coins to buy a "..name.."."
    end
    else
    text = "You need level "..PET.allowed[name].level.." to buy this pet."
    end
    else
    text = "You may not buy that pet."
    end
    else
    text = "You already have a pet."
    end
    else
    text = "!pet buy [petname]"
    end
    if text ~= nil then
    doPlayerSendTextMessage(cid, 19, text)
    end
    elseif p[1] == "move" then
    if isCreature(petuid) == TRUE then
    if p[2] ~= nil then
    if PET.direction[p[2]] ~= nil then
    if doTileQueryAdd(petuid, getPosByDir(getThingPos(petuid), PET.direction[p[2]], 1)) == 1 then
    doMoveCreature(petuid, PET.direction[p[2]])
    else
    doPlayerSendCancel(cid, 'Tile is blocked.')
    end
    else
    doPlayerSendCancel(cid, '!pet move [up/down/left/right]')
    end
    else
    doPlayerSendCancel(cid, '!pet move [up/down/left/right]')
    end
    else
    doPlayerSendCancel(cid, 'Summon a pet first.')
    end
    elseif p[1] == "say" then
    text = string.explode(param, "\"")
    if isCreature(petuid) == TRUE then
    if text[2] ~= nil then
    if string.len(text[2]) < 39 then
    doCreatureSay(petuid, text[2], TALKTYPE_ORANGE_1)
    else
    doPlayerSendCancel(cid, 'Too long text.')
    end
    else
    doPlayerSendCancel(cid, '!pet say "I am '..getCreatureName(cid)..'\'s pet.')
    end
    else
    doPlayerSendCancel(cid, 'Summon a pet first.')
    end
    elseif p[1] == "release" then
    if isCreature(petuid) == TRUE and getPlayerStorageValue(cid, PET.online) == 2 then
    doCreatureSay(petuid, ':\'(', TALKTYPE_ORANGE_1)
    doSendMagicEffect(getThingPos(petuid),CONST_ME_POFF)
    doRemoveCreature(petuid)
    doPlayerSendCancel(cid, 'Releasing '..name..'.')
    setPlayerStorageValue(cid, 7702, 1)
    end
    setPlayerStorageValue(cid, PET.online, 2)
    setPlayerStorageValue(cid, PET.damage, 0)
    doPlayerSendTextMessage(cid, 19, "You have released your pet \""..name.."\".")
    setPlayerStorageString(cid, PET.name, "")
    else
    doPlayerSendTextMessage(cid, 19, "!pet [help/summon/buy/move/say/release]")
    end
    return TRUE
    end


    Ok Acabamos com as Talkactions agora vá em Data>CreatureEvents.xml e Adicione Isso:

    Obs: ( Caso Ja Ouver a Pasta Logout.lua Delete Tudu dela e Coloque a Nova )



    <event type="logout" name="logout" event="script" value="logout.lua"/>
    [/codebox]

    Agora vá em Data>CreatureEvents>Scripts crie uma pasta.lua chamada logout e coloque isso:


    [codebox]
    local petuidstor = 7701 -- storages, have to be same as your other script.
    local onlinestor = 7702
    local damagestor = 7703
    function onLogout(cid)
    if isCreature(getPlayerStorageValue(cid, petuidstor)) == 1 then
    if getPlayerStorageValue(cid, onlinestor) == 2 then
    local petuid = getPlayerStorageValue(cid, petuidstor)
    setPlayerStorageValue(cid, damagestor, getCreatureMaxHealth(petuid) - getCreatureHealth(petuid))
    doSendMagicEffect(getThingPos(petuid),CONST_ME_POFF)
    setPlayerStorageValue(cid, onlinestor, 1)
    end
    end
    return TRUE
    end


    Abra a pata login.lua que se localiza em Data>CreatureEvents>Scripts abra ela e coloque isso:



    registerCreatureEvent(cid, "logout")
    [/codebox]


    Agora para Finalizar vá em Data>Lib>Function.lua e Acresente Isso:


    [codebox]
    string.explode = function (str, sep)
    local pos, t = 1, {}
    if #sep == 0 or #str == 0 then
    return
    end

    for s, e in function() return str:find(sep, pos) end do
    table.insert(t, str:sub(pos, s - 1):trim())
    pos = e + 1
    end

    table.insert(t, str:sub(pos):trim())
    return t
    end

    _warpzone = 2147483648 -- start storing strings here (THIS IS THE ABSOLUTE MAXIMUM VALUE FOR THIS)
    _maxlength = 1024 -- multiply by 3 to get the true length.

    setPlayerStorageInteger = setPlayerStorageValue
    getPlayerStorageInteger = getPlayerStorageValue

    function setPlayerStorageString(cid, key, value)
    if #value > (_maxlength-1) * 3 - 1 then -- Last word is reserved for 0 termination of the string.
    error("Storage string is too long")
    end
    if key > _warpzone / _maxlength then
    error("Storage string key is too large (" .. key .. ")")
    end
    key = _warpzone + key * _maxlength

    local word = 0
    local wordwrap = 0
    local wordcount = 0
    local i = 1
    while i <= #value do
    local byte = string.byte(string.sub(value, i, i))
    word = bit.bor(word, bit.lshift(byte, wordwrap))
    wordwrap = wordwrap + 8
    if wordwrap == 24 then
    --[[
    In the ideal world we would be able to store 4 characters per word,
    however, as the default return value for getPlayerStorageValue is
    -1, we can't use the last bit.
    ]]--
    setPlayerStorageInteger(cid, key + wordcount, word)
    word = 0
    wordwrap = 0
    wordcount = wordcount + 1
    end
    i = i + 1
    end
    -- store the last word
    setPlayerStorageInteger(cid, key + wordcount, word)
    end

    function getPlayerStorageString(cid, key)
    if key > _warpzone / _maxlength then
    error("Storage string key is too large (" .. key .. ")")
    end
    key = _warpzone + key * _maxlength

    local wordcount = 0
    local str = ""
    while true do
    if wordcount >= _maxlength then
    break
    end
    local word = getPlayerStorageInteger(cid, key + wordcount)
    if word == -1 then
    -- end of string
    break
    else
    -- Extract the 3 characters from the value
    byte = bit.band(word, 255)
    if byte == 0 then break else str = str .. string.char(byte) end
    byte = bit.rshift(bit.band(word, 65280), 8)
    if byte == 0 then break else str = str .. string.char(byte) end
    byte = bit.rshift(bit.band(word, 16711680), 16)
    if byte == 0 then break else str = str .. string.char(byte) end
    end
    wordcount = wordcount + 1
    end
    return str
    end


    Obs²: Delete Todos Arquivos de Pets System Velhos para nao Causar nem um Bug!!

    Creditos:

    jordanhenry.


    Sugestoes, Duvidas Somente neste Topico!!

    Abraços..
  9. Gostei
    DevilMoon recebeu reputação de 1215171 em Ant Mage Bomb Kickers and MC   
    ola galera é um sistema que uso no meu server. se você nao gosta de mcs ou aqueles cara chato com magebomb que kika seu server com magebomb nos account manager aki está sua solução


    Vá em Data>Creaturescripts>Creaturescripts.xml adicione a tag:


    <event type="login" name="playercheck" script="playercheck.lua"/>


    Agora vá em Data>Creaturescripts>scripts e crie um arquivo chamado playercheck.lua e coloque isto dentro:




    Vermelho = Ali é o maximo que o player pode logar, se colocar 1 ele só pode logar o char dele, 2 ele pode logar o char dele + 1, recomendo colocar 1!! ou o maximo até 3/5
  10. Gostei
    DevilMoon recebeu reputação de Augusto em [Action] [8.70]Perfect Mount System   
    Bom to arrumando meu server styller estou customizando com ajuda de um amigo meu, que foi mapa do rad tibia, dai atualizei ele para 8.7 e procurei varias montarias, e nenhuma funcionou até que axei no otland uma perfeita, funfou aqui perfeitinho, então se não funfar ai, confira tudo, só funciona em 8.7

    Actions.xml




    Actions/scripts crie uma arquivo.lua chamado mount





    Se Você não tiver os items já arrumado no items.xml ai vai a lista é só adicionar ou substituir!






    SO FUNCIONA EM 8.70 NAO ENCISTAM EM OUTROS!



    (se alguem axar um slayer/snows yuriots 8.70 sem virus me manda o link por mensagem porfavor, estou precisando de um mapa dele)
  11. Gostei
    DevilMoon recebeu reputação de Puncker em [TalkAction] Buy Aol   
    muito bom, mais não ficaria melhor assim?




    custo = 10000 -- Quanto vai custar, gps
    item = 2173 -- ID do item
    quantidade = 1 -- Quantos vai vir

    function onSay(cid, words, param)
    if doPlayerRemoveMoney(cid, custo) == TRUE then
    doPlayerAddItem(cid, item, quantidade)
    doSendMagicEffect(getPlayerPosition(cid), 14)
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce precisa de 10k para comprar um aol.")
    end
    return TRUE
    end
    [/codebox]

    porque cada vez que o player compraria um aol, ficaria aparecendo aquela mensagem chata!
    so fiz.. gosto de cada, mas no meu server ta assim =)
  12. Gostei
    DevilMoon recebeu reputação de Augusto em Ant Mage Bomb Kickers and MC   
    ola galera é um sistema que uso no meu server. se você nao gosta de mcs ou aqueles cara chato com magebomb que kika seu server com magebomb nos account manager aki está sua solução


    Vá em Data>Creaturescripts>Creaturescripts.xml adicione a tag:


    <event type="login" name="playercheck" script="playercheck.lua"/>


    Agora vá em Data>Creaturescripts>scripts e crie um arquivo chamado playercheck.lua e coloque isto dentro:




    Vermelho = Ali é o maximo que o player pode logar, se colocar 1 ele só pode logar o char dele, 2 ele pode logar o char dele + 1, recomendo colocar 1!! ou o maximo até 3/5
  13. Gostei
    DevilMoon deu reputação a Renato em [Resolvido] Template para Naruto Tibia   
    só pegar qualquer um e trocar umas imagens aqui e ali e algum css O_O
    se fosse tipo ranks diferentes, algo que mexesse com php, mas nem...
    enfim, mesmo assim ainda não entendi direito
  14. Gostei
    DevilMoon recebeu reputação de Mek Fiuchem em [TalkAction] Cadeia (fdp)   
    os creditos só são do subwat.. já vi um post dele acho q no tibiaking ou em outro blog desta cadeia e tava funcionando perfeitamente
  15. Gostei
    DevilMoon recebeu reputação de Renato em Cloner System   
    Cloner System , Sumona um Monstro , com Mesmo Outfit que o Seu Cor etc... Mesma Life e Tudo!!Gastando Mana Tipo um Jutso Clones Da Sombra

    vá em

    Data>Monster
    Crie um Arquivo.XML e Renomeie para Cloner
    coloque isso dentro!



    <?xml version="1.0" encoding="UTF-8"?>
    <monster name="Clone" nameDescription="a clone" race="undead" experience="0" speed="400" manacost="0">
    <health now="10" max="10000"/>
    <look type="21" head="20" body="30" legs="40" feet="50" corpse="1397"/>
    <targetchange interval="50000" chance="0"/>
    <strategy attack="100" defense="0"/>
    <flags>
    <flag summonable="0"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="0"/>
    <flag convinceable="1"/>
    <flag pushable="0"/>
    <flag canpushitems="0"/>
    <flag canpushcreatures="0"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
    </flags>
    <attacks>
    <attack name="melee" interval="2000" skill="15" attack="7"/>
    <attack name="arrow" interval="1000" chance="40" min="-2" max="-4"/>
    <attack name="throwing star" interval="3000" chance="50" min="-3" max="-5"/>
    <attack name="throwing knife" interval="2000" chance="60" min="-2" max="-4"/>
    </attacks>
    <defenses armor="1" defense="5"/>
    <defense name="haste" interval="3000" chance="40"/>
    <defense name="light healing" interval="6000" chance="70" min="20" max="40"/>
    <immunities>
    <immunity physical="0"/>
    <immunity energy="0"/>
    <immunity fire="0"/>
    <immunity poison="0"/>
    <immunity lifedrain="1"/>
    <immunity paralyze="1"/>
    <immunity outfit="1"/>
    <immunity drunk="1"/>
    <immunity invisible="0"/>
    </immunities>
    <loot>
    </loot>
    </monster>
    [/codebox]

    Agora em Monster.xml
    Bote isso


    [codebox]
    <monster name="Clone" file="clone.xml" />


    Ok Agora voce ja tem o Monstro , Agora Vamos a Spell vá em Data>Spells>Scripts e coloque isso dentro!!



    function onCastSpell(cid, var)
    ----COPY PLAYER STATUS
    local playerpos = getPlayerPosition(cid)
    local cloth = getCreatureOutfit(cid)
    local health = getCreatureHealth(cid)
    local maxhealth = getCreatureMaxHealth(cid)

    ----CLONE THE PLAYER
    local clone = doCreateMonster("Clone", playerpos)
    doConvinceCreature(cid, Clone)
    setCreatureMaxHealth(clone, maxhealth)
    doCreatureAddHealth(clone, health)
    doSetCreatureOutfit(clone, cloth, -1)
    doSendMagicEffect(playerpos, 2)
    return TRUE
    end
    [/codebox]

    a Tag em Spells.xml


    [codebox]
    <instant name="Shadow Clone" words="utevo ani vid" selftarget="0" aggressive="0" direction="1" lvl="40" maglv="20" mana="300" soul="0" exhaustion="1000" prem="0" enabled="1" script="clone.lua"><vocation id="3"/><vocation id="7"/</instant>


    Muinto Obrigado espero que Gostem!!


    Topico Original

    Print Screen:





  16. Gostei
    DevilMoon recebeu reputação de Augusto em [MoveEvent] Change outfit Tile   
    Eae Galera Tudo Bom? Entao vim Aqui Postar um Tile que Voce pisa em Cima dele e Ganha um Outfit.
    Voce coloca a ActionId 2020 num Item ou Tile, quando o Player Pisar nele ganhará um Outfit Escolhi Por voce.

    Vá em Data>MoveMents>Scripts crie uma pasta.lua chamada changetile.lua e coloque isso:



    -- { By: GOD Dreamer } --

    local female = {lookType = 269, lookHead = 79, lookBody = 91, lookLegs = 91, lookFeet = 91, lookTypeEx = 0, lookAddons = 3} -- Outfit Female
    local male = {lookType = 268, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 3} -- Outfit Male

    function onStepIn(cid, item, pos)
    if isPlayer(cid) == TRUE then
    if getPlayerSex(cid) == 0 then
    doCreatureChangeOutfit(cid, female)
    else
    doCreatureChangeOutfit(cid, male)
    end
    doSendMagicEffect(getThingPos(cid), 29) -- Efeito que dara quando o Player Pisar no Tile ou ItemId.
    doSendAnimatedText(getPlayerPosition(cid),"Wooaahh!", math.random(01,255)) -- Oque o Player vai Falar quando Mudar de Outfit.
    end
    return TRUE
    end
    [/codebox]

    Agora vá em Data>Movements.xml Adicione essa tag:


    [codebox]
    <movevent type="StepIn" actionid="2020" event="script" value="changetile.lua"/>


    Feche e Salve!!


    OBS: Veja se nao tenha a ActionId 2020 Primeiro antes de Salvar!!
    Agora Abra seu RME Coloque a ActionId no Tile e Seja Feliz.

    Duvidas Somente neste Topico.

    Abraços..
  17. Gostei
    DevilMoon deu reputação a Private Sub Teste em Duvida sobre imagem   
    Use a mente
    Ps: Google salva vidas!
  18. Gostei
    DevilMoon deu reputação a Renato em (Entregue) Imagem + Banner   
    Fiz uma...





    http://img818.imageshack.us/img818/816/blogp.png http://img693.imageshack.us/img693/1682/blog2g.png http://img713.imageshack.us/img713/7038/logoblog.png






Informação Importante

Confirmação de Termo