mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-13 22:34:53 +02:00
finish first part of oriental addon
This commit is contained in:
16
data/movements/scripts/calassa/calassa_back.lua
Normal file
16
data/movements/scripts/calassa/calassa_back.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
function onStepIn(creature, item, position, fromPosition)
|
||||
local player = creature:getPlayer()
|
||||
if not player then
|
||||
return true
|
||||
end
|
||||
|
||||
doRelocate(item:getPosition(),{x = 31914, y = 32713, z = 6})
|
||||
item:getPosition():sendMagicEffect(11)
|
||||
Game.sendMagicEffect({x = 31914, y = 32713, z = 6}, 11)
|
||||
end
|
||||
|
||||
function onAddItem(item, tileitem, position)
|
||||
doRelocate(item:getPosition(),{x = 31914, y = 32713, z = 6})
|
||||
item:getPosition():sendMagicEffect(11)
|
||||
Game.sendMagicEffect({x = 31914, y = 32713, z = 6}, 11)
|
||||
end
|
23
data/movements/scripts/calassa/calassa_enter.lua
Normal file
23
data/movements/scripts/calassa/calassa_enter.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
function onStepIn(creature, item, position, fromPosition)
|
||||
local player = creature:getPlayer()
|
||||
if not player then
|
||||
return true
|
||||
end
|
||||
|
||||
local headItem = player:getSlotItem(CONST_SLOT_HEAD)
|
||||
if headItem and isInArray({5460}, headItem.itemid) then
|
||||
player:teleportTo(Position(31915, 32716, 12))
|
||||
player:getPosition():sendMagicEffect(2)
|
||||
player:getPosition():sendMagicEffect(CONST_ME_LOSEENERGY)
|
||||
else
|
||||
position.y = position.y - 3
|
||||
player:teleportTo(position)
|
||||
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function onAddItem(item, tileitem, position)
|
||||
doRelocate(item:getPosition(),{x = 31915, y = 32716, z = 12})
|
||||
Game.sendMagicEffect({x = 31915, y = 32716, z = 12}, 2)
|
||||
end
|
Reference in New Issue
Block a user