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

[Request] Fishing plugin

goodle

New Member
Joined
Apr 17, 2014
Messages
146
Reaction score
0
Need some basic fishing plugin.
to use the skills
 
Fishing for trophy fish or worms?
 
I take no credit made my s1n
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace sintal1ty
{
public class Fisher: Core
{
protected Dictionary <string, string> actions;
public static string GetPluginAuthor (){
return "sintal1ty";
}

public static string GetPluginVersion (){
return "1.0.0.0";
}

public static string GetPluginDescription (){
return "Sports Fishing";
}
public Fisher () : base (){
actions = new Dictionary <string, string> (){
{"Moving to the Left", "Stand Firm Left"},
{"Moving to the Right", "Stand Firm Right"},
{"Escape", "Give Slack"},
{"Move to the Bottom", "Reel In"},
{"Leap", "Big Reel In"}
};
}
protected void Wait (){
while (me.target == null || (me.target.target != null && me.target.target != me) || getBuff (me.target, "Strength Contest") == null){
// If I have no target or it isn't targeting me or my target does not have Strength Contest buff we wait. 100msec
Thread.Sleep (100);
}
// Check to see if my target is valid and is not attackable.
}

protected void Stopper (){
Buff check;
while (true){
Wait ();
check = getBuff (me.target, "Tension"); // Fetch buff "Tension" 1 time
if (check != null && isCasting ()){
Thread.Sleep (500); // Lets wait to see if Tension is still there. (Sometimes it takes a half a second to disappear even though we are casting the right spell.(due to proc delay in game))
check = getBuff (me.target, "Tension"); // // Fetch buff "Tension" 2nd Time
if (check != null && isCasting ()){
CancelSkill (); // Tension buff detected twice lets cancel
Log ("Cancel");
Thread.Sleep (250);
}
}
Thread.Sleep (100);
}
}

public void PluginRun (){
Thread stopper = new Thread (Stopper); // Stream check for Tension debuff
stopper.Start ();
String oldSkill = null;
while (true){
Wait ();
String skill = null;
// Select the corresponding response to the fish's buffs
foreach (Buff enBuff in me.target.getBuffs ()){
if (actions.ContainsKey (enBuff.name)){
skill = actions [enBuff.name];
break;
}
}
if (skill != oldSkill){ // Checks to see if the corresponding skill changed from the last one.
CancelSkill (); // Cancel 1 time
Thread.Sleep (50);
CancelSkill (); // Cancel 2 time ( Don't know why but this works everytime if called twice.)
Log ("Buff Action Changed - Cancel Casting");
Thread.Sleep(50);
}
// Lets cast if we have a corresponding skill matched
if (! isCasting () && skill != null){
if (! isGliding ()){
TurnDirectly (); // Face the fish
}
Log ("Used: " + skill);
UseSkill (skill, true);
oldSkill = skill;


}
Thread.Sleep (100);
}
}
}
}
 
Also you can add additional checks\turnDirectly to fish/ etc

Code:
public void SkillCanceler()
        {
            while (true)
            {
                Thread.Sleep(10);
                if (me.target == null)
                    continue;
                var myCastSkillId = me.castSkillId;
                if (myCastSkillId > 0)            
                {
                    if (buffTime(me.target, 5265) > 0 && myCastSkillId != 21194)
                        CancelSkill();
                    if (buffTime(me.target, 5264) > 0 && myCastSkillId != 21135)
                        CancelSkill();
                    if (buffTime(me.target, 5267) > 0 && myCastSkillId != 21195)
                        CancelSkill();
                    if (buffTime(me.target, 5266) > 0 && myCastSkillId != 21196)
                        CancelSkill();
                    if (buffTime(me.target, 5508) > 0 && myCastSkillId != 21290)
                        CancelSkill();
                }
                
            }
        }
public void PluginRun()
        {     
            new Task(SkillCanceler).Start();
            while (true)
            {
                Thread.Sleep(10);
                if (me.target == null)
                    continue;
                if (buffTime(me.target, 5265) > 0 && !me.isCasting)
                    UseSkill(21194);
                if (buffTime(me.target, 5264) > 0 && !me.isCasting)
                    UseSkill(21135);
                if (buffTime(me.target, 5267) > 0 && !me.isCasting)
                    UseSkill(21195);
                if (buffTime(me.target, 5266) > 0 && !me.isCasting)
                    UseSkill(21196);
                if (buffTime(me.target, 5508) > 0 && !me.isCasting)
                    UseSkill(21290);
            }
        }
 
Hey Out...

could you tell me where I have to put your script into the main script? I have no scripting experience.. .sorry
 
Back
Top