PDA

View Full Version : [Fighting] [Reflection] Kyle's eFighter Account Trainer



Kyle
12-08-2015, 07:27 PM
So it had been a while since I had released a script, and I have never released one with the new reflection include. I was bored last night and decided to whip something up. I tried to write this in a very clean and efficient way in which it will be both modular to easily add on to it, and helpful for people to learn how to script with reflection.

What it is, is a simple startup account combat trainer, which all you need to do is put Iron, Steel, Mithril, Adamant, and Rune Scimitars in the bank (One of each, only for current attack level and up) and it will attack goblins by the goblin house, deathwalking and grabbing the needed scimitars when needed. It will train Attack, Strength, Hitpoints, and if you select it, Defense and Prayer.

With the script being so modular and easy to add new locations, I plan on adding more monsters when the player reaches certain levels, if you could recommend what levels you would like to do I can add quite easily (I was thinking about monks next).

It has no mouse movements (which I explain in the script how to add) and minimal antiban as this in meant for starter accounts.

Enjoy and post progress reports and let me know of any bugs or what you would like to see added.

If anyone wouldn't mind making this thread a bit more interesting and less wall of text like, let me know that as well :)


Version: 1
Running for 180 Minutes
Gained 7 Attack Levels, 0 Strength Levels, 7 Defense levels, and 6 Prayer levels
Currently fighting Goblins using Block attack style

Hoodz
12-08-2015, 08:41 PM
shit script.

edit: STILL can't rep+ you, you'll get it once its possible.

Rlp
12-13-2015, 04:52 PM
So it had been a while since I had released a script, and I have never released one with the new reflection include. I was bored last night and decided to whip something up. I tried to write this in a very clean and efficient way in which it will be both modular to easily add on to it, and helpful for people to learn how to script with reflection.

What it is, is a simple startup account combat trainer, which all you need to do is put Iron, Steel, Mithril, Adamant, and Rune Scimitars in the bank (One of each, only for current attack level and up) and it will attack goblins by the goblin house, deathwalking and grabbing the needed scimitars when needed. It will train Attack, Strength, Hitpoints, and if you select it, Defense and Prayer.

With the script being so modular and easy to add new locations, I plan on adding more monsters when the player reaches certain levels, if you could recommend what levels you would like to do I can add quite easily (I was thinking about monks next).

It has no mouse movements (which I explain in the script how to add) and minimal antiban as this in meant for starter accounts.

Enjoy and post progress reports and let me know of any bugs or what you would like to see added.

If anyone wouldn't mind making this thread a bit more interesting and less wall of text like, let me know that as well :)


Version: 1
Running for 180 Minutes
Gained 7 Attack Levels, 0 Strength Levels, 7 Defense levels, and 6 Prayer levels
Currently fighting Goblins using Block attack style

I will probably give this a go later Elfyyy.

As for what to add to it, Cows, Chickens and the giant rats outside lumbridge castle would be worth looking at.

Hamish
12-17-2015, 06:28 PM
Been using it at the goblins at Lumbridge I can see the bot stops at times to look for bones but when it doesn't find any bones to pickup it just stands around waiting for bones and never goes back to attacking monsters until the inventory is full... any ideas? Even when I edit the script so its not meant to pick items up it seems that it works amazing for a little bit then after 10-15 minutes it'll just stop doing anything, script doesnt give any errors it just doesn't attack or move...

Kyle
12-17-2015, 07:04 PM
Been using it at the goblins at Lumbridge I can see the bot stops at times to look for bones but when it doesn't find any bones to pickup it just stands around waiting for bones and never goes back to attacking monsters until the inventory is full... any ideas? Even when I edit the script so its not meant to pick items up it seems that it works amazing for a little bit then after 10-15 minutes it'll just stop doing anything, script doesnt give any errors it just doesn't attack or move...

Hmmm that's odd, never saw that when testing. I've changed a lot with the include lately so maybe something with that messed it up. I'll check it later when I get off work.

