Jump to content

First Script


Recommended Posts

Zarox you are right about the inv not all showing, when you will sell more items the chimera gear will show up.

The bot worked pretty much all night yesterday as i manage to get to 40million xp (LV 25 TOO :lmao: ) and when i went to bed i was at 30 million. I hope i finally corrected the glitch *cross fingers*

As for Golbez, thank you for your interrest ! you're more than welcome to help out ! but i don't see right away the mods you've made and why is the #inclue <misc.au3> necessary. Work on the code but try to mark out the changes :whistle:

And for the gui, i agree with both of you :lmao: it would be an interresting feature but i also feel the auto loot selling function is more interresting for now.

If the script is still running when i get back from work, i'll work on the AutoSell function.

Cheers

Lespoils

i had to update my autoit.. i didnt have the right libs ;) but i fixxed that

im going to work on a way so when you die the bot doesnt crash it just pressed finnish and keeps going :P

but all this will happen after i get home from work :P 5pm est

Link to comment
Share on other sites

  • Replies 85
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Okay Yes, this is a good idea. Thx Golbez

When i get home (5pm too), if the script is still running, i'll post it again. and i'll start on the AutoSell Function.

Another thing that can be nice, is to find a way to simply run the script and it would open the right IE page. so that we do not need to go through FireFox.

but again this is less important than getting the script glitchless and adding the autosell function.

Lespoils

Link to comment
Share on other sites

if u put it to -1 it'll fight only ants your level, if u put it to 0 it'll only fight ants 1 level lower than u.

For myself i put anyother monster to 4 lvl lower than me, because scorpions are really strong even if u have 3 lvls higher than them.

Hope this helps

Link to comment
Share on other sites

if u put it to -1 it'll fight only ants your level, if u put it to 0 it'll only fight ants 1 level lower than u.

For myself i put anyother monster to 4 lvl lower than me, because scorpions are really strong even if u have 3 lvls higher than them.

Hope this helps

does... question.. how do you make it read the screen i cant get it to do it :whistle:

func Fight()
    $oIE = _IEAttach ("Pet me") 
    $sText = _IEPropertyGet($oIE,"innertext")   

    while StringRegExp($sText, 'You have killed a') = 0   
      ;this is how i choose a specific button from the page
        $oForms = _IEFormGetCollection ($oIE,0)
        $oElement = _IEFormElementGetCollection($oForms,0)   
       
      ;no _IELoadWait() here to have quicker battle
        _IEAction($oElement,"click")
       
        $oIE = _IEAttach ("Pet me") 
        $sText = _IEPropertyGet($oIE,"innertext")     
    WEnd
   
  ;wait untill the page loads before click loot
    _IELoadWait ($oIE)
   
    if StringRegExp($sText, 'You have killed a') then
      ;this is how i choose a specific button from the page
        $oForms = _IEFormGetCollection ($oIE,0)
        $oElement = _IEFormElementGetCollection($oForms,4)
       
        _IELoadWait ($oIE)
        _IEAction($oElement,"click")
        _IELoadWait ($oIE)
        
    elseif StringRegExp($sText, 'You have died') then
        MsgBox (0, "dead", "your dead")
    EndIf
EndFunc

eather of you guys got aol im? if you do im me: zephino

Edited by Golbez
Link to comment
Share on other sites

does... question.. how do you make it read the screen i cant get it to do it :whistle:

func Fight()
    $oIE = _IEAttach ("Pet me") 
    $sText = _IEPropertyGet($oIE,"innertext")   

    while StringRegExp($sText, 'You have killed a') = 0   
     ;this is how i choose a specific button from the page
        $oForms = _IEFormGetCollection ($oIE,0)
        $oElement = _IEFormElementGetCollection($oForms,0)   
       
     ;no _IELoadWait() here to have quicker battle
        _IEAction($oElement,"click")
       
        $oIE = _IEAttach ("Pet me") 
        $sText = _IEPropertyGet($oIE,"innertext")     
    WEnd
   
 ;wait untill the page loads before click loot
    _IELoadWait ($oIE)
   
    if StringRegExp($sText, 'You have killed a') then
     ;this is how i choose a specific button from the page
        $oForms = _IEFormGetCollection ($oIE,0)
        $oElement = _IEFormElementGetCollection($oForms,4)
       
        _IELoadWait ($oIE)
        _IEAction($oElement,"click")
        _IELoadWait ($oIE)
        
    elseif StringRegExp($sText, 'You have died') then
        MsgBox (0, "dead", "your dead")
    EndIf
