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

Summon monster on wall use, not working

yosh

Coder+Mapper+G.Designer
Joined
Dec 14, 2010
Messages
33
Reaction score
1
Well i took this script from rescue the princess post so credits go to him. I adapted it so it would on use of a wall the wall should disappear, but it's simply not working.

using The Forgotten Server - Version 0.2.9 (Mystic Spirit).

Here is the script

PHP:
local wallpos = {x=482, y=548, z=7, stackpos=1}
local wallid = 9119
local timetoreset = 10000
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local getwall = getTileItemById(wallpos, wallid).uid
 
	if item.itemid == 9119 and item.uid == 4039 then
		doPlayerSendTextMessage(cid, 22, 'Watch out for my demons!')
		doSummonCreature("Demon", spawnpos)
		doSendMagicEffect(wallpos, CONST_ME_BATS)
		doRemoveItem(getwall)
		addEvent(returnwall, timetoreset)
	end
end
 
function returnwall()
doCreateItem(wallid, wallpos)
end
 
stackpos 255 you need this on the monsters spawn point.. Also i dont see a local for the spawn point.

- - - Updated - - -

Lua:
local wallpos = {x=482, y=548, z=7, stackpos=1}
local wallid = 9119
local timetoreset = 10000

local demonPos = {x=482, y=548, z=7, stackpos=255}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local getwall = getTileItemById(wallpos, wallid).uid
 
    if item.itemid == 9119 and item.uid == 4039 then
        doPlayerSendTextMessage(cid, 22, 'Watch out for my demons!')
        doSummonCreature("Demon", demonPos)
        doSendMagicEffect(wallpos, CONST_ME_BATS)
        doRemoveItem(wallpos, wallid)
        addEvent(returnwall, timetoreset)
    end
end
 
local function returnwall
doCreateItem(wallid, wallpos)
end
 
Try this.

Lua:
local wallpos = {x=482, y=548, z=7}
local wallid = 9119
local timetoreset = 10000
 
local demonPos = {x=482, y=548, z=7}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == 9119 and item.uid == 4039 then
        doPlayerSendTextMessage(cid, 22, 'Watch out for my demons!')
        doRemoveItem(wallpos, wallid)
		doSendMagicEffect(wallpos, CONST_ME_BATS)
		doSummonCreature("Demon", demonPos)
        addEvent(returnwall, timetoreset)
    end
end
 
local function returnwall
doCreateItem(wallid, wallpos)
end
 

Similar threads

  • Question
RevScripts Summon Item
Replies
8
Views
669
Back
Top