SRL Archive - OSR Help

need help with a procedure please


unknownrpg

2012-12-29 18:28:11

i need a procedure that will

press the 1 key? = SendKeys('1',100,100);
then move the mouse to invslot 19 one time = not really sure =/ mmouse = i dunno
then if IsUpText('Iron ore') then mouse(x, y, 5, 5, true) repeat (check uptext for iron ore and click 1 and inv slot 19 over n over till
IsUpText('Steel bar') then stop

does this make sense?

trying to make a a superheat function that will check uptext before each cast, wait a certain time with a tolerance, then useing the action bar by clicking 1 and leaving mouse over inv slot 19 after moving it there first time then check uptext and if it = iron ore left click and if it = steel bar stop the procedure?

not asking you to do for me feel free if u want lol but maybe show me what functions i need to use to accomplish this? possibly explain them? just started messing with this stuff l8 last night watching yohojo's video tut's

and if ur really bored plz explain to me why my "chooseoption" function wont work in my script in the link, this procedure here will be applied to the script in the link.
http://villavu.com/forum/showthread.php?t=94491

i need advice on script in link on what to chenge to make it cleaner and faster?

Gucci

2012-12-29 18:37:02

Just create a DTM for the iron ore and use this function, also chooseoption should work; update SRL and then restart Simba

procedure HereYaGo;
var
x, y, Iron: Integer;
begin
Iron := DTMHERE
SendKeys('1', 100, 100);
InvMouse(19, mouse_move);
if IsUpText('ron') then
begin
ClickMouse2(mouse_left);
end;

repeat
HereYaGo;
until(not(FindDTM(Iron, x, y, MIX1, MIY1, MIX2, MIY2)))
FreeDTM(Iron);
end;

unknownrpg

2012-12-29 18:39:51

From: Gucci
Just create a DTM for the iron ore and use this function, also chooseoption should work; update SRL and then restart Simba

procedure HereYaGo;
var
x, y, Iron: Integer;
begin
Iron := DTMHERE
SendKeys('1', 100, 100);
InvMouse(19, mouse_move);
if IsUpText('ron') then
begin
ClickMouse2(mouse_left);
end;

repeat
HereYaGo;
until(not(FindDTM(Iron, x, y, MIX1, MIY1, MIX2, MIY2)))
FreeDTM(Iron);
end;


tyvm for quick response i will give it a try thanks again +1

o and in script choose option compiles fine just after the script right clicks the ore it doesnt click the option? it jsut sits there and says complete

unknownrpg

2012-12-29 19:17:22

From: Gucci
Just create a DTM for the iron ore and use this function, also chooseoption should work; update SRL and then restart Simba

procedure HereYaGo;
var
x, y, Iron: Integer;
begin
Iron := DTMHERE
SendKeys('1', 100, 100);
InvMouse(19, mouse_move);
if IsUpText('ron') then
begin
ClickMouse2(mouse_left);
end;

repeat
HereYaGo;
until(not(FindDTM(Iron, x, y, MIX1, MIY1, MIX2, MIY2)))
FreeDTM(Iron);
end;



Error: Exception: The bitmap[0] does not exist at line 664
The following DTMs were not freed: [0]
program SupaHeata;
{$I SRL/SRL.SIMBA}

//credits for this procedure "GUCCI"

procedure HereYaGo;
var
x, y, IronOre: Integer;
begin
IronOre := DTMFromString('mlwAAAHicY2dgYBAAYgUglgZiUSDmZIAARiBmhbI5gJgXiIWgNDMQGypIMOACXHgwIx4MBQCKzAFk');
SendKeys('1', 100, 100);
InvMouse(19, mouse_move);
if IsUpText('Iron ore') then
begin
ClickMouse2(mouse_left);
end;

repeat
HereYaGo;
until(not(FindDTM(IronOre, x, y, MIX1, MIY1, MIX2, MIY2)))
FreeDTM(IronOre);
end;

begin
HereYaGo;
end.

and here is the ore procedure where chooseoption does not work properly
program SupaHeata;
{$I SRL/SRL.SIMBA}

var
x,y,IronOre,Coal,Bag: Integer;

begin

SetupSRL;
ActivateClient;

Coal := DTMFromString('mlwAAAHicY2dgYBAAYkYGCOAEYlEglgZiBSBmBWJmIOYFYiEozQFVq6ggwYALcOHBjHgwFAAAgcgBVA==');

if FindDTM(Coal, x, y, MBX1, MBY1, MBX2, MBY2) then
begin
WriteLn('Yes! we have Coal!');
MMouse(x, y, 5, 5);
if IsUpText('Coal') then
Wait(RandomRange(400, 500));
Mouse(x, y, 0, 0, false);
ChooseOption('ut on');
Wait(RandomRange(400, 500));
FreeDTM(Coal);
end;
end.

Checked simba updates all up 2 date so i forced a update and restarted client still no luck with chooseoption

Gucci

2012-12-29 19:19:22

Is the error in the procedure I created? Also for the function that has choose option does it say that coal was found?

unknownrpg

2012-12-29 19:22:01

From: Gucci
Is the error in the procedure I created? Also for the function that has choose option does it say that coal was found?


error is in global? i believe new tab opens called global and yes says coal was found

Gucci

2012-12-29 19:29:07

Hmmm try forcing a Simba/SRL update again and restart it something must have gone wrong last time you updated

unknownrpg

2012-12-29 19:50:02

From: Gucci
Hmmm try forcing a Simba/SRL update again and restart it something must have gone wrong last time you updated


on step 10 number 4 here
http://villavu.com/forum/showthread.php?t=47714

unknownrpg, you do not have permission to access this page. This could be due to one of several reasons:

anything special i have to do setting up MSI??
prob not important.

unknownrpg

2012-12-29 20:00:37

From: Gucci
Hmmm try forcing a Simba/SRL update again and restart it something must have gone wrong last time you updated


this is after full reinstall and old reg files deleted useing CCleaner
and proper ext's enabled


Thank you for using Simba,
Hakuna Matata.

No Extensions update available.
No Plugins update available.
No SRL update available.
No SPS update available.
No MSI update available.
New window: 853238
[Hint] C:\Simba\Scripts\DTM COAL ONLY.simba(6:3): Variable 'IRONORE' never used at line 5
[Hint] C:\Simba\Scripts\DTM COAL ONLY.simba(6:3): Variable 'BAG' never used at line 5
Compiled successfully in 999 ms.
SRL Compiled in 0 msec
Yes! we have Coal!
Successfully executed.

still just right clicks and does not perform ChooseOption('ut on');

and same result with the procedure pops up another tab called "globals"
and this is the result

Compiled successfully in 1233 ms.
New window: 853238
Compiled successfully in 1248 ms.
Error: Exception: The bitmap[0] does not exist at line 664
The following DTMs were not freed: [0]

riwu

2012-12-29 20:03:08

From: unknownrpg
on step 10 number 4 here
http://villavu.com/forum/showthread.php?t=47714

unknownrpg, you do not have permission to access this page. This could be due to one of several reasons:

anything special i have to do setting up MSI??
prob not important.

That thread has been deleted. MSI is closed temporary until SPS 6 release.

unknownrpg

2012-12-29 20:04:21

From: riwu
That thread has been deleted. MSI is closed temporary until SPS 6 release.


o ok ty

Gucci

2012-12-29 20:12:34

From: unknownrpg
o ok ty


Replace the chooseoption with WaitOption('on', 500)

unknownrpg

2012-12-29 20:16:11

From: Gucci
Replace the chooseoption with WaitOption('on', 500)


same result right clicks n stops

Compiled successfully in 1014 ms.
New window: 853238
[Hint] C:\Simba\Scripts\DTM COAL ONLY.simba(6:3): Variable 'IRONORE' never used at line 5
[Hint] C:\Simba\Scripts\DTM COAL ONLY.simba(6:3): Variable 'BAG' never used at line 5
Compiled successfully in 983 ms.
SRL Compiled in 0 msec
Yes! we have Coal!
Successfully executed.

unknownrpg

2012-12-29 20:28:22

From: Gucci
Replace the chooseoption with WaitOption('on', 500)


when i try to run
program new;
{$DEFINE SMART}
{$i srl/srl.simba}

begin
ClearDebug();
SetupSRL();
end.

i get
SRL Compiled in 0 msec
** Fatal Error: Pairing Clients; Terminating Script **
Successfully executed.

because smart is down?

Gucci

2012-12-29 20:39:54

Don't know how to fix that error, must be a problem with the plugin or something; try updating to Smart V8. Also the waitoption and things weren't working for me yesterday but when I manually updated SRL and restarted it worked (First I was doing it with a bitmap of the option)

CRASH_OVERRIDE

2012-12-29 21:22:29

From: unknownrpg
when i try to run
program new;
{$DEFINE SMART}
{$i srl/srl.simba}

begin
ClearDebug();
SetupSRL();
end.

i get
SRL Compiled in 0 msec
** Fatal Error: Pairing Clients; Terminating Script **
Successfully executed.

because smart is down?


Mate, use the Edit button instead of double/triple posting all the time XD. Also, what version of SIMBA do you have installed? Could you maybe also post the whole script? If you getting errors on line 600 and we are only seeing roughly 30 lines we can't help :/

unknownrpg

2012-12-29 21:37:44

From: tasmania
Mate, use the Edit button instead of double/triple posting all the time XD. Also, what version of SIMBA do you have installed? Could you maybe also post the whole script? If you getting errors on line 600 and we are only seeing roughly 30 lines we can't help :/


the errors on lines 600 n whatnot are in "globals" which are built into simba
and i did edit the posts probably 2-3 times each lol b4 i posted a new 1 but ya i got it =p