EndFunc

eather of you guys got aol im? if you do im me: zephino

i'll add comments on all the lines so you know whats happening

func Fight()

    ;locks onto the page
    $oIE = _IEAttach ("Pet me") 
    ;puts all the text from the page in a string
    $sText = _IEPropertyGet($oIE,"innertext")   

    ;while there is nothing in the string that equals 'You have killed a',
    ;it keeps click on attack/defend
    while StringRegExp($sText, 'You have killed a') = 0   

       ;this is how i choose a specific button from the page
       ;each element of the page has some kinda of ID i had to find this one by trial and error
       ;the var $oElement has a reference to the button attack/defend
       $oForms = _IEFormGetCollection ($oIE,0)
       $oElement = _IEFormElementGetCollection($oForms,0)   
       
       ;no _IELoadWait() here to have quicker battle
       ;usualy i wrap the click command into a _IELoadWait, seemed a lot less buggy
        _IEAction($oElement,"click")
       
       ;Before exiting the While get the focus back on the page
       $oIE = _IEAttach ("Pet me") 
       $sText = _IEPropertyGet($oIE,"innertext")      
    WEnd
   
    ;wait untill the page loads before click loot, 
    _IELoadWait ($oIE)
   
    ;if there is some text that looks like 'You have killed a' do this
    if StringRegExp($sText, 'You have killed a') then

      ;this is how i choose a specific button from the page
      $oForms = _IEFormGetCollection ($oIE,0)
      $oElement = _IEFormElementGetCollection($oForms,4)
       
      _IELoadWait ($oIE)
      _IEAction($oElement,"click")
      _IELoadWait ($oIE)
        
    elseif StringRegExp($sText, 'You have died') then
        MsgBox (0, "dead", "your dead")
    EndIf
EndFuncoÝ÷ Øay-èJÚâ^LiÓ~¬MìmßÖ(º¯yØwméì¥u·¢Ø^Z¥y¦è½ë(ëax%G­+"v'g¶ÚòÛ(Ù¢g¢ÚÞjYrÂänëb·ljËZ®Ö®¶­s`b33c¶ôfvFærÒ¢vÆRb33c¶ôfvFærÒ b7G&æu&VtWb33c·5FWBÂb33µ÷RfR¶ÆÆVBb33²FVà b33c¶ôfvFærÒ ¶Fò6öFRvVâfvB2FöæP VÇ6P 7G&æu&VtWb33c·5FWBÂb33µ÷RfRFVBb33²FVâ b33c¶ôfvFærÒ ¶Fò6öFRvVâ÷RFV@ VÇ6P ¶Fòæ÷&ÖÂfvFær6öFP VæF`¢VæD`¢tVæ

i think the hardest thing is to get the focus on the finish button. if you look at the comment i added u'll see how i got the focus on the different button. start from there.

Thanks for the help Golbez and i hope this gives you a good start.

Lespoils

Link to comment
Share on other sites

mastergolbez37@yahoo.com

idk how to add people lol

and no i dont see any pic in your post if thats what your asking

ok off to work..im already 3 hours late xD

i had to "go to the doctor for a check up" :whistle:

Edited by Golbez
Link to comment
Share on other sites

gasp... I hate you! you were able to use _IEFormGetCollection in this? *sigh* lol, I dropped my own bot BECAUSE of this! rawr!

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

I like the UI, thanks for that. I don't have any things that would make it faster.

Cool but unnecessary ideas:

Show how long you have been running script

Show how much money you have made

Show list of items you have gotten

Show list of how many monsters you have killed

Show list of how many of each type of monster.

Just some fun ideas for your UI.

Thanks alot,

Zarox

Edited by Zarox
Link to comment
Share on other sites

I like the UI, thanks for that. I don't have any things that would make it faster.

Cool but unnecessary ideas:

Show how long you have been running script

Show how much money you have made

Show list of items you have gotten

Show list of how many monsters you have killed

Show list of how many of each type of monster.

Just some fun ideas for your UI.

Thanks alot,

Zarox

are you going to help any or are me and lespoils going to make it all?

Link to comment
Share on other sites

are you going to help any or are me and lespoils going to make it all?

I will but I didn't want to just start working on your GUI, without your consent. I am also testing for the glitch where it goes to the "My Pets" Page. I have been running the script for around 3 hours hoping the glitch will happen, because I need to find the exact spot it happens. Also, I never was part of lespoils project. I had my own script, but then lespoils' posted his script here and I realized his was far superior, so I found no point in continuing the development of mine.

Edited by Zarox
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...