Page 1 of 2

Shaiya fighter version 2

Posted: Tue Jul 08, 2008 11:13 pm
by deaznracer
Those who have a copy of my shaiya fighter version 2 anti-KS (fighterx2.lua)

tell me any bugs you have found while using it. I have been MIA.

Cacolone was the only person who helped locating the bugs. He'll be haveing access to hunter/archer bot with a good anti-ks causeup ou i know he'll contribute to help finding the bugs.

If you want these new scripts message me and tell me your level of lua knowledge and if you are willing to help find bugs.

1)1st Bug found by Cacolone. When 2 people hit 1 target at the very same time, the bot doesn't stop killing.
(when other players hit first the bot will automatically back away, I am guessing timeing still needs to be corrected to the exact timing per 1/1000 sec lol .)

2)I notice, when i go to work and leave the bot on for 8 hrs, I come back and I see party invitation screen on my monitor. So, this will be fix because people are sending party invitation and if the user is not declining then other players has the right to suspect it is a bot lol. If the bot declines the party invitation, it would be less suspicious to other players. They'll assume we are @ssholes and leave us alone lol.

Re: Shaiya fighter version 2

Posted: Wed Jul 09, 2008 3:14 pm
by Dnic
I just went into settings to auto decline party invites.

Still been playing around with it using both skills at the same, but no luck no matter what I put in there.

Re: Shaiya fighter version 2

Posted: Thu Jul 10, 2008 1:12 am
by centik
Dnic wrote:I just went into settings to auto decline party invites.

Still been playing around with it using both skills at the same, but no luck no matter what I put in there.
yup..u can just set the option and check party invites decline

same here..i still cant figure out how would my character use 2 skills in a row..


and regarding the same time hit bug..ive notice this too but i dont see it as a bad bug but more of a good bug :D if im playing my character manually and i hit the same mob in the same time with other character,im not gonna back off and try to pull other mob..ill certainly gonna try to kill that monster first..that so called bug is perfect :D with this bug ur bot reflex is more human like than a robot

Re: Shaiya fighter version 2

Posted: Fri Jul 11, 2008 3:22 am
by deaznracer
lol I didn't realize there was an option for that. Easy fixed.

Re: Shaiya fighter version 2

Posted: Fri Jul 11, 2008 10:46 am
by cronchris
Does this fighet script have a fix for lagged mobs, mobs were they look like they are there but it keeps saying worng, target, maybe switch target, or one that jumps/moves oover or around obsticales?

Re: Shaiya fighter version 2

Posted: Fri Jul 11, 2008 6:40 pm
by centik
cronchris wrote:Does this fighet script have a fix for lagged mobs, mobs were they look like they are there but it keeps saying worng, target, maybe switch target, or one that jumps/moves oover or around obsticales?
lagged mobs usually have 0 HP so the bot will just ignore this mobs and look for mob with full HP

Re: Shaiya fighter version 2

