SRL Archive - Research & Development Lounge

NEW SolveDemon


SaiKo HaWaIIaN

2009-01-10 17:23:43

for those of you whos computers couldnt handle the default script, as mines couldnt, here is an alternative. pretty basic, but also the best that i can do =D

i would appreciate it if you post here if it Did/Did NOT work for you.

Note: i use SCAR 3.15b, revision 31

instructions:
1. backup Demon.scar (location: includes/SRL/SRL/core/AntiRandoms/)… rename to Demon[BACKUP].scar
2. place the new Demon.scar you just downloaded into that same directory.

or you can fill out lines 17 - 19 of Drill Sergeant Damien.scar and run that (if your character is already in the event.

UPDATED just a bit, a little "more efficient".

UPDATED added a progress report to it.

Gu3st...

2009-01-11 09:28:31

    repeat
wait(1000);
until FindNPCChatText('private', Nothing)
MY EYES!!!!
GAAAH

[S]paz

2009-01-11 09:45:48

*fixes Zytex's eyes*

Btw wait 1 sec until it finds text is very dangerous, what if something goes wrong and it never says private, your left waiting forever!!!

~Spaz

Wizzup?

2009-01-11 13:08:14

Do you know that the signs and colors change position and owner everytime you enter and exit the event? This won't work. Good job nevertheless.

SaiKo HaWaIIaN

2009-01-11 17:38:13

thanx for the reply's. but has anyone actually tried it yet?

no offence wizzup, but i dont agree with you that it will not work. then again i need testers to answer that. if the colors change more than that 10 tolerance then the script is a total dud. but if you meant the color mats changes order, then the script should still work, also if the signs change order.

would help alot if i actually knew more of the scripting language and how to use the arrays and such. if someone could polish this thing out, thatd be great. the basic idea is not to use the bitmap thingy, cause it always freezes for me… i waited 10 mintues to be sure it froze =).

mormonman

2009-01-11 18:00:53

From: SaiKo HaWaIIaN
thanx for the reply's. but has anyone actually tried it yet?

no offence wizzup, but i dont agree with you that it will not work. then again i need testers to answer that. if the colors change more than that 10 tolerance then the script is a total dud. but if you meant the color mats changes order, then the script should still work, also if the signs change order.

would help alot if i actually knew more of the scripting language and how to use the arrays and such. if someone could polish this thing out, thatd be great. the basic idea is not to use the bitmap thingy, cause it always freezes for me… i waited 10 mintues to be sure it froze =).


dude he is saying that the mats change spots, so the colors are never the same for each action… don't diss Wizzup, becuz you will most likely be wrong 98% of the time

Baked0420

2009-01-11 18:06:39

he didn't diss wizzup?, he just didn't get what wizzup? was telling him.

but saiko, it won't work because the mat changes what sign it goes with, I think that's what wizzup? is trying to tell you.

randy marsh

2009-01-11 18:06:41

Hmm i think wizz nos rite..

SaiKo HaWaIIaN

2009-01-11 23:53:00

From: [S]paz
*fixes Zytex's eyes*

Btw wait 1 sec until it finds text is very dangerous, what if something goes wrong and it never says private, your left waiting forever!!!

~Spaz


that, can be fixed fairly easily to prevent looping infinite. but im more interested in tests, and if that becomes a major problem now, ill fix it now. until then… still waiting for someone to actually try it.

From: Baked0420
he didn't diss wizzup?, he just didn't get what wizzup? was telling him.

but saiko, it won't work because the mat changes what sign it goes with, I think that's what wizzup? is trying to tell you.


yeah i didnt understand him, …kinda still dont but yeah. it's still working for me.


and to you others try not to spam like that, i want some real feedback. and if you read above, "no offence wizzup"…you know.


edit: ive read his post over and over, i still get the same result -.-. my script doesnt look for a mat in a specific place with a specific sign. i assign a color to a mat, then the trial and error starts, for each assignment (ex. jog, situps…) it trys it on mat1 first,(which i have assigned a color to, no matter where that mat is located, it is mat1.) if its wrong, the next time it gets the same assignment, it goes to the next mat color and so on. maybe ill make a video…cant really explain so well.

anyways… here is the code, for those of you who hadn't even looked at it and already booing me:f:
program Sergeant_Solver;
{.include srl/srl/misc/Smart.scar}
{.include srl/srl.scar}

var users, x, y, StarJumps, PushUps, SitUps, Jog: integer;
Busy, SJ, PU, SU, J: boolean;

const Mat1 = 745026;
Mat2 = 946986;
Mat3 = 542270;
Mat4 = 3167543;

procedure setup;
begin
NumberOfPlayers(1); //The number of players you will be using

Players[0].Name:= ''
Players[0].Pass:= ''
Players[0].Nick:= '' //3-4 characters, no capitals
Players[0].Skill:= 'strength' //woodcutting or firemaking
Players[0].Active:= True

SetPlayerNameTPAs;
Users:= HowManyPlayers;
end;

