Tbol
Well-Known Member
- Joined
- Apr 7, 2019
- Messages
- 592
- Reaction score
- 64
Looking for tutorial area basically i have this script as an exit area of tutorial zone
But would like to edit it a little bit and make it if player tries to step on ''14724,14719,14720,14721 etc.....'' he wont be able until he havent learned spell named "X'' and would say you have to learn spell X first to be able to exit this tutorial area.
LUA:
---# Movement script
local effects = {
[14724] = 93,
[14719] = 94,
[14720] = 82,
[14721] = 83,
[14722] = 95,
[14723] = 76,
[14725] = 84
}
local config = {
teleport = {x=663, y=396, z=7}
}
function onStepIn(creature, item)
if creature:isPlayer() then
local loadEffect = effects[item:getId()]
if loadEffect then
creature:teleportTo(config.teleport)
creature:sendTextMessage(MESSAGE_INFO_DESCR, 'Congratulations warrior, your game starts now!')
creature:setStorageValue(66655, loadEffect)
end
end
return true
end
function onStepOut(creature, item)
if creature:isPlayer() then
creature:setStorageValue(66655, -1)
end
return true
end