Ir para conteúdo
  • 0

[Mod]Arena Svargrond Do Demonbholder


milbradt

Pergunta

Olá, eu até postei no topico dele la.. creio que não esta errado abrir um topico com uma duvida sobre o mod do demonbholder.

 

Para quem não sabe o MOD é esse:

 

<?xml version="1.0" encoding="UTF-8"?>

<mod name="Arena Svargrond" enabled="yes" author="Demonbholder" forum="XTibia.com">

<config name="ArenaLib"><![CDATA[

dinheiro = 10000

storage = 47000

storage2 = 47001

playerpos = {x=151, y=48, z=7} -- posicao da arena

trofypos = {x=151, y=48, z=7} -- posicao da area apos a arena

monpos = {x=151, y=48, z=7} -- posicao onde o monstro sera criado

monsters = {

[0] = 'rat',

[1] = 'dwarf',

[2] = 'minotaur guard',

[3] = 'demon skeleton',

[4] = 'dragon',

[5] = 'vampire',

[6] = 'giant spider',

[7] = 'dragon lord',

[8] = 'warlock',

[9] = 'demon'

}

function doRemoveCorpse(pos)

for i = 1, 255 do

corp = {x=pos.x, y=pos.y, z=pos.z, stackpos=i}

if isCorpse(getThingFromPos(corp).uid) then

break

end

end

doRemoveItem(getThingFromPos(corp).uid, 1)

end

]]></config>

<creaturescript type="death" name="Arena" event="script"><![CDATA[

domodlib('ArenaLib')

if isPlayer(deathList[1]) and isMonster(cid) then

if getPlayerStorageValue(deathList[1], storage) > -1 and getPlayerStorageValue(deathList[1], storage) < 10 then

setPlayerStorageValue(deathList[1], storage, getPlayerStorageValue(deathList[1], storage) + 1)

addEvent(doRemoveCorpse, 500, getCreaturePosition(cid))

setPlayerStorageValue(deathList[1], storage2, -1)

end

if getPlayerStorageValue(deathList[1], storage) == 10 then

doTeleportThing(deathList[1], trofypos)

end

end

return TRUE

]]></creaturescript>

<creaturescript type="kill" name="ArenaK" event="script"><![CDATA[

domodlib('ArenaLib')

if isMonster(cid) and isPlayer(target) then

if getPlayerStorageValue(target, storage) > -1 and getPlayerStorageValue(target, storage) < 10 then

setPlayerStorageValue(target, storage, -1)

setPlayerStorageValue(target, storage2, -1)

doRemoveCreature(cid)

addEvent(doRemoveCorpse, 500, getCreaturePosition(target))

end

end

return TRUE

]]></creaturescript>

<creaturescript type="logout" name="ArenaL" event="script"><![CDATA[

domodlib('ArenaLib')

if getPlayerStorageValue(cid, storage) > -1 and getPlayerStorageValue(cid, storage) < 10 then

return FALSE, doPlayerSendCancel(cid, "You can't logout during arena!")

end

return TRUE

]]></creaturescript>

<movevent type="StepIn" actionid="40000" event="script"><![CDATA[

domodlib('ArenaLib')

if monsters[getPlayerStorageValue(cid, storage)] then

if getPlayerStorageValue(cid, storage2) == -1 then

local mon = doCreateMonster(monsters[getPlayerStorageValue(cid, storage)], monpos)

setPlayerStorageValue(cid, storage2, 1)

registerCreatureEvent(mon, "Arena")

registerCreatureEvent(mon, "ArenaK")

end

end

return TRUE

]]></movevent>

<movevent type="StepIn" actionid="40001" event="script"><![CDATA[

domodlib('ArenaLib')

for _, pid in pairs(getPlayersOnline()) do

if (getPlayerStorageValue(pid, storage) > -1 and getPlayerStorageValue(pid, storage) < 10) or getPlayerStorageValue(cid, storage) == 10 then

return TRUE, doTeleportThing(cid, fromPosition)

end

end

if getPlayerMoney(cid) < dinheiro then

return TRUE, doTeleportThing(cid, fromPosition), doPlayerSendCancel(cid, "Voce nao tem dinheiro.")

end

doPlayerRemoveMoney(cid, dinheiro)

setPlayerStorageValue(cid, storage, 0)

doPlayerSendTextMessage(cid, 4, "Arena Svargrond!")

return TRUE, doTeleportThing(cid, playerpos)

]]></movevent>

</mod>

 

 

Então, o erro que percebi no mod:

Obviamente quando alguem esta fazendo a quest ninguem pode entrar, apenas quando quem estiver dentro morrer ou terminar!

 

Porem, só podera uma outra pessoar entrar dentro da arena quando esse personagem quem es a quest primeiro estiver OFFLINE!

 

Segue logo abaixo o link do topico do script:

http://www.xtibia.com/forum/topic/155518-tibia-quests/

 

Alguem sabe o que pode estar errado? E tem como Arrumar? Sei que não é facil não..^^

Vlw!

Editado por milbradt
Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Teste assim:

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Arena Svargrond" enabled="yes" author="Demonbholder" forum="XTibia.com">
<config name="ArenaLib"><![CDATA[
dinheiro = 10000
storage = 47000
storage2 = 47001
playerpos = {x=151, y=48, z=7} -- posicao da arena
trofypos = {x=151, y=48, z=7} -- posicao da area apos a arena
monpos = {x=151, y=48, z=7} -- posicao onde o monstro sera criado
fromPos,toPos = {x=1,y=1,z=1},{x=1,y=1,z=1} -- posição do canto superior direito, posição do canto inferior esquerdo da arena
monsters = {
[0] = 'rat',
[1] = 'dwarf',
[2] = 'minotaur guard',
[3] = 'demon skeleton',
[4] = 'dragon',
[5] = 'vampire',
[6] = 'giant spider',
[7] = 'dragon lord',
[8] = 'warlock',
[9] = 'demon'
}
function doRemoveCorpse(pos)
for i = 1, 255 do
corp = {x=pos.x, y=pos.y, z=pos.z, stackpos=i}
if isCorpse(getThingFromPos(corp).uid) then
break
end
end
doRemoveItem(getThingFromPos(corp).uid, 1)
end
]]></config>
<creaturescript type="death" name="Arena" event="script"><![CDATA[
domodlib('ArenaLib')
if isPlayer(deathList[1]) and isMonster(cid) then
if getPlayerStorageValue(deathList[1], storage) > -1 and getPlayerStorageValue(deathList[1], storage) < 10 then
setPlayerStorageValue(deathList[1], storage, getPlayerStorageValue(deathList[1], storage) + 1)
addEvent(doRemoveCorpse, 500, getCreaturePosition(cid))
setPlayerStorageValue(deathList[1], storage2, -1)
end
if getPlayerStorageValue(deathList[1], storage) == 10 then
doTeleportThing(deathList[1], trofypos)
end
end
return TRUE
]]></creaturescript>
<creaturescript type="kill" name="ArenaK" event="script"><![CDATA[
domodlib('ArenaLib')
if isMonster(cid) and isPlayer(target) then
if getPlayerStorageValue(target, storage) > -1 and getPlayerStorageValue(target, storage) < 10 then
setPlayerStorageValue(target, storage, -1)
setPlayerStorageValue(target, storage2, -1)
doRemoveCreature(cid)
addEvent(doRemoveCorpse, 500, getCreaturePosition(target))
end
end
return TRUE
]]></creaturescript>
<creaturescript type="logout" name="ArenaL" event="script"><![CDATA[
domodlib('ArenaLib')
if getPlayerStorageValue(cid, storage) > -1 and getPlayerStorageValue(cid, storage) < 10 then
return FALSE, doPlayerSendCancel(cid, "You can't logout during arena!")
end
return TRUE
]]></creaturescript>
<movevent type="StepIn" actionid="40000" event="script"><![CDATA[
domodlib('ArenaLib')
if monsters[getPlayerStorageValue(cid, storage)] then
if getPlayerStorageValue(cid, storage2) == -1 then
local mon = doCreateMonster(monsters[getPlayerStorageValue(cid, storage)], monpos)
setPlayerStorageValue(cid, storage2, 1)
registerCreatureEvent(mon, "Arena")
registerCreatureEvent(mon, "ArenaK")
end
end
return TRUE
]]></movevent>
<movevent type="StepIn" actionid="40001" event="script"><![CDATA[
domodlib('ArenaLib')
for x = fromPos.x, toPos.x do
for y = fromPos.y,toPos.y do
local m = getTopCreature({x=x, y=y, z=fromPos.z}).uid
if m~= 0 and isPlayer(m) then
doTeleportThing(cid, fromPosition, true)
return doPlayerSendCancel(cid, "Alguem esta na arena.")
end
end
end
if getPlayerMoney(cid) < dinheiro then
return TRUE, doTeleportThing(cid, fromPosition), doPlayerSendCancel(cid, "Voce nao tem dinheiro.")
end
doPlayerRemoveMoney(cid, dinheiro)
setPlayerStorageValue(cid, storage, 0)
doPlayerSendTextMessage(cid, 4, "Arena Svargrond!")
return TRUE, doTeleportThing(cid, playerpos)
]]></movevent>
</mod>

 

 

 

Edite em:

fromPos,toPos = {x=1,y=1,z=1},{x=1,y=1,z=1} -- posição do canto superior direito, posição do canto inferior esquerdo da arena.

 

Espero ter ajudado.

Editado por Leoxtibia
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...