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

Private spawns

Death-Pulse

Owner of Death-Pulse
Joined
May 10, 2014
Messages
100
Reaction score
0
How would i made this summon as many monsters as you want

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local fromPos = {x = toPosition.x - 10, y = toPosition.y - 10, z = toPosition.z}
local toPos = {x = toPosition.x + 10, y = toPosition.y + 10, z = toPosition.z}

local amount = 0
for x = fromPos.x, toPos.x do
for y = fromPos.y, toPos.y do
for z = fromPos.z, toPos.z do
local monster = getTopCreature({x=x,y=y,z=z}).uid
if(isCreature(monster) == TRUE) then
if getCreatureName(monster) == "Orshabaal" then
amount = amount+1
end
end
end
end
end

if amount >= 1 then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
doPlayerSendCancel(cid, "You need to kill Orshabaal first before you can summon one again.")
return true
else
doSummonCreature("Orshabaal", {x = toPosition.x - 10, y = toPosition.y + 10, z = toPosition.z})
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have summoned a Orshabaal.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
end
return true
end

It only summons 1 monster by a hit of a lever then u have to kill 1 before u can use again
 
Last edited by a moderator:
try it. If not, just delete the
if amount >=1 (this is what checks if theres 1 monster so it won't let you spawn another)
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local fromPos = {x = toPosition.x - 10, y = toPosition.y - 10, z = toPosition.z}
local toPos = {x = toPosition.x + 10, y = toPosition.y + 10, z = toPosition.z}

doSummonCreature("Orshabaal", {x = toPosition.x - 10, y = toPosition.y + 10, z = toPosition.z})
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have summoned a Orshabaal.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
return true
end
 
How can i make a item that will give them access to this private spawn area for 3 hours? when ever they use the item it teleports them to a private spawn for 3 hours but after the 3 hours they do not have access to it and gets teleported out to their temple..
 
Last edited:
Back
Top