function onKill(cid, target)
local monster = getCreatureName(target)
local room = getArenaMonsterIdByName(monster)
if room > 0 then
setPlayerStorageValue(cid, room, 1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'Mozesz wejsc do kolejnego pokoju areny!')
end
end
If you have bug with last arena room that teleport is not working but it was written that you have done arena level, replace your /movements/scripts/didarenalevel.lua with mine (I am posting it for free, rep+?):
Code:function onStepIn(cid, item, pos, fromPosition) local arenaLeave = {x=1045, y=889, z=6} if getPlayerStorageValue(cid, item.actionid+getPlayerStorageValue(cid, 42355)*10-1) == 1 then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'You have done your challenge on the level '.. getPlayerStorageValue(cid, 42355)+1 ..'! Go ahead and choose your reward.') setPlayerStorageValue(cid, 42355, getPlayerStorageValue(cid, 42355)+1) --did arena level X setPlayerStorageValue(cid, item.actionid+getPlayerStorageValue(cid, 42355)*10, 1) --did arena level X setGlobalStorageValue(item.actionid-1, 0) -- room free setPlayerStorageValue(cid, 42350, os.time()+5) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena doTeleportThing(cid, arenaLeave, TRUE) else doTeleportThing(cid, fromPosition, TRUE) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'Kill the monster first!') end return TRUE end
local arenaLeave = {x=1045, y=889, z=6}
put there XYZ of tile when player should be teleported after COMPLETING arena level.
[20/01/2009 20:42:29] Warning: [Event::loadScript] Can not load script. data/movements/scripts/didarenalevel.lua
[20/01/2009 20:42:29] data/movements/scripts/didarenalevel.lua:1: '=' expected near 'onStepIn'
[20/01/2009 20:42:29] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/login.lua
[20/01/2009 20:42:29] data/creaturescripts/scripts/login.lua:38: 'end' expected (to close 'function' at line 1) near '<eof>'
[20/01/2009 20:48:15] Lua Script Error: [MoveEvents Interface]
[20/01/2009 20:48:15] data/movements/scripts/leavearena.luanStepIn
[20/01/2009 20:48:15] attempt to index a nil value
[20/01/2009 20:48:15] stack traceback:
[20/01/2009 20:48:15] [C]: in function 'doTeleportThing'
[20/01/2009 20:48:15] data/movements/scripts/leavearena.lua:20: in function <data/movements/scripts/leavearena.lua:1>
Change your kill.lua to this.
function onKill(cid, target)
local monster = getCreatureName(target)
local room = getArenaMonsterIdByName(monster)
if room > 0 then
setPlayerStorageValue(cid, room, 1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT, 'Mozesz wejsc do kolejnego pokoju areny!')
end
return TRUE
end
arenaKickPosition = {x=XXXX, y=YYYY, z=Z}
@up
Perhaps this is your fault.
@to all with bug with Gesior's arena (when player finishes arena he isn't teleported)
this bug is caused because development have separated global.lua into other lua files.
there is one value which is supposed to be in global
Code:arenaKickPosition = {x=XXXX, y=YYYY, z=Z}
MOVE it from functions.lua to constant.lua, and it should work. I have posted some time ago fix in didarenalevel.lua but it also need edit of more files. But you can leave didarenalevel.lua like it is, it doesn't matter.
[21/01/2009 09:33:25] Lua Script Error: [CreatureScript Interface]
[21/01/2009 09:33:25] data/creaturescripts/scripts/kill.lua:onKill
[21/01/2009 09:33:25] data/creaturescripts/scripts/kill.lua:3: attempt to call global 'getArenaMonsterIdByName' (a nil value)
[21/01/2009 09:33:25] stack traceback:
[21/01/2009 09:33:25] data/creaturescripts/scripts/kill.lua:3: in function <data/creaturescripts/scripts/kill.lua:1>
return TRUE
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/arenaroom.lua:onStepIn
luaDoSummonCreature(). Monster name() not found
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/arenaroom.lua:onStepIn
luaDoSummonCreature(). Monster name() not found
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/arenaroom.lua:onStepIn
luaDoSummonCreature(). Monster name() not found
got all monsters and i killed all monsters all arenas but cant get to final roomYou dont have the monsters or?