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

[HOT] Last Man Standing Event!

How can I make a sudden death after x minutes? I think it get's boring when there's fewer players, so I was thinking about something like this but instead of it healing it would make damage.
 
Hi Cyko, your script of creaturescripts have one bug with summons, because not have storage and all summons of server is remove xD

Script of creaturescripts
Code:
function onThink(cid)

    local summons = getCreatureSummons(cid)
	if getPlayerStorageValue(cid, ZEA_JOIN) == 1 then -- add this line :)
		if #summons >= 1 then
			if isCreature(summons[1]) then
				doRemoveCreature(summons[1])
            end
        end
    end
	
    return true
end
 
That should not happend since its checking for storage.
 
Yes but this need storage because this script remove all summons in game. I add this line because now only remove summons of event.
 
Script has bugs in 0.3.6

@Printer

[Error - CreatureScript Interface]
[08/04/2014 16:44:15] data/creaturescripts/scripts/lms/lms.lua: OnThink
[08/04/2014 16:44:15] Description:
[08/04/2014 16:44:16] data/creaturescripts/scripts/lms/lms.lua:64: attempt to compare number with boolean
[08/04/2014 16:44:16] stack traceback:
[08/04/2014 16:44:16] data/creaturescripts/scripts/lms/lms.lua:64: in function <data/creaturescripts/scripts/lms/lms.lua:62>
 
Wow this script is so old... I could 100% optimize it and make it flawless. But i have no time.

Here is the fix for the error:
Replace whole function onThink!
Code:
function onThink(cid)
    local summons = getCreatureSummons(cid)
    if #summons > 0 and getPlayerStorageValue(cid, ZEA_JOIN) == 1 then
        for i = 1, #summons do
            doRemoveCreature(summons[i])
        end
    end
    return true
end
 
@Printer I am testing this lms on my computer, with only 2 players, but when I kill one after both have attacked each other, it always returns the message " 00:42 Last Man Standing Event finished! No one win?!?!?! WTF!" and the last player standing gets stuck in the arena.

can you help me with this please?

Thank you :)

@Edit: Never mind, I was able to figure out why. I didn't add the actionid 3333 to the teleport :( THank you for posting this great set of scripts.
 
Last edited:
@Printer and @Ray Rewind :
Mine is working fine, except for the fact that it keeps sending some error messages:

It looks something like this:
Code:
[Error - CreatureScript Interface]
[08/04/2014 16:44:15] data/creaturescripts/scripts/lms/lms.lua: OnThink
[08/04/2014 16:44:15] Description:
[08/04/2014 16:44:16] data/creaturescripts/scripts/lms/lms.lua:64: attempt to compare number with boolean
[08/04/2014 16:44:16] stack traceback:
[08/04/2014 16:44:16] data/creaturescripts/scripts/lms/lms.lua:64: in function <data/creaturescripts/scripts/lms/lms.lua:62>

and one that says that summon is not found.

how can I fix this error? for now I just erased the whole On think function but I know it will cause some problems in the future.
 
@moni111 as @Printer stated above you have to replace your onthink part with the new one from him

Code:
function onThink(cid)
    local summons = getCreatureSummons(cid)
    if #summons > 0 and getPlayerStorageValue(cid, ZEA_JOIN) == 1 then
        for i = 1, #summons do
            doRemoveCreature(summons[i])
        end
    end
    return true
end

this will fix your issue in server log
 
@Ray Rewind
I did that, but it still didn't work :( and the error just keeps showing on the server window. I removed it so that It wont keep showing, because it was spamming every minute or so when I haven't even started the event.
 
Back
Top