• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

RevScripts โค โ„ฑ๐“‡๐‘’๐‘’ ๐’ฎ๐’ธ๐“‡๐’พ๐“…๐“‰๐’พ๐“ƒ๐‘” ๐’ฎ๐‘’๐“‡๐“‹๐’พ๐’ธ๐‘’ ๐’ฏโ„ฑ๐’ฎ ๐Ÿท.๐Ÿป+ โค

Sarah Wesker

เธ„โˆ‚vฮฑฮทcฮต เธฃาฏฮทั‚ฮฑx โค
Support Team
Joined
Mar 16, 2017
Messages
1,276
Solutions
139
Reaction score
1,591
Location
London
GitHub
MillhioreBT
Twitch
millhiore_bt
YouTube
millhiorebt
โค ๐…๐ซ๐ž๐ž ๐’๐œ๐ซ๐ข๐ฉ๐ญ๐ข๐ง๐  ๐’๐ž๐ซ๐ฏ๐ข๐œ๐ž ๐Ÿ.๐Ÿ“+ โค

๐Ÿ“š (ใฃโ—”โ—กโ—”)ใฃ โ„๐“ƒ๐’ป๐‘œ๐“‡๐“‚๐’ถ๐“‰๐’พ๐‘œ๐“ƒ ๐Ÿ“š
โค โ„ฐ๐“ƒ๐‘”๐’พ๐“ƒ๐‘’: ๐’ฏโ„ฑ๐’ฎ ๐’ช๐’ป๐’พ๐’ธ๐’พ๐’ถ๐“
โค โ„ฐ๐“ƒ๐‘”๐’พ๐“ƒ๐‘’ ๐’ฑ๐‘’๐“‡๐“ˆ๐’พ๐‘œ๐“ƒ: ๐Ÿท.๐Ÿป+

