Page 8 of 22

Re: Shaiya bot

Posted: Wed Mar 05, 2008 8:17 pm
by Administrator
You also have these:

Code: Select all

buff1_time = minutesToTimer(5);
buff2_time = minutesToTimer(10);
Which would be 5 * 60 * 1000, or 10 * 60 * 1000. Of course, that's using 5 and 10 minute buffs.

Another question. Why is the old script would not work for pick up but only attack?
Aeria has changed something like graphic things? :)
Yes, exactly. They removed the bar that displays how much HP your enemy has. This was very stupid of them, if you ask me. It's kind of important to know if you're even hurting your enemy. The old script would only trigger the pickups after killing an enemy, but since it the script could not determine if you even had a target, you can see where the problem lies.

Re: Shaiya bot

Posted: Thu Mar 06, 2008 12:05 am
by hpr12951
M...now I know why the pick up is not working :)

I've changed the buff time too. and when running the micromacro, still gives me "attempt to call the global 'secondsToTimer' "

MM, why, where still need to change?

Re: Shaiya bot

Posted: Thu Mar 06, 2008 4:10 am
by nooberz
@elverion
can your bot work with shaiya client minimize?

Re: Shaiya bot

Posted: Thu Mar 06, 2008 7:13 am
by 3cmSailorfuku
nooberz wrote:@elverion
can your bot work with shaiya client minimize?
No, it requires focus on the target application.

Though you may want to take a look on the second release..
* Attached input now allows sending to non-focused or minimized windows.
hmm

Re: Shaiya bot

Posted: Thu Mar 06, 2008 4:41 pm
by Administrator
Yeah, although the newest version of MicroMacro allows for that, it doesn't work for all games. Specifically, those that use DirectInput. It doesn't work for Shaiya.

Re: Shaiya bot

Posted: Thu Mar 06, 2008 5:37 pm
by hpr12951
Elverion,

The micromacro still gives me "attempt to call the global 'secondsToTimer' "

The script works in ur computer?? or just dont work in mine...

I change the buff time, too, and secondsToTime *60*1000...
mmm, not working..

Where still need changes?

Re: Shaiya bot

Posted: Thu Mar 06, 2008 5:54 pm
by Administrator
Just download the latest version of MicroMacro.

Re: Shaiya bot

Posted: Thu Mar 06, 2008 10:58 pm
by hpr12951
I set the sitting to be 50%.
BUT my character sits for like a second, then start to stand and fight again.... my HP is not full yet. Where need to change? :)

Re: Shaiya bot

Posted: Fri Mar 07, 2008 2:30 am
by Administrator
Does it say it's exiting because you're under attack?

Re: Shaiya bot

Posted: Fri Mar 07, 2008 4:45 am
by hpr12951
No, it says nothing~ altho around me there is no monster,, still rest for 1 second then stand up to attack again.

Why~? :)

Re: Shaiya bot

