Click here to buy some Tibia gold in our shop

Results 1 to 8 of 8

Thread: Keep Distance Mod

  1. #1
    Join Date
    Feb 2016
    Posts
    14

    Lightbulb Keep Distance Mod

    Hello i maked a simple, little bit bugged Keep Distance function in VB6 code. Char goin ~3 sqms before target.

    ModCavebot after
    Code:
    Public setFollowTarget() As Boolean
    put this:
    Code:
    Public setDistance() As Boolean
    after
    Code:
      Case "setnofollow"
        setFollowTarget(Sid) = False
        'exeLine(Sid) = exeLine(Sid) + 1
        updateExeLine Sid, 1, True
        fastM = True
    put this:
    Code:
          Case "setdistance"
        setDistance(Sid) = True
        'exeLine(Sid) = exeLine(Sid) + 1
        updateExeLine Sid, 1, True
        fastM = True
    ModCavebot after End if:
    Code:
      If bestMelee = True Then
        aRes = MeleeAttack(idConnection, bestID)
      End If
      If setFollowTarget(idConnection) = True Then
        PerformMove idConnection, myX(idConnection) + bestX, myY(idConnection) + bestY, myZ(idConnection)
      End If
    paste this:
    Code:
        If setDistance(idConnection) = True Then
        
        If myX(idConnection) < bestX & myY(idConnection) < bestY Then
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX - 4, myY(idConnection) + bestY - 4, myZ(idConnection)
        End Select
    
        
        ElseIf myX(idConnection) > bestX & myY(idConnection) > bestY Then
        
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX + 4, myY(idConnection) + bestY + 4, myZ(idConnection)
      End Select
        ElseIf myX(idConnection) > bestX & myY(idConnection) < bestY Then
        
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX + 4, myY(idConnection) + bestY - 4, myZ(idConnection)
      End Select
        ElseIf myX(idConnection) < bestX & myY(idConnection) > bestY Then
        
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX - 4, myY(idConnection) + bestY + 4, myZ(idConnection)
      End Select
        ElseIf myX(idConnection) <> bestX & myY(idConnection) = bestY Then
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX, myY(idConnection) + bestY + 4, myZ(idConnection)
      End Select
        ElseIf myX(idConnection) = bestX & myY(idConnection) <> bestY Then
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX + 4, myY(idConnection) + bestY, myZ(idConnection)
      End Select
      End If
      
      End If
    frmMain after
    Code:
        setFollowTarget(i) = False
    paste this:
    Code:
        setDistance(i) = True
    after:
    Code:
      setFollowTarget(index) = False
    paste this
    Code:
      setDistance(index) = True
    after
    Code:
      ReDim setFollowTarget(1 To MAXCLIENTS)
    paste it
    Code:
      ReDim setDistance(1 To MAXCLIENTS)
    frmCavebot after
    Code:
          setFollowTarget(idConnection) = True
    put this:
    Code:
          setDistance(idConnection) = False
    Now when you type line SetDistance in cavebot your character will be run from target.
    Last edited by xstojakes; 03-26-2016 at 21:55.

  2. #2
    Join Date
    May 2014
    Posts
    109

    Default

    very nice. i still using blackd on tibia rl
    www.facebook.com/lovetibia

    Tutorials for BLACKD NG
    Casino Script http://www.blackdtools.net/showthread.php?61858-tutorial-script-casino-blackd
    Healing http://www.blackdtools.net/showthread.php?61854-TUTORIAL-Healer-Blackd-NG&p=446551#post446551
    Cavebot http://www.blackdtools.net/showthread.php?61855-TUTORIAL-CaveBot-Blackd-NG&p=446552#post446552
    Aimbot http://www.blackdtools.net/showthread.php?61869-TUTORIAL-Aimbot-Blackd-NG&p=446598#post446598

  3. #3
    Join Date
    Sep 2008
    Location
    Brazil
    Posts
    73

    Default

    Oh, that's really nice. Try posting on github to see if Daniel merges it.

    If he does, I'll get you some cash on Unitera, if you want.

  4. #4
    Join Date
    Feb 2016
    Posts
    14

    Default

    Nono(I playing on Astera,Rowana,Secura), it is little bit bugged, and i maked this script for my usage too.I'll fix it when ill have some more time, i working in this same time at this small freezes when cavebot changing a waypoint, somewhere must be a wait delay configured to doin that. And idk why cavebot dont check some monsters corpse when you using a fluid after killing a mob, it should use fluid->check a corpse. Bot don't doin that, WHY? I think, when Daniel fix this bugs, we will destroy this capitalistic Xenobot etc, and Blackd will be lightninig on pantheon of best Tibia bots EVER!

  5. #5
    Join Date
    Jul 2011
    Posts
    130

    Default

    good job! sure has been times in the past where i'd need something to keep distance, but never actually wrote any code for it
    to get my attention, send me a PM/mail.

  6. #6
    Join Date
    Aug 2006
    Location
    Spain
    Posts
    1,296

    Default

    Looks really nice. Thank you!
    Now it would be great if someone can test it and post the changes to our github so I can merge it directly.
    https://github.com/blackdtools/Blackd-Proxy-CLASSIC/

    I am the admin. To contact me, send me an email to daniel@blackdtools.com
    Don't send pms to me! I rarely read pms. Just email me instead!

  7. #7
    Join Date
    Aug 2016
    Posts
    5

    Default

    Quote Originally Posted by xstojakes View Post
    Hello i maked a simple, little bit bugged Keep Distance function in VB6 code. Char goin ~3 sqms before target.

    ModCavebot after
    Code:
    Public setFollowTarget() As Boolean
    put this:
    Code:
    Public setDistance() As Boolean
    after
    Code:
      Case "setnofollow"
        setFollowTarget(Sid) = False
        'exeLine(Sid) = exeLine(Sid) + 1
        updateExeLine Sid, 1, True
        fastM = True
    put this:
    Code:
          Case "setdistance"
        setDistance(Sid) = True
        'exeLine(Sid) = exeLine(Sid) + 1
        updateExeLine Sid, 1, True
        fastM = True
    ModCavebot after End if:
    Code:
      If bestMelee = True Then
        aRes = MeleeAttack(idConnection, bestID)
      End If
      If setFollowTarget(idConnection) = True Then
        PerformMove idConnection, myX(idConnection) + bestX, myY(idConnection) + bestY, myZ(idConnection)
      End If
    paste this:
    Code:
        If setDistance(idConnection) = True Then
        
        If myX(idConnection) < bestX & myY(idConnection) < bestY Then
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX - 4, myY(idConnection) + bestY - 4, myZ(idConnection)
        End Select
    
        
        ElseIf myX(idConnection) > bestX & myY(idConnection) > bestY Then
        
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX + 4, myY(idConnection) + bestY + 4, myZ(idConnection)
      End Select
        ElseIf myX(idConnection) > bestX & myY(idConnection) < bestY Then
        
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX + 4, myY(idConnection) + bestY - 4, myZ(idConnection)
      End Select
        ElseIf myX(idConnection) < bestX & myY(idConnection) > bestY Then
        
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX - 4, myY(idConnection) + bestY + 4, myZ(idConnection)
      End Select
        ElseIf myX(idConnection) <> bestX & myY(idConnection) = bestY Then
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX, myY(idConnection) + bestY + 4, myZ(idConnection)
      End Select
        ElseIf myX(idConnection) = bestX & myY(idConnection) <> bestY Then
        Select Case CInt(Int((1 * Rnd()) + 1))
        Case 1
            PerformMove idConnection, myX(idConnection) + bestX + 4, myY(idConnection) + bestY, myZ(idConnection)
      End Select
      End If
      
      End If
    frmMain after
    Code:
        setFollowTarget(i) = False
    paste this:
    Code:
        setDistance(i) = True
    after:
    Code:
      setFollowTarget(index) = False
    paste this
    Code:
      setDistance(index) = True
    after
    Code:
      ReDim setFollowTarget(1 To MAXCLIENTS)
    paste it
    Code:
      ReDim setDistance(1 To MAXCLIENTS)
    frmCavebot after
    Code:
          setFollowTarget(idConnection) = True
    put this:
    Code:
          setDistance(idConnection) = False
    Now when you type line SetDistance in cavebot your character will be run from target.
    Really nice what u did!

    I need to just understand where i should write this codes... suppose to be on CaveBot area?

  8. #8
    Join Date
    May 2019
    Posts
    1

    Default

    You have to keep the all mod of distance that have the data among to have some friction on this that was able to good. I have to make report on this so I need to know are essay writing services ethical? This was the details that I need to gat among these fields on this.

Posting Permissions

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