Mouse Control
Forum rules
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
Mouse Control
mouseSet(100, 200);
mouseLClick();
I made the function with this, but at the 2st client it work. after I set to the 2nd client, it didnt work. I'm using v.0.99 because there are several error if I use the v.1.0.
Is there any change about Mouse control in 1.0?
Is the function above cant be use on multiclient?
Thank you
mouseLClick();
I made the function with this, but at the 2st client it work. after I set to the 2nd client, it didnt work. I'm using v.0.99 because there are several error if I use the v.1.0.
Is there any change about Mouse control in 1.0?
Is the function above cant be use on multiclient?
Thank you
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse Control
Yes, there are a lot of changes with keyboard and mouse input between 0.99 and 1.0. You should resolve the errors instead of ignoring them.
If you do not have input attached (ie. you used the attach() function), try attaching. If you are attached, try detatching and reattaching after the input, like this:
Remember that normal (non-attached) input only works when that window is on top.
If you do not have input attached (ie. you used the attach() function), try attaching. If you are attached, try detatching and reattaching after the input, like this:
Code: Select all
detatch();
mouseLClick();
attach(win);
Re: Mouse Control
I have try but cannot work with multiclient.
The problem is, after detach() it only work on the active window.
I use the latest micromacro (1.0) and the script is like this.
Thanks
The problem is, after detach() it only work on the active window.
I use the latest micromacro (1.0) and the script is like this.
Code: Select all
function fight()
--I want to press a skill (ALT + 1) or press from skill bar (mouse coordinate 700, 740) on multiclient
--I have try keyboardPress( key.VK_1, key.VK_ALT ); but I didnt work
--but keyboardPress( key.VK_V, key.VK_CONTROL ); work (can paste text I copy)
--I try using keyboardHold(key.VK_ALT) and keyboardPress(key.VK_1) it work on active window
--I try using mouse function, but it only work on active window, so anyone have an idea/trick
detach();
mouseSet(705, 750);
mouseLClick();
attach(win);
-----------------------------------------------------------------------------------------------
while( have_target() ) do
keyboardPress(attack_key);
if( (HP / MaxHP * 100) < HP_potion_use ) then use_hp_potion() end
if( (MP / MaxMP * 100) < MP_potion_use ) then use_mp_potion() end
yrest(100);
end
pickup_items();
end
function main()
local original_name = getWindowName(win);
attach(win);
proc = openProcess( findProcessByWindow(win) );
setPriority(PRIORITY_HIGH);
local winname = original_name .. " [ID:" .. sprintf("%x",win) .. "]";
if( string.find(original_name, " [ID:" .. sprintf("%x",win) .. "]", 1, true) == nil ) then
setWindowName(win, winname);
end
setWindowName(getHwnd(), "MicroMacro - " .. "Perfect World Bot" .. " [ID:" .. sprintf("%x",win) .. "]");
atExit(exit_callback);
charptr_addr = memoryReadInt(proc, staticbase_ptr) + staticbase_offset;
get_monster_list();
printf("\nBOT STARTED\n");
registerTimer("update_vars", 100, update_vars);
registerBuffs();
while(1) do
if( have_target() == false ) then
find_target();
end
if( have_target() ) then
fight();
end
if( (HP / MaxHP * 100) < HP_potion_use and HP_potion_use > 0) then use_hp_potion() end
if( (MP / MaxMP * 100) < MP_potion_use and MP_potion_use > 0) then use_mp_potion() end
yrest(100);
end
end
startMacro(main, true);
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse Control
Yes, that's the problem with normal input. Attached mouse input usually doesn't work. In fact, the only game I can think of that it works for is Metin 2.I have try but cannot work with multiclient.
The problem is, after detach() it only work on the active window.
Isn't there some way you can just remap the key in-game so that you don't need to hold ALT?
Re: Mouse Control
There is no other way, only ALT + 1 or click the skill.
Do you ever heard this situation.
After the patch, the monster which was targeted from bot, the char cant use skill, but when we click the monster with mouse, the char can use skill. I think is prevention to use bot on this game.
Thanks
Do you ever heard this situation.
After the patch, the monster which was targeted from bot, the char cant use skill, but when we click the monster with mouse, the char can use skill. I think is prevention to use bot on this game.
Thanks
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse Control
I have not heard of that. If I get some time, I'll look into it. The ALT+<key> works everywhere else, though, so it's definitely something specific to this game.
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse Control
Can you tell me exactly which copy of the game you have? I know they are all basically the same game with (slightly) different graphics, but initiating with skills seems to work fine with "Perfect World Internation: Rising Tides."
Re: Mouse Control
I already test "Perfect World Internation: Rising Tides.", mine is "Perfect World Indonesia", I think it is the same.
Before the new patch, it work. But now, the monster which locked/targeted by the function "memoryWriteIntPtr(proc, charptr_addr, targetid_offset, monsterList);" My char cant cast skill, or must wait till the monster hit us first and the skill can be cast.
Before the new patch, it work. But now, the monster which locked/targeted by the function "memoryWriteIntPtr(proc, charptr_addr, targetid_offset, monsterList);" My char cant cast skill, or must wait till the monster hit us first and the skill can be cast.
Who is online
Users browsing this forum: No registered users and 5 guests