• 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!

Solved LMS golden goblet reward not working...

Denziz

New Member
Joined
May 2, 2013
Messages
81
Reaction score
4
Hello, The title speaks for it self... When I win the LMS event I get a bunch of errors and a golden throphy but It aint got any description on it. Im not reciving my tokens too (ID = 6527)

Script
Code:
local t = {
tmp = {
{x = 1016, y = 1486, z = 7}, -- North west corner of Area where players must stand in order to join the event
{x = 1028, y = 1492, z = 7} -- South east corner of Area
},
arena = {
{x = 1013, y = 1459, z = 7}, -- North west Corner of Arena
{x = 1033, y = 1477, z = 7}, -- South East corner of Arena
{x = 1023, y = 1468, z = 7} -- Center of Arena
},

from = {x = 1017, y = 1463, z = 7}, -- Top left cornor of the playground (random players teleportation)
to = {x = 1029, y = 1473, z = 7}, -- Bottom right cornor of the playground (random players teleportation)

minPlayers = 2, -- min players required to start the battle
noPlayers = 1, -- Leave it as it is
prize = {6527} -- Reward that player recives
}
local kick = 0

function onThink()
local arenaPlayers = {}

for x = t.arena[1].x, t.arena[2].x do
for y = t.arena[1].y, t.arena[2].y do
for z = t.arena[1].z, t.arena[2].z do
local pos = {x = x, y = y, z = z}
local n = getTileInfo(pos).creatures
if n ~= 0 then
pos.stackpos = 1
local c = getThingfromPos(pos)
while c.uid ~= 0 do
if c.itemid == 1 and c.type == 1 then
table.insert(arenaPlayers, c.uid)
if #arenaPlayers == n then
break
end
end
pos.stackpos = pos.stackpos + 1
c = getThingfromPos(pos)
end
end
end
end
end

if #arenaPlayers == 1 then
local p = getPlayerMasterPos(arenaPlayers[1])
doTeleportThing(arenaPlayers[1], p)
doSendMagicEffect(p, CONST_ME_TELEPORT)
doPlayerSendTextMessage(arenaPlayers[1], MESSAGE_STATUS_CONSOLE_BLUE, "You have won the event and received your reward.")
doBroadcastMessage(getCreatureName(arenaPlayers[1]) .." won a Last Man Standing Event.")
local item = doPlayerAddItem(arenaPlayers[1], 7369, 1, true)
doItemSetAttribute(item, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Last Man Standing Event.")
doPlayerAddItem(arenaPlayers[1], t.prize[math.random(#t.prize)], 25)
kick = 0
elseif #arenaPlayers > 1 then
if kick == 0 then
kick = os.time()
else
if os.time() - kick >= 30 then
kick = 0
for i = 1, #arenaPlayers do
doTeleportThing(arenaPlayers[i], {x=32369, y=32241, z=7})
doPlayerSendTextMessage(arenaPlayers[i], MESSAGE_STATUS_WARNING, "Too even, try harder next time.")
end
end
end
elseif #arenaPlayers == 0 then
kick = 0

local players = {}
for x = t.tmp[1].x, t.tmp[2].x do
for y = t.tmp[1].y, t.tmp[2].y do
for z = t.tmp[1].z, t.tmp[2].z do
local c = getTopCreature({x = x, y = y, z = z})
if c.type == 1 then
table.insert(players, c.uid)
end
end
end
end

if #players >= t.minPlayers then
for i = 1, #players do
local p = {x = math.random(t.from.x, t.to.x), y = math.random(t.from.y, t.to.y), z = math.random(t.from.z, t.to.z)}
doTeleportThing(players[i], p)
doSendMagicEffect(p, CONST_ME_TELEPORT)
doPlayerSendTextMessage(players[i], MESSAGE_STATUS_WARNING, "The battle begins. Survive for glory!")
end
else
for i = 1, #players do
doTeleportThing(players[i], {x=32369, y=32241, z=7})
doPlayerSendTextMessage(players[i], MESSAGE_STATUS_WARNING, "The event didn't start because there isn't enough players in area!")
end
end
end
return true
end

ERROR:
Code:
[23/02/2014 22:50:04] [Error - GlobalEvent Interface]
[23/02/2014 22:50:04] data/globalevents/scripts/lastman.lua:onThink
[23/02/2014 22:50:04] Description:
[23/02/2014 22:50:04] (luaGetCreatureName) Creature not found

[23/02/2014 22:50:04] [Error - GlobalEvent Interface]
[23/02/2014 22:50:04] data/globalevents/scripts/lastman.lua:onThink
[23/02/2014 22:50:04] Description:
[23/02/2014 22:50:04] data/globalevents/scripts/lastman.lua:54: attempt to concatenate a boolean value
[23/02/2014 22:50:04] stack traceback:
[23/02/2014 22:50:04]     data/globalevents/scripts/lastman.lua:54: in function <data/globalevents/scripts/lastman.lua:21>
[23/02/2014 22:50:05] [Error - GlobalEvents::think] Couldn't execute event: LastMan
 
Last edited by a moderator:
Code:
local t = {
tmp = {
{x = 1016, y = 1486, z = 7}, -- North west corner of Area where players must stand in order to join the event
{x = 1028, y = 1492, z = 7} -- South east corner of Area
},
arena = {
{x = 1013, y = 1459, z = 7}, -- North west Corner of Arena
{x = 1033, y = 1477, z = 7}, -- South East corner of Arena
{x = 1023, y = 1468, z = 7} -- Center of Arena
},

from = {x = 1017, y = 1463, z = 7}, -- Top left cornor of the playground (random players teleportation)
to = {x = 1029, y = 1473, z = 7}, -- Bottom right cornor of the playground (random players teleportation)

minPlayers = 2, -- min players required to start the battle
noPlayers = 1, -- Leave it as it is
prize = {6527} -- Reward that player recives
}
local kick = 0

function onThink()
local arenaPlayers = {}

for x = t.arena[1].x, t.arena[2].x do
for y = t.arena[1].y, t.arena[2].y do
for z = t.arena[1].z, t.arena[2].z do
local pos = {x = x, y = y, z = z}
local n = getTileInfo(pos).creatures
if n ~= 0 then
pos.stackpos = 1
local c = getThingfromPos(pos)
while c.uid ~= 0 do
if c.itemid == 1 and c.type == 1 then
table.insert(arenaPlayers, c.uid)
if #arenaPlayers == n then
break
end
end
pos.stackpos = pos.stackpos + 1
c = getThingfromPos(pos)
end
end
end
end
end

if #arenaPlayers == 1 then
local p = getPlayerMasterPos(arenaPlayers[1])
doTeleportThing(arenaPlayers[1], p)
doSendMagicEffect(p, CONST_ME_TELEPORT)
doPlayerSendTextMessage(arenaPlayers[1], MESSAGE_STATUS_CONSOLE_BLUE, "You have won the event and received your reward.")
doBroadcastMessage(getCreatureName(arenaPlayers[1]) .." won a Last Man Standing Event.")
local item = doPlayerAddItem(arenaPlayers[1], 7369, 1, true)
doItemSetAttribute(item, "description", "Awarded to " .. getCreatureName(arenaPlayers[1]) .. " for winning the Last Man Standing Event.")
doPlayerAddItem(arenaPlayers[1], t.prize[math.random(#t.prize)], 25)
kick = 0
elseif #arenaPlayers > 1 then
if kick == 0 then
kick = os.time()
else
if os.time() - kick >= 30 then
kick = 0
for i = 1, #arenaPlayers do
doTeleportThing(arenaPlayers[i], {x=32369, y=32241, z=7})
doPlayerSendTextMessage(arenaPlayers[i], MESSAGE_STATUS_WARNING, "Too even, try harder next time.")
end
end
end
elseif #arenaPlayers == 0 then
kick = 0

local players = {}
for x = t.tmp[1].x, t.tmp[2].x do
for y = t.tmp[1].y, t.tmp[2].y do
for z = t.tmp[1].z, t.tmp[2].z do
local c = getTopCreature({x = x, y = y, z = z})
if c.type == 1 then
table.insert(players, c.uid)
end
end
end
end

if #players >= t.minPlayers then
for i = 1, #players do
local p = {x = math.random(t.from.x, t.to.x), y = math.random(t.from.y, t.to.y), z = math.random(t.from.z, t.to.z)}
doTeleportThing(players[i], p)
doSendMagicEffect(p, CONST_ME_TELEPORT)
doPlayerSendTextMessage(players[i], MESSAGE_STATUS_WARNING, "The battle begins. Survive for glory!")
end
else
for i = 1, #players do
doTeleportThing(players[i], {x=32369, y=32241, z=7})
doPlayerSendTextMessage(players[i], MESSAGE_STATUS_WARNING, "The event didn't start because there isn't enough players in area!")
end
end
end
return true
end
 
please next time use code tag not php :(
This, lua is not the same as php, using php tags for lua only makes it harder to read + for people who use the black theme it's harder to read because of the dark colors.
So use [ code] [ /code] instead of [ php] [ /php]
 
This, lua is not the same as php, using php tags for lua only makes it harder to read + for people who use the black theme it's harder to read because of the dark colors.
So use [ code] [ /code] instead of [ php] [ /php]
Already Told Him This Before He Doesn't Listen :)
 
ooh I didnt know that lol... So sorry guys, Wont happen again. I promise :D

But I got another problem.... When I starup my server I am getting this irritating error... "WARNING: Could not load house data". I dont know but I cant buy houses cause there aint no houses in game... How do I fix this problem? I want so players can buy houses..

Kind regards,
Denziz
 
Back
Top