Deprecated: Function create_function() is deprecated in /var/www/html/jellyro.com/archive/forums/Sources/Load.php on line 178

Deprecated: Function create_function() is deprecated in /var/www/html/jellyro.com/archive/forums/Sources/Load.php on line 183

Deprecated: Function create_function() is deprecated in /var/www/html/jellyro.com/archive/forums/Sources/Load.php on line 184

Deprecated: Function create_function() is deprecated in /var/www/html/jellyro.com/archive/forums/Sources/Load.php on line 220

Deprecated: Function create_function() is deprecated in /var/www/html/jellyro.com/archive/forums/Sources/Load.php on line 223

Deprecated: Function create_function() is deprecated in /var/www/html/jellyro.com/archive/forums/Sources/Load.php on line 235

Deprecated: Function create_function() is deprecated in /var/www/html/jellyro.com/archive/forums/Sources/Load.php on line 250

Deprecated: Function create_function() is deprecated in /var/www/html/jellyro.com/archive/forums/Sources/Load.php on line 268
Homunculus ASPD/Dancing Tweak

Author Topic: Homunculus ASPD/Dancing Tweak  (Read 3259 times)

Myew Gelato

  • I know a Dark Priest, and he's cool.
  • ***
  • Posts: 1115
  • Nyaow~
Homunculus ASPD/Dancing Tweak
« on: January 29, 2011, 07:34:10 am »
The guide says:
Nah open the AI file in the USER_AI folder using notepad.

Then findChange this:

if (MyState == ATTACK_ST) then
OnATTACK_ST ()
end

And change it

To this:
local zx, zy = GetV( V_POSITION, MyEnemy )
if (MyState == ATTACK_ST) then
OnATTACK_ST ()
Move(MyID,zx+1,zy)
Move(MyID,zx-1,zy)
end
if (MyState == ATTACK_ST) then
OnATTACK_ST ()
Move(MyID,zx,zy+1)
Move(MyID,zx,zy-1)
end
But AI.lua is:
Code: [Select]
if (MyState == IDLE_ST) then
OnIDLE_ST()
elseif (MyState == CHASE_ST) then
OnCHASE_ST()
elseif (MyState == EVADE_ST) then
OnEVADE_ST()
elseif (MyState == ATTACK_ST) then
OnATTACK_ST()
elseif (MyState == FOLLOW_ST) then
OnFOLLOW_ST()
elseif (MyState == BUGPOSI_ST) then
OnBUGPOSI_ST()

How can I implement this for my Lif? ??? Do I need to use a different AI than MirAI? I tried AzzyAI once but it didn't work on our server with my Lif. (may have been before the switch/updates)

"I am a Crusader. Reliever of pain, and.. a protector of people." "...because annoying people is fun! -Kaeri"

Kibou

  • Mercenary Trader
  • **
  • Posts: 584
  • Expect the worst; Hope for the best.
Re: Homunculus ASPD/Dancing Tweak
« Reply #1 on: January 29, 2011, 10:19:26 am »
My suggestion would be to take this part of that code:

Code: [Select]
elseif (MyState == ATTACK_ST) then
OnATTACK_ST()

And take it to the top, so the code now looks like this:

Code: [Select]
        if (MyState == ATTACK_ST) then
OnATTACK_ST()
        elseif (MyState == IDLE_ST) then
OnIDLE_ST()
elseif (MyState == CHASE_ST) then
OnCHASE_ST()
elseif (MyState == EVADE_ST) then
OnEVADE_ST()
elseif (MyState == FOLLOW_ST) then
OnFOLLOW_ST()
elseif (MyState == BUGPOSI_ST) then
OnBUGPOSI_ST()

Afterwards you may insert the suggested code so it will look something like this:

Code: [Select]
       local zx, zy = GetV( V_POSITION, MyEnemy )
        if (MyState == ATTACK_ST) then
                OnATTACK_ST ()
                Move(MyID,zx+1,zy)
                Move(MyID,zx-1,zy)
        elseif (MyState == IDLE_ST) then
