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

Programmer TFS 1.x Programming Services

Hello, I have 3 spell requests as you did a good job with the Summon Explosion Spell.
Bounce
Description: Bounce between targets
Features/Settings:
Max distance between targets,
damage on hit,
delay between each bounce,
animation,


Pull
Description: Pull everyone in a 5SQM area towards you.

Code:
-- Bounce spell script made by Nekiro#5727
-- little messy, but im a noob :((

local bounces = 5 -- number of bounces if targets are in distance
local maxRadius = 5 -- if 5 then radius is 5x5
local onlyPlayers = false
local delay = 2 -- seconds

local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)

function onGetFormulaValues(player, skill, attack, factor)
    local min = (player:getLevel() / 2) + 30 -- completely random
    local max = (player:getLevel() / 5) + 100
    return -min, -max
end

combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local currentBounce, caster, lastBounceTarget = 1
local function checkBounces(currentTargetUid)
    if not caster then
        return true
    end

    local currTarget = Creature(currentTargetUid)
    if not currTarget then
        return true
    end
    local creatures = Game.getSpectators(currTarget:getPosition(), false, onlyPlayers, maxRadius, maxRadius, maxRadius, maxRadius)
    if #creatures == 0 then
        return true
    end

    local randomTarget
    repeat
        randomTarget = creatures[math.random(#creatures)]
    until randomTarget and randomTarget:isMonster() and randomTarget ~= currTarget and randomTarget ~= lastBounceTarget
    currTarget:getPosition():sendDistanceEffect(randomTarget:getPosition(), CONST_ANI_FIRE)
    combat:execute(caster, Variant(randomTarget.uid))
    lastBounceTarget = randomTarget
    currentBounce = currentBounce + 1

    if currentBounce >= bounces then
        return true
    end

    if lastBounceTarget then
        addEvent(checkBounces, delay * 1000, lastBounceTarget.uid)
    end
    return true
end

function onCastSpell(creature, variant)
    addEvent(checkBounces, delay * 1000, variant:getNumber())
    caster = creature
    creature:getPosition():sendDistanceEffect(Creature(variant:getNumber()):getPosition(), CONST_ANI_FIRE)
    return combat:execute(creature, variant)
end

Code:
-- Pull spell script made by Nekiro#5727
-- unfortunately it has to be done with Game.getSpectators(), there is no "getTargetList() for players :("

local radius = 5 -- 5x5
local onlyPlayers = false
function onCastSpell(creature, variant)
    local targets = Game.getSpectators(creature:getPosition(), false, onlyPlayers, radius, radius, radius, radius)
    if #targets == 0 then
        return true
    end

    for _, target in pairs(targets) do
        if target ~= creature then
            target:teleportTo(target:getClosestFreePosition(creature:getPosition()))
        end
    end
    return true
end

These two scripts seem interesting to me, so there you are. If anyone have any advice on how to improve this code, feel free to tell me!

do you make any scripts for websites? i want top bank balance and frags (daily and monthly for frags) in highscroes i use myaac.


Also need
!bless (got one script that dosent work for me)
!spells (use spellbook)
!commands (show all avaible commands for youre acces)

You can find every of them on forums. Also third is not possible, until you make config with all commands with corresponding access or you can parse shits from talkactions.xml, but thats stupid.
 
Still available :)
 
Last edited:
From this post and few modifications I got the following below. Thanks for the contribution mate ;)

Pull
giphy.gif


Bounce
giphy.gif


Sorry about the poor quality, dno.
 
Nice gifs :)

Available again. Contact me via discord, if you need anything.

I have updated contact info, please read first post.
 
Last edited:
Really pleasant and helpful guy. Solved my problem Ive been having for months within minutes. Recommended.
 
Really pleasant and helpful guy. Solved my problem Ive been having for months within minutes. Recommended.
Thanks! Also I'm available again.
 
Last edited:
Hello! Thanks for you services!

What about the bounce spell but for solo/party players that heals instead of damage.

Exura sio mas "playername ---> heals first player and bounces to other party players if they exist.

Thanks!
 
Hello! Thanks for you services!

What about the bounce spell but for solo/party players that heals instead of damage.

Exura sio mas "playername ---> heals first player and bounces to other party players if they exist.

Thanks!
Why? If you want to request script go to support board.
 
I didnt mean to be rude, but i thought you were taking request and you were actually free at the moment. >.<
 
I didnt mean to be rude, but i thought you were taking request and you were actually free at the moment. >.<
Sure, I take free requests, when I say it, also I'm helping a lot in support threads so you can just make your request there, maybe me or someone else will do it for you.

If you need any script/system contact me! I'm free at the moment to do any job :)

Bumping the thread as I'm available for requests/scripting again.
 
Last edited:
Code:
-- Bounce spell script made by Nekiro#5727
-- little messy, but im a noob :((

local bounces = 5 -- number of bounces if targets are in distance
local maxRadius = 5 -- if 5 then radius is 5x5
local onlyPlayers = false
local delay = 2 -- seconds

local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)

function onGetFormulaValues(player, skill, attack, factor)
    local min = (player:getLevel() / 2) + 30 -- completely random
    local max = (player:getLevel() / 5) + 100
    return -min, -max
end

combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local currentBounce, caster, lastBounceTarget = 1
local function checkBounces(currentTargetUid)
    if not caster then
        return true
    end

    local currTarget = Creature(currentTargetUid)
    if not currTarget then
        return true
    end
    local creatures = Game.getSpectators(currTarget:getPosition(), false, onlyPlayers, maxRadius, maxRadius, maxRadius, maxRadius)
    if #creatures == 0 then
        return true
    end

    local randomTarget
    repeat
        randomTarget = creatures[math.random(#creatures)]
    until randomTarget and randomTarget:isMonster() and randomTarget ~= currTarget and randomTarget ~= lastBounceTarget
    currTarget:getPosition():sendDistanceEffect(randomTarget:getPosition(), CONST_ANI_FIRE)
    combat:execute(caster, Variant(randomTarget.uid))
    lastBounceTarget = randomTarget
    currentBounce = currentBounce + 1

    if currentBounce >= bounces then
        return true
    end

    if lastBounceTarget then
        addEvent(checkBounces, delay * 1000, lastBounceTarget.uid)
    end
    return true
end

function onCastSpell(creature, variant)
    addEvent(checkBounces, delay * 1000, variant:getNumber())
    caster = creature
    creature:getPosition():sendDistanceEffect(Creature(variant:getNumber()):getPosition(), CONST_ANI_FIRE)
    return combat:execute(creature, variant)
end

Code:
-- Pull spell script made by Nekiro#5727
-- unfortunately it has to be done with Game.getSpectators(), there is no "getTargetList() for players :("

local radius = 5 -- 5x5
local onlyPlayers = false
function onCastSpell(creature, variant)
    local targets = Game.getSpectators(creature:getPosition(), false, onlyPlayers, radius, radius, radius, radius)
    if #targets == 0 then
        return true
    end

    for _, target in pairs(targets) do
        if target ~= creature then
            target:teleportTo(target:getClosestFreePosition(creature:getPosition()))
        end
    end
    return true
end

These two scripts seem interesting to me, so there you are. If anyone have any advice on how to improve this code, feel free to tell me!



You can find every of them on forums. Also third is not possible, until you make config with all commands with corresponding access or you can parse shits from talkactions.xml, but thats stupid.

On the bounce spell, if there is only 1 or 2 creatures, and spell is cast, the server crashes since there's nothing to bounce to and lastBounce cant be hit again like tar1 tar2 tar1 tar2... you cant make it bounce between two targets.
 
On the bounce spell, if there is only 1 or 2 creatures, and spell is cast, the server crashes since there's nothing to bounce to and lastBounce cant be hit again like tar1 tar2 tar1 tar2... you cant make it bounce between two targets.
Problem would be with „repeat” as you said if you cast between two people then one is hit second cant be, because it was already hit once, so it will loop infinitely probably. This script will crash the server while spell is still bouncing, but caster will logout or will get somehow removed.
 
Last edited:
Any work around?

I have edited this line:
Code:
until randomTarget and (randomTarget:isMonster() or randomTarget:isPlayer()) and randomTarget ~= currTarget
so it bounces on player but doesnt work. Stop working after 2 bounces, tried many stuff, not working so far.
 
Bumping this thread as I'm available again. Contact me if you need any script/system.
 
Last edited:
I just hired an adjustment service in my source with Nekiro. The price was very low, did a great service and was also very quick.
For me it was very expensive just because I am Brazilian and a very low currency, but it has nothing to do with the professional in question.
I recommend.
 
Had the pleasure of working with Nekiro for a while by now, he always provides a great and fast service. Highly recommended.
 
I just hired an adjustment service in my source with Nekiro. The price was very low, did a great service and was also very quick.
For me it was very expensive just because I am Brazilian and a very low currency, but it has nothing to do with the professional in question.
I recommend.

Had the pleasure of working with Nekiro for a while by now, he always provides a great and fast service. Highly recommended.
Thanks guys! I'm available for requests again, contact me if you need anything.

I'm currently free for requests, contact me. (info in main post)

Hello, I’m back with doing requests. Need anything? Contact me via disord.
 
Last edited:
Back
Top