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

Lua Make an item id walkable if it has a action id

Ahilphino

Excellent OT User
Joined
Jun 5, 2013
Messages
1,667
Solutions
1
Reaction score
734
I would like to make the item 22767 walkable but only if it has the action id 5529 assigned to it.
Is this possible do with a movement script, and if so which function would I need to use?

I know its possible to do this by editing the items.otb file but then it always becomes walkable even if it doesnt have any action id
 
I have tried to get help with things like this many times. There a certain things I think Otland will not help you with because it would allow you to do "to much". They keep things like this reserved for "special" clients.
 
Make it walkable in items.otb, make a movement script:
Code:
<movevent event="StepIn" itemid="22767" script="yourscript.lua"/>

Code:
function onStepIn(creature, item, position, fromPosition)
if item.actionid == 5529 then
return true
end
return false
end

Can't see why @Itutorial is being so grumpy :p
 
Make it walkable in items.otb, make a movement script:
Code:
<movevent event="StepIn" itemid="22767" script="yourscript.lua"/>

Code:
function onStepIn(creature, item, position, fromPosition)
if item.actionid == 5529 then
return true
end
return false
end

Can't see why @Itutorial is being so grumpy :p

oh wow can't believe I didn't think of this myself
ty :)
 
Simple workaround, can't believe I didn't think of this myself lol
I'm not sure it could be done without an otb edit, because I don't know if StepIn is called when attempting to walk on unwalkable squares. This way is probably the simplest and maybe the only real way to make it work without source edits
 

Similar threads

Back
Top