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

How to Differentiate Revscript MoveEvent.onStepIn with Multiples AIDs

sururuts

Active Member
Joined
Sep 14, 2010
Messages
79
Reaction score
45
I want to be able to know which AID the player is stepping, when there is multiples AIDs registered in the same revscript code

is it possible to use the aid to know where the player is stepping in?
how can I do it?

The example code is being used just to illustrate what I wanna do.
Lua:
local mv = MoveEvent()
function mv.onStepIn(creature, item, position, fromPosition)
    if item.aid == 33560 then -- this doesn't work
        position:sendMagicEffect(777)
    elseif item.aid == 33561 then -- this doesn't work
        position:sendMagicEffect(778)
    elseif item.aid 33562 then -- this doesn't work
        position:sendMagicEffect(779)
    end
end

mv:aid(33560, 33561, 33562)
mv:register()

Each AID have multiples different positions

1665620824799.png1665620842438.png
 
Last edited:
Back
Top