SRL Archive - General

Idea for a Safe Spot Script!


Billy Bobby8

2007-09-06 21:31:50

All right, I am not a SCAR Scripter by any means, but I was talking to GExtreme (The one who made that ranging script) and he said he couldn't get down killing stuff in cages. Like it wouldn't know when it had killed the monster, so you'd have to set a time (I.E. every 45 seconds, click on the monster to attack it again) but that wasn't to precise. So today I was thinking, and I came up with this idea.

The script would look at the Ranged EXP (Hover Mouse over the ranged skill) And look to see when the exp goes up a set amount (So for an ogre, it would need 1 of http://runehq.com/RHQMonsterView.php?id=89 these XP Amounts set by the user. So if you were fighting on Accurate it would need to have gained
319 EXP before it clicks on another monster. Post thoughts guys!

1q1q

2007-09-06 22:09:38

Well, you can just make it to where it can click on another monster by any amounts of exp gained. Instead of having the exact amount, because if you get any exp.. the only way is to kill a monster.
Edit: It will also be less clutter!! :D

IEatJ00erBaybees

2007-09-06 22:14:29

Interesting…very interesting. So it would take the exp before it starts killing it, then, while ranging, it will put the exp found+319<current exp, switch to another monster?

Billy Bobby8

2007-09-07 01:51:47

From: 1q1q
Well, you can just make it to where it can click on another monster by any amounts of exp gained. Instead of having the exact amount, because if you get any exp.. the only way is to kill a monster.
Edit: It will also be less clutter!! :D


Good idea, but may I make a little change to your idea.

When it is looking at the exp, if it doesn't go up for say, 10 seconds, it will check to see if a Random has appeared, you have been teled away, or if something went weird and you need to attack a monster :)

From: IEatJ00erBaybees
Interesting…very interesting. So it would take the exp before it starts killing it, then, while ranging, it will put the exp found+319<current exp, switch to another monster?


Exactly! :)

Rikje

2007-09-07 04:25:36


program New;
{.include SRL/SRL.scar}

var
x, y, CurrentXp, WaitTime : Integer;

const ExpMonster= 12;

Function CheckExp: Boolean;
var
TempExp : Integer;
begin
TempExp:= CurrentXp + ExpMonster - 2; //Fail Save.

if GetXp('Range') => TempExp then
begin
Result:= True;
Currentxp:= TempExp;
end;
end;

begin;
SetupSRL;
CurrentXp:= GetXP('Range');
Repeat;
FightMonster;
MarkTime(WaitTime);
repeat;
Wait(2000);
until(CheckExp) or (timefrommark(WaitTime)=>10000)
if (timefrommark(WaitTime)=>10000) then
CurrentXp:= GetXp('Range');
until(false);
end.

:)

n3ss3s

2007-09-07 10:52:59

m im bored, ill make a port sarim jail ranger :D

Psychor

2007-09-07 11:58:47

It's a good idea, but you would have problems in a multi zone, like the demon cage in the wizard tower. Cause when someone else fiures at it, it takes away from your total exp that your calculating on.

n3ss3s

2007-09-07 12:23:34

-.- Let me show how its done… Ill be done propably in a few days… School takes lot time.

Billy Bobby8

2007-09-07 13:51:44

Wow, great job Rikjess, I'm not a scripter, but from what it looks like, that is a pretty handy little fail safe you made! And the thing is, if it is in a multi zone, it will just look and see that it hasn't gained any exp, then do what I said it would do above! :)

1q1q

2007-09-07 15:51:41

From: Psychor
It's a good idea, but you would have problems in a multi zone, like the demon cage in the wizard tower. Cause when someone else fires at it, it takes away from your total exp that your calculating on.


Thats why I said in my post, that let it check for any expierance gain.. in case that happens.
Because you will HAVE to kill someone in order to gain expierance. only way you can gain expierance without killing something is by a random. and you have to do other movements then just killing a monster for that to happen. ie) the book of knowledge.

Infantry001

2007-09-07 21:18:36

You could use infightat.

Billy Bobby8

2007-09-07 22:09:09

What is that?

Psychor

2007-09-08 21:45:48

From: 1q1q
Thats why I said in my post, that let it check for any expierance gain.. in case that happens.
Because you will HAVE to kill someone in order to gain expierance. only way you can gain expierance without killing something is by a random. and you have to do other movements then just killing a monster for that to happen. ie) the book of knowledge.


I'm only playing Runescape for about 3 months now, so correct me if i'm wrong. But i thought you would get experience by actually hitting it and doing damage. So you don't have to actually kill it to gain experience.

takeNout

2007-09-12 07:32:52

From: rikjess

program New;
{.include SRL/SRL.scar}

var
x, y, CurrentXp, WaitTime : Integer;

const ExpMonster= 12;

Function CheckExp: Boolean;
var
TempExp : Integer;
begin
TempExp:= CurrentXp + ExpMonster - 2; //Fail Save.

if GetXp('Range') => TempExp then
begin
Result:= True;
Currentxp:= TempExp;
end;
end;

begin;
SetupSRL;
CurrentXp:= GetXP('Range');
Repeat;
FightMonster;
MarkTime(WaitTime);
repeat;
Wait(2000);
until(CheckExp) or (timefrommark(WaitTime)=>10000)
if (timefrommark(WaitTime)=>10000) then
CurrentXp:= GetXp('Range');
until(false);
end.

:)


Shouldn't you add a range to the monster's hp, as it may regen some hp whilst in combat, thus giving you more exp.

Rikje

2007-09-12 11:46:20

From: takeNout
Shouldn't you add a range to the monster's hp, as it may regen some hp whilst in combat, thus giving you more exp.


exept of the part that i just made dat verry fast :p.
but it does -2. incase of it miss 1 hp. and ''=>'' so if it got more hp it will exit to.

Infantry001

2007-09-12 17:28:51

From: Billy Bobby8
What is that?


InFightAt is a function that lets you know if there is a health bar at a given point on the screen (you input them yourself). It may be more reliable than your current exp checking, but you would need a good function to find the monster's new spot (because they move after getting attacked, of course).

You can find it in my Monastery Terrorist script (link in siggy, click the script stats).