Programmer TFS 1.x Scripting Services

OP
Nekiro

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,892
Best answers
81
Reaction score
671
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.
 

Sp0tl3ss

Nestalia.org
Joined
Jul 19, 2014
Messages
273
Best answers
0
Reaction score
12
okey sorry to whaste youre time and thanks for answering :)
 
OP
Nekiro

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,892
Best answers
81
Reaction score
671
Still available :)
 
Last edited:
OP
Nekiro

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,892
Best answers
81
Reaction score
671
Nice gifs :)

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

I have updated contact info, please read first post.
 
Last edited:

Gaddhuve

Well-Known Member
Joined
May 6, 2011
Messages
74
Best answers
1
Reaction score
17
Really pleasant and helpful guy. Solved my problem Ive been having for months within minutes. Recommended.
 
OP
Nekiro

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,892
Best answers
81
Reaction score
671
Really pleasant and helpful guy. Solved my problem Ive been having for months within minutes. Recommended.
Thanks! Also I'm available again.
 
Last edited:

Aeronx

Active Member
Joined
Dec 17, 2015
Messages
711
Best answers
8
Reaction score
92
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!
 
OP
Nekiro

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,892
Best answers
81
Reaction score
671
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.
 

Aeronx

Active Member
Joined
Dec 17, 2015
Messages
711
Best answers
8
Reaction score
92
I didnt mean to be rude, but i thought you were taking request and you were actually free at the moment. >.<
 
OP
Nekiro

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,892
Best answers
81
Reaction score
671
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:

Aeronx

Active Member
Joined
Dec 17, 2015
Messages
711
Best answers
8
Reaction score
92
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.
 
OP
Nekiro

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,892
Best answers
81
Reaction score
671
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:

Aeronx

Active Member
Joined
Dec 17, 2015
Messages
711
Best answers
8
Reaction score
92
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.
 
OP
Nekiro

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,892
Best answers
81
Reaction score
671
Bumping this thread as I'm available again. Contact me if you need any script/system.
 
Last edited:

DiegoRulez

Well-Known Member
Joined
Apr 16, 2012
Messages
82
Best answers
0
Reaction score
8
Location
Feira de Santana - Brasil
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.
 

Ashtar

ShadowRealm.online
Premium User
Joined
May 1, 2009
Messages
307
Best answers
0
Reaction score
92
Had the pleasure of working with Nekiro for a while by now, he always provides a great and fast service. Highly recommended.
 
OP
Nekiro

Nekiro

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,892
Best answers
81
Reaction score
671
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:
Top