QuestionNeed a function for my AQW Bot

Posts 1–15 of 28 · Page 1 of 2
Need a function for my AQW Bot
hi to everyone,

Let me introduce since im a noob in this forum.
I'm a old coder that usualy make bot for USF and maker of botting for money.

I'm recently coding now Bots for AQW and success some times and recently made a Bot for myself.
but, the problem is that im missing a function in my Bot that I would like to have.

that function is "get all drops" and would like to know how that part is made and would appreciate the codes.
for me to complete my bot and start somewhere.

thanks in advance,
have a nice day.

~Best regards~
Mitch1490
Code:
public static function pickUpItems():void
		{
			var dropStack:MovieClip = _instance.ui.dropStack;
			//var dropStack:MovieClip = clone(Game.world.ui.dropStack) as MovieClip;
			var invTree:Object = clone(_instance.world.invTree);
			var arrNames:Array = new Array();
			for each(var test:MovieClip in dropStack) {
				trace("[ Auto-Pick Up ] : On Screen: '" + test.cnt.strName.text + "'");
				arrNames.push(test.cnt.strName.text);
			}
			for each (var item:Object in invTree)
			{
				for each(var itemName:String in arrNames) {
					if (itemName.indexOf(item.sName) != -1 && item.bTemp == 0)
					{
						Game.world.sfc.sendXtMessage("zm", "getDrop", [item.ItemID], "str", Game.world.curRoom);
						trace("[ Auto-Pick Up ] : Get Drop packet successfully sent!");
						break;
					}
				}
			}//Dark Mystic v3.3
		}
Quote Originally Posted by zerobrium View Post
Code:
public static function pickUpItems():void
		{
			var dropStack:MovieClip = _instance.ui.dropStack;
			//var dropStack:MovieClip = clone(Game.world.ui.dropStack) as MovieClip;
			var invTree:Object = clone(_instance.world.invTree);
			var arrNames:Array = new Array();
			for each(var test:MovieClip in dropStack) {
				trace("[ Auto-Pick Up ] : On Screen: '" + test.cnt.strName.text + "'");
				arrNames.push(test.cnt.strName.text);
			}
			for each (var item:Object in invTree)
			{
				for each(var itemName:String in arrNames) {
					if (itemName.indexOf(item.sName) != -1 && item.bTemp == 0)
					{
						Game.world.sfc.sendXtMessage("zm", "getDrop", [item.ItemID], "str", Game.world.curRoom);
						trace("[ Auto-Pick Up ] : Get Drop packet successfully sent!");
						break;
					}
				}
			}//Dark Mystic v3.3
		}
I have already that piece of coding but not seems to work...
I still need help on this...

thanks in advance.
have a nice day.
Quote Originally Posted by mitch1490 View Post
I still need help on this...

thanks in advance.
have a nice day.
What exactly is the problem?
Quote Originally Posted by zerobrium View Post
What exactly is the problem?
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.
Quote Originally Posted by mitch1490 View Post
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!");
	            }
	}
thanks for your help zerobrium,

After did everything you said, I have tested it and its still not accepting the drops.

I just dont know why if this part of code is working... does it works for you bro?
Quote Originally Posted by mitch1490 View Post
thanks for your help zerobrium,

After did everything you said, I have tested it and its still not accepting the drops.

I just dont know why if this part of code is working... does it works for you bro?
It works perfectly fine for me...
Quote Originally Posted by zerobrium View Post
It works perfectly fine for me...
wow... so i might do something wrong...

could you add me to skype to talk about it more privately.

my skype is: michelnoel90
Quote Originally Posted by mitch1490 View Post
wow... so i might do something wrong...

could you add me to skype to talk about it more privately.

my skype is: michelnoel90
you sure you are a coder?
Quote Originally Posted by BORATownage View Post
you sure you are a coder?
yes im a coder but in other computer languages lol

I'm starting in flash... sorry...

---------- Post added at 03:38 PM ---------- Previous post was at 03:32 PM ----------

Quote Originally Posted by zerobrium View Post
What exactly is the problem?
i started again a new form and added a checkbox then assingned by named it like i should.

then added this to my class.

/////////////////////////////////////
public var acceptAll:CheckBox;

function acceptDrops ():void {
if(acceptAll.selected) {
pickUpItems();
}
}
////////////////////////////////////////////

then tryed to add the pickUpItems function at the end of my class but got errors for the clone undefined..

so then i tryed to add the pickup function in my class named GAME... but no success neither...

I'm woundering if im missing something or putting the function not in right place in my project...

thanks in advance for help,

have a nice day.
Here is a picture to my errors i got when did everything like you said.
this might help you to know what I'm having issue with.




@mitch1490
Hey man! You requested for me to check out your post, so I am
But you're in better hand's already! @zerobrium is much more experienced than me, and he is definitely giving you the right advice

I have never had an issue like yours in your last post with the image... but from what I assume, your problem is connected around when you address the game. I am really unsure on this, so don't take my word for it but I would try changing "Game.world.invTree" back to
"_instance.Game.world.invTree" as I don't know if that would be changed from Zerobrium's original code.
You may have to also use Game.as somehow...
But as I said Zerobrium taught me pretty much all I know, so good luck!
Quote Originally Posted by Oliboli8769 View Post
@mitch1490
Hey man! You requested for me to check out your post, so I am
But you're in better hand's already! @zerobrium is much more experienced than me, and he is definitely giving you the right advice

I have never had an issue like yours in your last post with the image... but from what I assume, your problem is connected around when you address the game. I am really unsure on this, so don't take my word for it but I would try changing "Game.world.invTree" back to
"_instance.Game.world.invTree" as I don't know if that would be changed from Zerobrium's original code.
You may have to also use Game.as somehow...
But as I said Zerobrium taught me pretty much all I know, so good luck!
thanks for checking this out.
i tryed so many things and even changing the game.world.invtree to _instance or using my Game.as
but nothing seems to work... sometimes everythings is compiling perfectly but it just dont grab thoses drops.

PS: @zerobrium could you share me a working sample of only the checkbox and coding mixed togheter for me to check what im doing wrong.
Else I can share with you my project for you to step into it and tell me whats wrong with it...


thanks in advance for help,
have a nice day.
Posts 1–15 of 28 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?