OnIDLE_ST()
elseif (MyState == CHASE_ST) then
OnCHASE_ST()
elseif (MyState == EVADE_ST) then
OnEVADE_ST()
elseif (MyState == FOLLOW_ST) then
OnFOLLOW_ST()
elseif (MyState == BUGPOSI_ST) then
OnBUGPOSI_ST()

Hopefully it works as coded, if not, writing the extension into the actual OnAttack_ST() code might be necessary.
« Last Edit: January 29, 2011, 11:03:10 am by Kibou »
Pleased to make your acquaintance. =)

Spoiler for In Game Names:
Aoi Koidoku - 84/54 Stalker (Main Character)
Atelier Sonata - 72/42 Alchemist (Lif: Orica Mule Harmonia)
Kitsu Raiseisen - 71/37 Priest
Setsuna Shibarayume - 70/39 Monk
Kristallinen - 70/33 Wizard
Patchi - 67/26 Sage
Minyutsawke - 66/26 Hunter
Steelblossom - 66/25 Blacksmith
Eolia no Misha - 64/36 Soul Linker
Senkaon - 52/32 Knight

Need a Moscovia Warp for the Valentine's Day quests? Whisper my characters ingame!

Xia Xue

  • Yuno Librarian
  • ***
  • Posts: 2506
  • しばらく 休み
Re: Homunculus ASPD/Dancing Tweak
« Reply #2 on: January 29, 2011, 10:55:36 am »
my brain is bleeding @_@ to this
;_;














imafraidyoulookatathinglongenoughitloosesallofiitsmeanings

Kibou

  • Mercenary Trader
  • **
  • Posts: 584
  • Expect the worst; Hope for the best.
Re: Homunculus ASPD/Dancing Tweak
« Reply #3 on: January 29, 2011, 11:08:20 am »
Yeah, LUA code is nothing pretty to look at for non-coders (well, it's not pretty to look at for most coders as well, but yeah @_@). Thankfully MirAI's stuff is structured well, so it's easy enough to tinker with.

An alternative way of using the code snippet:

Code: [Select]
       if (MyState == IDLE_ST) then
OnIDLE_ST()
elseif (MyState == CHASE_ST) then
       OnCHASE_ST()
elseif (MyState == EVADE_ST) then
                OnEVADE_ST()
        elseif (MyState == ATTACK_ST) then
                OnATTACK_ST()
                local zx, zy = GetV( V_POSITION, MyEnemy )
                Move(MyID,zx+1,zy)
                Move(MyID,zx-1,zy)
elseif (MyState == FOLLOW_ST) then
       OnFOLLOW_ST()
        elseif (MyState == BUGPOSI_ST) then
                OnBUGPOSI_ST()

This is in case you don't like the idea of messing around with MirAI's call order.

Edit: Fixed to accomodate original coding. *dumbass* :-[
« Last Edit: January 29, 2011, 11:23:12 am by Kibou »
Pleased to make your acquaintance. =)

Spoiler for In Game Names:
Aoi Koidoku - 84/54 Stalker (Main Character)
Atelier Sonata - 72/42 Alchemist (Lif: Orica Mule Harmonia)
Kitsu Raiseisen - 71/37 Priest
Setsuna Shibarayume - 70/39 Monk
Kristallinen - 70/33 Wizard
Patchi - 67/26 Sage
Minyutsawke - 66/26 Hunter
Steelblossom - 66/25 Blacksmith
Eolia no Misha - 64/36 Soul Linker
Senkaon - 52/32 Knight

Need a Moscovia Warp for the Valentine's Day quests? Whisper my characters ingame!

DreamerP

  • Elder of Thanatos
  • ***
  • Posts: 6110
  • ~Cherish Yesterday, Live Today, Dream Tomorrow~
Re: Homunculus ASPD/Dancing Tweak
« Reply #4 on: January 29, 2011, 12:28:14 pm »
So dancing is working again  ???

Kibou

  • Mercenary Trader
  • **
  • Posts: 584
  • Expect the worst; Hope for the best.
Re: Homunculus ASPD/Dancing Tweak
« Reply #5 on: January 29, 2011, 12:58:01 pm »
I haven't tested the code recently myself, but I can give it a try today. I know it worked for me some years ago when I manually had to edit the dancing code in myself at some point.
Pleased to make your acquaintance. =)

