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

Can't summon any more monster!

Binho®

KooL =D
Joined
May 27, 2008
Messages
344
Reaction score
0
Location
BrZ Style
I have this script... see.

Code:
local demonPos = { x = 16498, y = 15650, z = 12 }

function onStepIn(cid, item, position, fromPosition)
    if item.uid == 36202 and isPlayer(cid) == TRUE and getPlayerSlotItem(cid, 2).itemid == 2173 then
        doSummonCreature("Demon", demonPos)
    end
end

How do i get the Demon can't be summoned again when passing through the floor more than once?
 
I have this script... see.

Code:
local demonPos = { x = 16498, y = 15650, z = 12 }

function onStepIn(cid, item, position, fromPosition)
    if item.uid == 36202 and isPlayer(cid) == TRUE and getPlayerSlotItem(cid, 2).itemid == 2173 then
        doSummonCreature("Demon", demonPos)
    end
end

How do i get the Demon can't be summoned again when passing through the floor more than once?

woot ? you want many demons to spawn ?
 
Try one of this ?

PHP:
-- by Ates

-- start --

local monster = {
     {"demon", {x=1000, y=1000, z=7}}
}
local tile = ITEM_ID -- Write your item-id there !
local msg = "YOUE_MESSAGE."
local cant = "You need be level 30 or higher."

function onStepIn(cid, item, frompos, item2, topos)

if item.itemid == tile then
if getPlayerLevel >= 30 then
     for _, m in ipairs(monster) do
	 doSummonCreate(cid, m)
	 doCreatureSay(cid, msg, TALKTYPE_ORANGE_1)
else
if getPlayerLevel <= 30 then
	 doCreatureSay(cid, cant, TALKTYPE_ORANGE_1)
     end
return TRUE
end
end

-- end --

PHP:
-- Script by Ates (Start of script) --

function onStepIn(cid, item, frompos, item2, topos)

local move = {x=1000, y=1001, z=7}
local tile = ITEM_ID
local pos = {x=1000, y=1000, z=7}
local monster = "Demon"

if item.itemid == tile and getPlayerLevel(cid) <= 30 then
     doCreatureSay(cid, "You cant enter this tile.", TALKTYPE_ORANGE_1)
	 doMoveCreature(cid, NORTH) -- Where to move creature also if you want you can use move
else
if getPlayerLevel(cid) >=  30 then
     doCreatureSay(cid, "MESSAGE_TO_PLAYER", TALKTYPE_ORANGE_1)
	 doSummonCreature(cid, monster, pos)
	 end
	 return TRUE
end
end

-- End of script --
 
Or easier script (not optimised, but easier)
Code:
local demonPos = { x = 16498, y = 15650, z = 12 }
local storageValue = YOUR STORAGE
function onStepIn(cid, item, position, fromPosition)
    if item.uid == 36202 and isPlayer(cid) == TRUE and getPlayerSlotItem(cid, 2).itemid == 2173 then
		if getPlayerStorageValue(cid, storageValue) == 1 then
			doCreatureSay(cid, "I have already been there...", TALKTYPE_ORANGE_1)
		else
        doSummonCreature("Demon", demonPos)
		setPlayerStorageValue(cid, storage, 1)
		end
    end
end
 
Back
Top