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

RevScripts Walk back from tile if achievement is missing

Joriku

Working in the mines, need something?
Joined
Jul 16, 2016
Messages
1,088
Solutions
15
Reaction score
381
Location
Sweden
YouTube
Joriku
Hi,
can't seem to find this anywhere and no clue where to start.
Any ideas on how this can be made?

- SQM let's say 1000-1000-7, you need to have the item/achievement/level to enter there, if achievement is missing you'll be walked back with a message saying "sorry, not possible"
 
this can be a start for you
Lua:
local at = MoveEvent()

function at.onStepIn(creature, item, position, fromPosition)
    if not creature:hasAchievement("Allow Cookies?") then
        creature:teleportTo(fromPosition, false)
        creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    end
    return true
end

at:id(430) -- ground id
at:register()
 
Back
Top