Spoiler for In Game Names:
Aoi Koidoku - 84/54 Stalker (Main Character)
Atelier Sonata - 72/42 Alchemist (Lif: Orica Mule Harmonia)
Kitsu Raiseisen - 71/37 Priest
Setsuna Shibarayume - 70/39 Monk
Kristallinen - 70/33 Wizard
Patchi - 67/26 Sage
Minyutsawke - 66/26 Hunter
Steelblossom - 66/25 Blacksmith
Eolia no Misha - 64/36 Soul Linker
Senkaon - 52/32 Knight

Need a Moscovia Warp for the Valentine's Day quests? Whisper my characters ingame!

aone

  • Earl of Vermillion
  • ***
  • Posts: 1789
  • frying fish
Re: Homunculus ASPD/Dancing Tweak
« Reply #6 on: January 29, 2011, 02:12:23 pm »
Quote
make a not pad and copy/past the following



--------------------------------------------------
-- Fast attack Mod by Des, aka Zenia-chan
--------------------------------------------------
-- Your Homunculus will move while attacking
-- and can attack faster. However, it will not
-- recover HP/SP while attacking, due to these
-- movements.
--------------------------------------------------

--------------------------------------------------
function ModInit()
-- plugin initialization
--------------------------------------------------
StdOnATTACK_ST = OnATTACK_ST
OnATTACK_ST = FastOnATTACK_ST

end

--------------------------------------------------
function FastOnATTACK_ST()
--------------------------------------------------
local zx, zy = GetV( V_POSITION, MyEnemy )
StdOnATTACK_ST ()
Move(MyID,zx+1,zy)
Move(MyID,zx-1,zy)
StdOnATTACK_ST ()
Move(MyID,zx,zy+1)
Move(MyID,zx,zy-1)
end




name the note pad FastAttack_Mod save in your User_AI folder then open your mir ai config click on the tab Extra and click on FastAttack_Mod when you log on turn on user ai and your done ur pet will attack faster by constantly moving to remove delay
Divinity
"Thanks for all the fish."
2008 - 2012

Kibou

  • Mercenary Trader
  • **
  • Posts: 584
  • Expect the worst; Hope for the best.
Re: Homunculus ASPD/Dancing Tweak
« Reply #7 on: January 29, 2011, 02:17:32 pm »
Ah, thanks much aone, I'll test this out later today as well. =)
Pleased to make your acquaintance. =)

Spoiler for In Game Names:
Aoi Koidoku - 84/54 Stalker (Main Character)
Atelier Sonata - 72/42 Alchemist (Lif: Orica Mule Harmonia)
Kitsu Raiseisen - 71/37 Priest
Setsuna Shibarayume - 70/39 Monk
Kristallinen - 70/33 Wizard
Patchi - 67/26 Sage
Minyutsawke - 66/26 Hunter
Steelblossom - 66/25 Blacksmith
Eolia no Misha - 64/36 Soul Linker
Senkaon - 52/32 Knight

Need a Moscovia Warp for the Valentine's Day quests? Whisper my characters ingame!

aone

  • Earl of Vermillion
  • ***
  • Posts: 1789
  • frying fish
Re: Homunculus ASPD/Dancing Tweak
« Reply #8 on: January 29, 2011, 02:18:05 pm »
yarp :)
Divinity
"Thanks for all the fish."
2008 - 2012

Linmakana

  • Yuno Librarian
  • ***
  • Posts: 4011
  • Gone.
    • My YouTube Channel
Re: Homunculus ASPD/Dancing Tweak
« Reply #9 on: January 29, 2011, 02:34:05 pm »
Spoiler for Hax:
Quote
make a not pad and copy/past the following



