Jump to content
  • 0

Q> about max dmg on script


CursorX

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

hello guys... is it possible to have a script with max dmg?

for example...

i got monster in map.. even the player is higher level or he got high dmg.. the max dmg on that map is only 1k ...

or its not possible.?

if it is possible can i hve sample?

thankyou

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

should belongs to source section though

[paste=1flvas6pjtxx]

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

hi annie.. what if its pvp on? player get 1k max dmg too? is it affected the player? becoz on same map?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

yes it is

 

if you want the damage cap only on monster only, can do

if ( src->type == BL_PC && bl->type == BL_MOB )

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

is this correct?

if( src->type == BL_PC && bl->type == BL_MOB ) {
		sd = BL_CAST(BL_PC, src);
		if ( !strcmp( mapindex_id2name(sd->mapindex), "ordeal_3-2" ) )
			if ( damage > 1000 )
				damage = 1000;
	}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

yeah ...

if you want a specific mob id, can also struct mob_data

[paste=akwqjhz48c4]

https://github.com/rathena/rathena/blob/master/src/map/map.h#L866

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

hi i got 2 different mob in 1 map shid be like this sample?

if ( !strcmp( mapindex_id2name( ((TBL_PC*)src)->mapindex ), "ordeal_3-2" ) && ((TBL_MOB*)bl)->mob_id == 1003 ) && ((TBL_MOB*)bl)->mob_id == 1004 )

is this ryt?

 

in battle.c where i will paste that code?

Edited by DwGen
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

hi i got 2 different mob in 1 map shid be like this sample?

if ( !strcmp( mapindex_id2name( ((TBL_PC*)src)->mapindex ), "ordeal_3-2" ) && ((TBL_MOB*)bl)->mob_id == 1003 ) && ((TBL_MOB*)bl)->mob_id == 1004 )
is this ryt?
usually if calling 2 same function on same variable, I would've set the variable instead

[paste=qzoymzafaz2]

kill a poring or a drops in ordeal_3-2, would cap the damage at 1000

in battle.c where i will paste that code?

this is a patch file =/

search for the line no. around 1259 inside the battle_calc_damage function

search for return damage;, add the lines with the + above it

or you can just download the file

rename it as max_damage.diff

right click -> apply patch

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

i did search.. but i dont know where to put... look this is the latest battle.c

 

https://github.com/rathena/rathena/blob/master/src/map/battle.c


hey annie?

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...