SRL Archive - OSR Help

Help With Using Equipped Items (Teleporting)


Success

2013-07-18 03:17:06

I'm making a new script and right now I'm using a DTM to find the ammy to use to teleport but it works half the time.
Any better suggestion on how to find the ammy, right click, and click operate, to teleport?
I already having it click the equip game tab.
I'd appreciate any help! :spongebob:

Chris!

2013-07-18 03:44:36

Can you show us the code related to it that you have so we can help you edit it so it works more? Thanks. :)

Success

2013-07-18 13:50:27

So it finds the Necky DTM and right clicks it to teleport. I'm wondering if there is a better way to find the necky such as if there is a command for clicking items already equipped.
I know I could just use MoveMouse and have it move over the necky and right click it than but that's not very "professional" lol any suggestions?


Procedure Teleport;
begin
GameTab(tab_Equip);
Wait(randomRange(100, 250));
if FindDTM(NeckyDTM,X,Y,MIX1,MIY1,MIX2,MIY2) then
begin
Mouse(X,Y,4,4,Mouse_right);
Wait(randomRange(100, 250));
WaitOption('Operate', 500);
Wait(randomRange(3000, 3250));
end;
end;

Wu-Tang Clan

2013-07-18 14:00:23

You could use invslot if its a static"ly?" placed item. What I'm getting at is that you aren't equipping and unequipping the item when you are also picking something up. So the ammy is always in an inventory slot, for this procedure we'll go with invslot 1. PS I'm doing this in the browser so the standards are off and it may not compile.


procedure DTMfailsafe; // Added this after I made AmmyThing...
var
x,y,AmmyDTM: integer;
begin
AmmyDTM:= jkashdfklajsdlkgjaoqiwueryoz12312asdfqw3; //Fake dtm... should have been declared in a SetDTM procedure
if (FindDTM(AmmyDTM, x, y, MIx1, MIy1, MIx2, MIy2)) then
Mouse(x,y,3,4,False); // Moves the mouse to the DTM and right clicks
WaitOption('eleport', 550);
if (isMoving) then
writeln('we have successfully teleported using DTMfailsafe');
end;

procedure AmmyThing;
var
X,Y: Integer;
begin
if InvMouse(1,mouse_right) then
waitOption(eleport, 550);
if not(isMoving) then
Writeln('we have been unsuccessful in using AmmyThing to teleport, trying failsafe: DTMfailsafe');
DTMfailsafe; // You should probably have a failsafe using a dtm, I'll make a short one that has potential
end;
Like I said I did this in browser so I'm not even sure if any part of it will compile, but to my knowledge it seems decent for what your asking.
EDIT: You ninjad me while I was writing this…

Success

2013-07-18 14:48:31

Yeah that's legit, I like how you added the fail safe as well.
I appreciate it man! You'll be seeing some releases from me soon.