Ranqers Posted January 9, 2013 Share Posted January 9, 2013 You can probably do this with arrays or something, but i'm using 7y constants and 4x constants to make a 7by5 rectangle (28 slots) const 1y = 231; 2y = 266; 3y = 301; 4y = 336; 5y = 371; 6y = 406; 7y = 441; 1x = 587; 2x = 628; 3x = 667; 4x = 709; I want to use these in a function/procedure, like this kinda: procedure dropRow(i: Var); begin mmouse(1x,i,false); wait(50); mmouse(1x,i-45,true); wait(100); .... all the way to mmouse(4x,i,false); wait(50); mmouse(1x,i-45,true); wait(100); end; somehow I need var: i to equal 1-7y; if theres an easier way please do say! thanks Quote Link to comment Share on other sites More sharing options...
Janilabo Posted January 9, 2013 Share Posted January 9, 2013 Hey ranqers, could you give me image examples at what you are trying to do? I am slightly confused.. Are you trying to simply go with the procedure from first slot to last slot or what? If you are familiar with arrays, then you could use [TPA|TBA]Grid() from HERE (check out the uppit link - grid_stuff.zip, contains some examples how those functions can be used). However, if you aren't familiar with arrays.. I HIGHLY recommend learning arrays. I am pretty sure those functions would help you out. Quote Link to comment Share on other sites More sharing options...
Ranqers Posted January 10, 2013 Author Share Posted January 10, 2013 Im trying to get dropRow(1y); to drop the first row of items (4 items) in the inventory.. that way i can just say dropRow(1y); dropRow(2y); ect.. instead of typing out moveMouse.. clickMouse.. wait.. clickMouse.. 4 times for each row. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted January 10, 2013 Share Posted January 10, 2013 I would start with slots then make a row dropper. If you can figure out how far away each slot is from the one before it, you can do the method like OSI does in Inventory.scar for RS2 I'm sure some math in a loop could make you this row dropper that could use those constants maybe.... Quote Link to comment Share on other sites More sharing options...
Ranqers Posted January 11, 2013 Author Share Posted January 11, 2013 how could i do something like this var droprow1 = [{x:45, y:64}, {x:56, y:98}, {x:23, y:44} {x:25, y:56}]; //not the actual x's and y's var len = droprow1.length; for(var i = 0; i < len; i++) begin MoveMouse(droprow1.x,droprow1.y); Wait(150); ClickMouse(droprow1.x,droprow1..y,True); Wait(1000); ClickMouse(droprow1.x,droprow1.+45.y,False); //i'd change this to a "drop" option dtm for better accuracy later. end; Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted January 11, 2013 Share Posted January 11, 2013 (edited) Knowing what game / a pic would be so helpful. LordJashin is right: figuring out how to calc the x/y of a slot position would make things easier in the end. If you insist on hard wiring in the coordinates I'd do something like this (coordinates are made up obviously): [sCAR]program New; var ItemSlots: T2DPointArray; procedure SetupSlots; begin ItemSlots := [ // Row 0, Col 0 Row 0, Col 1 Row 0, Col 2 Row 0, Col 3 TPointArray([Point(100, 100), Point(200, 100), Point(300, 100), Point(400, 100)]), // Row 1, Col 0 Row 1, Col 1 Row 1, Col 2 Row 0, Col 3 TPointArray([Point(100, 200), Point(200, 200), Point(300, 200), Point(400, 200)]) ]; end; procedure DropRow(const Row: Integer); var Col: Integer; begin for Col := 0 to High(ItemSlots[Row]) do begin ClickMouse(ItemSlots[Row][Col].X, ItemSlots[Row][Col].Y, mbLeft); Wait(50); end; end; begin SetupSlots; // Drop 1st row (arrays count from 0) DropRow(0); end.[/sCAR] This is not great code: no randomization etc. but you get the idea. Edited January 11, 2013 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
Ranqers Posted January 19, 2013 Author Share Posted January 19, 2013 (edited) SOLVED. ILOVEYOUBIXBY THANKS for ALL the help guys. - - - Updated - - - Hey ranqers, could you give me image examples at what you are trying to do? I am slightly confused.. Are you trying to simply go with the procedure from first slot to last slot or what? If you are familiar with arrays, then you could use [TPA|TBA]Grid() from HERE (check out the uppit link - grid_stuff.zip, contains some examples how those functions can be used). However, if you aren't familiar with arrays.. I HIGHLY recommend learning arrays. I am pretty sure those functions would help you out. I wish I could say I understand how these functions work, thanks though! Edited January 19, 2013 by Ranqers Quote Link to comment Share on other sites More sharing options...
Janilabo Posted January 19, 2013 Share Posted January 19, 2013 Hey Ranqers, which RuneScape server is this? -Jani Quote Link to comment Share on other sites More sharing options...
Ranqers Posted January 19, 2013 Author Share Posted January 19, 2013 It's a secret:) Quote Link to comment Share on other sites More sharing options...