โš™๐Ÿ”งโ„‹๐‘œ๐“Œ ๐“‰๐‘œ ๐“‡๐‘’๐“†๐“Š๐‘’๐“ˆ๐“‰ ๐’ถ ๐“ˆ๐’ธ๐“‡๐’พ๐“…๐“‰?
โค โ„ณ๐’ถ๐“€๐‘’ ๐“ˆ๐“Š๐“‡๐‘’ ๐“Ž๐‘œ๐“Š ๐“‚๐‘’๐‘’๐“‰ ๐“‰๐’ฝ๐‘’ ๐’ธ๐‘œ๐“‡๐“‡๐‘’๐’ธ๐“‰ ๐“‹๐‘’๐“‡๐“ˆ๐’พ๐‘œ๐“ƒ ๐’ถ๐“ƒ๐’น ๐‘’๐“ƒ๐‘”๐’พ๐“ƒ๐‘’.
โค ๐’ฏ๐“‡๐“Ž ๐“ƒ๐‘œ๐“‰ ๐“‰๐‘œ ๐“‚๐’ถ๐“€๐‘’ ๐“Ž๐‘œ๐“Š๐“‡ ๐“‡๐‘’๐“†๐“Š๐‘’๐“ˆ๐“‰ ๐“‰๐‘œ๐‘œ ๐’ธ๐‘œ๐“‚๐“…๐“๐‘’๐“, ๐’ถ๐“ˆ ๐“‰๐’ฝ๐‘’ ๐“ˆ๐’พ๐“‚๐“…๐“๐‘’๐“ˆ๐“‰ ๐‘œ๐“ƒ๐‘’๐“ˆ ๐“Œ๐’พ๐“๐“ ๐’ท๐‘’ ๐“‰๐’ถ๐“€๐‘’๐“ƒ ๐’ธ๐’ถ๐“‡๐‘’ ๐‘œ๐’ป ๐’ป๐’พ๐“‡๐“ˆ๐“‰.
โค ๐’ด๐‘œ๐“Š ๐’ถ๐‘”๐“‡๐‘’๐‘’ ๐“ƒ๐‘œ๐“‰ ๐“‰๐‘œ ๐’ป๐’พ๐“๐‘’ ๐’ถ ๐‘”๐“‡๐’พ๐‘’๐“‹๐’ถ๐“ƒ๐’ธ๐‘’๐“ˆ ๐’พ๐’ป ๐“Ž๐‘œ๐“Š๐“‡ ๐’ถ๐“…๐“…๐“๐’พ๐’ธ๐’ถ๐“‰๐’พ๐‘œ๐“ƒ ๐’พ๐“ˆ ๐’ถ๐’ธ๐’ธ๐‘’๐“…๐“‰๐‘’๐’น ๐’ท๐“Š๐“‰ ๐“ƒ๐‘’๐“‹๐‘’๐“‡ ๐“‡๐‘’๐“ˆ๐‘œ๐“๐“‹๐‘’๐’น.
โค ๐’ด๐‘œ๐“Š ๐“‚๐“Š๐“ˆ๐“‰ ๐’ฝ๐’ถ๐“‹๐‘’ ๐’ถ ๐’ธ๐‘’๐“‡๐“‰๐’ถ๐’พ๐“ƒ ๐“‡๐‘’๐“…๐“Š๐“‰๐’ถ๐“‰๐’พ๐‘œ๐“ƒ ๐’พ๐“ƒ ๐“‰๐’ฝ๐‘’ ๐’ป๐‘œ๐“‡๐“Š๐“‚, โ„ ๐’น๐‘œ ๐“ƒ๐‘œ๐“‰ ๐’ถ๐’ธ๐’ธ๐‘’๐“…๐“‰ ๐“‡๐‘’๐“†๐“Š๐‘’๐“ˆ๐“‰๐“ˆ ๐’ป๐‘œ๐“‡ ๐“ƒ๐‘’๐“Œ ๐‘œ๐“‡ ๐“ˆ๐“Š๐“ˆ๐“…๐’พ๐’ธ๐’พ๐‘œ๐“Š๐“ˆ ๐’ถ๐’ธ๐’ธ๐‘œ๐“Š๐“ƒ๐“‰๐“ˆ, ๐“‰๐“‡๐“Ž ๐“ƒ๐‘œ๐“‰ ๐“‰๐‘œ ๐“Š๐“ˆ๐‘’ โ„ฑ๐’œ๐’ฆโ„ฐ๐’ฎ.
โค โ„›๐‘’๐“‚๐‘’๐“‚๐’ท๐‘’๐“‡ ๐“‹๐‘’๐“‡๐“Ž ๐“Œ๐‘’๐“๐“ ๐“‰๐’ฝ๐’ถ๐“‰ ๐’พ๐“‰ ๐’พ๐“ˆ ๐’ป๐‘œ๐“‡ ๐’ช๐’ป๐’ป๐’พ๐’ธ๐’พ๐’ถ๐“ ๐’ฏโ„ฑ๐’ฎ ๐“ˆ๐‘œ ๐’น๐‘œ๐“ƒ'๐“‰ ๐’ท๐‘œ๐“‰๐’ฝ๐‘’๐“‡ ๐’ถ๐“ˆ๐“€๐’พ๐“ƒ๐‘” ๐’ป๐‘œ๐“‡ ๐“ˆ๐‘œ๐“‚๐‘’๐“‰๐’ฝ๐’พ๐“ƒ๐‘” ๐’ป๐‘œ๐“‡ ๐“Ž๐‘œ๐“Š๐“‡ ๐‘œ๐“‰๐’ฝ๐‘’๐“‡ ๐‘’๐“ƒ๐‘”๐’พ๐“ƒ๐‘’, ๐’ถ๐“ˆ โ„ ๐“Œ๐’พ๐“๐“ ๐’พ๐‘”๐“ƒ๐‘œ๐“‡๐‘’ ๐“ˆ๐’ถ๐’พ๐’น ๐“‡๐‘’๐“†๐“Š๐‘’๐“ˆ๐“‰.
โค ๐’ฏ๐’ฝ๐‘’ ๐’น๐‘’๐“ˆ๐’ธ๐“‡๐’พ๐“…๐“‰๐’พ๐‘œ๐“ƒ ๐“‚๐“Š๐“ˆ๐“‰ ๐’ท๐‘’ ๐’พ๐“ƒ โ„ฐ๐“ƒ๐‘”๐“๐’พ๐“ˆ๐’ฝ ๐’ถ๐“ƒ๐’น ๐“Œ๐‘’๐“๐“ ๐‘’๐“๐“…๐“๐’ถ๐’พ๐“ƒ๐‘’๐’น ๐“Œ๐’พ๐“‰๐’ฝ๐‘œ๐“Š๐“‰ ๐“‰๐‘œ๐‘œ ๐“‚๐’ถ๐“ƒ๐“Ž ๐“Œ๐‘œ๐“‡๐’น๐“ˆ.

๐ŸŽ€โ„‹๐‘œ๐“Œ ๐’น๐‘œ โ„ ๐“€๐“ƒ๐‘œ๐“Œ ๐’พ๐’ป ๐“‚๐“Ž ๐’ถ๐“…๐“…๐“๐’พ๐’ธ๐’ถ๐“‰๐’พ๐‘œ๐“ƒ ๐“Œ๐’ถ๐“ˆ ๐’ถ๐’ธ๐’ธ๐‘’๐“…๐“‰๐‘’๐’น?๐ŸŽ€
โค โ„๐’ป ๐“Ž๐‘œ๐“Š๐“‡ ๐“‡๐‘’๐“†๐“Š๐‘’๐“ˆ๐“‰ ๐’ฝ๐’ถ๐“ˆ ๐“‚๐“Ž ๐“๐’พ๐“€๐‘’, ๐’พ๐“‰ ๐“‚๐‘’๐’ถ๐“ƒ๐“ˆ ๐“‰๐’ฝ๐’ถ๐“‰ ๐’พ๐“‰ ๐“Œ๐’ถ๐“ˆ ๐’ถ๐’ธ๐’ธ๐‘’๐“…๐“‰๐‘’๐’น.
โค โ„๐’ป ๐“Ž๐‘œ๐“Š๐“‡ ๐“‡๐‘’๐“†๐“Š๐‘’๐“ˆ๐“‰ ๐’พ๐“ˆ ๐’ถ๐’ธ๐’ธ๐‘’๐“…๐“‰๐‘’๐’น, ๐“Ž๐‘œ๐“Š ๐’ฟ๐“Š๐“ˆ๐“‰ ๐’ฝ๐’ถ๐“‹๐‘’ ๐“‰๐‘œ ๐“Œ๐’ถ๐’พ๐“‰ ๐’ป๐‘œ๐“‡ ๐“‚๐‘’ ๐“‰๐‘œ ๐’ถ๐“ƒ๐“ˆ๐“Œ๐‘’๐“‡ ๐“Ž๐‘œ๐“Š๐“‡ ๐“‡๐‘’๐“†๐“Š๐‘’๐“ˆ๐“‰.

๐’ฏ๐’ฝ๐’พ๐“ˆ ๐’พ๐“ˆ ๐“‚๐“Ž ๐‘œ๐“๐’น ๐’ป๐“‡๐‘’๐‘’ ๐“ˆ๐‘’๐“‡๐“‹๐’พ๐’ธ๐‘’๐“ˆ ๐“‰๐’ฝ๐“‡๐‘’๐’ถ๐’น ๐’พ๐’ป ๐“Ž๐‘œ๐“Š'๐’น ๐“๐’พ๐“€๐‘’ ๐“‰๐‘œ ๐’ธ๐’ฝ๐‘’๐’ธ๐“€ ๐’ท๐‘’๐’ป๐‘œ๐“‡๐‘’ ๐“Ž๐‘œ๐“Š ๐’ถ๐“ˆ๐“€ ๐’ป๐‘œ๐“‡ ๐“ˆ๐‘œ๐“‚๐‘’๐“‰๐’ฝ๐’พ๐“ƒ๐‘” ๐“‡๐‘’๐“…๐‘’๐’ถ๐“‰๐‘’๐’น.

๐Ÿ“Œ โ„›๐‘’๐“†๐“Š๐‘’๐“ˆ๐“‰ ๐‘’๐“๐’ถ๐“‚๐“…๐“๐‘’: ๐Ÿ“Œ

โ„ฐ๐“ƒ๐‘”๐’พ๐“ƒ๐‘’ ๐’ถ๐“ƒ๐’น ๐’ฑ๐‘’๐“‡๐“ˆ๐’พ๐‘œ๐“ƒ โœ…
๐’Ÿ๐‘’๐“ˆ๐’ธ๐“‡๐’พ๐“…๐“‰๐’พ๐‘œ๐“ƒ ๐Ÿ“‘
...
 

djblah

Active Member
Joined
Oct 15, 2010
Messages
106
Solutions
2
Reaction score
25
good night sara it is possible to grant permanent critical to the premium player.

If that were the case, I would like a script that complies with that, giving the premium player a permanent critical to the premium player.

1666835294703.png

an extra in the critical +10 in total would be +20 being premium
 
OP
OP
Sarah Wesker

Sarah Wesker

เธ„โˆ‚vฮฑฮทcฮต เธฃาฏฮทั‚ฮฑx โค
Support Team
Joined
Mar 16, 2017
Messages
1,276
Solutions
139
Reaction score
1,591
Location
London
GitHub
MillhioreBT
Twitch
millhiore_bt
YouTube
millhiorebt
Hello Sarah!
TFS VERSIร“N: 1.4.1
DESCRIPTION: Let's say i want a 3 different bags that gives random items to a player and for stackable items "count" can be random too, let's say a player receive gold coins between 1 to 100 gold coins (can be any other stackable item, just the gold coins as refference).

Bag 1 gives random items (no need for a key)
Bag 2 and Bag 3 needs an special key to open (player have to use the key on the box to open it.)

Thank in advance!
data/scripts/rewardbags.lua
Lua:
local backpacks = {
    [65000] = {
        name = "Free Backpack",
        storage = 70000,
        rewardBag = 1988,
        rewards = {
            { itemId = 2160 },
            { itemId = "demon armor", chance = 50 }
        }
    },
    [65001] = {
        name = "Keyed Backpack 1",
        storage = 70001,
        keyId = 2086,
        rewardBag = 1988,
        rewards = {
            { itemId = 2160, count = 100 },
            { itemId = "demon armor", chance = 50 }
        }
    },
    [65002] = {
        name = "Keyed Backpack 2",
        storage = 70002,
        keyId = 2092,
        rewardBag = 1988,
        rewards = {
            { itemId = 2160, count = 100 },
            { itemId = "demon armor", chance = 50 }
        }
    }
}

local action = Action()

function action.onUse(player, item, fromPos, target, toPos, isHotkey)
    local backpack = backpacks[item:getActionId()]
    if not backpack then
        return true
    end

    if player:getStorageValue(backpack.storage) == 1 then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already opened this backpack.")
        return true
    end

    if backpack.keyId and player:getItemCount(backpack.keyId) == 0 then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need a key to open this backpack.")
        return true
    end

    local reward = {}
    for _, it in pairs(backpack.rewards) do
        if not it.chance or math.random(100) <= it.chance then
            reward[#reward + 1] = it
        end
    end

    if #reward == 0 then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The backpack is empty.")
        return true
    end

    local container = Game.createItem(backpack.rewardBag, 1)
    if not container then
        return true
    end

    for _, it in pairs(reward) do
        local itemType = ItemType(it.itemId)
        if itemType:isStackable() then
            if it.minCount and it.maxCount then
                container:addItem(it.itemId, math.random(it.minCount, it.maxCount))
            elseif it.count then
                container:addItem(it.itemId, it.count)
            else
                container:addItem(it.itemId, math.random(1, 100))
            end
        else
            container:addItem(itemType:getId(), 1)
        end
    end

    if player:addItemEx(container) ~= RETURNVALUE_NOERROR then
        container:remove()
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a backpack, but you have no room to take it.")
        return true
    end

    if backpack.keyId then
        player:removeItem(backpack.keyId, 1)
    end
    player:setStorageValue(backpack.storage, 1)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a backpack in " .. backpack.name .. ".")
    player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
    return true
end

for aid, _ in pairs(backpacks) do
    action:id(aid)
end

action:register()
 

mano368

Intermediate OT User
Joined
Sep 2, 2011
Messages
354
Solutions
35
Reaction score
143
Location
Brazil
@Sarah Wesker

Hey Sarah, how are you?

What about a rooksystem? Can you do one for us?

When you die level 6 and downgrade to 5, player:
*Level 1(exp 0)
*Lose all equips, even amulet of loss and bless if possible(receive a Apple, torch and coat?)
*All skills level 10, ml level 0
*teleport to rookgaard town and set the same as hometown
*lose all learn spells(true or false)
*delete storages to quest again(can be a true or false(true for me xd), with alert to servers that use storage to addons, mounts and outfits)
*keep depot items and bank account(only to know, no need to code that)
*a true or false option to lose mounts and outfits(thinking in old and new servers) - if possible
*keep skull, no need to remove(only here to know, no need to code)
*another option that you think or remember

Thanks in advance and nice work! I appreciate your hardwork and like how you make it
 
OP
OP
Sarah Wesker

Sarah Wesker

เธ„โˆ‚vฮฑฮทcฮต เธฃาฏฮทั‚ฮฑx โค
Support Team
Joined
Mar 16, 2017
Messages
1,276
Solutions
139
Reaction score
1,591
Location
London
GitHub
MillhioreBT
Twitch
millhiore_bt
YouTube
millhiorebt
TFS 1.5


doSendDistanceShoot - Just like in the video.
From the x, y, z position to the x, y, z position, teleports the player when hit.
doSendDistanceShoot must be every 1 sqm, for the effect to be slow
Due to the lack of written and explained information, I will leave the function to simulate this effect of distance that advances sqm by sqm.
data/scripts/test.lua
Lua:
local config = {
    teleportWhenHitPlayer = Position(1000, 1045, 7)
}

function Position:getDirection(toPosition)
    local dx = toPosition.x - self.x
    local dy = toPosition.y - self.y
    local adx = math.abs(dx)
    local ady = math.abs(dy)
    if adx > ady then
        if dx > 0 then
            return DIRECTION_EAST
        else
            return DIRECTION_WEST
        end
    else
        if dy > 0 then
            return DIRECTION_SOUTH
        else
            return DIRECTION_NORTH
        end
    end
end

function Position:sendDistanceAnimateEffect(toPosition, distanceEffect, queueEffect)
    local distance = self:getDistance(toPosition)
    local direction = self:getDirection(toPosition)
    local pos = Position(self.x, self.y, self.z)
    for i = 1, distance do
        local nextPos = Position(pos.x, pos.y, pos.z)
        nextPos:getNextPosition(direction)
        addEvent(function (pos, nextPos)
            pos:sendMagicEffect(queueEffect)
            pos:sendDistanceEffect(nextPos, distanceEffect)
            local creatures = Tile(nextPos):getCreatures()
            for _, creature in pairs(creatures) do
                if creature:isPlayer() then
                    creature:teleportTo(config.teleportWhenHitPlayer)
                end
            end
            if #creatures > 0 then
                config.teleportWhenHitPlayer:sendMagicEffect(CONST_ME_TELEPORT)
            end
        end, 125 * i, pos, nextPos)
        pos = nextPos
    end
end
Here is an example of use:
Lua:
Position(992, 1046, 7):sendDistanceAnimateEffect(Position(1001, 1046, 7), CONST_ANI_SUDDENDEATH, CONST_ME_MORTAREA)
Position(992, 1047, 7):sendDistanceAnimateEffect(Position(1001, 1047, 7), CONST_ANI_SUDDENDEATH, CONST_ME_MORTAREA)
Position(992, 1048, 7):sendDistanceAnimateEffect(Position(1001, 1048, 7), CONST_ANI_SUDDENDEATH, CONST_ME_MORTAREA)

Position(991, 1046, 7):sendDistanceAnimateEffect(Position(1001, 1046, 7), CONST_ANI_SUDDENDEATH, CONST_ME_MORTAREA)
Position(991, 1047, 7):sendDistanceAnimateEffect(Position(1001, 1047, 7), CONST_ANI_SUDDENDEATH, CONST_ME_MORTAREA)
Position(991, 1048, 7):sendDistanceAnimateEffect(Position(1001, 1048, 7), CONST_ANI_SUDDENDEATH, CONST_ME_MORTAREA)
example.gif
 

TheMaxwellGates

New Member
Joined
Aug 20, 2020
Messages
10
Solutions
1
Reaction score
3
Hiiiiii, Sarah! How are you doing?

I need a talkaction (!bosstimer) that once the player send the command, it shows a modal window with the current cooldown to fight the bosses again.

----
I edit my message because it has been already solved in other place (with your contribution, btw, thanks a lot!).
If anyone is interested on it, here is the solution:
 
Last edited:

nefinoo

Carnage.flv
Joined
Sep 11, 2010
Messages
505
Solutions
1
Reaction score
46
Location
Lo Mochis, Sinaloa
Hello sarah, can you help me with this problem?
Is a "working" craft system i made, but i have a problem when i click on craft button.
 

VagosClubTM

Active Member
Joined
Aug 16, 2019
Messages
197
Reaction score
26
Location
Chile
โ„‹๐’พ @tomaszek123 โ„ ๐’ฝ๐‘œ๐“…๐‘’ ๐“Ž๐‘œ๐“Š ๐’ถ๐“‡๐‘’ ๐“‹๐‘’๐“‡๐“Ž ๐“Œ๐‘’๐“๐“, ๐“ˆ๐‘œ๐“‡๐“‡๐“Ž ๐’ป๐‘œ๐“‡ ๐“‰๐’ฝ๐‘’ ๐’น๐‘’๐“๐’ถ๐“Ž, โ„ ๐’น๐‘œ๐“ƒ'๐“‰ ๐“€๐“ƒ๐‘œ๐“Œ ๐’พ๐’ป ๐“Ž๐‘œ๐“Š ๐“ˆ๐“‰๐’พ๐“๐“ ๐“ƒ๐‘’๐‘’๐’น ๐’พ๐“‰ ๐’ท๐“Š๐“‰ โ„ ๐“Œ๐’พ๐“๐“ ๐“๐‘’๐’ถ๐“‹๐‘’ ๐’พ๐“‰ ๐’ฝ๐‘’๐“‡๐‘’.

โ„›๐‘’๐“ˆ๐“Š๐“๐“‰:
data/scripts/extraloot.lua
Lua:
local monsters = {
    -- all monsters
    all = {
        loot = {
            { itemId=2152, count=100, chance=20 },
            { itemId=2160, count=10, chance=20 },
            { itemId=2160, minCount=10, maxCount=20, chance=20 }
        }
    },
    ["rotworm"] = {
        loot = {
            { itemId=2398, count=10, chance=20 }
        }
    },
    ["dragon"] = {
        loot = {
            { itemId=2152, minCount=10, maxCount=20, chance=20 },
            { itemId=2160, minCount=10, maxCount=20, chance=20 }
        }
    }
}

local ec = EventCallback

function ec.onDropLoot(monster, corpse)
    if not corpse or not corpse:getType():isContainer() then
        return
    end
    local m = monstruos[monstruo:getName():lower()] o monstruos.todos
    botรญn local = m.botรญn
    si #botรญn == 0 entonces
        devolver
    final
    mostrarTexto local = falso
    para _, lootItem en pares (botรญn) hacer
        si math.random(100) <= botรญn.oportunidad entonces
            local it = ItemType(lootItem.itemId)
            si lootItem.count entonces
                if corpse:addItem(lootItem.itemId, it:isStackable() and lootItem.count o 1) entonces
                    mostrarTexto = verdadero
                final
            elseif cadรกver:addItem(lootItem.itemId, it:isStackable() y math.random(lootItem.minCount o 1, lootItem.maxCount o 100) o 1) entonces
                mostrarTexto = verdadero
            final
        final
    final

    si mostrar texto entonces
        monstruo:say("Encontraste algo.", TALKTYPE_MONSTER_SAY)
    final
final

ec:registro(777)[/Cร“DIGO]
๐’ด๐‘œ๐“Š ๐’ธ๐’ถ๐“ƒ ๐’ถ๐’น๐’น ๐‘’๐“๐“‰๐“‡๐’ถ ๐“๐‘œ๐‘œ๐“‰ ๐’ป๐‘œ๐“‡ ๐“ˆ๐“…๐‘’๐’ธ๐’พ๐’ป๐’พ๐’ธ ๐“‚๐‘œ๐“ƒ๐“ˆ๐“‰๐‘’๐“‡๐“ˆ, โ„ฌ๐“Š๐“‰ ๐“Ž๐‘œ๐“Š ๐’ธ๐’ถ๐“ƒ ๐’ถ๐“๐“ˆ๐‘œ ๐“Š๐“ˆ๐‘’ ๐“Š๐“ˆ๐‘’ [icode] all [/icode] ๐“‰๐’ถ๐’ท๐“๐‘’ ๐“‰๐‘œ ๐’ถ๐’น๐’น ๐“๐‘œ๐‘œ๐“‰ ๐“‰๐‘œ ๐“‚๐‘œ๐“ƒ๐“ˆ๐“‰๐‘’๐“‡๐“ˆ ๐“‚๐‘œ๐“ƒ๐“ˆ๐“‰๐‘’๐“‡๐“ˆ, ๐‘’๐“๐’ธ๐‘’๐“…๐“‰ ๐“‰๐’ฝ๐‘’ ๐“‰๐’ฝ๐’ถ๐“‰ ๐’ถ๐“๐“‡๐‘’๐’ถ๐’น๐“Ž ๐’ถ๐“๐“‡๐‘’๐’ถ๐’น๐“Ž ๐’ฝ๐’ถ๐“‹๐‘’ ๐’ถ ๐’ถ ๐“‰๐’ถ๐’ท๐“๐‘’, ๐“๐’พ๐“€๐‘’ [icode] rotworm [/icode] ๐’ถ๐“ƒ๐’น [ICODE]dragรณn[/ICODE]. ๐’น๐‘’๐“๐‘’๐“‰๐‘’ ๐“‰๐’ฝ๐‘’๐“‚ ๐’พ๐’ป ๐“Ž๐‘œ๐“Š ๐’ฟ๐“Š๐“ˆ๐“‰ ๐“Œ๐’ถ๐“ƒ๐“‰ ๐“‰๐‘œ ๐“Š๐“ˆ๐‘’ ๐“‰๐’ฝ๐‘’ [icode] all [/icode] ๐“‰๐’ถ๐’ท๐“๐‘’ ๐“‰๐‘œ ๐’ธ๐‘œ๐“ƒ๐“‰๐“‡๐‘œ๐“ ๐‘’๐“‹๐‘’๐“‡๐“Ž๐‘œ๐“ƒ๐‘’.

[ATTACH type="full" alt="fds.gif"]70044[/ATTACH]
[/QUOTE]

hi I have this error with this system I use TFS 1.5 NEKIRO 860
 

Attachments

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,991
Solutions
9
Reaction score
324
Location
Chile
Hey can you make a working script for tfs 1.5?



i have modified my door script so it push players in front of the door even if there is an item in front of it this work good for verticals doors but not for horizontal doors player are being pushed to the east instead of the south so @pink_panther gave me this script but it's not working

Lua:
--local verticalDoors = {

    --[1210] = 1211,

  --  [1213] = 1214,

--}



local horizontalDoors = {

    [1213] = 1214,

   -- [1210] = 1211

}

print("Door onStepOut")

function onStepOut(creature, item, fromPosition, toPosition)

    --local door = verticalDoors[item:getId()]

    --if door then

        --doRelocate(item:getPosition(), item:getPosition():moveRel(1, 0, 0))

        --item:transform(door)

       -- item:decay()

     --   return true

   -- end

    

    local door = horizontalDoors[item:getId()]

    if door then

       -- doRelocate(item:getPosition(), item:getPosition():moveRel(0, 1, 0))

       doRelocate(item:getPosition(), item:getPosition():moveRel(1, 0, 0))

        item:transform(door)

        item:decay()

        return true

    end

end

Code:
    <!-- horizontal doors -->

        <movevent event="StepOut" itemid="1213" script="vertical_horizontal_doors.lua"/>

    <movevent event="StepOut" itemid="1214" script="vertical_horizontal_doors.lua"/>

i converted it to revscript but is not working either

Code:
local verticalHorizontalDoors = MoveEvent()

verticalHorizontalDoors:type("stepout")

local verticalDoors = {

    [1210] = 1211,

}



local horizontalDoors = {

    [1213] = 1214,

}



--function onStepOut(creature, item, fromPosition, toPosition)

function verticalHorizontalDoors.onStepOut(creature, item, position, fromPosition)

    local door = verticalDoors[item:getId()]

    if door then

        doRelocate(item:getPosition(), item:getPosition():moveRel(1, 0, 0))

        item:transform(door)

        item:decay()

        return true

    end

    

    door = horizontalDoors[item:getId()]

    if door then

        doRelocate(item:getPosition(), item:getPosition():moveRel(0, 1, 0))

        item:transform(door)

        item:decay()

        return true

    end

end



verticalHorizontalDoors:register()



could you make a working script to fix this problem please?
 

Addams

1337
Senator
Premium User
Joined
Sep 29, 2009
Messages
2,797
Solutions
338
Reaction score
1,547
Are you accepting events? I've been trying to add a few events the last few days but most of them are outdated.
  1. Zombie Event like this one but with zombie waves instead of a single monster spawning each time, All players get the same speed in the event, Killing zombies (all players do the same damage), and the ability to summon 3 different types of monsters (Zombie and other custom monsters if needed).
  2. Snowball/Paintball Event like this one (All players with the same speed too)(Refilling ammo for kill-points)(losing kill-point on dying).
Not sure if both events need any elaboration (I want them to be like the known/famous ones mostly).
There are a few more events on the forum that hasn't been made to work with Revscripts or to work with newer TFS versions (Most of them are at least 7 years old) but I didn't want to make a long list.
 
Last edited:

pips

Member
Joined
Jul 29, 2009
Messages
60
Solutions
1
Reaction score
18
data/scripts/skillmultiplier.lua
Lua:
local vocations = {
    [1] = { -- Sorcerer
        [{1, 19}] = { -- Level 1-19
            [SKILL_MAGLEVEL] = 10
        },
        [{20, 100}] = { -- Level 20-100
            [SKILL_MAGLEVEL] = 8
        }
    },
    [2] = { -- Druid
        [{1, 19}] = { -- Level 1-19
            [SKILL_MAGLEVEL] = 10
        },
        [{20, 100}] = { -- Level 20-100
            [SKILL_MAGLEVEL] = 8
        }
    },
    [3] = { -- Paladin
        [{1, 100}] = { -- Level 1-100
            [SKILL_FIST] = 10,
            [SKILL_CLUB] = 10,
            [SKILL_SWORD] = 10,
            [SKILL_AXE] = 10,
            [SKILL_DISTANCE] = 10,
            [SKILL_SHIELD] = 10,
            [SKILL_FISHING] = 10
        }
    },
    [4] = { -- Knight
        [{1, 100}] = { -- Level 1-100
            [SKILL_FIST] = 10,
            [SKILL_CLUB] = 10,
            [SKILL_SWORD] = 10,
            [SKILL_AXE] = 10,
            [SKILL_DISTANCE] = 10,
            [SKILL_SHIELD] = 10,
            [SKILL_FISHING] = 10
        }
    }
}

local ec = EventCallback

function ec.onGainSkillTries(player, skill, tries)
    local vocation = vocations[player:getVocation():getBase():getId()]
    if not vocation then
        return true
    end

    local level = player:getLevel()
    for range, skills in pairs(vocation) do
        if level >= range[1] and level <= range[2] then
            local multiplier = skills[skill]
            if multiplier then
                return tries * multiplier
            end
            break
        end
    end
    return tries
end

ec:register(--[[0]])
Remember to activate the event onGainSkillTries on data/events/events.xml
is it possible to make this script works staged by SKILL LEVEL instead level?
indeed, i think this is how it was supposed to be xD
e.g.
sorcerer:
from MAGIC LEVEL 10 to MAGIC LEVEL 30 = MAGIC LEVEL RATE 10x
from MAGIC LEVEL 31 to MAGIC LEVEL 50 = MAGIC LEVEL RATE 5x...

thanks for doing this great job here.
 

absorc

Ask-her
Joined
Oct 7, 2013
Messages
57
Reaction score
4
Location
Sweden
Hi Sarah!
Hope that there is an easy way to do this.
A key that when you (Right click) use (Left Click) on any item you "Sell" the item for the same price you'd get if you sold it in the store from an NPC. The item disappears and you are left with the money in your BP and a message that you just sold the item and for which price.

Regards,
Absorc
 

Roddet

โ€ 
Premium User
Support Team
Joined
May 1, 2013
Messages
791
Solutions
86
Reaction score
569
Location
Mex
Hi Sarah!
Hope that there is an easy way to do this.
A key that when you (Right click) use (Left Click) on any item you "Sell" the item for the same price you'd get if you sold it in the store from an NPC. The item disappears and you are left with the money in your BP and a message that you just sold the item and for which price.

Regards,
Absorc
 

absorc

Ask-her
Joined
Oct 7, 2013
Messages
57
Reaction score
4
Location
Sweden
I will check this out. Thanks!
 
Top