Jump to content
  • 0

Perfect Hit effect


Brynner

Question


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  1962
  • Reputation:   202
  • Joined:  01/08/12
  • Last Seen:  

how to modified this Perfect Hit effect? i just want to modified it just like this.

single point it will surely hit the target. and also it can hit the perfect dodge player.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

@battle.c the code for the perfect hit thingy

} else { //Check for Perfect Hit
 if(sd && sd->bonus.perfect_hit > 0 && rnd()%100 < sd->bonus.perfect_hit)
	  flag.hit = 1;

and for neglecting the perfect dodge..

from

if ( (!skill_num || skill_num == PA_SACRIFICE) && tstatus->flee2 && rnd()%1000 < tstatus->flee2  )
{ //Check for Lucky Dodge
 wd.type=0x0b; 

then change to

if ( (!skill_num || skill_num == PA_SACRIFICE) && tstatus->flee2 && rnd()%1000 < tstatus->flee2 && !sd->bonus.perfect_hit  )
{ //Check for Lucky Dodge
 wd.type=0x0b;


Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  1962
  • Reputation:   202
  • Joined:  01/08/12
  • Last Seen:  

@battle.c the code for the perfect hit thingy

} else { //Check for Perfect Hit
if(sd && sd->bonus.perfect_hit > 0 && rnd()%100 <sd->bonus.perfect_hit)
flag.hit = 1;

and for neglecting the perfect dodge..

from

if ( (!skill_num || skill_num == PA_SACRIFICE) && tstatus->flee2 && rnd()%1000 <tstatus->flee2 )
{ //Check for Lucky Dodge
wd.type=0x0b; 

then change to

if ( (!skill_num || skill_num == PA_SACRIFICE) && tstatus->flee2 && rnd()%1000 <tstatus->flee2 && !sd->bonus.perfect_hit )
{ //Check for Lucky Dodge
wd.type=0x0b;

thanks for this.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  311
  • Reputation:   46
  • Joined:  11/06/11
  • Last Seen:  

It works 100% fine but when my servers runs 2-3 minutes and the map crash ~> this is the bt full of core dumps

#0  0x0819c9a7 in battle_calc_weapon_attack (src=0xaf430c84, target=0xf317dc0,
   skill_num=0, skill_lv=0, wflag=0) at battle.c:1557
       skillratio = 100
       skill = 0
       s_ele = <value optimized out>
       s_ele_ = <value optimized out>
       t_class = <value optimized out>
       i = <value optimized out>
       nk = 0
       n_ele = 0 '\000'
       sd = 0x0
       tsd = 0xf317dc0
       wd = {damage = 0, damage2 = 0, type = 0, div_ = 1, amotion = 624,
         dmotion = 400, blewcount = 0, flag = 529, dmg_lv = ATK_DEF}
       sc = 0xaf430ec4
       tsc = 0xf318064
       sstatus = 0xaf430e6c
       tstatus = 0xf318010
       flag = {hit = 0, cri = 0, idef = 0, idef2 = 0, pdef = 0, pdef2 = 0,
         infdef = 0, arrow = 0, rh = 1, lh = 0, weapon = 1}
       __FUNCTION__ = "battle_calc_weapon_attack"
#1  0x081a2536 in battle_calc_attack (attack_type=1, bl=0xaf430c84,
   target=0xf317dc0, skill_num=0, skill_lv=0, count=0) at battle.c:4847

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  311
  • Reputation:   46
  • Joined:  11/06/11
  • Last Seen:  

help help : need this perfect hit to bypass theflee

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  1962
  • Reputation:   202
  • Joined:  01/08/12
  • Last Seen:  

the solution is already posted above.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  311
  • Reputation:   46
  • Joined:  11/06/11
  • Last Seen:  

YEah, as you can see i am having a map-crash >.>

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  1962
  • Reputation:   202
  • Joined:  01/08/12
  • Last Seen:  

YEah, as you can see i am having a map-crash >.>

oh i did not get any kind of error since i only add this && !sd->bonus.perfect_hit and it works 100% while using the latest revision

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...