Ir para conteúdo
  • 0

Cancela Spell Em Area Pz


Pergunta

Como Ja Diz O Titulo Queria Uma Script Que Se O Player Entrar Em Area Pz Cancelasse Os Spell De Dano Porque Sempre Que Um Player Morre Na Arena Ele Vai Pro Temple E Sofre Dano Dentro Do Temple 

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/
Compartilhar em outros sites

Posts Recomendados

  • 0
  Em 25/02/2017 em 05:22, Tonyyx disse:

Como Ja Diz O Titulo Queria Uma Script Que Se O Player Entrar Em Area Pz Cancelasse Os Spell De Dano Porque Sempre Que Um Player Morre Na Arena Ele Vai Pro Temple E Sofre Dano Dentro Do Temple 

Expand  

 

  Mostrar conteúdo oculto

 

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712866
Compartilhar em outros sites

  • 0
  Em 25/02/2017 em 16:05, Crypter disse:

 

  Mostrar conteúdo oculto
Expand  

nao funcionou mesmo assim quando os players morrem na arena vao para o temple a skill continua batendo nao sei se foi porque eu instalei errado fiz assim

 

login:

  Citar

    registerCreatureEvent(cid,"SemAttack")

 

Expand  

 

creature xml

  Citar

   <event type="think" name="SemAttack" event="script" value="semattack.lua"/>

Expand  

 

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712868
Compartilhar em outros sites

  • 0
  Em 25/02/2017 em 16:12, Tonyyx disse:

nao funcionou mesmo assim quando os players morrem na arena vao para o temple a skill continua batendo nao sei se foi porque eu instalei errado fiz assim

 

login:

 

creature xml

 

Expand  

 

function onThink(cid, interval)    if(getTilePzInfo(getCreaturePosition(cid))) then         addEvent(function()            if isPlayer(cid) and (getTilePzInfo(getCreaturePosition(cid))) and getCreatureHealth(cid) < getCreatureMaxHealth(cid) then                            doCreatureAddHealth(cid, getCreatureMaxHealth(cid))                addEvent(doRemoveCreature, 1, cid)            end        end, 1000 * 1)    endend

 

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712871
Compartilhar em outros sites

  • 0

funcionou sempre que ele leva atk ele desloga soq ta demorando muito para deslogar mais mesmo assim funcionou so queria saber se tem como por pra desloga mais rapido pq o personagem quase chega na barra amarela de vida '-'

  Em 25/02/2017 em 16:29, Crypter disse:

 

function onThink(cid, interval)    if(getTilePzInfo(getCreaturePosition(cid))) then         addEvent(function()            if isPlayer(cid) and (getTilePzInfo(getCreaturePosition(cid))) and getCreatureHealth(cid) < getCreatureMaxHealth(cid) then                            doCreatureAddHealth(cid, getCreatureMaxHealth(cid))                addEvent(doRemoveCreature, 1, cid)            end        end, 1000 * 1)    endend

 

Expand  

 

Editado por Tonyyx
Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712875
Compartilhar em outros sites

  • 0
  Em 25/02/2017 em 17:00, Tonyyx disse:

funcionou sempre que ele leva atk ele desloga soq ta demorando muito para deslogar mais mesmo assim funcionou so queria saber se tem como por pra desloga mais rapido pq o personagem quase chega na barra amarela de vida '-'

 

Expand  

o tempo é 

1000 * 1)

se tu por 

1 * 1)
Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712880
Compartilhar em outros sites

  • 0
  Em 25/02/2017 em 18:15, Crypter disse:

o tempo é 

1000 * 1)

se tu por 

1 * 1)
Expand  

 

VLW PELA AJUDA TEM COMO DA UMA OLHADINHA NESSE TOPICO PRA TENTA ME AJUDA <3

 

 

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712884
Compartilhar em outros sites

  • 0
  Em 25/02/2017 em 18:44, Tonyyx disse:

 

VLW PELA AJUDA TEM COMO DA UMA OLHADINHA NESSE TOPICO PRA TENTA ME AJUDA <3

 

 

Expand  

Não entendi muito o bug ja tentou trocar de distro?

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712885
Compartilhar em outros sites

  • 0
  Em 25/02/2017 em 19:13, Crypter disse:

Não entendi muito o bug ja tentou trocar de distro?

Expand  

o bug e o seguinte 

 

tem um player sendo atacado ai donada ele chega a 0/ de life e nao sai disso nunca + ele fica ali ate o char dele DESLOGAR eu tentei pedir um script para quando o player chegasse 0/ ele deixasse o corpo no local de sua morte e ser teleportado para o yama ai a galera poderia pegar o loot dropado e o personagem nao iria ficar bugado mais nao e sempre que acontece esse bug e nao aparece erro na distro 

 

eu nao troquei minha distro pq eu nao sabia desse bug e investi muito nela mt muitas coisas +effect +missel +sword e glove de 2 maos +health e mana 100% e outras coisas queria apenas concerta esse bug que esta quebrando meu servidor

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712886
Compartilhar em outros sites

  • 0
  Em 25/02/2017 em 19:22, Tonyyx disse:

o bug e o seguinte 

 

tem um player sendo atacado ai donada ele chega a 0/ de life e nao sai disso nunca + ele fica ali ate o char dele DESLOGAR eu tentei pedir um script para quando o player chegasse 0/ ele deixasse o corpo no local de sua morte e ser teleportado para o yama ai a galera poderia pegar o loot dropado e o personagem nao iria ficar bugado mais nao e sempre que acontece esse bug e nao aparece erro na distro 

 

eu nao troquei minha distro pq eu nao sabia desse bug e investi muito nela mt muitas coisas +effect +missel +sword e glove de 2 maos +health e mana 100% e outras coisas queria apenas concerta esse bug que esta quebrando meu servidor

Expand  

 

Cara, isso é um bug desgraçado pois é um erro de um sistema básico de tíbia. Morrer é um sistema que já vem com o sistema e tu tem um puta bug de algum sistema que não deixa ele "morrer". Verifica teus scripts de ondeath ou onprearedeath pois são eles os responsáveis por isso.

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712903
Compartilhar em outros sites

  • 0
  Em 26/02/2017 em 11:16, Poccnn disse:

 

Cara, isso é um bug desgraçado pois é um erro de um sistema básico de tíbia. Morrer é um sistema que já vem com o sistema e tu tem um puta bug de algum sistema que não deixa ele "morrer". Verifica teus scripts de ondeath ou onprearedeath pois são eles os responsáveis por isso.

Expand  

 

nao tenho nenhum ONDETH nem ONPREAREDEATH no servidor olha meu creature xml

 

<?xml version="1.0" encoding="UTF-8"?><creaturescripts>    --LOGIN--	<event type="login" name="PlayerLogin" event="script" value="login.lua"/>	<event type="login" name="vip" event="script" value="vip.lua"/>	<event type="login" name="Outfit" script="outfit_vocation.lua"/>	<event type="login" name="BoasVindas" event="script" value="boasvindas.lua"/>	<event type="login" name="SkillStagesLogin" event="script" value="skillstageslogin.lua"/> 	<event type="login" name="BlessCheck" event="script" value="CheckBless.lua"/>	<event type="login" name="aloot_reg" event="script" value="aloot.lua"/>	--ADVANCE--	<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>	<event type="advance" name="FullHpMana" event="script" value="fullhpmana.lua"/>	<event type="advance" name="SkillStagesAdvance" event="script" value="skillstagesadvance.lua"/>		--DEATH,KILL--	<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>	<event type="death" name="PlayerDeath2" event="script" value="morte.lua"/>	<event type="death" name="Niwdeath" event="script" value="niwdeath.lua"/>	<event type="death" name="tp" event="script" value="tpmonster.lua"/>	<event type="kill" name="aloot_kill" event="script" value="aloot.lua"/>        <event type="kill" name="pvpsystem" event="script" value="pvpsystem.lua"/><event type="death" name="ProtectLevel" event="script" value="protectionlevel.lua"/>		--THINK--	<event type="think" name="Idle" event="script" value="idle.lua"/>    <event type="think" name="VocShenron" event="script" value="vocshenron.lua"/>    <event type="think" name="VocVegetto" event="script" value="vocvegetto.lua"/>    <event type="think" name="VocTapion" event="script" value="voctapion.lua"/>    <event type="think" name="VocKame" event="script" value="vockame.lua"/>    <event type="think" name="VocKagome" event="script" value="vockagome.lua"/>    <event type="think" name="VocKingVegeta" event="script" value="vockingvegeta.lua"/>    <event type="think" name="VocZaiko" event="script" value="voczaiko.lua"/>    <event type="think" name="VocGoku" event="script" value="vocgoku.lua"/>    <event type="think" name="VocChilled" event="script" value="vocchilled.lua"/>    <event type="think" name="VocC8" event="script" value="vocc8.lua"/>	<event type="think" name="VocBills" event="script" value="vocbills.lua"/>	<event type="think" name="VocVegettoblue" event="script" value="vocvegettoblue.lua"/>    <event type="think" name="VocGokuevo" event="script" value="vocgokuevo.lua"/>    <event type="think" name="VocFreeza" event="script" value="vocfreeza.lua"/>    <event type="think" name="VocZamasu" event="script" value="voczamasu.lua"/>    <event type="think" name="VocGogeta" event="script" value="vocgogeta.lua"/>    <event type="think" name="VocWhiss" event="script" value="vocwhiss.lua"/>    <event type="think" name="VocVados" event="script" value="vocvados.lua"/>    <event type="think" name="VocVegettoblack" event="script" value="vocvegettoblack.lua"/>    <event type="think" name="VocZeno" event="script" value="voczeno.lua"/>	<event type="think" name="RemovedorDeFrags" event="script" value="removedordefrags.lua"/>	<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>	<event type="think" name="TiraBattle" event="script" value="tirabattle.lua"/>	<event type="think" name="SemAttack" event="script" value="semattack.lua"/>		--ETC--	<event type="combat" name="NoPartyAttack" event="script" value="nopartyattack.lua"/>	<event type="receivemail" name="Mail" event="script" value="mail.lua"/>        <event type="push" name="Anti-Push" event="script" value="anti-push.lua"/>	</creaturescripts>

 

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712913
Compartilhar em outros sites

  • 0

Todos esses aqui são prováveis scripts que estejam gerando esse problema. 

  Citar
--DEATH,KILL--	<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>	<event type="death" name="PlayerDeath2" event="script" value="morte.lua"/>	<event type="death" name="Niwdeath" event="script" value="niwdeath.lua"/>	<event type="death" name="tp" event="script" value="tpmonster.lua"/>	<event type="kill" name="aloot_kill" event="script" value="aloot.lua"/>        <event type="kill" name="pvpsystem" event="script" value="pvpsystem.lua"/><event type="death" name="ProtectLevel" event="script" value="protectionlevel.lua"/>
Expand  

 

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712918
Compartilhar em outros sites

  • 0

apenas esses scripts v porque os outros eu adicionei com o bug '-' tem como voce ve esses 3 scripts para min vou deixa eles aki se ve se tem algum problema nele

<event type="death" name="Niwdeath" event="script" value="niwdeath.lua"/><event type="death" name="tp" event="script" value="tpmonster.lua"/><event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>

NiwDeath:

  Citar

local table = {
--_GOKU_--
[1] = 12788,
[2] = 12788,
[3] = 12788,
[4] = 12788,
[5] = 12835,
[6] = 12788,
[7] = 12788,
[8] = 12788

}

local config = {
--[vocation id] = { level, nova voc, looktype, efeito}
-- Goku
[2] = {1, 2, 118},
[3] = {1, 2, 116},
[4] = {1, 2, 116},
[5] = {1, 2, 121},
[6] = {1, 2, 116},
[7] = {1, 2, 116},
[8] = {1, 2, 116}

}

local function transform(pos, id, voc)
local item = getTileItemById(pos, id)
if item and item.uid > 1 then
doTransformItem(item.uid, table[voc])
doDecayItem(item.uid or 0)
end
end

function onDeath(cid, corpse)
--setPlayerStamina(cid, getPlayerStorageValue(cid, 34442))
local voc = config[getPlayerVocation(cid)]
if voc then
doPlayerSetVocation(cid, voc[1])
local outfit = {lookType = voc[2]}
doCreatureChangeOutfit(cid, outfit)
else
end
if not isPlayer(cid) or not table[getPlayerVocation(cid)] then return true end
addEvent(transform, 1, getThingPos(cid), corpse.itemid, getPlayerVocation(cid))
return true
end

Expand  

 

Tp:

  Citar

