What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

[Plugin] Auto Dropback

silverdraco

Member
Joined
Jan 29, 2015
Messages
50
Reaction score
0
From the requests forum:

EDIT: Forgot a }

Code:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;

namespace DefaultNameSpace{
   public class DefaultClass : Core
   {
       public static string GetPluginAuthor()
       {
           return "Silver";
       }

       public static string GetPluginVersion()
       {
           return "0.9b";
       }

       public static string GetPluginDescription()
       {
           return "Auto drop backs on a preset height (default 18 meters) after falling for a certain amount of time (default 10 meters)";
       }
       
       
       // Edit this to what you want the script to drop back at.
       int dropBackHeight = 18;
      
       public void PluginRun(){
           ClearLogs();
           double currentZ    = me.Z;
           double lastZ       = currentZ;
           double currentFall = 0;
           double startFall   = 0;
           bool falling       = false;
           while(true){
                lastZ    = currentZ;
                currentZ = me.Z;                  
                if(currentZ < lastZ && calculateHeight() > 10){
                    falling   = true;
                    startFall = lastZ;               
                }else{
                    falling = false;                 
                }               
                int cycle = 0;
                while(falling){
                    if(cycle > 0){
                        lastZ    = currentZ;
                        Thread.Sleep(120);
                        currentZ = me.Z;    
                    }    
                    if(currentZ < lastZ){
                        currentFall = startFall - currentZ;
                        if(currentFall > 10){
                            if(calculateHeight() < dropBackHeight){                         
                                if(skillCooldown(12049) == 0){
                                    Log("Dropping back!");
                                    UseSkill(12049);
                                }else{
                                    Log("Couldn't drop back because of Cooldown! (" + skillCooldown(12049) + " ticks left)");
                                }
                            }    
                        } 
                    }else{
                        falling = false;   
                    }
                    cycle++; 
                }
            }
       }    
       
       private double calculateHeight(){
            return (me.Z - getZFromHeightMap(me.X, me.Y));
       }

       public void PluginStop()
       {
       }
   }
}
 
Last edited:
Anytime :) Looking for more things to write! Any suggestions?
Well there is definitely a lack of pvp combat plugins missing from AB, Fight4me Stone-arrow is beautiful but wish there was a more variety of different builds, or even better have a gui setup where people can build there own pvp build eg Target reaches this distance do this followed by this or if target silenced you then use this skill...just throwing a few ideas out there :P

Oh also this would be pretty cool if your a archer or any class that needs to keep there distance is have a option to let the player set a certain distance to keep away, for example if target gets 20m close - trigger the player to keep distance by circling the target and always keep that 20m gap.....don't know if that made any sense :P
 
Thanks for the help :).
Glad to see people reading the suggestions and helping the newbies like me out!
 
Hey sorry to bother - I can't compile the script :(
'c:\Users\Administrator\Desktop\ArcheBuddy\Plugins\Auto Dropback\Auto Dropback.cs(72,9) : error CS1513: } expected'
What's the cause of this :<
 
seems you forgot to copy the entire code, and missed a } at the end of the code.
 
Well there is definitely a lack of pvp combat plugins missing from AB, Fight4me Stone-arrow is beautiful but wish there was a more variety of different builds, or even better have a gui setup where people can build there own pvp build eg Target reaches this distance do this followed by this or if target silenced you then use this skill...just throwing a few ideas out there :P

Oh also this would be pretty cool if your a archer or any class that needs to keep there distance is have a option to let the player set a certain distance to keep away, for example if target gets 20m close - trigger the player to keep distance by circling the target and always keep that 20m gap.....don't know if that made any sense :P

That last thing is pretty easy to do.
As for stuff like Fight4Me.. I don't know, man, it seems kinda unfair to make and release those things.


I edited the code, by the way. It was missing a closing }
 
That last thing is pretty easy to do.
As for stuff like Fight4Me.. I don't know, man, it seems kinda unfair to make and release those things.


I edited the code, by the way. It was missing a closing }

Understandable, can you see what you can do with a distance plugin ?
 
A distance plugin? What does it do?

if your a archer or any class that needs to keep there distance is have a option to let the player set a certain distance to keep away, for example if target gets 20m close - trigger the player to keep distance by circling the target and always keep that 20m gap.....
 
if your a archer or any class that needs to keep there distance is have a option to let the player set a certain distance to keep away, for example if target gets 20m close - trigger the player to keep distance by circling the target and always keep that 20m gap.....

Oh, yeah, I can do that. How would you select the target to circle?
 
Back
Top