Ir para conteúdo

carlinhoo0ww

Campones
  • Total de itens

    40
  • Registro em

  • Última visita

Posts postados por carlinhoo0ww

  1. Em 31/03/2022 em 22:00, JulianoZN disse:
    function onDeath(cid, corpose, lastHitKiller, mostDamageKiller)
    boss = {["irahsae"] = "the irahsae"  } --configure aki
    ef = 42 --efeito que solta no locau onde ele morrer
    monster = string.lower(getCreatureName(cid))
    pos = getCreaturePos(cid)
    doRemoveCreature(cid)
    doCreateMonster(VOCE PODE ESPECIFICAR O NOME DO MONSTRO QUE VAI NASCER AQUI, pos)
    doSendMagicEffect(pos, 22)
    return FALSE
    end

     

    local boss = {"irahsae"}
    function onDeath(cid, corpose, lastHitKiller, mostDamageKiller)
    ef = 42 --efeito que solta no locau onde ele morrer
    monster = string.lower(getCreatureName(cid))
    pos = getCreaturePos(cid)
    doRemoveCreature(cid)
    doCreateMonster(boss[monster], pos)
    doSendMagicEffect(pos, 22)
    return FALSE
    end

     

     

    Eu uso no meu poketibia assim \/

      Mostrar conteúdo oculto

    function onDeath(cid)
    doCreatureSay(cid, 'Será que consegue vencer o nosso líder ?', TALKTYPE_MONSTER)
    doSendMagicEffect(getThingPos(cid), 2)
    return doCreateMonster('Giant Mega Tropius', getThingPos(cid))
    end

     

    No creaturescripts.xml

     

    <event type="death" name="SLider" event="script" value="MegaTropius.lua"/>

     

     

    login.lua

    registerCreatureEvent(cid, "SLider")

     

    no xml do Poke que eu quero que morra pra executar a script

    <script>
    <event name="SLider"/>
    </script>

     

     

    pensei que tinha funcionando essa usada no poketibia, mas agora quando morre alguem aleatorio nasce o boss que era pra nascer apenas quando matasse o correto

  2. 14 horas atrás, JulianoZN disse:
    function onDeath(cid, corpose, lastHitKiller, mostDamageKiller)
    boss = {["irahsae"] = "the irahsae"  } --configure aki
    ef = 42 --efeito que solta no locau onde ele morrer
    monster = string.lower(getCreatureName(cid))
    pos = getCreaturePos(cid)
    doRemoveCreature(cid)
    doCreateMonster(VOCE PODE ESPECIFICAR O NOME DO MONSTRO QUE VAI NASCER AQUI, pos)
    doSendMagicEffect(pos, 22)
    return FALSE
    end

     

    local boss = {"irahsae"}
    function onDeath(cid, corpose, lastHitKiller, mostDamageKiller)
    ef = 42 --efeito que solta no locau onde ele morrer
    monster = string.lower(getCreatureName(cid))
    pos = getCreaturePos(cid)
    doRemoveCreature(cid)
    doCreateMonster(boss[monster], pos)
    doSendMagicEffect(pos, 22)
    return FALSE
    end

     

     

    Eu uso no meu poketibia assim \/

      Ocultar conteúdo

    function onDeath(cid)
    doCreatureSay(cid, 'Será que consegue vencer o nosso líder ?', TALKTYPE_MONSTER)
    doSendMagicEffect(getThingPos(cid), 2)
    return doCreateMonster('Giant Mega Tropius', getThingPos(cid))
    end

     

    No creaturescripts.xml

     

    <event type="death" name="SLider" event="script" value="MegaTropius.lua"/>

     

     

    login.lua

    registerCreatureEvent(cid, "SLider")

     

    no xml do Poke que eu quero que morra pra executar a script

    <script>
    <event name="SLider"/>
    </script>

     

     

    funcionou perfeitamento obrigado

    REP+

  3. galerinha do xtibia, um bom dia para voces, estou aqui mais uma vez implorando ajuda. kkkk

    estou com esse script que resumidamente ele faz o seguinte: quando um boss X morre na mesma hora ele cria outro.

    está tudo certinho ao meu ver, mas quando o 1 boss morre na da erro alguem, mas no segundo aparece esse erro

     

    [Error - CreatureScript Interface]
    data/creaturescripts/scripts/bossressuretion.lua:onDeath
    Description:
    (luaDoCreateMonster) Monster with name '' not found

     

    o que pode ser? alguem pode me ajudar pff

  4. ALGUEM ME AJUDA NESSE SCRIPT PF ESTÁ DANDO ERRO

    QD QUALQUER CHAR LOGA APARECE ISSO NA DISTRO

     

    Spoiler

    [Error - CreatureScript Interface]
    data/creaturescripts/scripts/expbonuspordominarcityguild.lua:onLogin
    Description:
    ...aturescripts/scripts/expbonuspordominarcityguild.lua:19: attempt to call glob
    al 'getGuildExpRate' (a nil value)
    stack traceback:
            ...aturescripts/scripts/expbonuspordominarcityguild.lua:19: in function
    <...aturescripts/scripts/expbonuspordominarcityguild.lua:17>
    [GOD] has logged out.

     

    script

    Spoiler

    function onTarget(cid, target)
        local m, playerGuild = cityMonsters[getCreatureName(target)], getPlayerGuildId(cid)
        if isPlayer(cid) and isMonster(target) and m and playerGuild > 0 then
            return getGlobalStorageValue(DEFAULT_STORAGE + m) ~= playerGuild
        end
        return true
    end
    function onStatsChange(cid, attacker, type, combat, value)
        if isPlayer(attacker) and isMonster(cid) and type == STATSCHANGE_HEALTHLOSS then
            local m, playerGuild = cityMonsters[getCreatureName(cid)], getPlayerGuildId(attacker)
            if m and playerGuild > 0 then
                return getGlobalStorageValue(DEFAULT_STORAGE + m) ~= playerGuild
            end
        end
        return true
    end
    function onLogin(cid)
        local guildId = getPlayerGuildId(cid)
        if guildId > 0 and getGuildExpRate(guildId) > 1 then
            doPlayerSetExperienceRate(cid, getGuildExpRate(guildId))
        end
        registerCreatureEvent(cid, "mTarget")
        registerCreatureEvent(cid, "mStatsChange")
        return true
    end   
    function onDeath(cid, corpse, deathList)
        local killer, m = deathList[1], cityMonsters[getCreatureName(cid)]
        if killer and isPlayer(killer) and m then
            local atualGuild, playerGuild = getPlayerStorageValue(cid, DEFAULT_STORAGE + m), getPlayerGuildId(killer)
            if playerGuild > 0 and atualGuild ~= playerGuild then
                if atualGuild > -1 then
                    setGuildExperience(atualGuild, getGuildExpRate(atualGuild) - 0.20)
                end
                setGuildExperience(playerGuild, getGuildExpRate(playerGuild) + 0.05)
                setGlobalStorageValue(DEFAULT_STORAGE + m, playerGuild)
                broadcastMessage("A guild "..getPlayerGuildName(killer).." acaba de dominar o "..getCreatureName(cid):explode(" ")[2].."!")
            end
        end
        return true
    end

     

  5. galera alguem de ajuda com esse script.

    preciso que 1 desses bicho ao morrer remova 3 paredes, como faço isso ?

     

    Spoiler

     

    function onDeath(cid, corpse, killer)

    local M ={
    ["Guarda"] = {Pos = {x=552,y=77,z=4},id= 9486 ,time = 60},
    ["Orc"] = {Pos = {x=553, y=77, z=4},id= 9486 ,time = 60},
    }

    local x = M[getCreatureName(cid)]
    function criar()
        local parede = getTileItemById(x.Pos, x.id)
        doCreateItem(x.id, 1, x.Pos)
        end
    if x then
        local parede = getTileItemById(x.Pos, x.id)
        if parede then
                doRemoveItem(parede.uid, 1)
                 doCreatureSay(cid, "A parede Será criada Novamente em "..x.time.." segundos.", TALKTYPE_ORANGE_1)
                addEvent(criar, x.time*1000)
        end
    end
    return TRUE
    end

     

    está dando esse erro:

     

     

  6. Em 12/10/2018 em 00:23, Marshmello disse:

    @carlinhoo0ww Testei aqui amigão ver se e assim

     

      Ocultar conteúdo


    local storage = 91023
    local storagevalue = 1
    local text = "Ponha um texto aqui, ele será mostrado quando o jogador já tiver a storage e pisar no piso." -- Troque seu texto

    function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
        if getPlayerStorageValue(cid, storage) >= os.time() then
            doPlayerSendTextMessage(cid, 22,  "Passou")
            
            return true
        end

        doPlayerSendTextMessage(cid, 22,  text)
        doTeleportThing(cid, fromPosition)
    end

     

    Tudo certo mano brigadao

  7. 13 horas atrás, Marshmello disse:
      Ocultar conteúdo

    local config = {
    msgDenied = "You don't have Master Demon goldentask",
    msgWelcome = "Seja Bem Vindo.",
    sto = 91023
    }

    function onStepIn(cid, item, position, fromPosition)
    if getPlayerStorageValue(cid, config.sto) - os.time <= 0 then
    doTeleportThing(cid, fromPosition, true)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied)
    doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
    else
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome)
    end
    return true
    end

    TESTE

    PUTS... TA DANDO ESSE ERRO

    E QUALQUER PLAYER TA PASSANDO NO TILE INDEPENDENTE DE TER A STORAGE OU NAO.

     

    [Error - MoveEvents Interface]
    data/movements/scripts/pharao/tiledemon.lua:onStepIn
    Description:
    data/movements/scripts/pharao/tiledemon.lua:8: attempt to perform arithmetic on
    field 'time' (a function value)
    stack traceback:
            data/movements/scripts/pharao/tiledemon.lua:8: in function <data/movemen
    ts/scripts/pharao/tiledemon.lua:7>

    [Error - MoveEvents Interface]
    data/movements/scripts/pharao/tiledemon.lua:onStepIn
    Description:
    data/movements/scripts/pharao/tiledemon.lua:8: attempt to perform arithmetic on
    field 'time' (a function value)
    stack traceback:
            data/movements/scripts/pharao/tiledemon.lua:8: in function <data/movemen
    ts/scripts/pharao/tiledemon.lua:7>
    Masdasd has logged out.
     

  8. Em 08/10/2018 em 12:55, Marshmello disse:
      Ocultar conteúdo

    local config = {
    msgDenied = "You don't have Master Demon goldentask",
    msgWelcome = "Seja Bem Vindo."
    sto = 91023
    }

    function onStepIn(cid, item, position, fromPosition)
    if getPlayerStorageValue(cid, config.sto) - os.time <= 0 then
    doTeleportThing(cid, fromPosition, true)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied)
    doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
    else
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome)
    end
    return true
    end

     

    Spoiler

    [Error - LuaScriptInterface::loadFile] data/movements/scripts/pharao/tiledemon.l
    ua:4: '}' expected (to close '{' at line 1) near 'sto'
    [Warning - Event::loadScript] Cannot load script (data/movements/scripts/pharao/
    tiledemon.lua)
    data/movements/scripts/pharao/tiledemon.lua:4: '}' expected (to close '{' at lin
    e 1) near 'sto'

     

    mudei e apareceu esse erro agr

  9. Em 10/05/2015 em 12:47, Killua disse:

    Do jeito que está aí vc pode escolher um item "noob" e um item "pro" e suas quantidades máximas. Quanto mais forte o monstro, maior a quantidade de item q vai cair.

    estou com essa mesmo problema

    alguem pode ajudar?

    Todos falaram bem do script, porem não funciona corretamente.

    Ao matar o boss e entrar no TP e ir para o templo, qualquer pessoa que tentei puxar alavanca diz que "ja tem alguem dentro da arena, aguarde.."

    Caso você morra pro boss, acontece a mesma coisa.

  10. PRECISO MT DA AJUDA DE VOCES COM ESSE SCRIPT

     

    ELE FUNCIONA NORMALMENTE

    QUEM NAO  GANHA A STORAGE DO NPC NAO PASSA

    ,E QUEM GANHA A STORAGE DO NPC PASSA NORMALMENTE 

    MAAAAAAS QUANDO O PLAYER PISA NO TILE APARECE ESSE ERRO NA DISTRO:

    MAS REPITO FUNCIONA 100% SO APARECE O ERRO NO DISTRO

     


     

    Spoiler

     

    [Error - MoveEvents Interface]
    data/movements/scripts/pharao/tilequeen.lua:onStepIn
    Description:
    (luaDoPlayerSendTextMessage) Player not found


    ______________________________________________________________________________

     

    [Error - MoveEvents Interface]
    data/movements/scripts/pharao/tiledemon.lua:onStepIn
    Description:
    data/movements/scripts/pharao/tiledemon.lua:9: attempt to perform arithmetic on
    a string value
    stack traceback:
            data/movements/scripts/pharao/tiledemon.lua:9: in function <data/movemen
    ts/scripts/pharao/tiledemon.lua:2>


    ________________________________________________________________________________

     

    [Error - MoveEvents Interface]
    data/movements/scripts/pharao/tiledemon.lua:onStepIn
    Description:
    data/movements/scripts/pharao/tiledemon.lua:9: attempt to perform arithmetic on
    a string value
    stack traceback:
            data/movements/scripts/pharao/tiledemon.lua:9: in function <data/movemen
    ts/scripts/pharao/tiledemon.lua:2>
     

     

     

    O SCRIPT É ESSE:

     

    Spoiler

     

    -- Script Vip Sytem 1.0 --
    function onStepIn(cid, item, position, fromPosition)

    local config = {
    msgDenied = "You don't have Master Demon goldentask",
    msgWelcome = "Seja Bem Vindo."
    }

    if getPlayerStorageValue(cid, 91023) - os.time() <= 0 then
    doTeleportThing(cid, fromPosition, true)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied)
    doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
    return TRUE
    end
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome)
    return TRUE
    end
     


     

     

    E SAO EM TORNO DE 4 TILE COM O MESMO SCRIPT SO MUDEI A STORAGE.

    dourep++++

  11. como faço para sumir mais de 1 parede??

    DOUREP+


     

    Spoiler

     

    function onDeath(cid, corpse, killer)

    local M ={
    ["Guarda"] = {Pos = {x=552,y=77,z=4},id= 9486 ,time = 60},
    ["Guarda"] = {Pos = {x=553, y=77, z=4},id= 9486 ,time = 60},
    }

    local x = M[getCreatureName(cid)]
    function criar()
        local parede = getTileItemById(x.Pos, x.id)
        doCreateItem(x.id, 1, x.Pos)
        end
    if x then
        local parede = getTileItemById(x.Pos, x.id)
        if parede then
                doRemoveItem(parede.uid, 1)
                 doCreatureSay(cid, "A parede Será criada Novamente em "..x.time.." segundos.", TALKTYPE_ORANGE_1)
                addEvent(criar, x.time*1000)
        end
    end
    return TRUE
    end

     

     

  12. galera nao está funcionando o script do tps do treines alguem pode ajudar ? PLMDS

    DOUREP+

     

    Spoiler

        trainers = {
        [1] = {x = 2888, y = 1398, z = 7},
        [2] = {x = 2871, y = 1455, z = 7},
        [3] = {x = 2888, y = 1409, z = 7},
        [4] = {x = 2888, y = 1420, z = 7},
        [5] = {x = 2888, y = 1431, z = 7},
        [6] = {x = 2888, y = 1442, z = 7},
        [7] = {x = 2888, y = 1453, z = 7},
        [8] = {x = 2888, y = 1464, z = 7},
        [9] = {x = 2888, y = 1475, z = 7},
        [10] = {x = 2888, y = 1486, z = 7},
        [11] = {x = 2888, y = 1497, z = 7},
        [12] = {x = 2888, y = 1508, z = 7},
        [13] = {x = 2888, y = 1519, z = 7},
        [14] = {x = 2888, y = 1530, z = 7},
        [15] = {x = 2888, y = 1541, z = 7},
        [16] = {x = 2888, y = 1552, z = 7},
        [17] = {x = 2888, y = 1563, z = 7},
        [18] = {x = 2888, y = 1574, z = 7},
        [19] = {x = 2888, y = 1585, z = 7},
        [20] = {x = 2888, y = 1596, z = 7},
        [21] = {x = 2888, y = 1607, z = 7},
        [22] = {x = 2888, y = 1618, z = 7},
        [23] = {x = 2888, y = 1629, z = 7},
        [24] = {x = 2888, y = 1640, z = 7},
        [25] = {x = 2888, y = 1651, z = 7},
        [26] = {x = 2888, y = 1662, z = 7},
        [27] = {x = 2888, y = 1673, z = 7},
        [28] = {x = 2888, y = 1684, z = 7},
        [29] = {x = 2888, y = 1695, z = 7},
        [30] = {x = 2902, y = 1398, z = 7},
        [31] = {x = 2902, y = 1409, z = 7},
        [32] = {x = 2902, y = 1420, z = 7},
        [33] = {x = 2902, y = 1431, z = 7},
        [34] = {x = 2902, y = 1442, z = 7},
        [35] = {x = 2902, y = 1453, z = 7},
        [36] = {x = 2902, y = 1464, z = 7},
        [37] = {x = 2902, y = 1475, z = 7},
        [38] = {x = 2902, y = 1486, z = 7},
        [39] = {x = 2902, y = 1497, z = 7},
        [40] = {x = 2902, y = 1508, z = 7},
        [41] = {x = 2902, y = 1519, z = 7},
        [42] = {x = 2902, y = 1530, z = 7},
        [43] = {x = 2902, y = 1541, z = 7},
        [44] = {x = 2902, y = 1552, z = 7},
        [45] = {x = 2902, y = 1563, z = 7},
        [46] = {x = 2902, y = 1574, z = 7},
        [47] = {x = 2902, y = 1585, z = 7},
        [48] = {x = 2902, y = 1596, z = 7},
        [49] = {x = 2902, y = 1607, z = 7},
        [50] = {x = 2902, y = 1618, z = 7},
        [51] = {x = 2902, y = 1629, z = 7},
        [52] = {x = 2902, y = 1640, z = 7},
        [53] = {x = 2902, y = 1651, z = 7},
        [54] = {x = 2902, y = 1662, z = 7},
        [55] = {x = 2902, y = 1673, z = 7},
        [56] = {x = 2902, y = 1684, z = 7},
        [57] = {x = 2902, y = 1695, z = 7},
        [58] = {x = 2916, y = 1398, z = 7},
        [59] = {x = 2916, y = 1409, z = 7},
        [60] = {x = 2916, y = 1420, z = 7},
        [61] = {x = 2916, y = 1431, z = 7},
        [62] = {x = 2916, y = 1442, z = 7},
        [63] = {x = 2916, y = 1453, z = 7},
        [64] = {x = 2916, y = 1464, z = 7},
        [65] = {x = 2916, y = 1475, z = 7},
        [66] = {x = 2916, y = 1486, z = 7},
        [67] = {x = 2916, y = 1497, z = 7},
        [68] = {x = 2916, y = 1508, z = 7},
        [69] = {x = 2916, y = 1519, z = 7},
        [70] = {x = 2916, y = 1530, z = 7},
        [71] = {x = 2916, y = 1541, z = 7},
        [72] = {x = 2916, y = 1552, z = 7},
        [73] = {x = 2916, y = 1563, z = 7},
        [74] = {x = 2916, y = 1574, z = 7},
        [75] = {x = 2916, y = 1585, z = 7},
        [76] = {x = 2916, y = 1596, z = 7},
        [77] = {x = 2916, y = 1607, z = 7},
        [78] = {x = 2916, y = 1618, z = 7},
        [79] = {x = 2916, y = 1629, z = 7},
        [80] = {x = 2916, y = 1640, z = 7},
        [81] = {x = 2916, y = 1651, z = 7},
        [82] = {x = 2916, y = 1662, z = 7},
        [83] = {x = 2916, y = 1673, z = 7},
        [84] = {x = 2916, y = 1684, z = 7},
        [85] = {x = 2916, y = 1695, z = 7},
        [86] = {x = 2930, y = 1398, z = 7},
        [87] = {x = 2930, y = 1409, z = 7},
        [88] = {x = 2930, y = 1420, z = 7},
        [89] = {x = 2930, y = 1431, z = 7},
        [90] = {x = 2930, y = 1442, z = 7},
        [91] = {x = 2930, y = 1453, z = 7},
        [92] = {x = 2930, y = 1464, z = 7},
        [93] = {x = 2930, y = 1475, z = 7},
        [94] = {x = 2930, y = 1486, z = 7},
        [95] = {x = 2930, y = 1497, z = 7},
        [96] = {x = 2930, y = 1508, z = 7},
        [97] = {x = 2930, y = 1519, z = 7},
        [98] = {x = 2930, y = 1530, z = 7},
        [99] = {x = 2930, y = 1541, z = 7},
        [100] = {x = 2930, y = 1552, z = 7},
        [101] = {x = 2930, y = 1563, z = 7},
        [102] = {x = 2930, y = 1574, z = 7},
        [103] = {x = 2930, y = 1585, z = 7},
        [104] = {x = 2930, y = 1596, z = 7},
        [105] = {x = 2930, y = 1607, z = 7},
        [106] = {x = 2930, y = 1618, z = 7},
        [107] = {x = 2930, y = 1629, z = 7},
        [108] = {x = 2930, y = 1640, z = 7},
        [109] = {x = 2930, y = 1651, z = 7},
        [110] = {x = 2930, y = 1662, z = 7},
        [111] = {x = 2930, y = 1673, z = 7},
        [112] = {x = 2930, y = 1684, z = 7},
        [113] = {x = 2930, y = 1695, z = 7},
        [114] = {x = 2944, y = 1398, z = 7},
        [115] = {x = 2944, y = 1409, z = 7},
        [116] = {x = 2944, y = 1420, z = 7},
        [117] = {x = 2944, y = 1431, z = 7},
        [118] = {x = 2944, y = 1442, z = 7},
        [119] = {x = 2944, y = 1453, z = 7},
        [120] = {x = 2944, y = 1464, z = 7},
        [121] = {x = 2944, y = 1475, z = 7},
        [122] = {x = 2944, y = 1486, z = 7},
        [123] = {x = 2944, y = 1497, z = 7},
        [124] = {x = 2944, y = 1508, z = 7},
        [125] = {x = 2944, y = 1519, z = 7},
        [126] = {x = 2944, y = 1530, z = 7},
        [127] = {x = 2944, y = 1541, z = 7},
        [128] = {x = 2944, y = 1552, z = 7},
        [129] = {x = 2944, y = 1563, z = 7},
        [130] = {x = 2944, y = 1574, z = 7},
        [131] = {x = 2944, y = 1585, z = 7},
        [132] = {x = 2944, y = 1596, z = 7},
        [133] = {x = 2944, y = 1607, z = 7},
        [134] = {x = 2944, y = 1618, z = 7},
        [135] = {x = 2944, y = 1629, z = 7},
        [136] = {x = 2944, y = 1640, z = 7},
        [137] = {x = 2944, y = 1651, z = 7},
        [138] = {x = 2944, y = 1662, z = 7},
        [139] = {x = 2944, y = 1673, z = 7},
        [140] = {x = 2944, y = 1684, z = 7},
        [141] = {x = 2944, y = 1695, z = 7},
        [142] = {x = 2958, y = 1398, z = 7},
        [143] = {x = 2958, y = 1409, z = 7},
        [144] = {x = 2958, y = 1420, z = 7},
        [145] = {x = 2958, y = 1431, z = 7},
        [146] = {x = 2958, y = 1442, z = 7},
        [147] = {x = 2958, y = 1453, z = 7},
        [148] = {x = 2958, y = 1464, z = 7},
        [149] = {x = 2958, y = 1475, z = 7},
        [150] = {x = 2958, y = 1486, z = 7},
        [151] = {x = 2958, y = 1497, z = 7},
        [152] = {x = 2958, y = 1508, z = 7},
        [153] = {x = 2958, y = 1519, z = 7},
        [154] = {x = 2958, y = 1530, z = 7},
        [155] = {x = 2958, y = 1541, z = 7},
        [156] = {x = 2958, y = 1552, z = 7},
        [157] = {x = 2958, y = 1563, z = 7},
        [158] = {x = 2958, y = 1574, z = 7},
        [159] = {x = 2958, y = 1585, z = 7},
        [160] = {x = 2958, y = 1596, z = 7},
        [161] = {x = 2958, y = 1607, z = 7},
        [162] = {x = 2958, y = 1618, z = 7},
        [163] = {x = 2958, y = 1629, z = 7},
        [164] = {x = 2958, y = 1640, z = 7},
        [165] = {x = 2958, y = 1651, z = 7},
        [166] = {x = 2958, y = 1662, z = 7},
        [167] = {x = 2958, y = 1673, z = 7},
        [168] = {x = 2958, y = 1684, z = 7},
        [169] = {x = 2958, y = 1695, z = 7},
        [170] = {x = 2972, y = 1398, z = 7},
        [171] = {x = 2972, y = 1409, z = 7},
        [172] = {x = 2972, y = 1420, z = 7},
        [173] = {x = 2972, y = 1431, z = 7},
        [174] = {x = 2972, y = 1442, z = 7},
        [175] = {x = 2972, y = 1453, z = 7},
        [176] = {x = 2972, y = 1464, z = 7},
        [177] = {x = 2972, y = 1475, z = 7},
        [178] = {x = 2972, y = 1486, z = 7},
        [179] = {x = 2972, y = 1497, z = 7},
        [180] = {x = 2972, y = 1508, z = 7},
        [181] = {x = 2972, y = 1519, z = 7},
        [182] = {x = 2972, y = 1530, z = 7},
        [183] = {x = 2972, y = 1541, z = 7},
        [184] = {x = 2972, y = 1552, z = 7},
        [185] = {x = 2972, y = 1563, z = 7},
        [186] = {x = 2972, y = 1574, z = 7},
        [187] = {x = 2972, y = 1585, z = 7},
        [188] = {x = 2972, y = 1596, z = 7},
        [189] = {x = 2972, y = 1607, z = 7},
        [190] = {x = 2972, y = 1618, z = 7},
        [191] = {x = 2972, y = 1629, z = 7},
        [192] = {x = 2972, y = 1640, z = 7},
        [193] = {x = 2972, y = 1651, z = 7},
        [194] = {x = 2972, y = 1662, z = 7},
        [195] = {x = 2972, y = 1673, z = 7},
        [196] = {x = 2972, y = 1684, z = 7},
        [197] = {x = 2972, y = 1695, z = 7},
        [198] = {x = 2986, y = 1398, z = 7},
        [199] = {x = 2986, y = 1409, z = 7},
        [200] = {x = 2986, y = 1420, z = 7},
        [201] = {x = 2986, y = 1431, z = 7},
        [202] = {x = 2986, y = 1442, z = 7},
        [203] = {x = 2986, y = 1453, z = 7},
        [204] = {x = 2986, y = 1464, z = 7},
        [205] = {x = 2986, y = 1475, z = 7},
        [206] = {x = 2986, y = 1486, z = 7},
        [207] = {x = 2986, y = 1497, z = 7},
        [208] = {x = 2986, y = 1508, z = 7},
        [209] = {x = 2986, y = 1519, z = 7},
        [210] = {x = 2986, y = 1530, z = 7},
        [211] = {x = 2986, y = 1541, z = 7},
        [212] = {x = 2986, y = 1552, z = 7},
        [213] = {x = 2986, y = 1563, z = 7},
        [214] = {x = 2986, y = 1574, z = 7},
        [215] = {x = 2986, y = 1585, z = 7},
        [216] = {x = 2986, y = 1596, z = 7},
        [217] = {x = 2986, y = 1607, z = 7},
        [218] = {x = 2986, y = 1618, z = 7},
        [219] = {x = 2986, y = 1629, z = 7},
        [220] = {x = 2986, y = 1640, z = 7},
        [221] = {x = 2986, y = 1651, z = 7},
        [222] = {x = 2986, y = 1662, z = 7},
        [223] = {x = 2986, y = 1673, z = 7},
        [224] = {x = 2986, y = 1684, z = 7},
        [225] = {x = 2986, y = 1695, z = 7},
        }

     

     


     

    Spoiler

     

        function onStepIn(cid, item, position, fromPosition)
        for i=1, table.maxn(trainers) do
        local trainer = trainers
        local position = {x=trainer.x,y=trainer.y,z=trainer.z,stackpos=255}
        local thing = getThingFromPos(position)
        if (thing.itemid == 0) then
        doTeleportThing(cid, position)
        doSendMagicEffect(position, 10)
        return true
        end
        end
        doPlayerSendCancel(cid, "The room trainers is full.")
        doTeleportThing(cid, fromPosition, false)
        doSendMagicEffect(fromPosition, 2)
        return true
        end


     

     

  13. galera vim aqui pedir a ajuda de vocês com o blood-castle do meu server que ja desisti de tentar arrumar.

    eu ja tinha o evento do blood-castle do @Killua

    mas resolvi adequalo ao meu castle mudei tudo certinho a lib, creature script,

    globalevents, tudo correto, o castle está funcionando normal, porém quando inicio o blood-castle aparece tudo certinho as msg e tal

    so que inves de iniciar-se o mesmo se inicia o script do castle, é as msg do blood mais usa a lib do castle

    alguem me ajuda pf dou REP+

     

    esse é o script do blood-castle

     

     

    e esse é a lib que mudei do meu castle

    Spoiler

     

    -- == Castle Event por Killua - Xtibia.com == --

    castleconfig = {
        
        templo = {x = 162, y = 54, z = 7}, -- templo
        
        posGuarda = {x = 553, y = 78, z = 4}, -- Onde o guarda do portão vai nascer
        
        premios = {{8300, 1}, {6570, 2}}, -- Premios que o vencedor vai ganhar {id, quantidade}
        
        positionTP = {x = 156, y = 44, z = 7}, -- Onde o tp será criado
         
        positionEvento = {x = 549, y = 155, z = 7}, -- Para onde o tp vai levar
         
        tempoTP = 1, -- Depois de quanto tempo que avisou vai ser criado o tp? Em minutos
         
        tempoAberto = 2, -- Tempo que o tp fica aberto. Em minutos
        
        minPlayers = 2, -- Número mínimo de players que devem entrar para que o evento aconteça
        
        tempoMaximo = 50, -- Tempo máximo, em minutos, que alguem pode permanecer no evento
        
        playersStorage = 54920, -- Não mude
        
        posPedras = {{x = 534, y = 145, z = 7, stackpos=1}, {x = 534, y = 146, z = 7, stackpos=1}, {x = 563, y = 146, z = 7, stackpos=1}, {x = 563, y = 145, z = 7, stackpos=1}}, -- Posições das pedras que bloqueiam a entrada do evento
        
        idDasParedes = 9486, -- ID das paredes que vao ser removidas  quando o Guarda morrer (todas devem ter o mesmo id)
        
        estatua = {x = 615, y = 128, z = 7}, -- Posicao onde o arcanjo vai ser criado
        
        tempoSaida = 50, -- Quando tempo o tp q é criado quando a estátua morre vai ficar? Em segundos
        
        posParedes = {{x = 552, y = 77, z = 4, stackpos=1}, {x = 553, y = 77, z = 4, stackpos=1}, {x = 554, y = 77, z = 4, stackpos=1}}, -- Posições das paredes que ficam atrás do guarda
        
        fromPos = {x = 503, y = 57, z = 7}, -- Canto superior esquerdo da área do seu evento  ---- Deve ser uma área quadrada ou retangular, de forma que todo o evento fique dentro dela.
        toPos = {x = 600, y = 169, z = 7}, -- Canto inferior direito da área do seu evento
     }
     
     -- [[ NAO ALTERE MAIS NADA DAQUI PARA BAIXO! ]] --
     
     function removeTpb()
           local t = getTileItemById(castleconfig.positionTP, 1387)
         if t then
             doRemoveItem(t.uid, 1)
             doSendMagicEffect(castleconfig.positionTP, CONST_ME_POFF)
         end
     end
     
     function removeStones()
         for i = 1, #castleconfig.posPedras do
             local pedra = getTileItemById(castleconfig.posPedras, 9470)
             if pedra then
                 doRemoveItem(pedra.uid, 1)
             end
         end
     end
     
      function putStones()
          for i = 1, #castleconfig.posPedras do
              local pedra = getTileItemById(castleconfig.posPedras, 9470)
              if not pedra then
                  doCreateItem(9470, 1, pedra)
              end
          end
      end

     
      function createTeleportb()
          local tip = doCreateTeleport(1387, castleconfig.positionEvento, castleconfig.positionTP)
          doItemSetAttribute(tip, "aid", 4726)
     end
          
      function removeTpa()
          local t = getTileItemById(castleconfig.estatua, 1387)
          if t then
              doRemoveItem(t.uid, 1)
              doSendMagicEffect(castleconfig.estatua, CONST_ME_POFF)
          end
      end
     
     
     function getPlayersInCastle()
         local playersInCastle = getGlobalStorageValue(castleconfig.playersStorage)
         return playersInCastle < 0 and 0 or playersIncastle
     end
     
     function removePlayers()
         for _, pid in pairs(getPlayersOnline()) do
             if isInArea(getThingPos(pid), castleconfig.fromPos, castleconfig.toPos) then
                 doTeleportThing(pid, castleconfig.templo, false)
                 doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce foi removido do Castle. Possiveis causas: o evento nao atingiu o numero minimo de players; Voce permaneceu no evento por mais de " .. castleconfig.tempoMaximo .. " minutos.")
             end
         end
     end
     
     function checkCastle()
         if getPlayersInCastle() >= castleconfig.minPlayers then
             removeStones()
             doBroadcastMessage("[Castle] O Evento comecou. Boa sorte a todos!")
             if not isMonster(getTopCreature(castleconfig.posGuarda).uid) then
                doCreateMonster("Guarda", castleconfig.posGuarda)
            end
            addEvent(removePlayers, castleconfig.tempoMaximo*60*1000)
        else
            removePlayers()
            setGlobalStorageValue(castleconfig.playersStorage, 0)
            doBroadcastMessage("[Castle] O evento nao atingiu o numero minimo de participantes e foi cancelado.")
            if isMonster(getTopCreature(castleconfig.posGuarda).uid) then
                doRemoveCreature(getTopCreature(castleconfig.posGuarda).uid)
            end
            if isMonster(getTopCreature(castleconfig.estatua).uid) then
                doRemoveCreature(getTopCreature(castleconfig.estatua).uid)
            end
        end
    end

    function putWalls()
        for i = 1, #castleconfig.posParedes do
            doCreateItem(castleconfig.idDasParedes, 1, castleconfig.posParedes)
        end
    end

    function removeWalls()
        for i = 1, #castleconfig.posParedes do
            local wall = getTileItemById(castleconfig.posParedes, castleconfig.idDasParedes)
            if wall then
                doRemoveItem(wall.uid, 1)
            end
        end
    end

    function createAngel()
        if not isMonster(getTopCreature(castleconfig.estatua).uid) then
            doCreateMonster("king", castleconfig.estatua)
            doBroadcastMessage("[Castle] Corram corram!")
        end
    end
             
    function Guarantee()
        if isMonster(getTopCreature(castleconfig.posGuarda).uid) then
            putWalls()
            doRemoveCreature(getTopCreature(castleconfig.posGuarda).uid)
        elseif isMonster(getTopCreature(castleconfig.estatua).uid) then
            putStones()
            putWalls()
            doRemoveCreature(getTopCreature(castleconfig.estatua).uid)
        end
    end

     

     

  14. > Loading Characters Market System.xml...mods/Characters Market System.xml:7: pa
    rser error : Input is not proper UTF-8, indicate encoding !
    Bytes: 0xED 0x6E 0x69 0x6D
    level = 30 -- Level mÝnimo que o character deve ter para ser vendido
                         ^
    [Error - ScriptingManager::loadFromXml] Cannot load mod mods/Characters Market S
    ystem.xml
    Line: 7, Info: Input is not proper UTF-8, indicate encoding !
    Bytes: 0xED 0x6E 0x69 0x6D


     failed!

     

    tentei em baiak 8.6

  15. olá galerinha do xtibia.

    alguem poderia editar um script pra mim pf ?

    adicionar umas msg para o movements [2392] = 2

    o script é esse.

     

    esse é o LIB

    Spoiler

    cityMonsters = {
        --["monster_name"] = recomendo número anterior + 1,
        ["Chanceler Carlin"] = 1,
        ["Chanceler Kazz"] = 2,
        ["Chanceler Ab"] = 3,
        --etc
    }
    DEFAULT_STORAGE = 49198
    function setGuildExperience(guildId, exp)
        for _, pid in pairs(getPlayersOnline()) do
            if getPlayerGuildId(pid) == guildId then
                doPlayerSetExperienceRate(pid, exp)
            end
        end
    end
    function getGuildExpRate(guildId)
        for _, pid in pairs(getPlayersOnline()) do
            local playerRate = getPlayerRates(pid)[8]
            if getPlayerGuildId(pid) == guildId and playerRate > 1 then
                return playerRate
            end
        end
        return 1.0
    end
    function getGuildName(guild_id)             --Omega
        local query = db.getResult("SELECT name FROM guilds WHERE id = "..guild_id)
        local ret = query:getID() == -1 and false or query:getDataString("name")
        query:free()
        return ret
    end

     

    e esse o movements dele

    Spoiler

    local guilds = {
        --[actionid] = número da cidade configurado em cityMonsters,
        [2391] = 1,
        [2392] = 2,
        [2393] = 3,
    }
        
    function onStepIn(cid, item, position, fromPosition)
        if not isPlayer(cid) then return true end
        local guildId = getGlobalStorageValue(guilds[item.actionid] + DEFAULT_STORAGE)
        if getPlayerGuildId(cid) ~= guildId then
            doTeleportThing(cid, fromPosition)
        end
        return true
    end

     

  16. 11 horas atrás, Marshmello2 disse:
      Ocultar conteúdo

    function onUse(cid, item, frompos, item2, topos)
      local sto = 874157 -- numero da storage
      if getPlayerStorageValue(cid, sto) == -1 then
        if getPlayerVocation(cid) == 6 then
          doTeleportThing(cid,{x=134, y=2443, z=7})
        else
          doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui") -- msg da vocation
        end
      else
        doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui") --- Msg da storage

      end
      return true
    end  

     

    tudo certo vlw

    3 horas atrás, Crypter disse:
    
    function onUse(cid, item, frompos, item2, topos)
    
      local storate,value = 874157,1 -- numero da storage, e o valor que ganha na quest da storage
      local vocationId = 6
      
      if not getPlayerVocation(cid) == vocationId then
        return doPlayerSendTextMessage(cid,22,"Você precisa ser um ? para entrar na área especial.")
      elseif not getPlayerStorageValue(cid, storate) == value then
        return doPlayerSendTextMessage(cid,22,"Você precisa fazer a quest para entrar na área especial.")
      end
      
      doTeleportThing(cid,{x=134, y=2443, z=7}) 
      doPlayerSendTextMessage(cid,22,"Você foi teleportado para área dos ?.") 
      return true
    end

     

    vlw

  17. Em 13/09/2018 em 11:44, Marshmello2 disse:

    @carlinhoo0ww

      Ocultar conteúdo

    function onUse(cid, item, frompos, item2, topos)
      local sto = 874157 -- numero da storage
      if getPlayerStorageValue(cid, sto) == -1 then
        if getPlayerVocation(cid) == 6 then
          doTeleportThing(cid,{x=134, y=2443, z=7})
        else
          doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui")
        end
      else
        doPlayerSendTextMessage(cid,22,"Only bio-alchimist may open this door.")

      end
    else
      return true
    end 

     

    vlw tava precisando pakas, vou dar uma testada aqui

    Em 13/09/2018 em 11:44, Marshmello2 disse:

    @carlinhoo0ww

      Mostrar conteúdo oculto

    function onUse(cid, item, frompos, item2, topos)
      local sto = 874157 -- numero da storage
      if getPlayerStorageValue(cid, sto) == -1 then
        if getPlayerVocation(cid) == 6 then
          doTeleportThing(cid,{x=134, y=2443, z=7})
        else
          doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui")
        end
      else
        doPlayerSendTextMessage(cid,22,"Only bio-alchimist may open this door.")

      end
    else
      return true
    end 

     

    puts deu erro. :(

     

    [Error - LuaScriptInterface::loadFile] data/actions/scripts/door/vocdoorp.lua:13
    : 'end' expected (to close 'function' at line 1) near 'else'
    [Warning - Event::loadScript] Cannot load script (data/actions/scripts/door/vocd
    oorp.lua)
    data/actions/scripts/door/vocdoorp.lua:13: 'end' expected (to close 'function' a
    t line 1) near 'else'
    [Error - LuaScriptInterface::loadFile] data/actions/scripts/door/vocdoord.lua:13
    : 'end' expected (to close 'function' at line 1) near 'else'
    [Warning - Event::loadScript] Cannot load script (data/actions/scripts/door/vocd
    oord.lua)
    data/actions/scripts/door/vocdoord.lua:13: 'end' expected (to close 'function' a
    t line 1) near 'else'
    [

  • Quem Está Navegando   0 membros estão online

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