Kyle
12-21-2015, 01:53 AM
Script updated to V1.2.. Few small fixes and updated to new pastebin link setup :)

AFools
12-22-2015, 05:11 AM
procedure TReflectionMouse.Move(Pnt: TPoint; RanX, RanY: Integer); override;
begin
MoveMouse(Pnt.X + RandomRange(0, RanX), Pnt.Y + RandomRange(0,RanY));
end;

I pinch the snippet to over-ride the mouse functions; but i was getting horrible results, i could not work out what it was or duplicate it. The mouse would seems miss mouse by 20+ pixels; sometimes seemingly more. (i'm not sure how <- i'm talking about a (+3 variance))

(-Ranx, Ranx) is a tall stretch from (+Ranx); therefore i changed it to (0,Ranx); This has yielded better much better results.

kiwikiwi
12-22-2015, 05:24 AM
Good job Kyle :)

jstemper
01-13-2016, 05:33 PM
I was planning on trying this on a lvl 3, but i'm getting this error:
Error: Duplicate declaration "SetRun" at line 78
Compiling failed.
any ideas?

AFools
01-13-2016, 06:54 PM
I was planning on trying this on a lvl 3, but i'm getting this error:
Error: Duplicate declaration "SetRun" at line 78
Compiling failed.
any ideas?

Just delete the entire function 'setrun' it is now in the include.

jstemper
01-15-2016, 04:40 AM
Just delete the entire function 'setrun' it is now in the include.

Thanks bro, i've been out of 07 loop for awhile

Vizual
01-19-2016, 01:28 AM
Looks good thanks for this

Keelijh
01-23-2016, 07:17 PM
This script is great!

Although, I did have an issue--with not detecting the correct weapon if it was already equipped. Then the script would head to the bank, not be able to find the correct weapon, eventually getting lost on the top floor while trying to go downstairs.

I disabled the functions for heading to the bank/swapping weapons and was able to be using it for several hours without many hiccups. ^.^


I leveled one account to level 25+ attack at the goblins :P

Simbaguardian
01-29-2016, 01:32 AM
This script is great!

Although, I did have an issue--with not detecting the correct weapon if it was already equipped. Then the script would head to the bank, not be able to find the correct weapon, eventually getting lost on the top floor while trying to go downstairs.

I disabled the functions for heading to the bank/swapping weapons and was able to be using it for several hours without many hiccups. ^.^


I leveled one account to level 25+ attack at the goblins :P

have you progressed any other stats with this script or been hit with a banhammer?

Hodor123
02-02-2016, 08:40 AM
I must be doing something wrong; i setup the script to fight the goblins and train pray. It kills the goblin but doesn't pick up the bones/bury them

nik3x
02-03-2016, 07:08 PM
I love this script but one thing bother me and i stopped useing this script because of it.
I want the mousemovement ok, it works.

But everytime it search for new npc to attack, it reset the mousepointer. it jumps to northwest corner of the game and works from there to goblin and attack.

