Shaiya bot

For any other game that doesn't have its own section.
Message
Author
caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya bot

#241 Post by caccolone » Wed Jun 11, 2008 9:24 am

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 ;)

deaznracer
Posts: 59
Joined: Tue May 20, 2008 5:45 am

Re: Shaiya bot

#242 Post by deaznracer » Wed Jun 11, 2008 11:14 am

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

caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya bot

#243 Post by caccolone » Wed Jun 11, 2008 1:51 pm

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 :)

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya bot

#244 Post by Administrator » Wed Jun 11, 2008 3:55 pm

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.

caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya bot

#245 Post by caccolone » Wed Jun 11, 2008 4:19 pm

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?

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya bot

#246 Post by Administrator » Wed Jun 11, 2008 4:35 pm

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)?

caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya bot

#247 Post by caccolone » Wed Jun 11, 2008 5:02 pm

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 )

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya bot

#248 Post by Administrator » Wed Jun 11, 2008 6:05 pm

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);

caccolone
Posts: 24
Joined: Mon Jun 09, 2008 8:23 am
Location: Frankfurt - Germany

Re: Shaiya bot

#249 Post by caccolone » Thu Jun 12, 2008 7:53 am

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 :)

botforlive
Posts: 7
Joined: Fri Jun 27, 2008 2:34 pm

Re: Shaiya bot

#250 Post by botforlive » Fri Jun 27, 2008 2:38 pm

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

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya bot

#251 Post by Administrator » Fri Jun 27, 2008 6:46 pm

You can find information on that here.

botforlive
Posts: 7
Joined: Fri Jun 27, 2008 2:34 pm

Re: Shaiya bot

#252 Post by botforlive » Fri Jun 27, 2008 8:35 pm

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

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya bot

#253 Post by Administrator » Fri Jun 27, 2008 10:48 pm

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.

centik
Posts: 51
Joined: Sat Apr 19, 2008 2:03 am

Re: Shaiya bot

#254 Post by centik » Sat Jun 28, 2008 2:15 am

is there a working game.exe that we can dual box or multi window in the same pc?

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya bot

#255 Post by Administrator » Sat Jun 28, 2008 7:13 am

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.

sez
Posts: 3
Joined: Tue Jun 03, 2008 8:27 pm

Re: Shaiya bot

#256 Post by sez » Fri Jul 04, 2008 2:23 am

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

takeNout
Posts: 2
Joined: Mon Jun 23, 2008 5:34 am

Re: Shaiya bot

#257 Post by takeNout » Mon Jul 07, 2008 3:24 am

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!

cronchris
Posts: 12
Joined: Mon Jul 07, 2008 10:46 am

Re: Shaiya bot

#258 Post by cronchris » Mon Jul 07, 2008 8:58 pm

nice script props, could someone please post a link for micromacro, I can't seem to find it on google at all

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: Shaiya bot

#259 Post by Administrator » Mon Jul 07, 2008 10:26 pm

You didn't consider checking http://solarimpact.servegame.com? I'm kind of wondering how you found the forum, but not the main site.

cronchris
Posts: 12
Joined: Mon Jul 07, 2008 10:46 am

Re: Shaiya bot

#260 Post by cronchris » Tue Jul 08, 2008 12:08 am

found it off of google, but hey thanks for telling me the url

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests