mirror of
https://github.com/otland/forgottenserver
synced 2026-08-15 16:32:07 -04:00
* Move runes to dedicated folder * Redirect old XML and lib folder to new location * Drop unused custom spells
35 lines
996 B
Lua
35 lines
996 B
Lua
local spell = Spell(SPELL_INSTANT)
|
|
|
|
function spell.onCastSpell(creature, variant)
|
|
local position = creature:getPosition()
|
|
position:sendMagicEffect(CONST_ME_POFF)
|
|
|
|
local tile = Tile(position)
|
|
if not table.contains(ropeSpots, tile:getGround():getId()) and not tile:getItemById(14435) then
|
|
creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
|
|
return false
|
|
end
|
|
|
|
tile = Tile(position:moveUpstairs())
|
|
if not tile then
|
|
creature:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM)
|
|
return false
|
|
end
|
|
|
|
creature:teleportTo(position, false)
|
|
position:sendMagicEffect(CONST_ME_TELEPORT)
|
|
return true
|
|
end
|
|
|
|
spell:group("support")
|
|
spell:id(76)
|
|
spell:name("Magic Rope")
|
|
spell:words("exani tera")
|
|
spell:level(9)
|
|
spell:mana(20)
|
|
spell:isAggressive(false)
|
|
spell:isSelfTarget(true)
|
|
spell:cooldown(2000)
|
|
spell:groupCooldown(2000)
|
|
spell:vocation("sorcerer;true", "druid;true", "paladin;true", "knight;true", "master sorcerer;true", "elder druid;true", "royal paladin;true", "elite knight;true")
|
|
spell:register()
|