Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    mitch1490's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    2
    My Mood
    Happy

    Question 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

  2. #2
    zerobrium's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    614
    Reputation
    13
    Thanks
    789
    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
    		}

  3. The Following User Says Thank You to zerobrium For This Useful Post:

    mitch1490 (06-10-2013)

  4. #3
    mitch1490's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    2
    My Mood
    Happy
    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...

  5. #4
    mitch1490's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    2
    My Mood
    Happy
    I still need help on this...

    thanks in advance.
    have a nice day.

  6. #5
    zerobrium's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    614
    Reputation
    13
    Thanks
    789
    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?

  7. #6
    mitch1490's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    2
    My Mood
    Happy
    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.
    Last edited by mitch1490; 06-11-2013 at 12:37 PM.

  8. #7
    zerobrium's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    614
    Reputation
    13
    Thanks
    789
    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!");
    	            }
    	}
    Last edited by zerobrium; 06-11-2013 at 02:20 PM.

  9. The Following User Says Thank You to zerobrium For This Useful Post:

    mitch1490 (06-11-2013)

  10. #8
    mitch1490's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    2
    My Mood
    Happy
    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?

  11. #9
    zerobrium's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    614
    Reputation
    13
    Thanks
    789
    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...

  12. The Following User Says Thank You to zerobrium For This Useful Post:

    mitch1490 (06-11-2013)

  13. #10
    mitch1490's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    2
    My Mood
    Happy
    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

  14. #11
    BORATownage's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    70
    Reputation
    15
    Thanks
    7
    My Mood
    Psychedelic
    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?

  15. #12
    mitch1490's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    2
    My Mood
    Happy
    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.

  16. #13
    mitch1490's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    2
    My Mood
    Happy
    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.




    Attached Thumbnails Attached Thumbnails
    compilation awq bot errors.png  

    Last edited by mitch1490; 06-11-2013 at 06:03 PM. Reason: added picture

  17. #14
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,197
    Reputation
    455
    Thanks
    3,812
    @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!

  18. The Following User Says Thank You to Oliboli8769 For This Useful Post:

    mitch1490 (06-12-2013)

  19. #15
    mitch1490's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    105
    Reputation
    10
    Thanks
    2
    My Mood
    Happy
    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.

Page 1 of 2 12 LastLast

Similar Threads

  1. Need a MM for Aqw account trade
    By OverLord. in forum Middleman Lounge
    Replies: 1
    Last Post: 12-08-2012, 09:47 AM
  2. Need a MM for AQW Transaction (PAYPAL)
    By Zerbia in forum Middleman Lounge
    Replies: 2
    Last Post: 09-22-2012, 01:35 AM
  3. Need a MM for AQW Transaction (PAYPAL)
    By Zerbia in forum Middleman Lounge
    Replies: 3
    Last Post: 09-21-2012, 12:54 PM
  4. [Source Code] ..Bots Function .. For Warrock ..
    By Gh0sts~l1f3 in forum WarRock Hack Source Code
    Replies: 8
    Last Post: 01-21-2011, 09:05 AM