SRL Archive - OSR Help

Hmmm .. GATHERMINIMAP


sm0k3

2011-04-02 19:34:14

Hmm i cant seem to get My Player To Walk Back ..

Everything works untill WalkJob2;

..

program GoingBannanas;
// ########################################################
// ## Welcome To Going BANNANAS V1.0a ##
// ## ##
// ## Picks Bannanas In Karamja Bannana Plantation ##
// ## Start in Luthos's Hut in Karamja. Nothing in ##
// ## Inventory … ##
// ########################################################

//#############################################
//{$DEFINE SMART} //Uncomment for SMART ####
{.include SRL/SRL.scar} //##
{.i SRL/SRL/core/SPS/SPS.simba} //##
//#############################################

// ####################
// ## Configuration: ##
// ###### ###################################
const //#########################################################

// ### Player Configuration ################################
Pname0 = ''; // Player 0 UserName
Ppass0 = ''; // Player 0 PassWord
nick0 = 'kind'; // 2-4 letters of Username (that are not capital letters or numbers).

Pname1 = ''; // Player 1 UserName
Ppass1 = ''; // Player 1 PassWord
nick1 = ''; // 2-4 letters of Username (that are not capital letters or numbers).
// #########################################################

// ### SRL Stats Configuration ############################
sUser = ''; // SRL Stats UserName
sPass = ''; // SRL Stats PassWord
// #########################################################

// ##############################
// Variables
var
FillPath, BoxBoss: TPointArray; //
x, y, BF, BP,GPearned: integer;
sLoc: string;


procedure DeclarePlayers;
begin
Disguise('Windows Live Messenger');

HowManyPlayers:= 1;
CurrentPlayer:= 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := Pname0; // Username.
Players[0].Pass := Ppass0; // Password.
Players[0].Nick := nick0;
Players[0].Active := True;
end;

// End of Config
Procedure WalkJob;
Begin;
if (sLoc = 'Luthas') then
Begin;
SPS_WalkPath(FillPath);
End;
End;

Procedure WalkJob2;
Begin;
if (sLoc = 'Btrees') then
Begin;
InvertTPA(FillPath);
SPS_WalkPath(FillPath);
InvertTPA(FillPath);
End;
End;
Procedure DoJob;
Begin;
repeat
sLoc:='Btrees';
FindObjEx(x, y, ['ick', 'nanas'], [2352631], 5, 9, MSX1, MSY1, MSX2, MSY2);
Mouse(x,y,1,1,true);
until (InvFull);
Wait(500+Random(500))
End;

Procedure TalkLuthas;
Begin;
ClickToContinue;
wait(600+Random(500));
ClickToContinue;
wait(600+Random(500));
if (FindText(x, y, 'Could you offer', NPCCHARS, MCX1, MCY1, MCX2, MCY2)) then
Begin;
Writeln('NPC Chat Found')
Mouse(x,y,0,0,True);
wait(600+Random(500));
ClickToContinue;
wait(300+Random(500));
ClickToContinue;
wait(600+Random(500));
ClickToContinue;
wait(600+Random(500));
ClickToContinue;
End else;
Begin;
Writeln('Couldnt Find NPC chat');
End;
End;
Procedure StartJobs;
Begin;
FindObjEx(x, y, ['alk', 'uthas'], [600382], 5, 9, MSX1, MSY1, MSX2, MSY2);
if IsUpText('uthas') then //Check it is Luthas
Begin;
sLoc:='Luthas'
Writeln('Luthas Found')
Mouse(x,y,1,1,true);
Wait(1000+Random(2000))
TalkLuthas;
End else
Begin;
Writeln('Luthas Not Found')
StartJobs;
End;
End;

// Program Begins

//MainLoop
begin
SPS_Areas := ['8_6'];
sLoc:='Luthas' ;
FillPath:=[Point(3375,2504),Point(3338,2497),Point(3299,2496),Point(3295,2473)];
BoxBoss:=[Point(3377,2504),Point(3383,2487)];

Smart_Signed := True;
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
SPS_WalkPath(BoxBoss);
Wait(2000+Random(300));
StartJobs;
WalkJob;
Dojob;
WalkJob;
WalkJob2;
end.


the error is
[ERROR] GATHERMINIMAP:: Exception: Access violation

HarryJames

2011-04-02 19:47:25

You do appear to be Invering the path twice, but i'm drunk so you should probably ignore me!

Coh3n

2011-04-02 19:48:02

I get the same when I use SPS sometimes. I don't know why. Most times it works fine, others I get that. My best suggestion is to just restart Simba a couple times. Other than that I have no idea. :unsure:

HarryJames

2011-04-02 19:48:40

Ignore that, you made it walk to path and then changed it.

Remove the ';' after the Begin for WalkJob2, that should help :)

Ogre

2011-04-02 20:13:22

You left your password in there, I PM'd you what I changed it to (don't want anyone stealing it! :thumbsdown:)

sm0k3

2011-04-02 20:50:46

@ Ogre .. Thnx i gotta write a script that checks 4 these things lol..

Stil doent walk back tho .. it walks to luthos talks to him .. walks to bannana's

fills up the inventory then as soon as its supposed to walk theb same path back .. spams debug with the error for 1 - 2 mins then the scrpt stops

Dgby714

2011-04-02 21:03:33

If we get more access to Simba's form from extensions we can make it where when you copy it sensors them automatically

sm0k3

2011-04-02 21:06:03

That would be usefull.. hmm if i knew how i would make it

Dgby714

2011-04-02 21:09:04

I could make it easily but we just don't have enough access to do it. You could just use Paster….

Floor66

2011-04-03 03:47:47

I do suggest you run Simba with admin rights. It's fixed a lot of access errors for me.

sm0k3

2011-04-03 06:25:04

Ive found the solution … lol


hmm it only works in smart ..

in smart its flawless .. wonder why it dont work in normal client .. ?

Coh3n

2011-04-03 12:09:08

From: sm0k3
Ive found the solution … lol


hmm it only works in smart ..

in smart its flawless .. wonder why it dont work in normal client .. ?

The normal client "flickers" a lot, and I've seen that cause problems for quite a few people.

Floor66

2011-04-03 12:15:30

What I do against the flicker is use a try…except…finally for a crapload of colour/bmp/dtm finding but it's just too messy so I switched to SMART.