Hello,
im looking for arena PVP for tfs 0.3.6 [8.54], and i not found anything :F
Someone can give me that script?
Thanks,
Erexo.
@Edit:
i have that scirpt
but error:
and when someone leave arena, they cant to be kill'ed...
im looking for arena PVP for tfs 0.3.6 [8.54], and i not found anything :F
Someone can give me that script?
Thanks,
Erexo.
@Edit:
i have that scirpt
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Arena Play Ground" enabled="yes">
<config name="arena_config"><![CDATA[
config = {
oldPosition = {
{x = 975, y = 449, z = 7},
{x = 975, y = 451, z = 7}
},
newPosition = {
{x = 959, y = 454, z = 7},
{x = 972, y = 445, z = 7}
},
arena = {
fromPos = {x = 959, y = 445, z = 7},
toPos = {x = 972, y= 454, z = 7}
}
}
]]></config>
<event type="login" name="arena_login" event="script"><![CDATA[
return registerCreatureEvent(cid, "arena_dead")
]]></event>
<event type="statschange" name="arena_dead" event="script"><![CDATA[
domodlib("arena_config")
if type == 1 and getCreatureHealth(cid) <= value and isCreature(attacker) and isPlayer(cid) then
if isInRange(getThingPos(cid), config.arena.fromPos, config.arena.toPos) then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid), false)
doCreatureAddMana(cid, getCreatureMaxMana(cid), false)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
return false
end
end
return true
]]></event>
<action uniqueid="7001" event="script"><![CDATA[
domodlib("arena_config")
if item.itemid == 1945 then
return doTransformItem(item.uid, 1946)
end
local players = {}
for _, old in ipairs(config.oldPosition) do
local creature = getTopCreature(old).uid
if isPlayer(creature) then
table.insert(players, creature)
end
end
if #players ~= 2 then
return doPlayerSendTextMessage(cid, 27, "You need 2 players to start.")
end
for i, player in ipairs(players) do
doSendMagicEffect(getThingPos(player), CONST_ME_POFF)
doTeleportThing(player, config.newPosition[i], true)
doSendMagicEffect(config.newPosition[i], CONST_ME_TELEPORT)
end
doTransformItem(item.uid, 1945)
return true
]]></action>
</mod>
but error:
Code:
[Error - CreatureScript Interface]
buffer:onStatsChange
Description:
data/lib/032-position.lua:2: attempt to index global 'position' (a nil value)
stack traceback:
data/lib/032-position.lua:2: in function 'isInRange'
[string "loadBuffer"]:4: in function <[string "loadBuffer"]:1>
and when someone leave arena, they cant to be kill'ed...
Last edited: