SRL Archive - OSR Help

Tbox/Mouse Help/Making items that are in the Chat-Box


Pakyakkistan

2014-02-15 01:33:51

Have been looking around at various mouse functions to direct the mouse towards the chat-box to craft potions and so far, have either not been paying attention enough to find a function, or cannot seem to understand the functions available to get it working.
This is what I have right now:

Procedure MakePotions;
var PotionBox : TBoxArray;
begin
PotionBox := IntToBox( 200, 432, 305, 390);
MouseTBox(PotionBox, Mouse_Right)
ChooseOption('Make All');
end;

and upon playing the script I get "Type mismatch at line x"

What the heck have I missed or done incorrectly? Literally turning out to be the last procedure in my script and then I just have to add failsafes/antiban/thegoodstuff… Any and all help would be appreciated. Thanks.

Sk1nyNerd

2014-02-15 01:39:35

From: Pakyakkistan
Have been looking around at various mouse functions to direct the mouse towards the chat-box to craft potions and so far, have either not been paying attention enough to find a function, or cannot seem to understand the functions available to get it working.
This is what I have right now:

Procedure MakePotions;
var PotionBox : TBoxArray;
begin
PotionBox := IntToBox( 200, 432, 305, 390);
MouseTBox(PotionBox, Mouse_Right)
ChooseOption('Make All');
end;

and upon playing the script I get "Type mismatch at line x"

What the heck have I missed or done incorrectly? Literally turning out to be the last procedure in my script and then I just have to add failsafes/antiban/thegoodstuff… Any and all help would be appreciated. Thanks.


you could try:

MouseBox(200, 432, 305, 390, mouse_right);

basically same thing, but i dont think you can use mouse_right or mouse_left for MouseTBox so thats why youre getting that error

Turpinator

2014-02-15 01:45:56

Procedure MakePotions;
var PotionBox : TBox;
begin
PotionBox := IntToBox( 200, 432, 305, 390);
MouseTBox(PotionBox, Mouse_Right)
ChooseOption('Make All');
end;

var PotionBox : TBoxArray;
to…
var PotionBox : TBox;

Sk1nyNerd

2014-02-15 01:48:37

From: Turpinator
Procedure MakePotions;
var PotionBox : TBox;
begin
PotionBox := IntToBox( 200, 432, 305, 390);
MouseTBox(PotionBox, Mouse_Right)
ChooseOption('Make All');
end;

var PotionBox : TBoxArray;
to…
var PotionBox : TBox;


dohhh didnt even notice that haha

Flight

2014-02-15 01:54:10

Actually the problem is you defined 'PotionBox' as a TBoxArray (an array of TBox) and you're trying to define it with a function that gives you a single TBox, not an array. So to fix this particular error change this line:

var PotionBox : TBoxArray;
…to this:

var PotionBox : TBox;

Also you're going to have another error after that because there's no such procedure as "MouseTBox" but luckily there is a 'MouseBox' procedure which you can use instead; however the parameters for this procedure requires the XStart, YStart, XEnd, YEnd coordinates rather than a TBox. So to use 'MouseBox' you could simply do this:

MouseBox(200, 432, 305, 390, MOUSE_RIGHT);

Your end result being:

Procedure MakePotions;
begin
MouseBox(200, 432, 305, 390, MOUSE_RIGHT);
ChooseOption('Make All');
end;

If there's anything you don't understand don't hesitate to ask a question here, I'll be happy to explain it.

Ashaman88

2014-02-15 10:35:38

Would you post a pic of what menu you are trying to use/options you are trying to select?

Pakyakkistan

2014-02-15 11:06:47

I see… Thank you all for the help. Here is the image Ashaman [ATTACH=CONFIG]22937[/ATTACH]
Going to keep working on it, worked wonderfully with the suggestions above, just going to work around the Gauss error which I assume has to deal with the x1,y1,x2,y2 cords I have.
'Tis a wonder why I took a break from things for awhile with such a lovely community here. Again, thanks everyone.

Pakyakkistan

2014-02-15 11:22:05

From: Pakyakkistan
I see… Thank you all for the help. Here is the image Ashaman [ATTACH=CONFIG]22937[/ATTACH]
Going to keep working on it, worked wonderfully with the suggestions above, just going to work around the Gauss error which I assume has to deal with the x1,y1,x2,y2 cords I have.
'Tis a wonder why I took a break from things for awhile with such a lovely community here. Again, thanks everyone.


Fixed Gauss error after reading Flight's reply
Also you're going to have another error after that because there's no such procedure as "MouseTBox" but luckily there is a 'MouseBox' procedure which you can use instead; however the parameters for this procedure requires the XStart, YStart, XEnd, YEnd coordinates rather than a TBox. So to use 'MouseBox'


Feeling like I am actually getting somewhere with this script…

Flight

2014-02-16 20:01:57

From: Pakyakkistan
Fixed Gauss error after reading Flight's reply


Feeling like I am actually getting somewhere with this script…


That's what I like to hear. :smile: