Ir para conteúdo

Featured Replies

Postado

Nuus nada ver a pos que coloquei ksks

 

Mostrar conteúdo oculto

 

Editado por Yan Liima (veja o histórico de edições)

  • Respostas 9
  • Visualizações 1.2k
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado
  • Autor

@Yan Liima 

[12/01/2019 13:07:12] [Error - Spell Interface] 
[12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua
[12/01/2019 13:07:12] Description: 
[12/01/2019 13:07:12] (luaGetThingPosition) Thing not found

[12/01/2019 13:07:12] [Error - Spell Interface] 
[12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua
[12/01/2019 13:07:12] Description: 
[12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua:78: attempt to index a boolean value
[12/01/2019 13:07:12] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/itachi/genjutsu.lua)

Postado
  Em 12/01/2019 em 16:09, Mark Charlotte disse:

@Yan Liima 

[12/01/2019 13:07:12] [Error - Spell Interface] 
[12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua
[12/01/2019 13:07:12] Description: 
[12/01/2019 13:07:12] (luaGetThingPosition) Thing not found

[12/01/2019 13:07:12] [Error - Spell Interface] 
[12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua
[12/01/2019 13:07:12] Description: 
[12/01/2019 13:07:12] data/spells/scripts/itachi/genjutsu.lua:78: attempt to index a boolean value
[12/01/2019 13:07:12] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/itachi/genjutsu.lua)

 

Mostrar conteúdo oculto

 

  • 6 months later...
Postado
local cfg = {
    items_area = {
        {
            itemid = 11497,
            area = {
                {0,0,0,0,0,0,0},
                {0,1,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,2,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,0,1,0,0},
                {0,0,0,0,0,0,0}
            }
        },
        {
            itemid = 11498,
            area = {
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,2,0,0,1},
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,1,0,0,0}
            }
        },
        {
            itemid = 11499,
            area = {
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,2,0,0,0},
                {0,1,0,0,0,0,0},
                {0,0,0,0,0,0,1},
                {0,0,0,0,0,0,0}
            }
        },
        {
            itemid = 11500,
            area = {
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {1,0,0,2,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,0,0,0,0}
            }
        },
        {
            itemid = 11501,
            area = {
                {0,0,0,0,0,0,0},
                {0,0,0,0,1,0,0},
                {0,0,0,0,0,0,0},
                {0,0,0,2,0,0,0},
                {0,0,0,0,0,0,0},
                {0,0,1,0,0,0,0},
                {0,0,0,0,0,0,0}
            }    
        }
    },
    remove_time = 10, -- tempo em segundos para remover
    onuse_message = "Uma area foi atingida pelo Genjutsu de %s" -- message ao usar
}

function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    if getTopCreature(pos).uid > 0 and creature then return false end
    if getTileInfo(pos).protection and pz then return false, true end
    local n = not proj and 3 or 2
    for i = 0, 255 do
        pos.stackpos = i
        local tile = getTileThingByPos(pos)
        if tile.itemid ~= 0 and not isCreature(tile.uid) then
            if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
                return false
            end
        end
    end
    return true
end  

local combats = {}
for i, t in ipairs(cfg.items_area) do
    combats = createCombatObject()
    setCombatArea(combats, createCombatArea(t.area))
    function onTargetTile(cid, position)
        if isWalkable(position, true, true, true) then
            doCreateItem(t.itemid, 1, position)
            addEvent(function()
                local thing = getTileItemById(position, t.itemid).uid
                if(thing ~= 0) then
                    doRemoveItem(thing)
                end
            end, cfg.remove_time * 1000)
        end
    end
    setCombatCallback(combats, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
end

function onCastSpell(cid, var)

local outfit = {lookType = 90, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local time1 = 4000 -- segundos que ficará com a outfit
local position = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}

    for i = 1, #combats do
        doCombat(cid, combats[i], var)
        doSetCreatureOutfit(cid, outfit, time1)
        doSendMagicEffect(position, 193)
    end

    doBroadcastMessage(cfg.onuse_message:format(getCreatureName(cid)), MESSAGE_STATUS_WARNING)
    return true
end

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo