• 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 with Last Man Standing Event!

Moataz Hero

Titania.Sytes.Net
Joined
Jan 1, 2010
Messages
417
Reaction score
11
Location
Wars Land!
Welcome everyone

I need help with Last Man Standing event
that one in otland is bugged i want an Last Man Standing event
with broadcast for example: Last Man Standing Event will start in 5 minutes
and also when event is closed the portal disspear and when the event is gonna start the magic portal apper again, also the event had an waiting room they waiting on it like from pos to pos
hope someone help me with that event!

Waiting for the event!

Edit:
i got an problems with the event kimokimo gaved me hope someone help me with it
the problem is: the event is counting numbers of the minutes to the event start and it has an waiting room and everything and when we enter in the waiting room and we waiting to start the event and fight nothing happen and we still in waiting room :(
and hope u fix that problem and i got another errors when we in waiting rooms in console!
waiting ur answer for ur help in to post in my Visitor Messages!
Waiting for the help!
 
Last edited:
Lava Titan that one is bugged its without broadcast and its not saying 3-5 minutes left and event start
hope u get for me working one
waiting for ur answer with an Fully working one with broadcast and magic portal dissaper and apper like King Of Hill Event!
 
that one he had is bugged :( so i am still looking for an working one :(

Someone help me?!

Help me omg? None help?
 
Last edited by a moderator:
I tryed to convert it to mod with more options and here what i got so far it wont work for sure didnt test iam not a good scripter but i will post it maybe someone will fix it for him.

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Last man standing" version="1.00" author="Kimo" contact="otland.net" enabled="yes">
<config name="lastmanstanding_config"><![CDATA[
config = {
	temporaryArea = {
		{x = 73, y = 135, z = 9}, -- northwest corner of area where players must stand in order to join the event
		{x = 78, y = 139, z = 9} -- south east corner
	},
	arenaArea = {
		{x = 75, y = 127, z = 9}, -- nw corner of arena
		{x = 77, y = 129, z = 9}, -- se corner of arena
		{x = 79, y = 130, z = 9} -- center of arena
	},
	fromPosition = {x = 73, y = 135, z = 9}, -- top left cornor of the playground
	toPosition = {x = 78, y = 139, z = 9}, -- bottom right cornor of the playground
	minPlayers = 2, -- min players required to start the battle
	prize = {2160, 5467}, -- rewards
	playerCount = 3334, -- Global storage for counting the players left/entered in the event
	teleportPosition = {x = 82, y = 136, z = 9, stackpos = 1}, -- Where the teleport will be created
       teleportToPosition = {x = 76, y = 137, z = 9}, -- Where the teleport will take you
       teleportId = 1387 -- Id of the teleport
}              
]]></config>
 
<globalevent name="zombieevent" interval="26000" event="script"><![CDATA[
function onThink()
        domodlib('lastmanstanding_config')
        local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition)
        doItemSetAttribute(tp, "aid", 3444)
        setGlobalStorageValue(config.playerCount, 0)
        doBroadcastMessage("Last man standing is starting in 1 minutes! The teleport will be closed when the event start!", MESSAGE_EVENT_ADVANCE)
        addEvent(StartEvent, 1 * 1000 * 10)
	 print(getGlobalStorageValue(3334))
        return true
end

function StartEvent()
      domodlib('lastmanstanding_config')
        local get = getThingfromPos(config.teleportPosition)
        if get.itemid == config.teleportId then
                doRemoveItem(get.uid, 1)
                doBroadcastMessage("Last man standing teleport have been removed ", MESSAGE_EVENT_ADVANCE)
        end
	local players, arenaPlayers = {}, {}
	for x = (config.temporaryArea)[1].x, (config.temporaryArea)[2].x do
		for y = (config.temporaryArea)[1].y, (config.temporaryArea)[2].y do
			for z = (config.temporaryArea)[1].z, (config.temporaryArea)[2].z do
				if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
					table.insert(players, getTopCreature({x = x, y = y, z = z}).uid)
				end
			end
		end
	end
	for x = (config.arenaArea)[1].x, (config.arenaArea)[2].x do
		for y = (config.arenaArea)[1].y, (config.arenaArea)[2].y do
			for z = (config.arenaArea)[1].z, (config.arenaArea)[2].z do
				if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
					table.insert(arenaPlayers, getTopCreature({x = x, y = y, z = z}).uid)
				end
			end
		end
	end
	if(table.maxn(arenaPlayers) == 1) then
		doTeleportThing(arenaPlayers[1], getPlayerMasterPos(arenaPlayers[1]))
		doSendMagicEffect(getPlayerMasterPos(arenaPlayers[1]), CONST_ME_TELEPORT)
		doPlayerSendTextMessage(arenaPlayers[1], MESSAGE_STATUS_CONSOLE_BLUE, "You win a battle and recived your reward.")
		doBroadcastMessage("".. getCreatureName(arenaPlayers[1]) .." win a battle and recived your reward.")
		doPlayerAddItem(arenaPlayers[1], (config.prize)[math.random(1, table.maxn(config.prize))], 20)
	elseif(table.maxn(arenaPlayers) < 1) then
        if getGlobalStorageValue(config.playerCount) < minPlayers then
		if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then
			pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)}
				doTeleportThing(players[i], pos)
				doSendMagicEffect((config.arenaArea)[3], CONST_ME_TELEPORT)
				doPlayerSendTextMessage(players[i], MESSAGE_STATUS_WARNING, "The battle begins. Survive for glory!")
			end
		else
	return true
end
end
end
]]></globalevent>

<movevent type="StepIn" actionid="3444" event="script"><![CDATA[
local config = {
        playerCount = 3334, -- Global storage for counting the players in the event
        maxPlayers = 20 -- Max players who can participate
}
 
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
        domodlib('lastmanstanding_config')
        if getGlobalStorageValue(config.playerCount) < config.maxPlayers then
                        setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1)
                                if getGlobalStorageValue(config.playerCount) == config.maxPlayers then
                                        doBroadcastMessage("Last man standing event is now full [" .. getGlobalStorageValue(config.playerCount) .. " players]! The event will soon start.")
                                else
                        setPlayerStorageValue(cid,7777, getPlayerStorageValue(cid,7777)+1)
                        doBroadcastMessage(getPlayerName(cid) .. " entered last man standing event! Currently " .. getGlobalStorageValue(config.playerCount) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)
                end
        else
                doTeleportThing(cid, fromPosition)
                doPlayerSendCancel(cid, "The event is full. There is already " .. config.maxPlayers .. " players participating in the event.")
                return false
        end
                print(getGlobalStorageValue(config.playerCount) .. " Players in catch the item event.")
        return true
end
]]></movevent>
</mod>
 
Last edited:
BIG THANKS TO KimoKimo
Someone of scripters fix it guys!
waiting for helping of scripters!

Guys help me to fix that lms event!!!
Please help me guys please!!!
 
Last edited by a moderator:
still looking for help from best scripters!

Guys help me to fix that script!

Still waiting for the fixer to reply :(
 
Last edited by a moderator:
The information you have on the thread is not enough for people to help you, please post as much information as you can, what exactly happens and if there are any console errors, post those too
 
lol i've catched the bug, it was in the mod in globalevent named Zombievent loool! i've changed it to Last Man Standing LOL!
but didn't tested the event now because i am adding the action id 3444 in every ground in the waiting room!
hope it works! if it works i'll post here, and if it bugged or so i'll post it here too!
 
replace ur startEvent code with this one:

Lua:
function StartEvent()      domodlib('lastmanstanding_config')
        local get = getThingfromPos(config.teleportPosition)
        if get.itemid == config.teleportId then
                doRemoveItem(get.uid, 1)
                doBroadcastMessage("Last man standing teleport have been removed ", MESSAGE_EVENT_ADVANCE)
        end
    local players, arenaPlayers = {}, {}
    for x = config.temporaryArea[1].x, config.temporaryArea[2].x do
        for y = config.temporaryArea[1].y, config.temporaryArea[2].y do
            for z = config.temporaryArea[1].z, config.temporaryArea[2].z do
                if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
                    table.insert(players, getTopCreature({x = x, y = y, z = z}).uid)
                end
            end
        end
    end
    for x = config.arenaArea[1].x, config.arenaArea[2].x do
        for y = config.arenaArea[1].y, config.arenaArea[2].y do
            for z = config.arenaArea[1].z, config.arenaArea[2].z do
                if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
                    table.insert(arenaPlayers, getTopCreature({x = x, y = y, z = z}).uid)
                end
            end
        end
    end
    if(table.maxn(arenaPlayers) == 1) then
        doTeleportThing(arenaPlayers[1], getPlayerMasterPos(arenaPlayers[1]))
        doSendMagicEffect(getPlayerMasterPos(arenaPlayers[1]), CONST_ME_TELEPORT)
        doPlayerSendTextMessage(arenaPlayers[1], MESSAGE_STATUS_CONSOLE_BLUE, "You win a battle and recived your reward.")
        doBroadcastMessage("".. getCreatureName(arenaPlayers[1]) .." win a battle and recived your reward.")
        doPlayerAddItem(arenaPlayers[1], (config.prize)[math.random(1, table.maxn(config.prize))], 20)
    elseif(table.maxn(arenaPlayers) < 1) then
        if getGlobalStorageValue(config.playerCount) < minPlayers then
        if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then
            pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)}
                doTeleportThing(players[i], pos)
                doSendMagicEffect((config.arenaArea)[3], CONST_ME_TELEPORT)
                doPlayerSendTextMessage(players[i], MESSAGE_STATUS_WARNING, "The battle begins. Survive for glory!")
            end
        else
            return true
        end
    end
end
it probably still wont work, and i dont have a server to test, so if it still has errors, reply with them

and stop asking for help in every post, its annoying, you already asked for help by creating this thread, no point in continuing asking for it -.-'
 
*brings magic ball that can see the errors in your console*
Incase you haven't understood, we cannot help you unless you tell us what the errors actually are, if they are the same as the ones before, TELL US THAT!!
 
its spamming and when we enter in waiting room and the minute gone then we not teleported to the real event to fight :(
i want it works fully :( help me Scarlet!
 
Im sorry for stealing this thread, but my problem is that there is no teleport.

This appears in the console:

[Error - LuaScriptInterface::loadFile] data/globalevents/scripts/lms.lua:1: unexpected symbol near '?'

[Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/lms.lua)

data/globalevents/scripts/lms.lua:1: unexpected symbol near '?'


And ive tryed to delete the '?' but it just keep giving me more errors, and it still dont work..

Abbe
 
Back
Top