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

Movement Script [HELP]

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,775
Solutions
25
Reaction score
483
Location
Sweden
I want the script to do following:
When I walk on the tile, it summons a monsters on a position I choose, and when I walk off the tile, it creates an item on that tile. Here is my script so far:


PHP:
function onStepIn(cid, item, frompos, item2, topos, pos) 

if item.uid == 5010 then
creaturepos = {x=1211, y=588, z=12}
doSummonCreature("Warlock", creaturepos)
end 
end

wall1 = {x=1266, y=1242, z=11, stackpos=1}
getwall1 = getThingfromPos(wall1)



function onStepOut(cid, item, frompos, item2, topos, pos) 
if item.uid == 5010 then
doCreateItem(1025,1,wall1)
end
end
end

Code:
<movevent event="StepIn" uniqueid="5010" script="quest.lua"/>
<movevent event="StepOut" uniqueid="5010" script="quest.lua"/>
 
TFS version ??

fixed lua script:
Code:
function onStepIn(cid, item, position, fromPosition) 
	doSummonCreature("Warlock", {x=1211, y=588, z=12})
end

function onStepOut(cid, item, position, fromPosition) 
	doCreateItem(1025, 1, position)
end
 
TFS version ??

fixed lua script:
Code:
function onStepIn(cid, item, position, fromPosition) 
	doSummonCreature("Warlock", {x=1211, y=588, z=12})
end

function onStepOut(cid, item, position, fromPosition) 
	doCreateItem(1025, 1, position)
end


No idea, using avesta (It's probably based on OTServ)
 
Uuuhhh, forgot! Can you edit so when you walk OFF tile, the wall AND the creature summons? would b gr8!
 
Back
Top