Quote:
Originally Posted by StarBucks
Has anyone else finished "Pullweights"? If you have, have you noticed that it doesn't find the most direct path? This is what it is doing to me.
I'm going from the Farthest side of BI down to the portal, once there, go back.
|
May i ask, what kind of jumps are you using to jump the path? Like what combination (NORMAL 137-CLI 156) Because im trying it to, and somehow when i jump with 137, and clijump with 156 after it, it just DOESN't update/move. It's just moving at 1 position.
<Edit>
Ill throw you guys a 'bone' about mining.
Okay lets see, i will explain how you need to make this mining function.
Firstly thanks to
P4N his base, all the items we mine will be added to an inventory array. We could maybe check if there is a ore in it and make it drop. We will be doing that by this:
Code:
foreach (Items.ItemInfo invenitem in C.Inventory.Values)
{
//Do stuff here
}
As you can see it will go through every Item in the inventory now(That's hold by the Client) and this way we can do something with 'invenitem' like getting the UID!
Let's try that out!
Code:
if (Handler.IsOre(invenitem.ID))
{
//Yea yeah, we coming there
}
It will now check if the item is an ore, and if so we could do some actions with it. Maybe dropping?
Let's see how that works.
Code:
Packets.DropItem(C, invenitem.UID);
That's the code to drop the item. But the problem is now, if we are going to mine, and we have already some ores in inventory it will spam this packet and after all get you
INSTANTLY botjailed.
So what we gotta do now is, add somekind of waittime. We will do that like this:
Code:
if (C.LastDropped.AddMilliseconds(1000) < DateTime.Now)
{
Packets.DropItem(C, invenitem.UID);
}
Yea, now it will drop an item every second. That's pretty normal and will not get you botjailed ever.
Okay, now we have handled all the parts it will after all make a mining drop function. I made it already for you guys, but i wouldn't leech this without reading above, because you will not learn from that and if you have read above you will see that i made somekind of anti-leech in there.
Code:
foreach (Items.ItemInfo inventitemin C.Inventory.Values)
{
if (Handler.IsOre(inventitem.ID))
{
if (C.LastDropped.AddMilliseconds(1000) < DateTime.Now)
{
Packets.DropItem(C, inventitem.ID);
C.LastDropped = DateTime.Now;
}
}
}