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

Lua Skull Remover and Teleport scroll

adrenysny

Member
Joined
Feb 17, 2021
Messages
140
Reaction score
14
Will anyone have a remove red skull and frags script?
that can only be used while in the protection zone



And another temple scroll scripts with a charge of 100, that the charges that you have left appear when you give it look example

11:35 You see a temple scroll. (It has 100 charges.)
It weighs 2.00 oz.

me use otbr
 
Solution
data/scripts/removeskulltime.lua
Lua:
local removeFrags = Action()

function removeFrags.onUse(player, item, fromPos, target, toPos, isHotkey)
    local playerPos = player:getPosition()
    local tile = Tile(playerPos)
    if not tile or not tile:hasFlag(TILESTATE_PROTECTIONZONE) then
        player:sendCancelMessage("You can use only in pz.")
        return true
    end

    if player:getSkullTime() == 0 then
        player:sendCancelMessage("You don't have skull time.")
        return true
    end

    player:setSkullTime(0)
    player:setSkull(SKULL_NONE)
    playerPos:sendMagicEffect(CONST_ME_MORTAREA)
    player:say("Remove Skull!")
    item:remove(1)
    return true
end

removeFrags:id(9969)
removeFrags:register()
...
data/scripts/removeskulltime.lua
Lua:
local removeFrags = Action()

function removeFrags.onUse(player, item, fromPos, target, toPos, isHotkey)
    local playerPos = player:getPosition()
    local tile = Tile(playerPos)
    if not tile or not tile:hasFlag(TILESTATE_PROTECTIONZONE) then
        player:sendCancelMessage("You can use only in pz.")
        return true
    end

    if player:getSkullTime() == 0 then
        player:sendCancelMessage("You don't have skull time.")
        return true
    end

    player:setSkullTime(0)
    player:setSkull(SKULL_NONE)
    playerPos:sendMagicEffect(CONST_ME_MORTAREA)
    player:say("Remove Skull!")
    item:remove(1)
    return true
end

removeFrags:id(9969)
removeFrags:register()

data/scripts/teleportscroll.lua
Lua:
local teleportScroll = Action()

function teleportScroll.onUse(player, item, fromPos, target, toPos, isHotkey)
    local playerPos = player:getPosition()
    local tile = Tile(playerPos)
    if not tile or not tile:hasFlag(TILESTATE_PROTECTIONZONE) then
        player:sendCancelMessage("You can use only in pz.")
        return true
    end

    local town = player:getTown()
    local templePos = town and town:getTemplePosition() or Town(1):getTemplePosition()
    playerPos:sendMagicEffect(CONST_ME_POFF)
    player:teleportTo(templePos)
    templePos:sendMagicEffect(CONST_ME_TELEPORT)
    item:transform(item:getId(), item:getCharges() -1)
    return true
end

teleportScroll:id(1949)
teleportScroll:register()

add this to you item to give charges and show charges in description
items.xml
XML:
        <attribute key="charges" value="100" />
        <attribute key="showcharges" value="1" />
 
Last edited:
Solution
Back
Top