--------------------------------------------------
-- Fast attack Mod by Des, aka Zenia-chan
--------------------------------------------------
-- Your Homunculus will move while attacking
-- and can attack faster. However, it will not
-- recover HP/SP while attacking, due to these
-- movements.
--------------------------------------------------

--------------------------------------------------
function ModInit()
-- plugin initialization
--------------------------------------------------
StdOnATTACK_ST = OnATTACK_ST
OnATTACK_ST = FastOnATTACK_ST

end

--------------------------------------------------
function FastOnATTACK_ST()
--------------------------------------------------
local zx, zy = GetV( V_POSITION, MyEnemy )
StdOnATTACK_ST ()
Move(MyID,zx+1,zy)
Move(MyID,zx-1,zy)
StdOnATTACK_ST ()
Move(MyID,zx,zy+1)
Move(MyID,zx,zy-1)
end




name the note pad FastAttack_Mod save in your User_AI folder then open your mir ai config click on the tab Extra and click on FastAttack_Mod when you log on turn on user ai and your done ur pet will attack faster by constantly moving to remove delay
Does this have to be saved as a specific file type?
Spoiler for My Legacy Still Remains:
Spoiler for PECO:
Spoiler for LROC:

aone

  • Earl of Vermillion
  • ***
  • Posts: 1789
  • frying fish
Re: Homunculus ASPD/Dancing Tweak
« Reply #10 on: January 29, 2011, 02:37:17 pm »
.lua I think. Gotta check when I get home.
Divinity
"Thanks for all the fish."
2008 - 2012

Muranodo

  • Earl of Vermillion
  • ***
  • Posts: 1350
Re: Homunculus ASPD/Dancing Tweak
« Reply #11 on: January 29, 2011, 02:44:40 pm »
.lua I think. Gotta check when I get home.

Yeah, it has to be .lua for it to show up in the extra tab.  Tried it myself.

Myew Gelato

  • I know a Dark Priest, and he's cool.
  • ***
  • Posts: 1115
  • Nyaow~
Re: Homunculus ASPD/Dancing Tweak
« Reply #12 on: January 29, 2011, 02:48:25 pm »
Wow... do I feel stupid. I looked in my AI folder and it turns out I already had FastAttack_Mod.lua in there. /facepalm Buuut, my Lif wasn't dancing with it. Where and when did I get this, I don't remember. Turns out I didn't have the mod activated in MirAI. Many thanks for helping me solve that, she's dancing around Les beautifully now. ^^ I tested the mod Kibou rewrote and it also worked well.

"I am a Crusader. Reliever of pain, and.. a protector of people." "...because annoying people is fun! -Kaeri"

Kibou

  • Mercenary Trader
  • **
  • Posts: 584
  • Expect the worst; Hope for the best.
Re: Homunculus ASPD/Dancing Tweak
« Reply #13 on: January 29, 2011, 03:04:02 pm »
Goodie =) Glad we were able to help~
Pleased to make your acquaintance. =)

Spoiler for In Game Names:
Aoi Koidoku - 84/54 Stalker (Main Character)
Atelier Sonata - 72/42 Alchemist (Lif: Orica Mule Harmonia)
Kitsu Raiseisen - 71/37 Priest
Setsuna Shibarayume - 70/39 Monk
Kristallinen - 70/33 Wizard
Patchi - 67/26 Sage
Minyutsawke - 66/26 Hunter
Steelblossom - 66/25 Blacksmith
Eolia no Misha - 64/36 Soul Linker
Senkaon - 52/32 Knight

Need a Moscovia Warp for the Valentine's Day quests? Whisper my characters ingame!

DreamerP

  • Elder of Thanatos
  • ***
  • Posts: 6110
  • ~Cherish Yesterday, Live Today, Dream Tomorrow~
Re: Homunculus ASPD/Dancing Tweak
« Reply #14 on: January 29, 2011, 05:32:31 pm »
I still have my Lif AI saved I deleted Miranda when we changed since the AIs weren't working I guess I'll load it again  :)