procedure Perform_Exercise;
begin
if FindNPCChatText('star', Nothing) then
//perform StarJumps.
begin
Busy:= true;
SJ:= true;
PU:= false;
SU:= false;
J:= false;
StarJumps:= StarJumps + 1;
case StarJumps of
1:
begin
FindObjEx(x, y, ['Exer'], [Mat1], 4, 50, msx1, msy1, msx2, msy2);
end;
2:
begin
FindObjEx(x, y, ['Exer'], [Mat2], 4, 50, msx1, msy1, msx2, msy2);
end;
3:
begin
FindObjEx(x, y, ['Exer'], [Mat3], 4, 50, msx1, msy1, msx2, msy2);
end;
4:
begin
FindObjEx(x, y, ['Exer'], [Mat4], 4, 50, msx1, msy1, msx2, msy2);
end;
end;
mouse(x, y, 0, 0, true);
repeat
wait(1000);
until FindNPCChatText('private', Nothing)
end;

if not Busy then
begin
if FindNPCChatText('jog', Nothing) then
//Perform Jog.
begin
Busy:= true;
SJ:= false;
PU:= false;
SU:= false;
J:= true;
Jog:= Jog + 1;
case Jog of
1:
begin
FindObjEx(x, y, ['Exer'], [Mat1], 4, 50, msx1, msy1, msx2, msy2);
end;
2:
begin
FindObjEx(x, y, ['Exer'], [Mat2], 4, 50, msx1, msy1, msx2, msy2);
end;
3:
begin
FindObjEx(x, y, ['Exer'], [Mat3], 4, 50, msx1, msy1, msx2, msy2);
end;
4:
begin
FindObjEx(x, y, ['Exer'], [Mat4], 4, 50, msx1, msy1, msx2, msy2);
end;
end;
mouse(x, y, 0, 0, true);
repeat
wait(1000);
until FindNPCChatText('private', Nothing)
end;
end;

if not busy then
begin
if FindNPCChatText('push', Nothing) then
//Perform PushUps.
begin
Busy:= true;
SJ:= false;
PU:= true;
SU:= false;
J:= false;
PushUps:= PushUps + 1;
case PushUps of
1:
begin
FindObjEx(x, y, ['Exer'], [Mat1], 4, 50, msx1, msy1, msx2, msy2);
end;
2:
begin
FindObjEx(x, y, ['Exer'], [Mat2], 4, 50, msx1, msy1, msx2, msy2);
end;
3:
begin
FindObjEx(x, y, ['Exer'], [Mat3], 4, 50, msx1, msy1, msx2, msy2);
end;
4:
begin
FindObjEx(x, y, ['Exer'], [Mat4], 4, 50, msx1, msy1, msx2, msy2);
end;
end;
mouse(x, y, 0, 0, true);
repeat
wait(1000);
until FindNPCChatText('private', Nothing)
end;
end;

if not busy then
begin
if FindNPCChatText('sit', Nothing) then
//Perform SitUps.
begin
Busy:= true;
SJ:= false;
PU:= false;
SU:= true;
J:= false;
SitUps:= SitUps + 1;
case SitUps of
1:
begin
FindObjEx(x, y, ['Exer'], [Mat1], 4, 50, msx1, msy1, msx2, msy2);
end;
2:
begin
FindObjEx(x, y, ['Exer'], [Mat2], 4, 50, msx1, msy1, msx2, msy2);
end;
3:
begin
FindObjEx(x, y, ['Exer'], [Mat3], 4, 50, msx1, msy1, msx2, msy2);
end;
4:
begin
FindObjEx(x, y, ['Exer'], [Mat4], 4, 50, msx1, msy1, msx2, msy2);
end;
end;
mouse(x, y, 0, 0, true);
repeat
wait(1000);
until FindNPCChatText('private', Nothing)
end;
end;
end;

procedure Evaluate;
begin
wait(1000);
if PushUps > 4 then PushUps:= 0;
if SitUps > 4 then SitUps:= 0;
if StarJumps > 4 then StarJumps:= 0;
if Jog > 4 then Jog:= 0;
Busy:= false;
if not FindNPCChatText('sight', Nothing) then
begin
if not FindNPCChatText('Wrong', Nothing) then
begin
if SJ = true then
begin
StarJumps:= StarJumps - 1;
SJ:= false;
writeln('Found StarJump mat. mat# ' + inttostr(StarJumps + 1));
end;
if PU = true then
begin
PushUps:= PushUps - 1;
PU:= false;
writeln('Found PushUp mat. mat# ' + inttostr(PushUps + 1));
end;
if SU = true then
begin
SitUps:= SitUps -1;
SU:= false;
writeln('Found SitUp mat. mat# ' + inttostr(SitUps + 1));
end;
if J = true then
begin
Jog:= Jog - 1;
J:= false;
writeln('Found jog mat. mat# ' + inttostr(Jog + 1));
end;
end;
end;
end;

