Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Free User
    Join Date
    Sep 2015
    Posts
    18
    Reputation
    10
    Rep Power
    0

    REQUEST - madsheep trainer

    Hi, i need to add a line of code to this lua script so that the character use spellwand on himself (ID 651) after he logs back in once the serversave is done and have a sheep attacking him before the script stop (also if possible add so that only 2 creatures may attack him, 1 wolf and 1 madsheep) anyone with knowledge about this that can help me out? would be greatly appreciated!

    i already checked https://forums.tibiawindbot.com/show...ject-by-Borges aswell but that script kinda confused me abit and did not work for me

    wait(1800000)
    set('Targeting/Enabled', 'yes')
    set('Cavebot/Enabled', 'yes')
    focusclient()
    wait(12000)
    connect(Account, Password, Character)
    end

  2. #2
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by goatslayer View Post
    Hi, i need to add a line of code to this lua script so that the character use spellwand on himself (ID 651) after he logs back in once the serversave is done and have a sheep attacking him before the script stop (also if possible add so that only 2 creatures may attack him, 1 wolf and 1 madsheep) anyone with knowledge about this that can help me out? would be greatly appreciated!

    i already checked https://forums.tibiawindbot.com/show...ject-by-Borges aswell but that script kinda confused me abit and did not work for me

    wait(1800000)
    set('Targeting/Enabled', 'yes')
    set('Cavebot/Enabled', 'yes')
    focusclient()
    wait(12000)
    connect(Account, Password, Character)
    end
    In my thread: HERE

    I have 3 persistents:

    Anti Idle
    Reconnect
    Mad Sheep Trainer


    Create them and enable.

    Done!

    What's wrong?
    Helped you? REP+

  3. #3
    Free User
    Join Date
    Sep 2015
    Posts
    18
    Reputation
    10
    Rep Power
    0
    auto(100)
    local m = getcreature('Mad Sheep') <------
    if ($shielding < $sword) or ($shielding < $club) or ($shielding < $axe) then x (is this to slow down attacks so shielding catches up?)
    if m.dist == 1 then x
    attack(m.name) x
    wait(500,1000) x
    stopattack() x
    wait(1000*30) x
    end
    else
    if m.dist == 1 then <-------
    attack(m.name) <------
    end
    end

    if maround(7,m.name) == 0 then <-------
    if paround() >= 1 and $connected then <--------
    smartscreenshot() x
    wait(234,456) x
    closeclient() x
    wait(234,456) <-----
    else x
    useoncreature(651,$self) <----
    wait(200,500)
    end
    end


    this is the script you used, the X marked lines are the ones i tried to have removed and the <- marked lines are the one i tried to combine into one and connect with the code line i wrote earlier, the thing is the script i currently use for training is flawless but its setup is extremely simple as u can see and i dont have much experience with scripting so when i edit something i try to simplify it as much as possible and the script works flawlessly, it targets the sheep it connects and it ignores everything else that happends, now all i am missing is the spawn madsheep and if possible with someones help to make sure i am only being attacked by 1 wolf and 1 madsheep so incase instead of being attacked by the sheep i spawned i get attacked by 2 wolfs then one have to die

  4. #4
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by goatslayer View Post
    auto(100)
    local m = getcreature('Mad Sheep') <------
    if ($shielding < $sword) or ($shielding < $club) or ($shielding < $axe) then x (is this to slow down attacks so shielding catches up?)
    if m.dist == 1 then x
    attack(m.name) x
    wait(500,1000) x
    stopattack() x
    wait(1000*30) x
    end
    else
    if m.dist == 1 then <-------
    attack(m.name) <------
    end
    end

    if maround(7,m.name) == 0 then <-------
    if paround() >= 1 and $connected then <--------
    smartscreenshot() x
    wait(234,456) x
    closeclient() x
    wait(234,456) <-----
    else x
    useoncreature(651,$self) <----
    wait(200,500)
    end
    end


    this is the script you used, the X marked lines are the ones i tried to have removed and the <- marked lines are the one i tried to combine into one and connect with the code line i wrote earlier, the thing is the script i currently use for training is flawless but its setup is extremely simple as u can see and i dont have much experience with scripting so when i edit something i try to simplify it as much as possible and the script works flawlessly, it targets the sheep it connects and it ignores everything else that happends, now all i am missing is the spawn madsheep and if possible with someones help to make sure i am only being attacked by 1 wolf and 1 madsheep so incase instead of being attacked by the sheep i spawned i get attacked by 2 wolfs then one have to die
    All you need in one action:

    init start
    local lastStand = $standtime
    local randTime = math.random(300000, 600000)
    init end

    auto(100)

    -- MAD SHEEP TRAINER

    local m = getcreature('Mad Sheep')
    local waitshield = false -- true or false, Will wait your shielding skill to be the same, example: 20/20, 30/30, 40/40 etc...

    if waitshield and (($shielding < $sword) or ($shielding < $club) or ($shielding < $axe)) then
    if m.dist == 1 then
    attack(m.name)
    wait(500,1000)
    stopattack()
    wait(1000*30)
    end
    else
    if m.dist == 1 then
    attack(m.name)
    end
    end

    if maround(7,m.name) == 0 then
    if paround() >= 1 and $connected then
    smartscreenshot()
    wait(234,456)
    closeclient()
    wait(234,456)
    else
    useoncreature(651,$self)
    wait(200,500)
    end
    end

    -- RECONNECT

    if not $connected then
    reconnect(true)
    wait(2500)
    end

    -- ANTI IDLE

    if $standtime < lastStand then
    lastStand = $standtime
    end

    if $standtime - lastStand > randTime then
    local dirs = {'n', 'e', 's', 'w'}

    -- Makes sure it's random and not the same we're facing right now
    table.remove(dirs, table.find(dirs, $self.dir))
    turn(dirs[math.random(1, 3)])
    waitping()

    lastStand = $standtime
    randTime = math.random(300000, 600000)
    end

    -- EAT FOOD
    eatfoodfull()
    Last edited by Borges; 10-16-2015 at 05:44 PM.
    Helped you? REP+

  5. #5
    Free User
    Join Date
    Sep 2015
    Posts
    18
    Reputation
    10
    Rep Power
    0
    I really appreciate the time you took to made this but could you just edit the part of using spellwand when reconnected into the script i posted?

  6. #6
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by goatslayer View Post
    I really appreciate the time you took to made this but could you just edit the part of using spellwand when reconnected into the script i posted?
    You will lose all your spellwand if someone kill your sheep, anyway:

    auto(100)
    if not $connected then
    reconnect(true)
    wait(2500)
    end
    if maround(7,'Mad Sheep') == 0 then
    useoncreature(651,$self)
    wait(234,456)
    end
    Helped you? REP+

  7. #7
    Free User
    Join Date
    Sep 2015
    Posts
    18
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Borges View Post
    You will lose all your spellwand if someone kill your sheep, anyway:

    auto(100)
    if not $connected then
    reconnect(true)
    wait(2500)
    end
    if maround(7,'Mad Sheep') == 0 then
    useoncreature(651,$self)
    wait(234,456)
    end
    script works great thanks borges, appreciate your help! tried to +rep you but it does not let me click..maybe i have done it before so cant do it again im not really sure.

    although now i have another issue with a weapon changer persistent that i edited to suit my needs but then realized i need some more lines to add in it, i tried adding in some lines that i thought would help but it only gave me errors so now i need help again regarding mad sheep training, if Borges or anyone that have knowledge in making persistent concerning targeting creature could help out i would really appreciate it!

    the current persistent that i have edited is

    auto(200)
    if maround(2, 'wolf') > 1 then
    equipitem('sickle', "rhand")
    else
    equipitem('hive scythe', "rhand")
    end

    this one works BUT my problem is that it changes weapons when the #2 wolf is close but NOT attacking and it keeps the targeting on the mad sheep and kills it within seconds, the line/lines that i need added to this persistent is only execute this persistent IF attacked by 2+ wolfs not when 2+ sheep are in the vicinity of my character


    edit: i have set up the windbot targeting to attack the wolfs if 2+ wolfs are attacking me and to target the mad sheep if only 1 wolf is left
    Last edited by goatslayer; 10-17-2015 at 09:18 PM.

  8. #8
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by goatslayer View Post
    script works great thanks borges, appreciate your help! tried to +rep you but it does not let me click..maybe i have done it before so cant do it again im not really sure.

    although now i have another issue with a weapon changer persistent that i edited to suit my needs but then realized i need some more lines to add in it, i tried adding in some lines that i thought would help but it only gave me errors so now i need help again regarding mad sheep training, if Borges or anyone that have knowledge in making persistent concerning targeting creature could help out i would really appreciate it!

    the current persistent that i have edited is

    auto(200)
    if maround(2, 'wolf') > 1 then
    equipitem('sickle', "rhand")
    else
    equipitem('hive scythe', "rhand")
    end

    this one works BUT my problem is that it changes weapons when the #2 wolf is close but NOT attacking and it keeps the targeting on the mad sheep and kills it within seconds, the line/lines that i need added to this persistent is only execute this persistent IF attacked by 2+ wolfs not when 2+ sheep are in the vicinity of my character


    edit: i have set up the windbot targeting to attack the wolfs if 2+ wolfs are attacking me and to target the mad sheep if only 1 wolf is left
    Test This:

    -- MAD SHEEP TRAINER

    local m = getcreature('Mad Sheep')
    local n = getcreature('Wolf')

    local waitshield = false -- true or false, Will wait your shielding skill to be the same, example: 20/20, 30/30, 40/40 etc...

    if waitshield and (($shielding < $sword) or ($shielding < $club) or ($shielding < $axe)) then
    if m.dist == 1 and maround(1,n.name) < 2 and n.dist == 1 then
    attack(m.name)
    wait(500,1000)
    stopattack()
    wait(1000*30)
    else
    attack(n.name)
    end
    else
    if m.dist == 1 and maround(1,n.name) < 2 and n.dist == 1 then
    attack(m.name)
    else
    attack(n.name)
    end
    end

    if maround(1, n.name) > 1 then
    equipitem('sickle', "rhand")
    wait(234,456)
    else
    equipitem('hive scythe', "rhand")
    wait(234,456)
    end
    Last edited by Borges; 10-20-2015 at 12:06 AM.
    Helped you? REP+

  9. #9
    Free User
    Join Date
    Sep 2015
    Posts
    18
    Reputation
    10
    Rep Power
    0
    01:49:50 error in Persistent script weapon change:
    ["if m.dist == 1 and n.count < 2 and n...."]:weapon change:18 attempt to index local 'n' with an unknown property

    getting this error when using that script

  10. #10
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by goatslayer View Post
    01:49:50 error in Persistent script weapon change:
    ["if m.dist == 1 and n.count < 2 and n...."]:weapon change:18 attempt to index local 'n' with an unknown property

    getting this error when using that script
    script updated, try again.
    Helped you? REP+

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •