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

{Request, impossible?} 2 monsters Vs. Lot of players

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
Hello,
My request is simple, there's a room with 2 different monsters(monster1 and monster2).
When BOTH dies a teleport appears and all team can pass on it. (teleport desapears in 30 seg).
 
I'm sure it could be modified. Add a global storage maybe when the first one dies, and then when that storage becomes 2, create the tp o.o
 
I never had a no-life like all you guys so I never got level 80 to finish inquisition. I'm still on ungreez mission. only level 72 ek xD
 
I'm sure it could be modified. Add a global storage maybe when the first one dies, and then when that storage becomes 2, create the tp o.o

I know it is modified to suit him , i am just saying

@santigg :

if the inq script include 2 monster (when the both die the tp is created) then it is my fault.
 
use my inq cause not every one contains correct brothers script
and understand that code, its not hard, and then you will be able to code that thing yourself
 
try this, not sure if it works but all I could use was notepad and functions I remember :p

LUA:
local b,c == 'Monster1','Monster2' -- boss names
local s,i = 59124,1370 -- first is globalstorage value, second is itemid of teleport.
local tpt,ctp == {x=1,y=1,z=7},{x=1,y=1,z=7} -- first is where to teleport to, second is where to create teleport.
function onKill(cid,target)
	if isPlayer(target) ~= true then
		if getCreatureName(target):lower() == b:lower() or getCreatureName(target):lower() == c:lower() then
			setGlobalStorageValue(s,getGlobalStorageValue(s)+1)
			if getGlobalStorageValue(s) < 1 or getGlobalStorageValue(s) == 0 or getGlobalStorageValue(s) == 1 then
				setGlobalStorageValue(s,1)
				doBroadcastMessage(getCreatureName(target)..' has been killed, one left.')
			elseif getGlobalStorageValue(s) == 2 then
				doCreateTeleport(itemid,tpt,ctp)
				doBroadcastMessage(getCreatureName(target)..' has been killed, teleport is created.')
				setGlobalStorageValue(s,0)
				addEvent(doRemoveTeleport,2*60*1000)
			end
		end
	end
	return true
end

function doRemoveTeleport()
	return doRemoveItem(getTileItemById(ctp,i).uid) and true
end
 
LUA:
local b,c = 'Monster1','Monster2' -- boss names
local s,i = 59124,1370 -- first is globalstorage value, second is itemid of teleport.
local tpt,ctp = {x=1,y=1,z=7},{x=1,y=1,z=7} -- first is where to teleport to, second is where to create teleport.
function onKill(cid,target)
	if isPlayer(target) ~= true then
		if getCreatureName(target):lower() == b:lower() or getCreatureName(target):lower() == c:lower() then
			setGlobalStorageValue(s,getGlobalStorageValue(s)+1)
			if getGlobalStorageValue(s) < 1 or getGlobalStorageValue(s) == 0 or getGlobalStorageValue(s) == 1 then
				setGlobalStorageValue(s,1)
				doBroadcastMessage(getCreatureName(target)..' has been killed, one left.')
			elseif getGlobalStorageValue(s) == 2 then
				doCreateTeleport(itemid,tpt,ctp)
				doBroadcastMessage(getCreatureName(target)..' has been killed, teleport is created.')
				setGlobalStorageValue(s,0)
				addEvent(doRemoveTeleport,2*60*1000)
			end
		end
	end
	return true
end
 
function doRemoveTeleport()
	return doRemoveItem(getTileItemById(ctp,i).uid) and true
end
 
Back
Top