Page 13 of 22

Re: Shaiya bot

Posted: Wed Jun 11, 2008 9:24 am
by caccolone
grrrrrrrrr Im so stupid, I've copyed the strings and forget to change numbers :( thanks Elv

btw now the micromacro run correct but dosent switch mobs, I mean , my big problem is obstacle ( my guy keep running and keep try attack same mob ) , I see you have insert the function switch target and im pretty sure the problem for me is the name of key you assing " tilde " the key for switch mobs for me is this " \ " but I dont have found how is called in US keyboard, can you suggest me any solutions?

thanks alot for your help ;)

Re: Shaiya bot

Posted: Wed Jun 11, 2008 11:14 am
by deaznracer
is there an input command using micromacro?

like

get user input()

if userInput = Y then
Do this
end

If the user press X then it will do this function. Because I found some interesting offset that I want to be able to switch off and on without restarting micromacro

Re: Shaiya bot

Posted: Wed Jun 11, 2008 1:51 pm
by caccolone
im not a big expert and I dont have understand good what you explain me, Im sure my bot dont run good cuz I dont have tilde in switch key on my keyboard, I've tired US setting too but nothing change, maybe if I know how is called this key ( \ ) in US english keyboard I can use that name :)

Re: Shaiya bot

Posted: Wed Jun 11, 2008 3:55 pm
by Administrator
deaznracer wrote:is there an input command using micromacro?

like

get user input()

if userInput = Y then
Do this
end

If the user press X then it will do this function. Because I found some interesting offset that I want to be able to switch off and on without restarting micromacro

Depends what you mean. You can setup your own 'hotkeys', or you can collect information from the standard input stream. Hotkeys are simple.

Code: Select all

function hotkeys()
  if( keyPressed(key.VK_<whatever>) ) then
    do_something();
  end
end
registerTimer("hotkeys", 10, hotkeys);
I just used an automatic timer in this example, that way you don't have to bother checking inside any sub-loops. It's cheap, but it works.

Now, reading from the standard input stream is fine, however, you need to be aware that it is a blocking procedure. This means that the script execution will not continue until the user has completed their input and pressed enter.

Code: Select all

function get_input()
  printf("What is your name?\nName> ");
  io.stdin:flush(); -- always flush the buffer before you try to read in
  local name = io.stdin:read(); -- ask the user to input their name.

  printf("\n\nDo you like the color blue? [Y/N]> ");
  io.stdin:flush(); -- flush again
  local colorchoice = io.stdin:read(1);
  while( not (colorchoice == 'y' or colorchoice == 'n') ) do
    printf("\nInvalid choice. You chose %s. Try again> ", colorchoice);
    io.stdin:flush();
    colorchoice = io.stdin:read(1);
  end

  local colorstr = "like blue";
  if( colorchoice ~= 'y' ) then colorstr = "do not like blue"; end
  printf("\n\nOk! %s, you %s.\n", name, colorstr);

  io.stdin:flush();
end
There is a few things you should be aware of before using this. If you have this pop up right away when they start the script, you could notice some strange things. That is, if execution start is not automatic (they need to press F5 or whatever), F5 is also the "use previous input" hotkey for standard input. Try it and you'll see what I mean. To overcome this, you can do something like this:

Code: Select all

while( keyPressedLocal(key.VK_F5) ) rest(1); end; -- wait till they let go of F5
io.stdin:flush();
get_input();




im not a big expert and I dont have understand good what you explain me, Im sure my bot dont run good cuz I dont have tilde in switch key on my keyboard, I've tired US setting too but nothing change, maybe if I know how is called this key ( \ ) in US english keyboard I can use that name :)
That key is key.VK_BACKSLASH under the en_us keyboard layout. Actually, the only keyboard layout that is implemented is the en_us layout. If you want to help out, it'd be appreciated if you could create a layout script for your region. Just make a copy of micromacro/lib/mods/keyboards/en_us.lua and modify it to fit your keyboard. If you come up with something workable, I'll include it in the next release of MicroMacro.

Re: Shaiya bot

Posted: Wed Jun 11, 2008 4:19 pm
by caccolone
ok I will do it, cuz I know alot european using micromacro, but tell me, I have open en_us.lua and I found the name of key followed to number, how I can edit it? or better what I need edit, the number or the name?

About the kayname, I've tired already with backslash but still dont change mobs :(
for expemple if my guy was blocked on one obstacle and the time assigned for kill the mobs is ended the switch command need change target right? or this command work only when the char trying attack bugged mobs?

Re: Shaiya bot

Posted: Wed Jun 11, 2008 4:35 pm
by Administrator
In my script, it should switch if the target hasn't died in one minute. However, some people have reported it to not be working. Lets start with this: what keyboard layout are you using, and what key on your keyboard will target the next monster (is it the \ key)?

Re: Shaiya bot

Posted: Wed Jun 11, 2008 5:02 pm
by caccolone
im using italian layout , and yes the key is this " \ " I've tired just now some time with US keyboard configuration on my PC but still dont work, I test it with 5 second ( if mobs dont die in 5 second )

Re: Shaiya bot

