Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
delay on slime training
#1
Good afternoon, I'm training with slime and I wanted to add a random delay before starting to hit the next summon, is this possible? I am using the slime trainer, I wanted to do this after setting the mother slime. Or else a function that stops hitting the copy for a few seconds and comes back...
Reply

#2
Hello.

It's not possible add that delay using Tools -> Slime Trainer, but you can use this LUA script on Persistents that does the same than Tools -> Slime Trainer, except get mother id.
local SLIME_MOTHER_ID = 0 -- Slime mother id.
local ALERT_ON_MOTHER_DIED = true -- Should alert if slime mother dies?
local DELAY_BEFORE_ATTACKING = { Min = 1000, Max = 3000 } -- In milliseconds, delay to wait before attacking a slime.


local attackedCreature = attacked()
if attackedCreature.id == 0 then
    local motherDied = true
    local shouldAttackId = 0
    local slimesAroundCount = 0
    local creatures = getcreatures('mfs')
    for _, creature in ipairs(creatures) do
        if creature.dist >= 0 and creature.dist <= 1 and creature.id ~= SLIME_MOTHER_ID and creature.ismonster and creature.name == 'Slime' then
            shouldAttackId = creature.id
            slimesAroundCount = slimesAroundCount + 1
        elseif creature.id == SLIME_MOTHER_ID then
            motherDied = false
        end
    end

    if shouldAttackId > 0 then
        if slimesAroundCount > 1 then
            wait(DELAY_BEFORE_ATTACKING.Min, DELAY_BEFORE_ATTACKING.Max)
        end
        attack(shouldAttackId)
    end
    if motherDied and ALERT_ON_MOTHER_DIED then
        playsound('default')
        flashclient()
    end
end
Reply

#3
Thanks for the quick response, is there any way to make this delay start counting only when I'm getting hit by the 2 slimes?
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#4
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Hello.

I've applied few changes on the script, so it will only wait delay before attacking whenever there are at least 2 slimes around you.
Reply

#5
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Nice, where i can get the new script?
Reply

#6
On my first post.
Reply

#7
|Only Registered members can see download links. | Click here to buy subscription or here to register.
I put this delay, but when the slime comes near me the character starts to atack, him dont whait. If i press "esc" to stop atack, them srtart to atack again instantly.



local SLIME_MOTHER_ID = 1073761397 -- Slime mother id.
local ALERT_ON_MOTHER_DIED = true -- Should alert if slime mother dies?
local DELAY_BEFORE_ATTACKING = { 65000, 90000 } -- In milliseconds, delay to wait before attacking a slime.
local attackedCreature = attacked()
if attackedCreature.id == 0 then
    local motherDied = true
    local shouldAttackId = 0
    local slimesAroundCount = 0
    local creatures = getcreatures('mfs')
    for _, creature in ipairs(creatures) do
        if creature.dist >= 0 and creature.dist <= 1 and creature.id ~= SLIME_MOTHER_ID and creature.ismonster and creature.name == 'Slime' then
            shouldAttackId = creature.id
            slimesAroundCount = slimesAroundCount + 1
        elseif creature.id == SLIME_MOTHER_ID then
            motherDied = false
        end
    end
    if shouldAttackId > 0 then
        if slimesAroundCount > 1 then
            wait(DELAY_BEFORE_ATTACKING.Min, DELAY_BEFORE_ATTACKING.Max)
        end
        attack(shouldAttackId)
    end
    if motherDied and ALERT_ON_MOTHER_DIED then
        playsound('default')
        flashclient()
    end
end
Reply

#8
Most likely because there's only one slime near, not two (not counting mother). The script only waits to attack if two or more slimes (not counting mother) are near, but if you want to count mother then the very first script I developed did that (you quote it here:
|Only Registered members can see download links. | Click here to buy subscription or here to register.
)

I will only make further changes if you are extremely specific with what you want, each condition, etc.
Reply

#9
|Only Registered members can see download links. | Click here to buy subscription or here to register.
I'm training with the mother slime (I don't hit her) and one more slime, the others are walking around, as soon as the copy dies the mother summons another one or one of the ones that is walking comes to hit me, I wanted that as soon as When this new copy arrived I would wait for a random delay to hit them.
Reply

#10
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Hello.
The script that you quoted here (
|Only Registered members can see download links. | Click here to buy subscription or here to register.
) already does that. It always waits 1s to 3s before attacking a slime.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016