nao seria passar o pvp tool pelo rme?
info
Grupo: Visconde
Registrado: 19/07/12
Posts: 395
Reputação: +36
Char no Tibia: Billy Poul

info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

local config = {
pvpParcent = 2,
arenaFrom = {1250, 691, 6}, -- pvp arena from x,y,z position
arenaTo = {1260, 724, 6}, -- pvp arena to x,y,z position
}
function gainExperience(cid,lastHitKiller, mostDamageKiller)
if (isPlayer(lastHitKiller) and isPlayer(mostDamageKiller)) and (lastHitKiller ~= mostDamageKiller) then
doPlayerAddExp(lastHitKiller, (getPlayerExperience(cid)/200)*config.pvpParcent)
doSendAnimatedText(getPlayerPosition(lastHitKiller), (getPlayerExperience(cid)/200)*config.pvpParcent, TEXTCOLOR_WHITE)
doPlayerAddExp(mostDamageKiller, (getPlayerExperience(cid)/200)*config.pvpParcent)
doSendAnimatedText(getPlayerPosition(mostDamageKiller), (getPlayerExperience(cid)/200)*config.pvpParcent, TEXTCOLOR_WHITE)
elseif (isPlayer(lastHitKiller) and not(isPlayer(mostDamageKiller))) then
doPlayerAddExp(lastHitKiller, (getPlayerExperience(cid)/100)*config.pvpParcent)
doSendAnimatedText(getPlayerPosition(lastHitKiller), (getPlayerExperience(cid)/100)*config.pvpParcent, TEXTCOLOR_WHITE)
elseif (not(isPlayer(lastHitKiller)) and isPlayer(mostDamageKiller)) then
doPlayerAddExp(mostDamageKiller, (getPlayerExperience(cid)/100)*config.pvpParcent)
doSendAnimatedText(getPlayerPosition(mostDamageKiller), (getPlayerExperience(cid)/100)*config.pvpParcent, TEXTCOLOR_WHITE)
end
end
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
local playerPos = getPlayerPosition(cid)
local killerPos = getPlayerPosition(lastHitKiller)
if isPlayer(cid) then
if (playerPos.x >= config.arenaFrom[1] and playerPos.x <= config.arenaTo[1]) and (playerPos.y >= config.arenaFrom[2] and playerPos.y <= config.arenaTo[2]) and (playerPos.z >= config.arenaFrom[3] and playerPos.z <= config.arenaTo[3]) then
if (killerPos.x >= config.arenaFrom[1] and killerPos.x <= config.arenaTo[1]) and (killerPos.y >= config.arenaFrom[2] and killerPos.y <= config.arenaTo[2]) and (killerPos.z >= config.arenaFrom[3] and killerPos.z <= config.arenaTo[3]) then
gainExperience(cid,lastHitKiller, mostDamageKiller)
end
end
end
return TRUE
end
info
Grupo: Artesão
Registrado: 25/03/12
Posts: 109
Reputação: +4
Char no Tibia: Kimera DebochadoOo

o thiago ta dando o seguinte erro i o player chega no 0 de hp i não morre
[spoiler] [29/07/2012 17:18:53] [Error - CreatureScript Interface] [29/07/2012 17:18:53] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath [29/07/2012 17:18:53] Description: [29/07/2012 17:18:53] (luaGetThingPosition) Thing not found [29/07/2012 17:18:53] [Error - CreatureScript Interface] [29/07/2012 17:18:53] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath [29/07/2012 17:18:53] Description: [29/07/2012 17:18:53] data/creaturescripts/scripts/pvparena.lua:25: attempt to index local 'killerPos' (a boolean value) [29/07/2012 17:18:53] stack traceback: [29/07/2012 17:18:53] data/creaturescripts/scripts/pvparena.lua:25: in function <data/creaturescripts/scripts/pvparena.lua:20> [29/07/2012 17:18:54] [Error - CreatureScript Interface] [29/07/2012 17:18:54] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath [29/07/2012 17:18:54] Description: [29/07/2012 17:18:54] (luaGetThingPosition) Thing not found [29/07/2012 17:18:54] [Error - CreatureScript Interface] [29/07/2012 17:18:55] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath [29/07/2012 17:18:55] Description: [29/07/2012 17:18:55] data/creaturescripts/scripts/pvparena.lua:25: attempt to index local 'killerPos' (a boolean value) [29/07/2012 17:18:55] stack traceback: [29/07/2012 17:18:55] data/creaturescripts/scripts/pvparena.lua:25: in function <data/creaturescripts/scripts/pvparena.lua:20>
Editado Julho 29 por Nathan96
nao seria passar o pvp tool pelo rme?
olha respota ae coisa siiples
info
Grupo: Artesão
Registrado: 25/03/12
Posts: 109
Reputação: +4
Char no Tibia: Kimera DebochadoOo

si eu usar isso o char chega em 0 de hp i é teleportado ao templo ao em veis de perde level, skill, etc.
nao entendi vc oq aconteça na sua arena pvp ?
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

eu só tinha arrumado o script
na verdade não se usa mais lastHitKiller, se usa deathList[1]
oque eu não entendi é oq essa arena faz, me explica
info
Grupo: Artesão
Registrado: 25/03/12
Posts: 109
Reputação: +4
Char no Tibia: Kimera DebochadoOo

Kara eu quero exatamente o que a script acima faz só que ela não esta funcionando ;s
@Vodkart
È so pra quem morrer nesta aria ai perder skill,level, i etc, porque com o pz tool quando chega a 0 de hp é teletransportado para o templo i volta com full health and full mana
Editado Julho 29 por Nathan96
info
Grupo: Visconde
Registrado: 19/07/12
Posts: 395
Reputação: +36
Char no Tibia: Billy Poul

se e pra perder isso td. cria 1 arena e pronto. nao bote nada :S
info
Grupo: Artesão
Registrado: 25/03/12
Posts: 109
Reputação: +4
Char no Tibia: Kimera DebochadoOo

Mas somente, exclusivamente nessa area teria um pvp sem frags, somente nela você matava o kra i não cataria frag
info
Grupo: Visconde
Registrado: 19/07/12
Posts: 395
Reputação: +36
Char no Tibia: Billy Poul

atah agora entendi. irei pesquisar aqui.
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

para não contar Frags e perder o loot, skill, level tal como vc quer:
function onKill(cid, target)
local from,to = {x = 186, y = 54, z = 7},{x = 192, y = 60, z = 7}
if isPlayer(cid) and isPlayer(target) and isInRange(getCreaturePosition(cid), from, to) then
doCreatureSetSkullType(target, 3)
addEvent(doCreatureSetSkullType, 100, cid, 0)
end
return true
end
OBS: N PODE SER EM PVP TOOL
Editado Julho 29 por Vodkart



info
Grupo: Artesão
Registrado: 25/03/12
Posts: 109
Reputação: +4
Char no Tibia: Kimera DebochadoOo
Ola galerinha do xtibia hoje venho aqui pedir um sistema que funcione claro
para distro 0.3.6
Como o titulo já diz preciso um script que faça certo local de arena, ou então que arrume o script abaixo.
[spoiler] pvpParcent = 2, arenaFrom = {1250, 691, 6}, -- pvp arena from x,y,z position arenaTo = {1260, 724, 6}, -- pvp arena to x,y,z position } function gainExperience(cid,lastHitKiller, mostDamageKiller) if (isPlayer(lastHitKiller) and isPlayer(mostDamageKiller)) and (lastHitKiller ~= mostDamageKiller) then doPlayerAddExp(lastHitKiller, (getPlayerExperience(cid)/200)*config.pvpParcent) doSendAnimatedText(getPlayerPosition(lastHitKiller), (getPlayerExperience(cid)/200)*config.pvpParcent, TEXTCOLOR_WHITE) doPlayerAddExp(mostDamageKiller, (getPlayerExperience(cid)/200)*config.pvpParcent) doSendAnimatedText(getPlayerPosition(mostDamageKiller), (getPlayerExperience(cid)/200)*config.pvpParcent, TEXTCOLOR_WHITE) elseif (isPlayer(lastHitKiller) and not(isPlayer(mostDamageKiller))) then doPlayerAddExp(lastHitKiller, (getPlayerExperience(cid)/100)*config.pvpParcent) doSendAnimatedText(getPlayerPosition(lastHitKiller), (getPlayerExperience(cid)/100)*config.pvpParcent, TEXTCOLOR_WHITE) elseif (not(isPlayer(lastHitKiller)) and isPlayer(mostDamageKiller)) then doPlayerAddExp(mostDamageKiller, (getPlayerExperience(cid)/100)*config.pvpParcent) doSendAnimatedText(getPlayerPosition(mostDamageKiller), (getPlayerExperience(cid)/100)*config.pvpParcent, TEXTCOLOR_WHITE) end end function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) local playerPos = getPlayerPosition(cid) local killerPos = getPlayerPosition(lastHitKiller) if isPlayer(cid) then if (playerPos.x >= config.arenaFrom[1] and playerPos.x <= config.arenaTo[1]) and (playerPos.y >= config.arenaFrom[2] and playerPos.y <= config.arenaTo[2]) and (playerPos.z >= config.arenaFrom[3] and playerPos.z <= config.arenaTo[3]) then if (killerPos.x >= config.arenaFrom[1] and killerPos.x <= config.arenaTo[1]) and (killerPos.y >= config.arenaFrom[2] and killerPos.y <= config.arenaTo[2]) and (killerPos.z >= config.arenaFrom[3] and killerPos.z <= config.arenaTo[3]) then gainExperience(cid,lastHitKiller, mostDamageKiller) end end end return TRUE endErro
Editado Julho 29 por Nathan96