This seem very bad :( and i hope there is a fix for it.

I mean can the mouse just stay at the same point as it attacked last time.
and from there, do new attack or search for goblin. not that the mouse jumps to the northwest corner of runescape, and works down to the goblin target. :( please i hope you understand my bad language.

bran_corn
02-13-2016, 04:39 PM
This script is great!

Although, I did have an issue--with not detecting the correct weapon if it was already equipped. Then the script would head to the bank, not be able to find the correct weapon, eventually getting lost on the top floor while trying to go downstairs.

I disabled the functions for heading to the bank/swapping weapons and was able to be using it for several hours without many hiccups. ^.^


I leveled one account to level 25+ attack at the goblins :P


I must be doing something wrong; i setup the script to fight the goblins and train pray. It kills the goblin but doesn't pick up the bones/bury them

I'm having both of these issues as well. I'll edit this post if I figure either of them out.

edit1: hmmm seems that Bones.GetMSPoint is giving {-1,-1} and Bones.GetTile is giving {0,0}

edit2: I see! Bones.Find('Bones', 5) is returning false!

edit3: Strange. I've made a variable Debug: TReflectGroundItemArray; and I iterate through all of it's elements but they all give me blank output for GetName:

for i:=0 to Length(Debug)-1 do
begin
WriteLn(Debug[i]);
WriteLn(Debug[i].GetName);
end;

edit4: ok so setting Bones.Find("Bones", 5) -> Bones.Find(1, 5) fixes the problem it seems. btw is there any documentation of the Reflect include? It was kind of painful digging through the code, especially when I'm not super familiar with Lape syntax (is there good documentation for that anywhere?)

Keelijh
02-13-2016, 07:14 PM
btw is there any documentation of the Reflect include? It was kind of painful digging through the code, especially when I'm not super familiar with Lape syntax (is there good documentation for that anywhere?)

On the github portal for Reflection (https://github.com/Elfyyy/OSR-Reflection), there is little in the way of actual documentation. Your best option for learning, IMHO, would be to review Reflection-based scripts, and search for scripts with documentation, although not many public scripts are as well-documented as I would like to see. I can't blame people though, documenting for this kinda stuff seems silly mainly because, well, it's a free-to-play online video game among other reasons(facetiousness intended :yawn:).

For example, ineedbot has several well made scripts you could reference. Take a gander at the custom functions published on these forums (on that note, thanks again, iNeedBot!). The layout and format of iNeedBot's scripts make absorbing the marrow of the procedures/functions seem less daunting.



It'd be a great idea for the community to begin documenting the major includes better, at the very least. Sure, there are tutorials on the forums, however the includes ought to contain snippets-examples on the use of a function, definitions of variables/parameters/etc.

bran_corn
02-13-2016, 07:51 PM
I found this (http://blog.wizzup.org/blog/lape) but it's pretty incomplete. The lack of documentation is making it much more difficult to learn. I feel like documentation is less fun to write than code but is almost as important. In R or python you can load up a package somebody else wrote and be using it within a couple minute whereas here I find myself having to read through the code multiple times and writing test code to figure things out.

But yeah, thanks for the advice I've been reading over iNeedBot's code to figure things out and will continue!

KeepBotting
02-13-2016, 08:53 PM
Wizzup?'s Lape tutorial https://github.com/nielsAD/lape/blob/master/docs/lape.rst
Brandon's Lape tutorial https://villavu.com/forum/showthread.php?t=105024

In the way of reflection documentation there's a section containing some tutorials https://villavu.com/forum/forumdisplay.php?f=659

Hope this helps a bit :)

maikelpro99
02-16-2016, 01:18 AM
Error: Duplicate declaration "SetRun" at line 78

78- procedure TReflectLocalPlayer.SetRun(Toggle: Boolean);

terrorbyte
02-17-2016, 03:08 PM
Error: Duplicate declaration "SetRun" at line 78

78- procedure TReflectLocalPlayer.SetRun(Toggle: Boolean);

delete SetRun function entirely. It's been added into includes. Read the thread.

On the otherhand, I'm getting


Error: Unknown declaration "Init" at line 86

I already have the latest version of Prosocks.DLL not sure why it's bugigng out for me. Kyle;

terrorbyte
02-17-2016, 03:11 PM
updated prosocks.dll getting this now:


Error: Unknown declaration "GetWeildedWeapon" at line 152

Hodor123
02-20-2016, 06:17 AM
Thanks for the handy debug/repair. I've been inactive but still want to thank you!

Mj
02-20-2016, 03:15 PM
updated prosocks.dll getting this now:

Typo was fixed in a newer include version change the line to GetWieldedWeapon

terrorbyte
02-20-2016, 05:53 PM
Typo was fixed in a newer include version change the line to GetWieldedWeapon

Will update and test it out. How stupid of me lol

Mj
02-20-2016, 07:32 PM
Will update and test it out. How stupid of me lol

The Typo was in the include, but the script needs its function call to be changed as well, its not that obvious :).

terd
05-02-2017, 10:53 PM
I made all the suggested alterations, but it doesn't seem to attack anything.