Posted: Fri Aug 01, 2008 10:45 am
by centik
anybody figure it out how to use both attack skill to the same monster..pls help :(

Re: Shaiya fighter version 2

Posted: Sat Aug 02, 2008 8:48 am
by Dnic
centik wrote:anybody figure it out how to use both attack skill to the same monster..pls help :(
Still no such luck.

Re: Shaiya fighter version 2

Posted: Sat Aug 02, 2008 12:23 pm
by centik
-------------------------------------------------
-- Modify the Fighter's Skills information
-- If you enter No, the skill will switch between
-- skill 1 and skill 2 for each mob
-- EX: mob 1 skill 1 next Mob will use skill 2
-------------------------------------------------
-- Enter no if you don't want to use Skill.
-- Skill 1 = hot key 3
-- Skill 2 = hot key 4

Use_both_skill = yes; --put No or Yes to use both skills Hotkey 3 and 4

skill1_reuse_time = yes;

skill2_reuse_time = yes;
function skill3()
if(skill1_reuse_time == 0) then
else
skill_switch = 2;
keyboardPress(key_skill1);
yrest(2000);
end
end
function skill4()
if(skill2_reuse_time == 0) then
else
skill_switch = 1;
keyboardPress(key_skill2);
yrest(2000);
end
i played around with it but still dont work

Re: Shaiya fighter version 2

Posted: Wed Aug 06, 2008 1:58 pm
by Dnic
One thing, if I can suggest, is the ability to use 3 or more skills repeatedly during the same attack.

Re: Shaiya fighter version 2

Posted: Fri Aug 08, 2008 6:51 pm
by deaznracer
Go to FIGHT 2 and replace it with this code.

Code: Select all

-------------------------------------------------------
-- FIGHT 2
-------------------------------------------------------
function fight2()
   local beginTime  = os.time();
   local attackTime = os.time();
   local attackLoop = true;
   local skillsonetime = 0;
   local count = 0;
   local xFlag = 0;
  keyboardPress(key_attack);  
  printf("Attacking Target \n");

  while (attackLoop) do
    local targetStatus = targetstatus2();
    local Tstatus = status();
    if(targetStatus == TARGET_DEAD) then
       printf("Target Dead \n\n");
       moveBreak();
       pickup();
       attackLoop = false;
       skill5();
       skill6();
       skill7();
       --skillnum8();
       --skillnum9();
       --skillnum0();
    else
      local currentTime = os.time();
      if( os.difftime(currentTime, beginTime) > how_many_seconds ) then 
         beginTime  = os.time();
         if (Tstatus == TARGET_FULL) then
            yrest(500);
            local check_targets_hp = status();
            if(check_targets_hp == TARGET_DAMAGED) then
               printf("Target is damaged, continue killing \n");
            else
               moveBreak();
               do_jump = do_jump+1;
               printf("Changing Targets: Obsticle \n");
               attackLoop = false;
            end
         end
      else
         if(DAMAGED1_MOB == TARGET_DAMAGED) then
           if(count == 0) then
             count = 1 + count;
             unregisterTimer("checkingFullHP");
           end
           yrest(1000);
           if(attackHit == false and hitFlag == 0) then
             unregisterTimer("stop_Attacking"); 
             moveBack();
             continue     = 0;
             DAMAGED1_MOB = 2;
             yrest(100);
             hitFlag = 1;
             attackLoop = false;
             yrest(1000);
             skill5();
             skill6();
             skill7();
             printf("TARGET IS HIT BY OTHER PLAYER, SWITCH TARGET\n");
           else
             if(skillsonetime == 0) then
               skillsonetime = 1+skillsonetime;
               if(skill_switch == 1 or Use_both_skill == 1)then
                  skill3();
               end
               if(skill_swtich == 2 or use_both_skill == 1) then
                  skill4();
               end
             else
               local currentAttackTime = os.time();
               if(os.difftime(currentAttackTime, attackTime) > 3) then
                 attackTime = os.time();
                 targetStatus = targetstatus2();
                 if(targetStatus == TARGET_FULL) then
                   keyboardPress(key_attack);
                   yrest(1000);
                   xFlag = 1;
                 end
               end
             end
           end
         end
         if(xFlag == 1) then
           xFlag = 0;
         else
           yrest(500);
         end
      end
    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
    if( (SP/MaxSP*100) < SP_potion_use and SP_potion_use > 0 ) then use_sp_potion(); end
  end
  hitFlag = 0;
  DAMAGED1_MOB = TARGET_FULL;
  yrest(200);
end
if you want to spam skills remove this code

Code: Select all

skillsonetime = 1+skillsonetime;
[/color]

Re: Shaiya fighter version 2

Posted: Sat Aug 09, 2008 11:15 am
by Dnic
Ok so here is what I've done. I replaced the code with the above and I commented out the

Code: Select all

skillsonetime = 1+skillsonetime;
What this does, like you said, is spam the skills. So I put it back in so I could use both skills, however I still cannot get both skills to be used on one NPC. I've tried every combination of yes/no that I could possibly do for this with no luck.

Code: Select all

Use_both_skill      = Yes;   

skill1_reuse_time   = yes;   

skill2_reuse_time   = yes; 
I even changed this to 2 to try it with no success.

Code: Select all

skill_switch = 1;

Re: Shaiya fighter version 2

Posted: Sat Aug 09, 2008 11:30 am
by centik
it does spam skill ( 1st attack skill) now but still the 2nd attack skill dont work :/

Re: Shaiya fighter version 2

Posted: Sat Aug 09, 2008 5:37 pm
by deaznracer
okay give me some time i'll figure it out today.

Re: Shaiya fighter version 2

Posted: Sat Aug 09, 2008 5:48 pm
by deaznracer
okay i figured it out lol.

Code: Select all

   if(skill_swtich == 2 or use_both_skill == 1) then
                  skill4();
               end
if you Look at that code the letter ' u ' is supost to be Upper case ' U ' in use_both_skill == 1.

So just make it Use_both_skill == 1 . :P

just remember to take out the code

Code: Select all

skillsonetime = 1+skillsonetime;
if you want it to spam skills.

If you want it to spam faster go to skill3() and skill4() function and modify the time.
It is right now at yrest(2000);(which means a 2 second wait time)

Re: Shaiya fighter version 2

Posted: Sat Aug 09, 2008 8:49 pm
by Dnic
Damn, just a little thing like that? Thanks.

Also after playing around with it for a while you have to change:

Code: Select all

skill_switch = 1;
to 2. Or at least I did.

Also for the timing I found that 5 secs (5000) works perfectly. What this does is use one skill, 5 seconds later the next skill and 5 sec after back to the first, etc. Timing works out perfectly.

Re: Shaiya fighter version 2

Posted: Mon Aug 11, 2008 6:06 am
by centik
@ deaznracer than u very much :)


@Dnic

is this the way you did it man?
function skill3()
if(skill1_reuse_time == 0) then
else
skill_switch = 2;
keyboardPress(key_skill1);
yrest(2000);
end
end
function skill4()
if(skill2_reuse_time == 0) then
else
skill_switch = 1;
keyboardPress(key_skill2);
yrest(5000);
end
end

Re: Shaiya fighter version 2

Posted: Mon Aug 11, 2008 10:58 am
by Dnic
Yea this area are the ones you want to play with.

Code: Select all

yrest(2000);

Re: Shaiya fighter version 2

Posted: Thu Aug 14, 2008 7:35 am
by Dnic
So here is what I found. If you don't let it spam skills its fine, it'll do each skill one time.

If you comment out the section to let it spam itll spam the skills over and over. I got it timed so it does it right when its ready. However everything else seems to be effected by it in a negative way.
- It won't pot in time when needed.
- After NPC is dead theres a big delay before it does finally pot and picks up.
- Sometimes when attacking the next NPC it will only attack with the skills. It never hits the "attack" button to attack it between skills.

For now I have it set so it only uses 1 skill each time.

Re: Shaiya fighter version 2

Posted: Fri Aug 15, 2008 10:39 am
by centik
Dnic wrote:So here is what I found. If you don't let it spam skills its fine, it'll do each skill one time.

If you comment out the section to let it spam itll spam the skills over and over. I got it timed so it does it right when its ready. However everything else seems to be effected by it in a negative way.
- It won't pot in time when needed.
- After NPC is dead theres a big delay before it does finally pot and picks up.
- Sometimes when attacking the next NPC it will only attack with the skills. It never hits the "attack" button to attack it between skills.

For now I have it set so it only uses 1 skill each time.
yup i noticed that too..the delay is fine but the pot consumption and attack pausing ( coz it always try to activate skills instead of attack button after using skills) is kinda scary esp when i tried rnning the bot using my UM hunter,i almost lost him lol ..but i did set my bot to use 2 attack skills and take out the spamming skll feature and it work great :)