Issue information

Issue ID
#7609
Status
Fixed
Severity
None
Started
Haru
Aug 1, 2013 2:06
Last Post
Haru
Nov 30, 2013 20:18
Confirmation
N/A

Haru - Aug 1, 2013 2:06

Current script for item 13414 (Elemental_Sword) is:[code=auto:0]13414,Elemental_Sword,Elemental Sword,4,20,,1200,105,,1,3,0x000654E2,2,2,2,3,70,1,2,{ bonus bStr,2; bonus bInt,4; bonus bDex,1; bonus bMatkRate,5; bonus2 bAddEle,Ele_Neutral,10; bonus3 bAutoSpell,"MG_COLDBOLT",3,50; bonus4 bAutoSpellOnSkill,"MG_COLDBOLT","MG_FIREBOLT",3,1000; bonus4 bAutoSpellOnSkill,"MG_FIREBOLT","MG_LIGHTNINGBOLT",3,10000; bonus4 bAutoSpellOnSkill,"MG_LIGHTNINGBOLT","WZ_EARTHSPIKE",3,10000; },{},{} [/code]bAutoSpellOnSkill takes a success rate parameter in [n/10]%, not in [n/100]%, so those values cannot be right (value must be in the 1-1000 range, while there are values as high as 10000.)

The last two bAutoSpellOnSkill should be reduced to 1/10 of the current ones for sure (well, there's no functional change, since anything higher than 1000 is still 100% success rate), while I'm not sure whether the first one should be reduced as well (was it meant to be 10% or 100%?)

The line has been there since [url="https://github.com/HerculesWS/Hercules/commit/b913c4ab"]https://github.com/HerculesWS/Hercules/commit/b913c4ab[/url]

Ind - Aug 1, 2013 12:47

The aegis:[code=auto:0] SetAutoSpell2 Target MG_COLDBOLT 3 50 SetSkillAutoSpell MG_COLDBOLT 1000 MG_FIREBOLT 3 Target SetSkillAutoSpell MG_FIREBOLT 1000 MG_LIGHTNINGBOLT 3 Target SetSkillAutoSpell MG_LIGHTNINGBOLT 1000 WZ_EARTHSPIKE 3 Target AddDamage_Property Target PROPERTY_Nothing 10 [/code]as I under SetSkillAutoSpell ratio is 1 - 10000

Haru - Aug 1, 2013 13:45

So it's supposed to be 10% chance?

If so, considering that our bAutoSpellOnSkill is 1~1000[code=auto:0]if( rnd()%1000 >= sd->autospell3[i].rate ) continue;[/code]we need to update the item script for sure (we have 100%, 1000%, 1000% chance while we should have 10%, 10%, 10%)... and optionally also update the bAutoSpellOnSkill code to match their % rate for easy conversion of item scripts in future...

This post has been edited by Haru on Aug 1, 2013 14:16

Ind - Aug 1, 2013 15:07

I don't feel strong about what I said on SetSkillAutoSpell anymore, I checked others to compare e.g. 13110[code=auto:0] SetSkillAutoSpell GS_RAPIDSHOWER 1000 GS_GLITTERING 1 Target [/code]13038[code=auto:0] SetSkillAutoSpell RG_BACKSTAP 100 SM_BASH 10 Target [/code]and compared both against ours, either we have it all wrong or its matching...or i'm wrong about being wrong XD

Haru - Aug 1, 2013 17:06

Confirmed with Yommy that the range is 0-1000, so our code is correct.

proof ([url="http://db.irowiki.org/db/item-info/13307/"]item 13307, upgrade bonus 9+[/url]):[code=auto:0] SetSkillAutoSpell NJ_ISSEN 1000 AL_HEAL 10 User SetSkillAutoSpell NJ_HUUMA 200 NPC_CRITICALWOUND 2 Target [/code]The item DB entry is still wrong though, since 10000 is out of the acceptable range (even if there are no functional differences)