local tpId = 1387
local tps = {
    ["RB Goku SSJ4"] = {pos = {x=389, y=250, z=15}, toPos = {x=400, y=250, z=15}, time = 60}, -- Onde o Teleport irá aparecer e onde ele levará o Player. Em 'Time', configurar tempo em segundos para o TP desapecer.
    ["RB Vegeta SSJ4"] = {pos = {x=412, y=250, z=15}, toPos = {x=426, y=250, z=15}, time = 60},
    ["RB Gohan SSJ4"] = {pos = {x=438, y=250, z=15}, toPos = {x=449, y=250, z=15}, time = 60},
    ["RB Trunks SSJ4"] = {pos = {x=461, y=250, z=15}, toPos = {x=377, y=271, z=15}, time = 60},
    ["RB Raditz SSJ4"] = {pos = {x=389, y=271, z=15}, toPos = {x=400, y=271, z=15}, time = 60},
    ["RB Broly SSJ4"] = {pos = {x=412, y=271, z=15}, toPos = {x=426, y=271, z=15}, time = 60},
    ["RB Turles SSJ4"] = {pos = {x=438, y=271, z=15}, toPos = {x=449, y=271, z=15}, time = 60},
    ["RB Bardock SSJ4"] = {pos = {x=461, y=271, z=15}, toPos = {x=419, y=232, z=15}, time = 60},
    ["RB Gogeta SSJ4"] = {pos = {x=419, y=220, z=15}, toPos = {x=419, y=316, z=15}, time = 60},
    ["Porunga"] = {pos = {x=419, y=295, z=15}, toPos = {x=419, y=400, z=13}, time = 60},
    ["Fire Guardian1"] = {pos = {x=642, y=718, z=6}, toPos = {x=638, y=718, z=6}, time = 60},
    ["Fire Guardian2"] = {pos = {x=636, y=730, z=5}, toPos = {x=636, y=732, z=5}, time = 60},
    ["Fire Guardian3"] = {pos = {x=636, y=707, z=5}, toPos = {x=636, y=705, z=5}, time = 60},
    ["Hawk"] = {pos = {x=648, y=841, z=3}, toPos = {x=646, y=841, z=3}, time = 60},
    ["Warlock"] = {pos = {x=637, y=837, z=3}, toPos = {x=641, y=831, z=1}, time = 60},
    ["Titanius"] = {pos = {x=459, y=1080, z=6}, toPos = {x=361, y=1107, z=5}, time = 300},
}
 
 
function removeTp(tp)
    local t = getTileItemById(tp.pos, tpId)
    if t then
        doRemoveItem(t.uid, 1)
        doSendMagicEffect(tp.pos, CONST_ME_POFF)
    end
end

function onDeath(cid)
    local tp = tps[getCreatureName(cid)]
    if tp then
        doCreateTeleport(tpId, tp.toPos, tp.pos)
        doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
        addEvent(removeTp, tp.time*1000, tp)
        addEvent(doCreateMonster, tp.time*1001, getCreatureName(cid), tp.pos)
    end
    return TRUE
end

Expand  

 

PlayerDeath:

  Citar

local config = {
    deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')),
    sqlType = getConfigInfo('sqlType'),
    maxDeathRecords = getConfigInfo('maxDeathRecords')
}
config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
    if(config.deathListEnabled ~= TRUE) then
        return
    end
    local hitKillerName = "field item"
    local damageKillerName = ""
    if(lastHitKiller ~= FALSE) then
        if(isPlayer(lastHitKiller) == TRUE) then
            hitKillerName = getPlayerGUID(lastHitKiller)
        else
            hitKillerName = getCreatureName(lastHitKiller)
        end
        if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then
            if(isPlayer(mostDamageKiller) == TRUE) then
                damageKillerName = getPlayerGUID(mostDamageKiller)
            else
                damageKillerName = getCreatureName(mostDamageKiller)
            end
        end
    end
    db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");")
    local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
    if(rows:getID() ~= -1) then
        local amount = rows:getRows(true) - config.maxDeathRecords
        if(amount > 0) then
            if(config.sqlType == DATABASE_ENGINE_SQLITE) then
                for i = 1, amount do
                    db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
                end
            else
                db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")
            end
        end
    end
end

Expand  

 

  Em 26/02/2017 em 16:44, Poccnn disse:

Todos esses aqui são prováveis scripts que estejam gerando esse problema. 

 

Expand  

 

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712919
Compartilhar em outros sites

  • 0

É difícil verificar o erro apenas olhando o script. 

Mas muda isso no script de tp.

  Citar

return TRUE

Expand  

 

Por isso.

  Citar

return true 

Expand  

 

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712921
Compartilhar em outros sites

  • 0
  Em 26/02/2017 em 17:48, Poccnn disse:

É difícil verificar o erro apenas olhando o script. 

Mas muda isso no script de tp.

 

Por isso.

 

Expand  

 

aff man que triste o bug continua no servidor que merdaaaaaa '-'

Link para o comentário
https://xtibia.com/forum/topic/243781-cancela-spell-em-area-pz/#findComment-1712927
Compartilhar em outros sites

×
×
  • Criar Novo...