Posted: Wed Jun 11, 2008 6:05 pm
by Administrator
Ok. Try opening your new layout, and change the VK_BACKSLASH to 41 instead of 220 (I think it's 220, anyways). After saving it, you'll have to close and reopen MicroMacro before it takes effect. You can just test if it works by using a simple script like this:

Code: Select all

function main()
  while(1) do
    keyboardPress(key.VK_BACKSLASH);
    coroutine.yield();
    rest(10);
  end
end
startMacro(main);

Re: Shaiya bot

Posted: Thu Jun 12, 2008 7:53 am
by caccolone
ok done , now my guy switch mobs, I was need the script you post, with backslash on to 220 work, now I need add no KS feature and maybe can use this nice program ( 20 days and almost never used :( )
thanks alot Elv, and if you have any help for no KS im happy :)

Re: Shaiya bot

Posted: Fri Jun 27, 2008 2:38 pm
by botforlive
how can i can bar 2 all Hp pots and the bot use them... if you look at the topic fighter bot it uses the pots on bar2 but it wont the script wont work for a hunter thanks for your help

Re: Shaiya bot

Posted: Fri Jun 27, 2008 6:46 pm
by Administrator
You can find information on that here.

Re: Shaiya bot

Posted: Fri Jun 27, 2008 8:35 pm
by botforlive

Code: Select all

__hp_use_count = 0;
function use_hp_potion()
  if( __hp_use_count < 10 ) then
    keyboardPress(key.VK_NUMPAD1);
  else
    keyboardPress(key.VK_NUMPAD2);
  eles
    keyboardPress(key.VK_NUMPAD3);
  eles
    keyboardPress(key.VK_NUMPAD4);
  eles
    keyboardPress(key.VK_NUMPAD5);
  eles
    keyboardPress(key.VK_NUMPAD6);
  
  end

  __hp_use_count = __hp_use_count + 1;
end
something like this ,, i dont want to change to much and get baned. also do i just copy and pasted thins in the shaiya.lua any place

Re: Shaiya bot

Posted: Fri Jun 27, 2008 10:48 pm
by Administrator
No. You need to spell things right. It also makes no sense that you have multiple else statements.

Code: Select all

__hp_use_count = 0;
function use_hp_potion()
  if( __hp_use_count < 10 ) then
    keyboardPress(key.VK_NUMPAD1);
  elseif( __hp_use_count < 20 ) then
    keyboardPress(key.VK_NUMPAD2);
  elseif( __hp_use_count < 30 ) then
    keyboardPress(key.VK_NUMPAD3);
  elseif( __hp_use_count < 40 ) then
    keyboardPress(key.VK_NUMPAD4);
  elseif( __hp_use_count < 50 ) then
    keyboardPress(key.VK_NUMPAD5);
  else
    keyboardPress(key.VK_NUMPAD6);
  end

  __hp_use_count = __hp_use_count + 1;
end
also do i just copy and pasted thins in the shaiya.lua any place
Also no. Overwrite the definition of use_hp_potion() in the script you already have.

Re: Shaiya bot

Posted: Sat Jun 28, 2008 2:15 am
by centik
is there a working game.exe that we can dual box or multi window in the same pc?

Re: Shaiya bot

Posted: Sat Jun 28, 2008 7:13 am
by Administrator
Nope. Ploxasaurus's game.exe was supposed to do just that, but apparently it didn't work. I couldn't get any more information from him about how to fix it. Also, it's pretty much pointless to multi-client, as the bot can only function on the focused window.

Re: Shaiya bot

Posted: Fri Jul 04, 2008 2:23 am
by sez
r there multiple shades of yellow mobs? the bot was working perfectly until i went to raigo and the bot only attacked one of the two kinds of yellow mobs. it would skip half of the mobs and i ended up dying from the ones it skipped

Re: Shaiya bot

Posted: Mon Jul 07, 2008 3:24 am
by takeNout
I'd just like to thank you for the bot, after making a few changes to it to make it suitable for a mage, I was able to get HM in ~10 days. Even if it wasn't all botting, I am pretty sure it got me at least 5 - 10 mil exp.

To comment on the script though, in the sit function, you make the character sit down if it is made to stand up. The only thing that would make you stand up is if a monster attacked you. So 1. Making it sit down when it is standing is silly as you are obviously being attacked. 2. The 'being attacked' check becomes redundant as you can just check whether you are standing.
Another thing is that you check and toggle whether the skill is ready in the main function, as opposed to the fight function, I don't know if this is intentional but during a fight, it will continually spam the skills.

Overall, it is a nice and simple script, works very effectively. Thanks once again for it!

Re: Shaiya bot

Posted: Mon Jul 07, 2008 8:58 pm
by cronchris
nice script props, could someone please post a link for micromacro, I can't seem to find it on google at all

Re: Shaiya bot

Posted: Mon Jul 07, 2008 10:26 pm
by Administrator
You didn't consider checking http://solarimpact.servegame.com? I'm kind of wondering how you found the forum, but not the main site.

Re: Shaiya bot

Posted: Tue Jul 08, 2008 12:08 am
by cronchris
found it off of google, but hey thanks for telling me the url