im a bit confused with my script
the goal is that someone can only enter the Teleport when he have all 5 Storages (killed bosses)
Some help would be nice
Canary 1.3.1 , 12.81
Lua:
local teleportToSoulfinal = MoveEvent()
function teleportToSoulfinal.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if player:getStorageValue(Storage.soulquest.goscr, 1)then
player:getStorageValue(Storage.soulquest.gosgr, 1)
player:getStorageValue(Storage.soulquest.gosha, 1)
player:getStorageValue(Storage.soulquest.gosma, 1)
player:getStorageValue(Storage.soulquest.gossp, 1)
local destination = Position(33682, 31634, 14)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(destination)
destination:sendMagicEffect(CONST_ME_TELEPORT)
else
player:teleportTo(fromPosition)
player:say('You need kill the other bosses too!', TALKTYPE_MONSTER_SAY)
end
end
teleportToSoulfinal:type("stepin")
teleportToSoulfinal:aid(9992)
teleportToSoulfinal:register()
the goal is that someone can only enter the Teleport when he have all 5 Storages (killed bosses)
Some help would be nice
Canary 1.3.1 , 12.81