SRL Archive - First Scripts

Air Runner Project Map


Hairy Pomegranate

2009-09-12 07:40:12

Hello. I decided rather than to start hacking away with coding right away, I would make a map of how the script will work and post it here to receive criticisms and suggestions, so without further adu, here it is.

Purpose of this script:
convert rune essence in the first page of the bank box to air runes by using an air tiara and explorer's ring to get to the air altar, listening to the musician on the way.

Limitations of this script:
Talisman usage, no explorer's ring, multiple accounts, alternate routes.
Air runner
Start
Start... only once
wait 2000 + random (3000)
Check equip for tiara/exp ring3
hit equipment tab
search for bitmap or colors or item tiara
search for bitmap or colors or item ring3
if either false, logout and end script
wait 1000 + random(1000)
Bank
Open bankbox to withdraw rune essence
anti-random1 = random(3)
if anti-random1 <=2
find object bank booth by color array
mouse x,y
wait random (250)
select option use-quickly
find bitmap or object rune essence
if false logout and end script
mouse x,y
wait random (250)
select option withdraw all
if anti-random1 >2
find object banker by color array
mouse x,y
wait random (250)
select option bank
find bitmap or object rune essence
if false logout and end script
mouse x,y
wait random (250)
select option withdraw all
use equipped explorer ring
wait 1000 + random (1000)
hit equipment tab
find obj explorer ring
mouse x,y
wait random (250)
select option operate
wait 500 + random (250)
find text eleport
mouse x,y click
wait 250 + random (250)
fix map to point directly North
to alter
find bitmap 1
mouse x,y click
check for flag
wait random (250)
if no flag, open gate
find bitmap 2
mouse x,y click
find object musician
mouse x,y
select option (need confirmation)
find bitmap 3
mouse x,y click
... etc until air alter
find object air alter by color array
mouse x,y
select option (need to confirm)
craft runes
find object air alter by color array
mouse x,y
wait random (250)
select option (need to confirm)
find object (need to confirm) by color
mouse x,y
wait random (250)
select option (need to confirm)
from alter
find bitmap 1
mouse x,y click
find bitmal 2
mouse x,y click
... etc
find minimap icon bank
mouse x,y click
The more comments the better I can make the script so please comment!!

The script will continue indefinately unless your bank box has no rune essence in the first page of the bank or you have no explorer rune 3 or air tiara in the equipment page.

I will also need help with random detection techniques if those are to be supported.

Oh, and one more thing… if bitmap finding with maps are not good, tell me other methods of how to walk using the minimap.

mormonman

2009-09-12 08:01:12

Well to really learn, you must "hack" away. The outline looks fine… you will just need to failsafe all of it.

Hairy Pomegranate

2009-09-12 09:01:58

can you explain some failisafing methods to me?

JAD

2009-09-12 09:23:31

From: Hairy Pomegranate
can you explain some failisafing methods to me?


Making sure to not have any infinite loops is one of the most important. Don't do things like


repeat
Mouse(x,y,0,0,true);
until(BankScreen);

Because what if the bank screen never comes up? A MarkTime is one of the most key fail safes:


var t: Integer;

MarkTime(T);
repeat
Mouse(x,y,0,0,true);
until(BankScreen) or (TimeFromMark(T) > 10000+random(5000));

Things like that. Also a lot of if nots"


if(not(RadialWalk(...etc.)))then
if(not(Use a DDTM to walk instead)))then Exit;



Another important one is

if not LoggedIn then Exit;
Very important I should say.



Just try to predict possible things to go wrong. Don't be naive and assume everything is going to go according to plan in a script, because it never does.




There are also some great tutorials on fail safes in the tutorial island section. Do a little searching there if you are still interested :)

If you have any more questions, feel free to ask. You can also add me on msn if you like: [email]runescapemacro@hotmail.com[/email]

~JAD

Gu3st...

2009-09-12 14:09:17

And don't use bitmaps for map walking. The colors does change a lot on the minimap :)

rogeruk

2009-09-12 14:56:42

Why not use the Tiara? It would be alot easier and 1 more slot to use.

Hairy Pomegranate

2009-09-13 10:44:59

it IS tiara only

also, if i don't use a bitmap for walking what should i use? and… what's the problem with an endless loop?

ABC.def.GHI

2009-09-13 11:03:42

From: Hairy Pomegranate
it IS tiara only

also, if i don't use a bitmap for walking what should i use? and… what's the problem with an endless loop?


"Limitations of this script:
Talisman usage"

Umm..? Do you mean it does or doesn't use them? :] I think you just had a typo.

And you can use a DDTM. TRiLeZ has a tutorial, and an endless loop is bad because it's.. endless.. :p if it were like.. a check for something using the mouse, it would continually check, and then get a random and either sit there or solve it and then keep doing the mouse check. :/

Good luck! ^^

Gu3st...

2009-09-13 11:07:44

From: Hairy Pomegranate
if i don't use a bitmap for walking what should i use? and… what's the problem with an endless loop?

1. http://www.villavu.com/forum/showthread.php?t=19162
2. The problem with endless loops is that it may cause the character to click in the same spot for hours and hours and hours… that would cause the character to be banned.

dRez

2009-09-22 22:23:44

Going to use that technique for my scripts tho.