SRL Archive - Help

Performing actions on inventory items


RAndomGuru

2012-01-04 05:54:38

I want the script to right click the pouch and hit the action "summon".
I don't know any common ways to do this ><"

weequ

2012-01-04 05:58:56

If the pouch is always in the same inventory spot you could do MouseItem(1, false); for the first inventory slot. MouseItem(2, false) for the second one etc.. false means it will right click. Change to true if you wish to left click.

Edit:
To choose the option you could use ChooseOption or WaitOption

Try something like this:
MouseItem(?, false);
WaitOption('ummon', 2000); //Will keep waiting 2 seconds for the 'ummon' option to appear.

If the inventory slot changes you could use DTM's. Search for a DTM tutorial in the tutorial island section.

RAndomGuru

2012-01-04 05:59:47

Is there a more flawless way of doing that though?
Theres a chance that it might not be in that inventory spot.

Harry

2012-01-04 06:00:39

MMouseItem and check uptext.
DTM/BMP of item.
etc.

RAndomGuru

2012-01-04 06:22:48


if(FindColorSpiralTolerance(x, y, 3960768, MSX1, MSY1, MSX2, MSY2, 5))then
begin
mouse(x, y, 5, 5, false);
WaitOption('ummon', 2000);
end

^says Im missing a semi-colon at FindColorSpiral… etc.

EDIT: NVM got it :D ty all.