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

If stand in action Create Monster

cykor119

New Member
Joined
Aug 8, 2010
Messages
151
Solutions
1
Reaction score
4
If i stand on the Teleport or else (Action 1111 ) The monster has Spawn x y z.

Could someone Help me? REP++
 
data/movements/movements.xml
Code:
    <movevent type="StepIn" actionid="1111" event="script" value="monsterspawn.lua"/>

data/movement/scripts/monsterspawn.xml
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
     if item.aid == 1111 then
     doCreateMonster("demon", {x=803, y=822, z=7})
 end
  return true
 end
 
Explicited;
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

local name = "demon" -- Monster Summoned
local pos = {x=803, y=822, z=7} -- Position On Summon Monster

if item.aid == 1111 then
doCreateMonster(name, pos)
doPlayerSendTextMessage(cid, 20, "You Summoned A "..name.."")
doSendMagicEffect(pos, CONST_ME_MAGIC_RED)
end
return true
end
 
Last edited:
Explicited;
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

local name = "demon" -- Monster Summoned
local pos = {x=803, y=822, z=7} -- Position On Summon Monster

if item.aid == 1111 then
doCreateMonster(name, post)
doPlayerSendTextMessage(cid, 20, "You Summoned A "..name.."")
doSendMagicEffect(pos, CONST_ME_MAGIC_RED)
end
return true
end

Fixed
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

local name = "demon" -- Monster Summoned
local pos = {x=803, y=822, z=7} -- Position On Summon Monster

if item.aid == 1111 then
doCreateMonster(name, pos)
doPlayerSendTextMessage(cid, 20, "You Summoned A "..name.."")
doSendMagicEffect(pos, CONST_ME_MAGIC_RED)
end
return true
end
 
Back
Top