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

Running a Loop Ten Times

Status
Not open for further replies.

grown

New Member
Joined
Oct 22, 2014
Messages
17
Reaction score
0
I'm not experienced in C#, but I think this should be pretty simple.

I'm working on making a simple plugin to farm mobs and move around to different farm spots after killing 10 mobs or so. Reason for this is to make it harder to spot by other players.

I'll figure it out, just want to make sure I'm on the right track. Would the best way to go be to use the iteration/condition?

ex:

int total = 0;
for (int i = 1; i <= 10; i++)
total += i;


Thanks for any help.
 
Very simple variant:
Code:
for (int z = 1; z <= numezonesfarm; z++)
{
walking to next zone;
for (int i = 1; i <= 10; i++)
{
Farm here;
}
}
 
You'll also want to add:
Code:
while (me.target != null && !isAlive(me.target) && me.target.dropAvailable && isAlive())
{
if (me.dist(me.target) > 3)
ComeTo(me.target, 1);
PickupAllDrop(me.target);
}

if(me.target != null && !isAlive(me.target) && !me.target.dropAvailable)
{
CancelTarget();
i++;
}
 
Status
Not open for further replies.
Back
Top