Log in

View Full Version : draging an inventory item



Footy
07-08-2012, 01:21 PM
So in my alching script, which is purely for rune arrows, at the beginning, im trying to get the rune arrows into slot 17, which is where most humans would have it when they are alching. Im using a dtm of rune arrows to find rune arrows, but the dragitem function requires an invspace, not co-ordinates. How would I get it so it would find the arrows, then move them to invspace 17?
E: this is what I have so far
Gametab(25);
If not existsitem(17) then
finddtm(RArrows, x, y, MIX1, MIY1, MIX2, MIY2);
dragitem(

CephaXz
07-08-2012, 01:25 PM
Use dragmouse.

Footy
07-08-2012, 01:26 PM
Thanks Cepha! wasnt aware of that function! It should work fine now!

The Killer
07-08-2012, 01:29 PM
Use dragmouse.
an alternative would be
MouseMouse(1, 1)
Holdmouse(1, 1, 1)
Movemouse(2, 2)
releasemouse(2, 2)

CephaXz
07-08-2012, 01:30 PM
an alternative would be
MouseMouse(1, 1)
Holdmouse(1, 1, 1)
Movemouse(2, 2)
releasemouse(2, 2)

DragMouse works more like a human, even with randomization :p

Footy
07-08-2012, 01:31 PM
@killer
Generally, those functions are very bot like, never ever use movemouse, it will move it a straight line, always use Mmouse. dragmouse is like what you showed, but much much much more human like.

The Killer
07-08-2012, 01:35 PM
@killer
Generally, those functions are very bot like, never ever use movemouse, it will move it a straight line, always use Mmouse. dragmouse is like what you showed, but much much much more human like.

ima be a noob :p
so Mmouse is move mouse but less robotic??
feeling stupid now :p:duh:

CephaXz
07-08-2012, 01:39 PM
ima be a noob :p
so Mmouse is move mouse but less robotic??
feeling stupid now :p:duh:

Mouse speed is different. MoveMouse moves like godspeed :D

I once used those functions too :p
You can still use those functions if you're making a script for maybe a flash game or private servers.

The Killer
07-08-2012, 07:42 PM
Mouse speed is different. MoveMouse moves like godspeed :D

I once used those functions too :p
You can still use those functions if you're making a script for maybe a flash game or private servers.

what do i need to put in brackets for Mmouse if my cords are (498, 25)?

Footy
07-08-2012, 07:52 PM
If you are planning to click, use Mouse, it moves and clicks all in one function. The parameters for mouse are(x, y, ranx, rany, button) x and y are the coordinates, ranx and rany are randomness, I usually do 5-10, and button is 1 for left click, 2 for right click, and im not sure what 3 is. If you just want to move the mouse, MMouse parameters are (x, y, ranx, rany)

The Killer
07-08-2012, 08:14 PM
If you are planning to click, use Mouse, it moves and clicks all in one function. The parameters for mouse are(x, y, ranx, rany, button) x and y are the coordinates, ranx and rany are randomness, I usually do 5-10, and button is 1 for left click, 2 for right click, and im not sure what 3 is. If you just want to move the mouse, MMouse parameters are (x, y, ranx, rany)

yes i plan on clicking, i just typed aload of Mmouse (123, 123)
Clickmouse(123, 123)

-.- thanks for this so it should be Mouse(123, 123, ranx, rany, 1)

? bit lost on what ranx and rany is :s

Footy
07-08-2012, 08:17 PM
Exactly, if you are planning on clicking, always use Mouse, its the most humanlike. ranx, and rany are randomness to your x and y variables. say your x value was 10, and your y value was 20. Should you set the randomness to 5 for both x and y, it will click between 5 and 15 for x, and 15 and 25 for y. Basically, it ensures you arent always clicking on the same pixel. Does that clear up any confusion? if not, I could go more indepth with a diagram, :D

The Killer
07-08-2012, 08:20 PM
Exactly, if you are planning on clicking, always use Mouse, its the most humanlike. ranx, and rany are randomness to your x and y variables. say your x value was 10, and your y value was 20. Should you set the randomness to 5 for both x and y, it will click between 5 and 15 for x, and 15 and 25 for y. Basically, it ensures you arent always clicking on the same pixel. Does that clear up any confusion? if not, I could go more indepth with a diagram, :D

no need, thats great :) i actually understand :p
now to edit my first script

Footy
07-08-2012, 08:22 PM
Good luck! May I ask what its a script for? Id be more then happy to test it for you when you're done.

CephaXz
07-10-2012, 11:54 AM
Sorry, went out after I replied you yesterday :p

Good luck on your script!