Originally Posted by
mitch1490
the problem is that the bot function "get all drop" doesn't work at all...
I tryed so many things to get it to work but no success.
That's really broad, I kinda need more details. Do you have a checkbox assigned? If so try naming the instance to acceptAll.
Then add this line of code on your class:
Code:
public var acceptAll:CheckBox;
Code:
function acceptDrops ():void {
if(acceptAll.selected) {
pickUpItems();
}
}
Then you can add the pickUpItems function:
Code:
public static function pickUpItem(name:String)
{
//var dropStack:MovieClip = clone(Game.ui.dropStack) as MovieClip;
var invTree:Object = clone(Game.world.invTree);
for each (var item:Object in invTree)
{
trace("Item Name: " + item.sName + " Search name: " + name);
if (item.sName == name)
{
Game.sfc.sendXtMessage("zm", "getDrop", [item.ItemID], "str", Game.world.curRoom);
trace("[ Auto-Pick Up ] : Get Drop packet successfully sent!");
break;
} else {
trace("[ Auto-pick up ] : Item not found!");
}
}