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

[Plugin] Free OpenSorceProject

Blackclon

New Member
Joined
Sep 24, 2014
Messages
35
Reaction score
0
Based upon the "[Plugin][Example] Simple farm mobs" I started to add new functions.

1. Handling death:
Wht this function does:
Resurrects you when u die, prays to get back u're lost xp, returns to farmspot

Wht u have to do:
1. create a path with GPS Editor starting from the shrine you resurrect if u die ending at the Mob and naming the last point "goal".
2.change the path ("\\plugins\\Moving\\lvl40resur.db3") to destination of you pathfile.

Code:
public void DeathWalk()
{
           bool run_back_to_mob = false;
           while(true)
           {
               Thread.Sleep(100);
               while(!me.isAlive())
               {
                   ResToRespoint();
                   run_back_to_mob = true;
               }
               if(me.recoverableExp != 0)
               {
                   RestoreExp();
               }
               if(run_back_to_mob)
               {
                   gps = new Gps(this); 
                   gps.LoadDataBase(Application.StartupPath + "\\plugins\\Moving\\lvl40resur.db3");
                   gps.GpsMove("goal");
                   run_back_to_mob = false;     
               }
           }
}
I suggest u add " new Task(() => { DeathWalk(); }).Start(); " at the start of PluginRun()

2. Adding Buff food
In the original code U have:
Code:
if ((mpp() > 40 && hpp() > 75) || getAggroMobs().Count > 0)
                        bestMob = GetBestNearestMob(zone);
1. Change Code to:
Code:
if ((mpp() > min_mpp && hpp() > min_hpp) || getAggroMobs().Count > 0)
                        bestMob = GetBestNearestMob(zone);
else
{
	while(hpp() < min_hpp || mpp() < min_mpp){
		if(itemCooldown("NAME Health") == 0 && hpp() < min_hpp)
        		UseItem("NAME Health");                    
    		if(itemCooldown("NAME Mana") == 0 && mpp() < min_mpp)
                	UseItem("NAME Mana");
	}	
}
2. Add (X is 4 u to choose // somehere above usage ofcourse ..):
unsigned min_hpp = X, min_hpp = X
string NAME Health = "X"
string NAME Mana = "X"

thx to Nick4068 4 the input
Havent tested yet

I'll keep adding new functions. Make Suggestions if u like. The final goal is a complete standalone Grinder with GUI and all that fancy stuff.

Donate to keep me motivated:
 
Last edited:
here is a code to use health or mana food.

NAME Health = add health food name
NAME Mana = add mana food name

Code:
CheckBuffs();  
while(hpp() < 65){
 if(itemCooldown("NAME Health") == 0)
         UseItem("NAME Health");
        }                       
 while(mpp() < 30){
         if(itemCooldown("NAME Mana") == 0)
                UseItem("NAME Mana");
        }
 
Last edited:
@Nick4068 THX 4 sharing i mooded ure code a bit:

Code:
while(hpp() < 65 || mpp() < 30){
    if(itemCooldown("NAME Health") == 0 && hpp() < 65)
        UseItem("NAME Health");                    
    if(itemCooldown("NAME Mana") == 0 && mpp() < 30)
                UseItem("NAME Mana");
}
That way hp & mp are being checked parallel -> should be quicker
 
Back
Top