InvMouse will return true as long as the param you pass it is 1-28. it says "idgaf" if there is actually something to click... It will click even if nothing is their. If we want that(no IDEA why) then i want mouseItem back!!!
InvMouse will return true as long as the param you pass it is 1-28. it says "idgaf" if there is actually something to click... It will click even if nothing is their. If we want that(no IDEA why) then i want mouseItem back!!!
Last edited by footballjds; 03-20-2012 at 07:26 PM.
InvMouse shouldn't check if there is an item in that slot or not, it's job is to mouse that slot. The script should check if something is there.
MouseItem is still there.
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
what the heck is the point in a function that ALWAYS returns true?
(unless you give it a bad click var or your item isn't 1-28) IMHO the only way it will return false is if the scripter has a logic error and tells it to click an inv slot that doesn't exist or tells it to do something aside from move, rightClick, leftClick.
no, we don't:
Simba Code:procedure MouseItem(I: Integer; button: Integer);
begin
InvMouse(i, button);
end;
mouse item doesn't do jack sh$%$... MouseItem should DEFINITELY check if there's an item there... don't you agree? After all the name of the procedure is MouseItem not MouseInvSlot...
here is InvMouse, always returning true...
Why would we check the invSlot and Action but not check if there's something there? lol'd...
If you don't want invMouse to check for an item then restore MouseItem back to what it was long before....
Simba Code:function InvMouse(InvSlot, Action: Byte) : boolean;
var
TB: TBox;
CurrPT : TPoint;
begin
result := false;
if (not InRange(Action, 0, 3)) then
begin
srl_Warn('InvMouse', 'Action #' + IntToStr(Action) + ' is not a valid action', warn_AllVersions);
Exit;
end;
if (not InRange(InvSlot, 1, 28)) then
begin
srl_Warn('InvMouse', 'Inventory slot #' + IntToStr(InvSlot) + ' is not a valid slot', warn_AllVersions);
Exit;
end;
GameTab(tab_inv);
Result := true;//<--- wtf?
TB := InvBox(InvSlot);
GetMousePos(CurrPT.x,CurrPT.y);
if PointInBox(CurrPT,TB) then
MouseBox(Max(CurrPT.x-random(2),TB.x1),Max(CurrPT.y-random(2),TB.y1),
Min(CurrPT.x+random(2),TB.x2),Min(CurrPT.y+random(2),TB.y2),Action) //LOL Pro-human much!
else
MouseBox(TB.X1, TB.Y1, TB.X2, TB.Y2, Action);
end;
Last edited by footballjds; 03-20-2012 at 07:31 PM.
It returns true because it's doing what it said, it's mouse-ing the inventory slot. It will return false if the mouse or slot arguments aren't correct.
The name suits what it does perfectly.
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
Kyle's right about InvMouse, and when did MouseItem ever check if there was an item in that slot? I agree that it should check, but really? You're making a huge deal over this when you could just add one line of code to your script.
MouseItem is a completely pointless function as it is, actually. It's just InvMouse with a different name. I'll add an if (ExistsItem(I)) then to MMouseItem and MouseItem.
SRL's F.A.Q. (Error fixes) | How to Convert SRL-5 Scripts to SRL-6 | Draynor Chop N' Bank (RS3)| AIO Superheater (RS3)
T - E - A - MTogether Everyone Achieves More
There are currently 1 users browsing this thread. (0 members and 1 guests)