begin
Smartsetupex(29, false, true, false);
Settargetdc(smartgetdc);
SetupSRL;
ScriptID:= '808';
setup;
LoginPlayer;
wait(900 + random(900));
SetAngle(true);
makecompass('N');
StarJumps:= 0;
PushUps:= 0;
SitUps:= 0;
Jog:= 0;
SJ:= false;
PU:= false;
SU:= false;
J:= false;
if FindObjEx(x, y, ['Exer'], [Mat1], 4, 50, msx1, msy1, msx2, msy2) then
begin
mouse(x, y, 0, 0, true);
repeat
wait(1000);
until FindNPCChatText('private', Nothing)
end;
repeat
Perform_Exercise;
Evaluate;
until FindNPCChatText('sight', Nothing)
FindNPCChatText('continue', ClickLeft)
writeln('Drill Demon Solved.');
wait(8000);
end.

ian.

2009-01-12 00:19:49

k.. what wizzup said is that for you, the sit ups mat could've been dark green, but for someone else, it could be light green.. they're always different from time to time..

so this shouldn't work..

SaiKo HaWaIIaN

2009-01-12 00:35:34

From: 99_
k.. what wizzup said is that for you, the sit ups mat could've been dark green, but for someone else, it could be light green.. they're always different from time to time..

so this shouldn't work..


if that is the case then it will work.

nielsie95

2009-01-12 09:32:29

I think I understand how you want to solve it. Pretty good idea :) But wouldn't it be suspicious/detectable?

Lee Lok Hin

2009-01-12 09:46:35

So, in summary.

You basically try and guess, with a 1/4 sucess rate, the mat which you have to do? And once you have that, you…


Hm.


Well, it's bannable, yes. And the code could be a lot more efficient. But your idea is great. I think i'll continue on your idea.

SaiKo HaWaIIaN

2009-01-12 15:50:45

From: Lee Lok Hin
So, in summary.

You basically try and guess, with a 1/4 sucess rate, the mat which you have to do? And once you have that, you…


Hm.


Well, it's bannable, yes. And the code could be a lot more efficient. But your idea is great. I think i'll continue on your idea.


thank you, the main thing is to get the idea out so someone with greater skill can produce something, like what you said, "more efficient".

ian.

2009-01-12 18:38:55

sorry.. I get it now..

but yeah.. idea is nice (now that I understand it.. but, needs some fixing up :D)

sorry about saying it wouldn't work :(

Smarter Child

2009-01-12 21:51:57

Could AntiBan solve this issue?

mormonman

2009-01-12 22:50:31

From: leather cock
Could AntiBan solve this issue?


no… it just guesses a mat and clicks it… so it won't help…

SaiKo HaWaIIaN

2009-01-12 23:11:17

yes… it certainly needs some fixing. this is pretty much just enough to get it through =).

Naum

2009-01-14 12:30:50

What sumilion did was to use TPoints to find which was which. He then comitted each loaction to a variable so It wouldn't have to detect it over and over again.

I tried it btw, It only did one then It went beserk :)

SaiKo HaWaIIaN

2009-01-16 08:48:20

From: NaumanAkhlaQ
What sumilion did was to use TPoints to find which was which. He then comitted each loaction to a variable so It wouldn't have to detect it over and over again.

I tried it btw, It only did one then It went beserk :)


thanks for the feedback:)

Tickyy

2009-01-16 13:23:17

From: 99_
sorry.. I get it now..

but yeah.. idea is nice (now that I understand it.. but, needs some fixing up :D)

sorry about saying it wouldn't work :(


OFF-TOPIC

not a big deal, but you spam all the time and try to agree with the others… like your doing something good with all those posts, try to SCRIPT Something.

ian.

2009-01-16 18:55:27

>.> I don't wanna get mad and be like ASDIIJGBSADGKJBASD YOUR A MEANIE FACE!

but, how do you know I don't script? ;D

mormonman

2009-01-17 01:25:57

From: 99_
>.> I don't wanna get mad and be like ASDIIJGBSADGKJBASD YOUR A MEANIE FACE!

but, how do you know I don't script? ;D


well from what we can see, you haven't ever posted a script… which leads us to assume(ass outta you and me i know) that you don't.

ian.

2009-01-17 03:05:57

^^ just you wait :D

lol sorry that I've been having real life trouble and school stuff to do.. but.. I AM doing stuff for the site, just haven't finished what I was doing..

SaiKo HaWaIIaN

2009-01-23 01:24:21

here is my first proggy for this solver. ill add more when i get the chance of another demon event.

Wrong Exercise.
Found StarJump mat. mat# 1
StarJumps performed successfully.
Found PushUp mat. mat# 2
Wrong Exercise.
Found Jog mat. mat# 4
Jog performed successfully.
Found SitUp mat. mat# 3
StarJumps performed successfully.
----------- REPORT ------------
////| Solved Drill Demon: 169 seconds.
////| Wrong exercises: 2.
-------------------------------------
Successfully executed