Posted: Fri Mar 07, 2008 7:35 am
by c0dedzer0
I've seen alot of people having problems with their char having to rest, but only rests a second or 2 then stands and resumes attack without hp being fully recovered and no monsters attacking/interrupting the rest. I too had the same problem, and i studied it for a bit. I found the reason for it being that your MP & SP is full, i've tested it and wasted ALL my MP before a HP rest, and it seems that it follows the order which ever bar fills up first will make the char exit resting.
After reading through the scripts multiple time (mind you, been a while since i've looked at an actual source code, and its similar to c/c++) i've edited the variables to my personal setting:

Code: Select all

HP = 10000;
MaxHP = HP;
MP = HP;
MaxMP = MP;
SP = HP;
MaxSP = SP;
since i didn't care about the value of my MP, SP... and also took off some variable checks on the while command:

Code: Select all

  while( HP < MaxHP ) do
    if( HP < lasthp ) then
      printf("Exiting rest...under attack\n");
      return;
    else
      lasthp = HP;
    end

    yrest(100);
  end
line 1 originally had

Code: Select all

while( HP < MaxHP and MP < MaxMP and SP < MaxSP ) do
i am pretty clueless right now as to how i figured to change that, since earlier my comprehension was much better, but now i am just dead tired and need sleep x.x

anyways, This is a nice program you have here! still trying to go through learning lua languange, since i wanted to make a function that activates a timer once a target has been selected. That way when the timer reaches a certain value, it will assume that the target is bugged (cannot be attacked) or you are stuck on something and cannot get to your target and will then on select another target using the key.VK_` (<-- i tried that, but threw me a code about invalid so i tried key.VK_TILDE) and execute fight. I was mainly focusing on getting out of terrain since most likely if i can't get to a target, I am stuck. Then i remembered there was Unf that had clippin on it and trashed all the coding i attempted since i could just clip instead of getting stuck right? wrong! i couldn't download the latest Unf so now im back to scratch... GO FIGURE!

Re: Shaiya bot

Posted: Fri Mar 07, 2008 4:28 pm
by hpr12951
Mm... the rest is not working well.
Also, I set 2 skills to work, but sometimes, the attack just not working~

I set first skill to 5 seconds, and second skill for 10 seconds. After like certain time, the attack is not workin(just skills work, which kill monsters really slow)
However, sometimes the attack and skill work well again...

Seems like after certain time, my character doesnt do anything.... also, for the far attack monsters~ micromacro does not attack it.

After rest, micromacro says , "exiting rest, under attack", then it stop attack, just stand there. After i pressed attack, it works again. However, when "exiting rest, under attack", it stops again....

I set the way that c0dedzer0 says, and i set my character attack only.
but, I dont know why like.. after 10 min, it stuck.... and doesnt do anythin... just stand there.
Weird..

Why ?

Re: Shaiya bot

Posted: Fri Mar 07, 2008 7:27 pm
by c0dedzer0
when it stands there, does it wait for your hp to get full then resumes attacking? because by doing what i did it sometimes rests while standing up, almost same as sitting.

And im guessing the Skills are on timer, which if you set it to 30, 31, 32... every 30 seconds skill 1 will be used, then the next one on 31 and so on...

Something i noticed about micromacro on a long run... gets funky and does not read through scripts properly and in order...

Re: Shaiya bot

Posted: Fri Mar 07, 2008 8:19 pm
by Administrator
Thanks c0dedzer0. You may have saved me a lot of time by finding the resting bug. I'll definitely try and fix that ASAP, as well as the skill use issue (I already know how to "fix" it).

MicroMacro does run portions of the script out of order, yes. This is a strength, and not a weakness. MicroMacro runs in a pseudo-multi-threaded way, which allows it to update variables (such as reading HP, MP, SP from memory), while running other complex tasks concurrently. It might be a bit awkward to get used to, I'm sure, but it really can save you from having to do extra work (such as having to manually update the variables all the time).

EDIT: New script uploaded.

Re: Shaiya bot

Posted: Sat Mar 08, 2008 12:17 am
by hpr12951
To c0dedzer0:
The character has the full HP, but still stands there~ doin nothin.
Unless i pressed attack, otherwise, its like freezin~ :)

Re: Shaiya bot

Posted: Sat Mar 08, 2008 8:05 am
by c0dedzer0
To the guy above, go dl the up-to-date script, so far so flawless, now i just gotta work on targets being ignored...
thnx for the update

Re: Shaiya bot

Posted: Sat Mar 08, 2008 10:35 am
by gdwgdw
elverion, i am not good at the lua language , can you tell me how to "call" a function?

for example,

XXXXXXXX: XXXXXXXX
00112233: call 22334455
XXXXXXXX: XXXXXXXX

i want to use the command in the address 00112233, what should i do in the script?

Re: Shaiya bot

Posted: Sat Mar 08, 2008 5:18 pm
by Administrator
Well, you can't call directly like that. And it would need to be done in C/C++ (or, really, any language that supports creating DLLs). When the plugin system is finished, you will write a DLL which can handle this stuff. Typically, the best way to do that would be to use a hook, and then have the DLL call the function from within the target program. So I guess you'd end up needing 2 DLLs: one to plugin to MicroMacro so you can add new functions, and one to inject into the target process.

Re: Shaiya bot

Posted: Mon Mar 10, 2008 6:36 am
by gdwgdw
oh.......

thank u

this trainer just can attack the monster closest to the character, i am finding a way to improve it

Re: Shaiya bot

Posted: Mon Mar 10, 2008 7:16 am
by Administrator
Here's information on plugins: http://solarimpact.servegame.com/phpBB3 ... m.php?f=14
If you know how to invoke a function call like that through C, you can write a plugin to do that, and register the target function as a Lua function, allowing you to call it from MicroMacro scripts.

I'm sure there's an easier way to do it, through, say, reading/writing memory. I thought I was pretty close, but the target IDs didn't seem to stay the same, so I couldn't quite get it to target like the Perfect World bot does. Maybe you could look into doing something along those lines, though.