• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

easy script

Jikoe II

Member
Joined
Feb 7, 2009
Messages
174
Reaction score
9
Could someone make a script that will summon 2 monsters north from you when stepping on x tile, and remove the monsters when moving off the tile?

thanks
/jikoe
 
Up:
LUA:
function onStepIn(cid, item, pos)
local charPos = getCreaturePosition(cid)
local monkOne
local monkTwo

if(item.actionid == 9000) then
monkOne = {x = charPos.x - 1, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x + 1, y = charPos.y - 1, z = charPos.z}

elseif(item.actionid == 9001) then
monkOne = {x = charPos.x - 1, y = charPos.y + 2, z = charPos.z}
monkTwo = {x = charPos.x + 1, y = charPos.y + 2, z = charPos.z}

elseif(item.actionid == 9002) then
monkOne = {x = charPos.x - 2, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x -2, y = charPos.y + 1, z = charPos.z}

elseif(item.actionid == 9003) then
monkOne = {x = charPos.x + 2, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x + 2, y = charPos.y + 1, z = charPos.z}

else
return true
end

doSummonCreature("Target", monkOne)
doSummonCreature("Target", monkTwo)
return true
end

function onStepOut(cid, item, pos)
local charPos = getCreaturePosition(cid)
local monkOne
local monkTwo

if(item.actionid == 9000) then
monkOne = {x = charPos.x - 1, y = charPos.y - 2, z = charPos.z}
monkTwo = {x = charPos.x + 1, y = charPos.y - 2, z = charPos.z}

elseif(item.actionid == 9001) then
monkOne = {x = charPos.x - 1, y = charPos.y + 2, z = charPos.z}
monkTwo = {x = charPos.x + 1, y = charPos.y + 2, z = charPos.z}

elseif(item.actionid == 9002) then
monkOne = {x = charPos.x - 2, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x -2, y = charPos.y + 1, z = charPos.z}

elseif(item.actionid == 9003) then
monkOne = {x = charPos.x + 2, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x + 2, y = charPos.y + 1, z = charPos.z}

else
return true
end

doRemoveCreature(getThingfromPos({x = monkOne.x, y = monkOne.y, z = monkOne.z, stackpos = 253}).uid)
doRemoveCreature(getThingfromPos({x = monkTwo.x, y = monkTwo.y, z = monkTwo.z, stackpos = 253}).uid)
doSendMagicEffect(monkOne, 7)
doSendMagicEffect(monkTwo, 7)
return true
end

Down

LUA:
function onStepIn(cid, item, pos)
local charPos = getCreaturePosition(cid)
local monkOne
local monkTwo

if(item.actionid == 9000) then
monkOne = {x = charPos.x - 1, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x + 1, y = charPos.y - 1, z = charPos.z}

elseif(item.actionid == 9001) then
monkOne = {x = charPos.x - 1, y = charPos.y + 2, z = charPos.z}
monkTwo = {x = charPos.x + 1, y = charPos.y + 2, z = charPos.z}

elseif(item.actionid == 9002) then
monkOne = {x = charPos.x - 2, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x -2, y = charPos.y + 1, z = charPos.z}

elseif(item.actionid == 9003) then
monkOne = {x = charPos.x + 2, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x + 2, y = charPos.y + 1, z = charPos.z}

else
return true
end

doSummonCreature("Target", monkOne)
doSummonCreature("Target", monkTwo)
return true
end

function onStepOut(cid, item, pos)
local charPos = getCreaturePosition(cid)
local monkOne
local monkTwo

if(item.actionid == 9000) then
monkOne = {x = charPos.x - 1, y = charPos.y - 2, z = charPos.z}
monkTwo = {x = charPos.x + 1, y = charPos.y - 2, z = charPos.z}

elseif(item.actionid == 9001) then
monkOne = {x = charPos.x - 1, y = charPos.y + 2, z = charPos.z}
monkTwo = {x = charPos.x + 1, y = charPos.y + 2, z = charPos.z}

elseif(item.actionid == 9002) then
monkOne = {x = charPos.x - 2, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x -2, y = charPos.y + 1, z = charPos.z}

elseif(item.actionid == 9003) then
monkOne = {x = charPos.x + 2, y = charPos.y - 1, z = charPos.z}
monkTwo = {x = charPos.x + 2, y = charPos.y + 1, z = charPos.z}

else
return true
end

doRemoveCreature(getThingfromPos({x = monkOne.x, y = monkOne.y, z = monkOne.z, stackpos = 253}).uid)
doRemoveCreature(getThingfromPos({x = monkTwo.x, y = monkTwo.y, z = monkTwo.z, stackpos = 253}).uid)
doSendMagicEffect(monkOne, 7)
doSendMagicEffect(monkTwo, 7)
return true
end
 
Back
Top