diff options
author | HoraK-FDF <horak-fdf@web.de> | 2021-08-07 21:21:02 +0200 |
---|---|---|
committer | HoraK-FDF <horak-fdf@web.de> | 2021-08-07 21:21:02 +0200 |
commit | a593fe1fbf19e988d61678ba9c00049a236baf11 (patch) | |
tree | 41134470089eba7f5b0296bb61520526e6d7d033 | |
parent | 90414ed83cbc41a9d88690eb387474115a9769df (diff) | |
download | serverdata-a593fe1fbf19e988d61678ba9c00049a236baf11.tar.gz serverdata-a593fe1fbf19e988d61678ba9c00049a236baf11.tar.bz2 serverdata-a593fe1fbf19e988d61678ba9c00049a236baf11.tar.xz serverdata-a593fe1fbf19e988d61678ba9c00049a236baf11.zip |
changed back to switch and replaced ids with constantsfocus_skills
-rw-r--r-- | npc/magic/final.txt | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/npc/magic/final.txt b/npc/magic/final.txt index 055fe495..5250bcf8 100644 --- a/npc/magic/final.txt +++ b/npc/magic/final.txt @@ -244,13 +244,21 @@ function script HUB_PCBonus { { // atm trolls can use raging, I thought it's ok since they do damage over Str and have only a range of 3 @item_crit = 0; - - if (getequipname(EQI_HEAD_TOP) == "AssassinMask" || getequipname(EQI_HEAD_TOP) == "BullHelmet") - @item_crit = 15; - else if (getequipname(EQI_HEAD_TOP) == "Monocle" || getequipname(EQI_HEAD_TOP) == "Pipe") - @item_crit = 10; - - if (getequipname(EQI_HAND_R) == "Beheader") + switch (getequipid(EQI_HEAD_TOP)) + { + case AssassinMask: + case BullHelmet: + @item_crit = 15; + break; + case Monocle: + case Pipe: + @item_crit = 10; + break; + default: + @item_crit = 0; + break; + } + if (getequipid(EQI_HAND_R) == Beheader) @item_crit -= 25; bonus bCritical, (getskilllv(SKILL_RAGING))*((readparam2(UDT_DEX)/40)+(readparam2(UDT_LUK)/30)+(@item_crit/10)+(readparam2(UDT_STR)/10)-2); |