If there are people who want to help, I would really appriciate it.
The theory it's simple, but I have no ideea how to write the code.
My plan is to write this bot that it can automatically fight 10 times, with a break of 10 minutes between each fight. I could do this by simply recording the macro, but there are some problems.
I can't beat someone who has more energy than me. So, I'm looking for a code that can read my victim's energy, and if the number is bigger than 5 (for example), than return and find another one who has less.
I've put here a printscreen that shows how this menu looks. The code should read vitim's energy from this menu, check if it is bigger than 5 and return to the list for searching another one with less energy. Or if it's possible to figure out from the begining the one that has less than 5% energy, why not.
I've thought that going by inspect element in chrome may help me. I located the line where energy is displayed, but I have no ideea how to write the code.
I've started building this code, but it can only do simple tasks cause I dont know how to improve it yet.
------------------------------------------------------------------------------------------------------------------------------
Code: Select all
VERSION BUILD=1002 RECORDER=CR
URL GOTO=http://www.marketglory.com/account
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=588
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=587
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=588
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=589
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=601
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=603
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=602
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=603
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=606
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test
WAIT SECONDS=605
You can notice here that I copied the tasks because there are 10 fights to do and I want the macro to keep running. As I said, there is a timeout of 10min between fights, and I added that with a difference of couple seconds
so I'm safe from getting banned, cause they could check that I'm doing my fights every day at the same interval. I will keep editing this timeout.
So, besides variable reading, I would also need a loop with an timeout of 10min between each task group.
I really want to learn some coding commands, as a begginer. If you guys can help me with that, I would really appriciate it.
As a summary, I need a code for reading variables who can chose the victim that has the energy under 5% and a loop one, with a timeout of 10mins between each fight, who would simplify that long code.
A tested fight, is defined by that:
Code: Select all
URL GOTO=http://www.marketglory.com/account
TAG POS=2 TYPE=SPAN ATTR=TXT:Lupte<SP>Referali
TAG POS=1 TYPE=A ATTR=TXT:Ataca
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://www.marketglory.com/account/fight/view_fight/319762 ATTR=NAME:test