ymcc Posted September 17, 2019 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 3 Reputation: 0 Joined: 10/09/18 Last Seen: September 22, 2019 Share Posted September 17, 2019 In the past, I use *setunitdata <GID>,UMOB_ATKMIN,<new value> in the script to change some mob's ATK. But in the latest update, *setunitdata can not change the mob's ATKMIN,ATKMAX,MATKMIN,MATKMAX. How can I change mob's ATKorMATK in script now? Please help me,thx. Quote Link to comment Share on other sites More sharing options...
0 Seravy Posted September 17, 2019 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 176 Reputation: 60 Joined: 01/11/19 Last Seen: March 12, 2021 Share Posted September 17, 2019 MIN and MAX MATK are calculated values in renewal so changing them without changing the base stats they are calculated from doesn't really work. You have to change the stats they are being calculated from instead : INT, MATK (aka ATK2) and LEVEL. However, that's the theory. In practice, I do remember I had to actually fix/update the source to make it work, as MATK wasn't even available as a thing to read/write on mobs. See : https://github.com/rathena/rathena/pull/3968 Note this is for MATK specifically, I haven't really tested any of the other stats yet. There is a good chance they are also broken. This is how my script that scales monster strength currently looks like : setunitdata $@mobid[.@i], UMOB_LEVEL, getmonsterinfo( getarg(1), MOB_LV ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( getarg(1), MOB_MAXHP ) * (100+3*getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_ATKMIN, getmonsterinfo( getarg(1), MOB_ATK1 ) * (100+3*getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_ATKMAX, getmonsterinfo( getarg(1), MOB_ATK2 ) * (100+3*getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_MATK, getmonsterinfo( getarg(1), MOB_MATK ) * (100+3*getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_STR, getmonsterinfo( getarg(1), MOB_STR ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_AGI, getmonsterinfo( getarg(1), MOB_AGI ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_VIT, getmonsterinfo( getarg(1), MOB_VIT ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_INT, getmonsterinfo( getarg(1), MOB_INT ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_DEX, getmonsterinfo( getarg(1), MOB_DEX ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_LUK, getmonsterinfo( getarg(1), MOB_LUK ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_DEF, getmonsterinfo( getarg(1), MOB_DEF ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_MDEF, getmonsterinfo( getarg(1), MOB_MDEF ) * (100+getarg(3)) / 150; Quote Link to comment Share on other sites More sharing options...
0 ymcc Posted September 17, 2019 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 3 Reputation: 0 Joined: 10/09/18 Last Seen: September 22, 2019 Author Share Posted September 17, 2019 2 hours ago, Seravy said: MIN and MAX MATK are calculated values in renewal so changing them without changing the base stats they are calculated from doesn't really work. You have to change the stats they are being calculated from instead : INT, MATK (aka ATK2) and LEVEL. However, that's the theory. In practice, I do remember I had to actually fix/update the source to make it work, as MATK wasn't even available as a thing to read/write on mobs. See : https://github.com/rathena/rathena/pull/3968 Note this is for MATK specifically, I haven't really tested any of the other stats yet. There is a good chance they are also broken. This is how my script that scales monster strength currently looks like : setunitdata $@mobid[.@i], UMOB_LEVEL, getmonsterinfo( getarg(1), MOB_LV ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_MAXHP, getmonsterinfo( getarg(1), MOB_MAXHP ) * (100+3*getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_ATKMIN, getmonsterinfo( getarg(1), MOB_ATK1 ) * (100+3*getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_ATKMAX, getmonsterinfo( getarg(1), MOB_ATK2 ) * (100+3*getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_MATK, getmonsterinfo( getarg(1), MOB_MATK ) * (100+3*getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_STR, getmonsterinfo( getarg(1), MOB_STR ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_AGI, getmonsterinfo( getarg(1), MOB_AGI ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_VIT, getmonsterinfo( getarg(1), MOB_VIT ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_INT, getmonsterinfo( getarg(1), MOB_INT ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_DEX, getmonsterinfo( getarg(1), MOB_DEX ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_LUK, getmonsterinfo( getarg(1), MOB_LUK ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_DEF, getmonsterinfo( getarg(1), MOB_DEF ) * (100+getarg(3)) / 150; setunitdata $@mobid[.@i], UMOB_MDEF, getmonsterinfo( getarg(1), MOB_MDEF ) * (100+getarg(3)) / 150; OH, I see. Unfortunately, this problem still need to fix/update the source. That mean the script is not universal. However, thx for your answer. Quote Link to comment Share on other sites More sharing options...
Question
ymcc
In the past,
I use *setunitdata <GID>,UMOB_ATKMIN,<new value> in the script to change some mob's ATK.
But in the latest update,
*setunitdata can not change the mob's ATKMIN,ATKMAX,MATKMIN,MATKMAX.
How can I change mob's ATKorMATK in script now?
Please help me,thx.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.