SRL Archive - OSR Help

Click inventory slot(Need help!)


Brow

2012-03-07 04:23:20

Hiya guys,

Currently making my first script and have found that i need to click in an inventory slot.

I have searched for the past hour trying to find how i would script this and not found anything.

Any help much appreciated

YoHoJo

2012-03-07 04:39:47

Always the same slot?
Slot with a certain item in it?
Slot with any item at all in it?

Brow

2012-03-07 04:49:10

I need to click a slot with an item in,

I'm trying to make an alcher, This is the first time i have EVER tried any form of scripting so i am a big noobie :).

I've managed to get my script to click the high alch but nothing else just yet.

Magiic

2012-03-07 04:50:20

Use MouseItem(SlotNumber, Left) SlotNumber must be an integer between 1-28 (read left to right, row by row for inventory position) and Left must be a boolean regarding whether or not you want to left click.

YoHoJo

2012-03-07 04:50:29

If it's alwas same slot, just use coordinates
Mouse(X, Y, 5, 5, True) (Replace X and Y with it's coordinates)

Ideally line up the item with where the alch spell is, so you just have to click same spot over and over.

Brow

2012-03-07 04:52:12

So like


MouseItem(4, True);

or

MouseItem(4, Left);

Again sorry for being complete noob :)

Magiic

2012-03-07 04:55:36

From: Brow
So like


MouseItem(4, True);

or

MouseItem(4, Left);

Again sorry for being complete noob :)


First one, and don't be apologising, everyone starts somewhere. :)

YoHoJo

2012-03-07 04:56:05

Something like that yeah, type MouseItem into the function list search box on left side of simba and double click it and you can see how it works.

Coordinate click would be faster (barely) though :D.
But with mouseitem it's better for users, so they can have any inv setup and just enter which slot to click.

Magiic

2012-03-07 05:04:11

From: YoHoJo
Something like that yeah, type MouseItem into the function list search box on left side of simba and double click it and you can see how it works.

Coordinate click would be faster (barely) though :D.
But with mouseitem it's better for users, so they can have any inv setup and just enter which slot to click.


Plus it's part of SRL, which you have to utilise well if you ever apply to members, better to know all you can about it. :)

YoHoJo

2012-03-07 05:24:35

Would be more impressive to make own functions! But yeah Mouse/InvMouse are both simple , and SRL knowledge is important.

i need to bot!

2012-03-11 05:44:44

What :( I get a type mismatch from using this:

procedure click;
begin
MouseItem(1, true);
end;
'Type mismatch at line 216' :'(

Home

2012-03-11 06:09:19

From: i need to bot!
What :( I get a type mismatch from using this:

procedure click;
begin
MouseItem(1, true);
end;
'Type mismatch at line 216' :'(


Please people.. Don't give him false information!


MouseItem and how to use it.

MouseItem(1, mouse_Right) Will click first Inv slot with Right click.
If you wan't to do left click, you do mouse_Left.

~Home

i need to bot!

2012-03-13 16:29:16

Thanks home :D

footballjds

2012-03-13 16:35:23

From: YoHoJo
Something like that yeah, type MouseItem into the function list search box on left side of simba and double click it and you can see how it works.

Coordinate click would be faster (barely) though :D.
But with mouseitem it's better for users, so they can have any inv setup and just enter which slot to click.


coordinates are worse if he uses your suggestion.
it's barely random and it would only ADD to the coords…