Ir para conteúdo

Featured Replies

Postado
  • Solução

@leozincorsair Hiraishin Kunai né, enfim ano passado eu fiz uma script assim, não sei se funciona e se ta do jeito que você quer, testa ai:

 

Spoiler

local slots = {
    
    slot_01 = {},
    slot_02 = {},
    slot_03 = {}
    
}

local block = { -- Areas bloquadas
    [1] = {{x = 1261, y = 417, z = 15}, {x = 1317, y = 374, z = 15}},
    [2] = {{x = 1261, y = 417, z = 14}, {x = 1317, y = 374, z = 14}},
    [3] = {{x = 1261, y = 417, z = 13}, {x = 1317, y = 374, z = 13}},
    [4] = {{x = 1036, y = 909, z =  7}, {x = 1020, y = 894, z =  7}},
}

local time = 10
local itemid = 2352 -- ID da Kunai, lembrando que o item não poderá ser movido.

local storage = 23432
local waittime = 5 -- Exhaust, in seconds.

function onCastSpell(cid, var)
    local pos = {x = getCreaturePosition(cid).x, y = getCreaturePosition(cid).y, z = getCreaturePosition(cid).z, stackpos = getCreaturePosition(cid).stackpos} -- Não mecha aqui, nem para configurar as posições do effect.
    if getTileInfo(getThingPos(cid)).protection then
        doPlayerSendCancel(cid, "You can't cast in ProtectionZone.")
        return false
    end
    
    if exhaustion.check(cid, storage) then
        doPlayerSendCancel(cid, "Exhaustion, wait ...")
        return false
    end
    for a, b in pairs(block) do
        if isInArea(pos, b[1], b[2]) then
            doPlayerSendTextMessage(cid, 20, "Você não pode usar nesse area.")
            return false
        end
    end
    if var.string == "1" then 
        if table.getn(slots.slot_01) == 0 then
            table.insert(slots.slot_01, pos)
            doPlayerSendTextMessage(cid, 25, "Voce Marcou o 1 Selo - 30 Segundos Para Desaparecer !!")
            doCreateItem(itemid, pos)
            addEvent(function()
                if isCreature(cid) then
                    doPlayerSendTextMessage(cid, 25, "O 1 Selo Se Foi.")
                end
            end, time * 1000)
            addEvent(function()
                doCleanTile(pos)
            end, time * 1000)
            addEvent(doSendMagicEffect, time * 1000, pos, 2)
            addEvent(table.remove, time * 1000, slots.slot_01)
        else
            doTeleportThing(cid, slots.slot_01[1])
            doPlayerSendTextMessage(cid, 27, "Teleported!")
            doSendMagicEffect(getCreaturePosition(cid), 3)
            exhaustion.set(cid, storage, waittime)
        end 
    elseif var.string == "2" then
        if table.getn(slots.slot_02) == 0 then
            table.insert(slots.slot_02, pos)
            doPlayerSendTextMessage(cid, 25, "Voce Marcou o 2 Selo - 30 Segundos Para Desaparecer !!")
            doCreateItem(itemid, pos)
            addEvent(function()
                if isCreature(cid) then
                    doPlayerSendTextMessage(cid, 25, "O 2 Selo Se Foi.")
                end
            end, time * 1000)
            addEvent(function()
                doCleanTile(pos)
            end, time * 1000)
            addEvent(doSendMagicEffect, time * 1000, pos, 2)
            addEvent(table.remove, time * 1000, slots.slot_02)
        else
            doTeleportThing(cid, slots.slot_02[1])
            doPlayerSendTextMessage(cid, 27, "Teleported!")
            doSendMagicEffect(getCreaturePosition(cid), 3)
            exhaustion.set(cid, storage, waittime)
        end
    elseif var.string == "3" then
        if table.getn(slots.slot_03) == 0 then
            table.insert(slots.slot_03, pos)
            doPlayerSendTextMessage(cid, 25, "Voce Marcou o 3 Selo - 30 Segundos Para Desaparecer !!")
            addEvent(function()
                if isCreature(cid) then
                    doPlayerSendTextMessage(cid, 25, "O 3 Selo Se Foi.")
                end
            end, time * 1000)
            doCreateItem(itemid, pos)
            addEvent(function()
                doCleanTile(pos)
            end, time * 1000)
            addEvent(doSendMagicEffect, time * 1000, pos, 2)
            addEvent(table.remove, time * 1000, slots.slot_03)
        else
            doTeleportThing(cid, slots.slot_03[1])
            doPlayerSendTextMessage(cid, 27, "Teleported!")
            doSendMagicEffect(getCreaturePosition(cid), 3)
            exhaustion.set(cid, storage, waittime)
        end 
    else
        doPlayerSendTextMessage(cid, 27, "Utilize: Hiraishin Kunai No Jutsu-Numero do Selo. - EX Hiraishin Kunai No Jutsu 1")
    end 
end

 

 

  • Respostas 21
  • Visualizações 1.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @leozincorsair Hiraishin Kunai né, enfim ano passado eu fiz uma script assim, não sei se funciona e se ta do jeito que você quer, testa ai:    

Postado
  • Autor
2 minutos atrás, Storm disse:

@leozincorsair Hiraishin Kunai né, enfim ano passado eu fiz uma script assim, não sei se funciona e se ta do jeito que você quer, testa ai:

 

  Ocultar conteúdo


local slots = {
    
    slot_01 = {},
    slot_02 = {},
    slot_03 = {}
    
}

local block = { -- Areas bloquadas
    [1] = {{x = 1261, y = 417, z = 15}, {x = 1317, y = 374, z = 15}},
    [2] = {{x = 1261, y = 417, z = 14}, {x = 1317, y = 374, z = 14}},
    [3] = {{x = 1261, y = 417, z = 13}, {x = 1317, y = 374, z = 13}},
    [4] = {{x = 1036, y = 909, z =  7}, {x = 1020, y = 894, z =  7}},
}

local time = 10
local itemid = 2352 -- ID da Kunai, lembrando que o item não poderá ser movido.

local storage = 23432
local waittime = 5 -- Exhaust, in seconds.

function onCastSpell(cid, var)
    local pos = {x = getCreaturePosition(cid).x, y = getCreaturePosition(cid).y, z = getCreaturePosition(cid).z, stackpos = getCreaturePosition(cid).stackpos} -- Não mecha aqui, nem para configurar as posições do effect.
    if getTileInfo(getThingPos(cid)).protection then
        doPlayerSendCancel(cid, "You can't cast in ProtectionZone.")
        return false
    end
    
    if exhaustion.check(cid, storage) then
        doPlayerSendCancel(cid, "Exhaustion, wait ...")
        return false
    end
    for a, b in pairs(block) do
        if isInArea(pos, b[1], b[2]) then
            doPlayerSendTextMessage(cid, 20, "Você não pode usar nesse area.")
            return false
        end
    end
    if var.string == "1" then 
        if table.getn(slots.slot_01) == 0 then
            table.insert(slots.slot_01, pos)
            doPlayerSendTextMessage(cid, 25, "Voce Marcou o 1 Selo - 30 Segundos Para Desaparecer !!")
            doCreateItem(itemid, pos)
            addEvent(function()
                if isCreature(cid) then
                    doPlayerSendTextMessage(cid, 25, "O 1 Selo Se Foi.")
                end
            end, time * 1000)
            addEvent(function()
                doCleanTile(pos)
            end, time * 1000)
            addEvent(doSendMagicEffect, time * 1000, pos, 2)
            addEvent(table.remove, time * 1000, slots.slot_01)
        else
            doTeleportThing(cid, slots.slot_01[1])
            doPlayerSendTextMessage(cid, 27, "Teleported!")
            doSendMagicEffect(getCreaturePosition(cid), 3)
            exhaustion.set(cid, storage, waittime)
        end 
    elseif var.string == "2" then
        if table.getn(slots.slot_02) == 0 then
            table.insert(slots.slot_02, pos)
            doPlayerSendTextMessage(cid, 25, "Voce Marcou o 2 Selo - 30 Segundos Para Desaparecer !!")
            doCreateItem(itemid, pos)
            addEvent(function()
                if isCreature(cid) then
                    doPlayerSendTextMessage(cid, 25, "O 2 Selo Se Foi.")
                end
            end, time * 1000)
            addEvent(function()
                doCleanTile(pos)
            end, time * 1000)
            addEvent(doSendMagicEffect, time * 1000, pos, 2)
            addEvent(table.remove, time * 1000, slots.slot_02)
        else
            doTeleportThing(cid, slots.slot_02[1])
            doPlayerSendTextMessage(cid, 27, "Teleported!")
            doSendMagicEffect(getCreaturePosition(cid), 3)
            exhaustion.set(cid, storage, waittime)
        end
    elseif var.string == "3" then
        if table.getn(slots.slot_03) == 0 then
            table.insert(slots.slot_03, pos)
            doPlayerSendTextMessage(cid, 25, "Voce Marcou o 3 Selo - 30 Segundos Para Desaparecer !!")
            addEvent(function()
                if isCreature(cid) then
                    doPlayerSendTextMessage(cid, 25, "O 3 Selo Se Foi.")
                end
            end, time * 1000)
            doCreateItem(itemid, pos)
            addEvent(function()
                doCleanTile(pos)
            end, time * 1000)
            addEvent(doSendMagicEffect, time * 1000, pos, 2)
            addEvent(table.remove, time * 1000, slots.slot_03)
        else
            doTeleportThing(cid, slots.slot_03[1])
            doPlayerSendTextMessage(cid, 27, "Teleported!")
            doSendMagicEffect(getCreaturePosition(cid), 3)
            exhaustion.set(cid, storage, waittime)
        end 
    else
        doPlayerSendTextMessage(cid, 27, "Utilize: Hiraishin Kunai No Jutsu-Numero do Selo. - EX Hiraishin Kunai No Jutsu 1")
    end 
end

 

 

 

isso é uma spell certo ?

Postado

@leozincorsair Usa a XML assim

	<instant name="Hiraishin Kunai No Jutsu" words="Hiraishin Kunai No Jutsu" lvl="550" mana="0" params="1" blockwalls="1" agressive="0" exhaustion="2000" needlearn="0" event="script" value="newminato/Hiraishin.lua">
		<vocation id="36" />  
		<vocation id="35" />		
		</instant>

 

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo