• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Problem in Arena Svar~

tarsiciooo

New Member
Joined
Apr 28, 2009
Messages
10
Reaction score
0
in the last days I noticed a very strange problem in Svargrond Arena on my server, the problem is, when you ask permission to the arena to the NPC in Svargrond, he takes your money and tell you to go, there you go through the door and time to enter the teleport you up on it and nothing happens and how the teleport not take you anywhere, i noticed that when I close and open again the server the arena back running, and after a certain time back the arena does not work, i close and open again the server and arena work again. help me

arenadoors.lua in ACTIONS:

function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if item.actionid ~= 42357 then
if (item.actionid == 42366 and getPlayerStorageValue(cid,42355) >= 1) or (item.actionid == 42376 and getPlayerStorageValue(cid,42355) >= 2) or (item.actionid == 42386 and getPlayerStorageValue(cid,42355) == 3) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not enter room.")
return TRUE
end
elseif (item.actionid == 42357 and getPlayerStorageValue(cid,42351) == 1) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must pay first.")
return TRUE
end
return FALSE
end

arenareward.lua in ACTIONS:

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid >= 42361 and item.actionid <= 42365 and getPlayerStorageValue(cid, 42361) ~= 1 then
local reward = 0
if item.actionid == 42361 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 2114, 1)
elseif item.actionid == 42362 then
reward = doCreateItemEx(7406,1)
elseif item.actionid == 42363 then
reward = doCreateItemEx(7380,1)
elseif item.actionid == 42364 then
reward = doCreateItemEx(7392,1)
elseif item.actionid == 42365 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 7365, 100)
doAddContainerItem(reward, 7364, 100)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42361, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')
end
elseif item.actionid >= 42371 and item.actionid <= 42375 and getPlayerStorageValue(cid, 42371) ~= 1 then
local reward = 0
if item.actionid == 42371 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 7183, 1)
elseif item.actionid == 42372 then
reward = doCreateItemEx(7384,1)
elseif item.actionid == 42373 then
reward = doCreateItemEx(7389,1)
elseif item.actionid == 42374 then
reward = doCreateItemEx(7415,1)
elseif item.actionid == 42375 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 7365, 100)
doAddContainerItem(reward, 2547, 100)
doAddContainerItem(reward, 2547, 100)
doAddContainerItem(reward, 2311, 50)
doAddContainerItem(reward, 2304, 50)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42371, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')
end
elseif item.actionid >= 42381 and item.actionid <= 42385 and getPlayerStorageValue(cid, 42381) ~= 1 then
local reward = 0
if item.actionid == 42381 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 6568, 1)
elseif item.actionid == 42382 then
reward = doCreateItemEx(7390,1)
elseif item.actionid == 42383 then
reward = doCreateItemEx(7434,1)
elseif item.actionid == 42384 then
reward = doCreateItemEx(7429,1)
elseif item.actionid == 42385 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 2273, 50)
doAddContainerItem(reward, 2268, 50)
doAddContainerItem(reward, 7443, 1)
doAddContainerItem(reward, 7440, 1)
doAddContainerItem(reward, 6529, 100)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42381, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')
end
end
return TRUE
end

arenakill.lua in CREATURESCRIPTS:

local t = {
newPos = {x=33062, y=31029, z=7},
msg = "You have won! As new champion take the ancient armor as reward before you leave.",
area = {
fromX = 33054, toX = 33073,
fromY = 31026, toY = 32356,
z = 3
}
}
local spheres = {
['energy overlord'] = 8568,
['fire overlord'] = 8569,
['ice overlord'] = 8570,
['earth overlord'] = 8578
}

function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers, showSummons)
local creaturesList = {}
for x = -radiusx, radiusx do
for y = -radiusy, radiusy do
if not (x == 0 and y == 0) then
creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = 253})
if (creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
table.insert(creaturesList, creature.uid)
end
end
end
end

local creature = getTopCreature(position)
if(creature.type == 1 and showPlayers == TRUE) or (creature.type == 2 and showMonsters == TRUE and (showSummons == FALSE or (showSummons == TRUE and getCreatureMaster(creature.uid) == (creature.uid)))) then
if not(table.find(creaturesList, creature.uid)) then
table.insert(creaturesList, creature.uid)
end
end
return creaturesList
end
function onKill(cid, target, damage, flags)
if isPlayer(target) or not isInArray({1, 3}, flags) or getCreatureMaster(target) then
return true
end

local name = getCreatureName(target):lower()
if name == 'tirecz' then
local players = getCreaturesInRange({x=33063, y=31035,z=3}, 10, 9, FALSE, TRUE)
for i = 1, #players do
doTeleportThing(players, t.newPos)
doCreatureSay(players, t.msg, TALKTYPE_ORANGE_1, false, players, getCreaturePosition(players))
end
return true
end

if spheres[name] then
setGlobalStorageValue(spheres[name], -1)
return true
end

local now = tasks[name]
if (now) then
if isInArray({-1, now.amount}, getPlayerStorageValue(cid, now.storage)) or (not isInArray({14003, 14004, 14005}, now.storage) and getPlayerStorageValue(cid, 14500) ~= now.storage) then
return true
end

local newValue = getPlayerStorageValue(cid, now.storage) + 1
setPlayerStorageValue(cid, now.storage, newValue)
end

local room = getArenaMonsterIdByName(getCreatureName(target))
if room > 0 then
setPlayerStorageValue(cid, room, 1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You can enter next room!')
end
return TRUE
end


arenagoblet.lua in MOVEMENTS:

function onStepIn(cid, item, position, fromPosition)
local gobletPos = getThingPos(item.uid)
if item.actionid == 42360 then
if getPlayerStorageValue(cid, 42360) ~= 1 then
setPlayerStorageValue(cid, 42360, 1)
local goblet = doCreateItemEx(5807, 1)
doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena greenhorn difficulty.\nAwarded to " .. getCreatureName(cid) .. ".")
doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet)
end
elseif item.actionid == 42370 then
if getPlayerStorageValue(cid, 42370) ~= 1 then
setPlayerStorageValue(cid, 42370, 1)
local goblet = doCreateItemEx(5806, 1)
doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena scrapper difficulty.\nAwarded to " .. getCreatureName(cid) .. ".")
doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet)
end
elseif item.actionid == 42380 then
if getPlayerStorageValue(cid, 42380) ~= 1 then
setPlayerStorageValue(cid, 42380, 1)
local goblet = doCreateItemEx(5805, 1)
doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena warlord difficulty.\nAwarded to " .. getCreatureName(cid) .. ".")
doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet)
end
end
doTransformItem(item.uid, item.itemid - 1)
return TRUE
end

function onStepOut(cid, item, pos)
doTransformItem(item.uid, item.itemid + 1)
return TRUE
end



I THINK THIS SHOULD BE THE ERROR FILE BELOW


arenaroom.lua in MOVEMENTS:

function onStepIn(cid, item, position, fromPosition)
if InitArenaScript == 0 then
InitArenaScript = 1
-- make arena rooms free
for i = 0,9 do
setGlobalStorageValue(42300+i, 0)
setGlobalStorageValue(42400+i, 0)
end
checkArenaRooms({})
end
local arena_room = item.actionid
local player_arena = getPlayerStorageValue(cid, 42355)
if getPlayerStorageValue(cid, arena_room+getPlayerStorageValue(cid, 42355)*10-1) == 1 or arena_room+getPlayerStorageValue(cid, 42355)*10-1 == 42299 then
if getGlobalStorageValue(cid, arena_room) == 0 then
local monster_uid = getGlobalStorageValue(arena_room+100)
if monster_uid > 0 then
if isCreature(monster_uid) == TRUE then
doRemoveCreature(monster_uid)
end
end
local spawn_pos = getThingPos(arena_room)
local monster = doCreateMonster(arena_monsters[arena_room+getPlayerStorageValue(cid, 42355)*10], {x=spawn_pos.x-1,y=spawn_pos.y-1,z=spawn_pos.z})
setGlobalStorageValue(arena_room+100, monster)
doTeleportThing(cid, spawn_pos, TRUE)
setGlobalStorageValue(arena_room, cid)
setGlobalStorageValue(arena_room-1, 0)
setPlayerStorageValue(cid, 42350, os.time()+arena_room_max_time)
else
doTeleportThing(cid, fromPosition, TRUE)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(getGlobalStorageValue(cid, arena_room))..' is now in next room. Wait a moment and try again.')
end
else
doTeleportThing(cid, fromPosition, TRUE)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'First kill monster!')
end
if arena_room == 42300 then
setPlayerStorageValue(cid, 42351, 0)
setPlayerStorageValue(cid, 42352, 1)
end
return TRUE
end

function checkArenaRooms(param)
addEvent(checkArenaRooms, 1000, {})
for i = 42300, 42309 do
local player = getGlobalStorageValue(i)
if isPlayer(player) == TRUE then
local player_storage = getPlayerStorageValue(player, 42350)
if player_storage <= os.time() then
doTeleportThing(player, arenaKickPosition, TRUE)
setPlayerStorageValue(player, 42350, 0)
setGlobalStorageValue(i, 0)
doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'You have been kicked from arena! You have only ' .. arena_room_max_time .. ' seconds for one room.')
elseif player_storage - 10 <= os.time() then
doPlayerSendTextMessage(player,MESSAGE_EVENT_DEFAULT,'You have ' .. player_storage - os.time() .. ' seconds to go to the next room!')
end
else
setGlobalStorageValue(i, 0)
end
end
end
 
Back
Top