Код
//###############################################
//Poison Weaken Feeblemind Clumsy Poison Field
//Flame Strike Explosion Fireball Magic Arrow Fire Field
//Ice Strike Paralyze Mana Drain Harm Paralyze Field
//Lightning MIndBlast Chainlightning Energy Bolt Energy Field
//Dispel Mass Curse Reveal Teleport Mass Dispel
// Meteor Swarm Earthquake
[Function resistancemenu]
sdialog d_resistancemenu
[DIALOG d_resistancemenu]
0,540
page 0
Resizepic 0 0 2600 820 175
dtext 280 17 0 Chance To Resisting Spells :
button 500 17 4014 4015 1 0 1 //кнопка для обновления
dtext 10 40 0 Poison
if (<Src.TAG0.InnoxRES> + <Src.TAG0.InnoxSRES> + <Src.TAG0.WInnoxSRES> + <Src.TAG0.APFRES>) //сдесь складываем таги с шмоток для определения
dtext 130 40 0 <eval (<Src.TAG0.InnoxRES> + <Src.TAG0.InnoxSRES> + <Src.TAG0.WInnoxSRES> + <Src.TAG0.APFRES>)>% //сдесь складываем таги с шмоток для отображения
//else
//dtext 130 40 0 -
endif
dtext 170 40 0 Weaken
if (<Src.TAG0.desmaniRES> + <Src.TAG0.DdesmaniRES>)
dtext 290 40 0 <eval (<Src.TAG0.desmaniRES> + <Src.TAG0.DdesmaniRES>)>%
//else
//dtext 290 40 0 -
endif
dtext 330 40 0 Feeblemind
if (<Src.TAG0.FeeblemindRES> + <Src.TAG0.FeebleDark> + <src.tag0.Feeblemagering>)
dtext 440 40 0 <eval (<Src.TAG0.FeeblemindRES> + <Src.TAG0.FeebleDark> + <src.tag0.Feeblemagering>)>%
//else
//dtext 440 40 0 -
endif
dtext 490 40 0 Clumsy
if (<Src.TAG0.uusjuxRES> + <Src.TAG0.WuusjuxRES> + <Src.TAG0.TEuusjuxRES>)
dtext 610 40 0 <eval (<Src.TAG0.uusjuxRES> + <Src.TAG0.WuusjuxRES> + <Src.TAG0.TEuusjuxRES>)>%
//else
//dtext 610 40 0 -
endif
dtext 650 40 0 Poison Field
if (<Src.TAG0.APFRES>)
dtext 770 40 0 <eval <Src.TAG0.APFRES>>%
//else
//dtext 770 40 0 -
endif
dtext 10 60 0 Flame Strike
if (<Src.TAG0.FSRES> + <Src.TAG0.FSSRES> + <Src.TAG0.WIFSSRES> + <Src.TAG0.SeaShieldRES>)
dtext 130 60 0 <eval (<Src.TAG0.FSRES> + <Src.TAG0.FSSRES> + <Src.TAG0.WIFSSRES> + <Src.TAG0.SeaShieldRES>)>%
//else
//dtext 130 60 0 -
endif
dtext 170 60 0 Explosion
if <src.TAG0.EPLATINUmRes> + <Src.TAG0.EPlutoniumRes>
dtext 290 60 0 <eval <src.TAG0.EPLATINUmRes> + <Src.TAG0.EPlutoniumRes>>%
//else
//dtext 290 60 0 -
endif
dtext 330 60 0 Fire Ball
if <src.TAG0.FBMOONRes> + <Src.TAG0.SeaShieldRES>
dtext 450 60 0 <eval <src.TAG0.FBMOONRes> + <Src.TAG0.SeaShieldRES>>%
//else
//dtext 450 60 0 -
endif
dtext 490 60 0 Magic Arrow
if <src.TAG0.MAMOONRes> + <Src.TAG0.SeaShieldRES>
dtext 610 60 0 <eval <src.TAG0.MAMOONRes> + <Src.TAG0.SeaShieldRES>>%
//else
//dtext 550 60 0 -
endif
dtext 650 60 0 Fire Field
if (<TAG0.AFFRES> + <Src.TAG0.SeaShieldRES>)
dtext 770 60 0 <eval (<TAG0.AFFRES> + <Src.TAG0.SeaShieldRES>)>%
//else
//dtext 770 60 0 -
endif
dtext 10 80 0 Ice Strike // у меня это новый спелл вместо mana vampire
if <Src.TAG0.VCOLDRES> + <Src.TAG0.DCOLDRES> + <Src.TAG0.WFCOLDRES>
dtext 130 80 0 <eval (<Src.TAG0.VCOLDRES> + <Src.TAG0.DCOLDRES> + <Src.TAG0.WFCOLDRES>)>%
//else
//dtext 130 80 0 -
endif
dtext 170 80 0 Paralyze
if <Src.TAG0.SparalRES>
dtext 290 80 0 <eval <Src.TAG0.SparalRES>>%
//else
//dtext 290 80 0 -
endif
dtext 330 80 0 Mana Drain
if <src.TAG0.MANADRainRes>
dtext 450 80 0 <eval <src.TAG0.MANADRainRes>>%
//else
//dtext 450 80 0 -
endif
dtext 490 80 0 Mind Blast
if <Src.TAG0.MindBlastRES>
dtext 610 80 0 <eval <Src.TAG0.MindBlastRES>>%
//else
//dtext 610 80 0 -
endif
dtext 650 80 0 Paralyze Field
if <src.TAG0.SPFRES> + <Src.TAG0.paralRES> + <Src.TAG0.WFparalRES>
dtext 770 80 0 <eval (<src.TAG0.SPFRES> + <Src.TAG0.paralRES> +<Src.TAG0.WFparalRES>)>%
//else
//dtext 770 80 0 -
endif
dtext 10 100 0 Lightning
if (<Src.TAG0.ELightRES> + <Src.TAG0.WLightRES>)
dtext 130 100 0 <eval (<Src.TAG0.ELightRES> + <Src.TAG0.WLightRES>)>%
//else
//dtext 130 100 0 -
endif
dtext 170 100 0 Harm
if <src.TAG0.HarmRes> + <src.TAG0.YWHarmRes>
dtext 290 100 0 <eval (<src.TAG0.HarmRes> + <src.TAG0.YWHarmRes>)>%
//else
//dtext 290 100 0 -
endif
dtext 330 100 0 Chain Lightning
if (<src.TAG0.ELightRES> + <src.TAG0.WLightRES>)
dtext 450 100 0 <eval (<src.TAG0.ELightRES> + <src.TAG0.WLightRES>)>%
//else
//dtext 450 100 0 -
endif
dtext 490 100 0 Energy Bolt
if (<src.TAG0.ELightRES>)
dtext 610 100 0 <eval <src.TAG0.ELightRES>>%
//else
//dtext 610 100 0 -
endif
dtext 650 100 0 Energy Field
if (<src.TAG0.ELightRES>)
dtext 770 100 0 <eval <src.TAG0.ELightRES>>%
//else
//dtext 770 100 0 -
endif
dtext 10 120 0 Dispel
if <Src.TAG0.ADispelRES>
dtext 130 120 0 <eval <Src.TAG0.ADispelRES>>%
//else
//dtext 130 120 0 -
endif
dtext 170 120 0 Mass Curse
if <src.tag0.BRRes> + <src.TAG0.DdesmaniRES> + <src.TAG0.BcMCRES>
dtext 290 120 0 <eval <src.tag0.BRRes> + <src.TAG0.DdesmaniRES> + <src.TAG0.BcMCRES>>%
//else
//dtext 290 120 0 -
endif
dtext 330 120 0 Reveal
if <Src.TAG0.Mshadow>
dtext 450 120 0 <eval <Src.TAG0.Mshadow>>%
//else
//dtext 450 120 0 -
endif
dtext 490 120 0Teleport
if <Src.TAG0.ADispelRES>
dtext 610 120 0 <eval <Src.TAG0.ADispelRES>>%
//else
//dtext 610 120 0 -
endif
dtext 650 120 0 Mass Dispel
if <Src.TAG0.ADispelRES>
dtext 770 120 0 <eval <Src.TAG0.ADispelRES>>%
//else
//dtext 770 120 0 -
endif
dtext 260 140 0 Meteor Swarm
if <Src.TAG0.MSSteelRes>
dtext 380 140 0 <eval <Src.TAG0.MSSteelRes>>%
//else
//dtext 380 140 0 -
endif
dtext 420 140 0 EarthQuake
if <SRC.TAG0.TITANEQRes>
dtext 540 140 0 <eval <SRC.TAG0.TITANEQRes>>%
//else
//dtext 540 140 0 -
endif
[DIALOG d_resistancemenu BUTTON]
ON=0
ON=1
resistancemenu
В евент под spelleffect:
Код
ON=@SpellEffect
if <ARGN1> == 51
IF RAND(1,100) <= <TAG0.FSRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_aqua Used Power Of The Aqua
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.FSSRES>
//SRC.SMSG <NAME> Reflected your spell.
say @0487 Used Power Of The Snow Skin
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.WIFSSRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_ice Used Power Of The Ice Wood
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.SeaShieldRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_ice Used Power Of The Sea Shield
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.FSSRESFC>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_vulcan Used Power Of The Fire Cape
RETURN 1
ENDIF
effect 3, i_fire_column, 20, 10, 0, 0, 3
SOUND snd_SPELL_FLAMESTRIKE
argn2={58 68}
argn2 +=<eval ((<src.magery>/100) +(<src.EvaluatingIntel>/100) + (<src.int>/20))>
argn2 -=<eval ((<MagicResistance>/50) + (<ar>/10))>
damage <argn2> <src.uid>
RETURN 1
ENDIF
IF <ARGN1> == 53
IF RAND(1,100) <= <TAG0.VCOLDRES>
//SRC.SMSG <NAME> ected your spell.
say @color_o_vulcan Used Power Of The Vulcan
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.DCOLDRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_vulcan Used Power Of The Dragon Skin
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.WFCOLDRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_fire Used Power Of The Fire Wood
RETURN 1
ENDIF
effect 3, i_fx_cold_strike, 11, 11, 0, 0, 0
argn2={47,59}
argn2 +=<eval ((<src.magery>/100) +(<src.EvaluatingIntel>/100) + (<src.int>/20))>
argn2 -=<eval ((<MagicResistance>/50) + (<ar>/10))>
damage <argn2> <src.uid>
SRC.mana=<SRC.mana>+(-18)
RETURN 1
ENDIF
if <ARGN1> == 38
IF RAND(1,100) <= <TAG0.SparalRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_solar Used Power Of The Solar
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 47
IF RAND(1,100) <= <TAG0.SPFRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_solar Used Power Of The Solar
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.paralRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_vulcan Used Power Of The Vulcan
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.WFparalRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_fire Used Power Of The Fire Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 8
IF RAND(1,100) <= <TAG0.desmaniRES>
//SRC.SMSG <NAME> Reflected your spell.
say @0846 Used Power Of The Ancient Bones
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.DdesmaniRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_damned Used Power Of The Damned Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 3
IF RAND(1,100) <= <TAG0.FeeblemindRES>
//SRC.SMSG <NAME> Reflected your spell.
say @084c Used Power Of The Wisdom Bones
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.FeebleDark>
//SRC.SMSG <NAME> Reflected your spell.
say @0536 Used Power Of The Dark Skin
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.Feeblemagering>
//SRC.SMSG <NAME> Reflected your spell.
say @0847 Used Power Of The Mage Ring
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 20
IF RAND(1,100) <= <TAG0.InnoxRES>
//SRC.SMSG <NAME> Reflected your spell.
say @0455 Used Power Of The Cursed Bones
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.InnoxSRES>
//SRC.SMSG <NAME> Reflected your spell.
say @09a3 Used Power Of The Scorpion Skin
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.WInnoxSRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_venom Used Power Of The Venom Wood
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.APFRES>
//SRC.SMSG <NAME> Reflected your spell.
say @09e6 Used Power Of The Acid
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 1
IF RAND(1,100) <= <TAG0.uusjuxRES>
//SRC.SMSG <NAME> Reflected your spell.
say @07d3 Used Power Of The Dexterous Bones
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.WuusjuxRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_quieted Used Power Of The Quieted Wood
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.TEuusjuxRES>
//SRC.SMSG <NAME> Reflected your spell.
say @09e6 Used Power Of The True Elven shield
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 30
IF RAND(1,100) <= <TAG0.ELightRES>
//SRC.SMSG <NAME> Reflected your spell.
say @00a07 Used Power Of The Eldar
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.WLightRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_Lightning Used Power Of The Lightning Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 50
IF RAND(1,100) <= <TAG0.ELightRES>
//SRC.SMSG <NAME> Reflected your spell.
say @00a07 Used Power Of The Eldar
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 42
IF RAND(1,100) <= <TAG0.ELightRES>
//SRC.SMSG <NAME> Reflected your spell.
say @00a07 Used Power Of The Eldar
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 39
IF RAND(1,100) <= <TAG0.APFRES>
//SRC.SMSG <NAME> Reflected your spell.
say @09e6 Used Power Of The Acid
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 49
IF RAND(1,100) <= <TAG0.ELightRES>
//SRC.SMSG <NAME> Reflected your spell.
say @00a07 Used Power Of The Eldar
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.WLightRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_lightning Used Power Of The Lightning Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 28
IF RAND(1,100) <= <TAG0.AFFRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_aqua Used Power Of The Aqua
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.SeaShieldRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_ice Used Power Of The Sea Shield
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 41
IF RAND(1,100) <= <TAG0.ADispelRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_avalon Used Power Of The Avalon Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 22
IF RAND(1,100) <= <TAG0.ADispelRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_avalon Used Power Of The Avalon Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 54
IF RAND(1,100) <= <TAG0.ADispelRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_avalon Used Power Of The Avalon Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 46
IF RAND(1,100) <= <TAG0.BRRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_black_rock Used Power Of The Black Rock
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.DdesmaniRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_damned Used Power Of The Damned Wood
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.BcMCRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_blood_crest Used Power Of The Blood Crest
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 48
IF RAND(1,100) <= <TAG0.MShadow>
SRC.SMSG <NAME> Used Power Of The Shadow
SMSG I Used Power Of The Shadow
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 12 //harm
IF RAND(1,100) <= <TAG0.HarmRes>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_oak Used Power Of The Oak Wood
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.YWHarmRes>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_yew Used Power Of The Yew Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 37 //mindblast
IF RAND(1,100) <= <TAG0.MindBlastRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_oak Used Power Of The Oak Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 31 //manadrain
IF RAND(1,100) <= <TAG0.MANADRainRes>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_yew Used Power Of The Yew Wood
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 55 //Meteor Swarm
IF RAND(1,100) <= <TAG0.MSSteelRes>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_steel Used Power Of The Steel
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 57 //EarthQuake
IF RAND(1,100) <= <TAG0.TITANEQRes>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_titanium Used Power Of The Titanium
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 5 //magic_arrow
IF RAND(1,100) <= <TAG0.MAMOONRes>
//SRC.SMSG <NAME> Reflected your spell.
say @09e9 Used Power Of The Moon
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.SeaShieldRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_ice Used Power Of The Sea Shield
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 69 //Fire Ball
IF RAND(1,100) <= <TAG0.FBMOONRes>
//SRC.SMSG <NAME> Reflected your spell.
say @09e9 Used Power Of The Moon
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.SeaShieldRES>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_ice Used Power Of The Sea Shield
RETURN 1
ENDIF
ENDIF
if <ARGN1> == 43 //Explosion
IF RAND(1,100) <= <TAG0.EPLATINUmRes>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_platinum Used Power Of The Platinum
RETURN 1
ENDIF
IF RAND(1,100) <= <TAG0.EPlutoniumRes>
//SRC.SMSG <NAME> Reflected your spell.
say @color_o_plutonium Used Power Of The Plutonium
RETURN 1
ENDIF
ENDIF
Пример вещей дающих процент к резисту Poison:
Код
[ITEMDEF i_Acid_helm_open]
DEFNAME=i_Acid_helm_open
NAME=Acid Helmet
ID=i_helm_open
ARMOR=90
REQSTR=180
WEIGHT=15
CATEGORY=Freedom - Arm - Colored
SUBSECTION=Acid
DESCRIPTION=Acid helm_open
RESOURCES=15 i_ingot_Acid
SKILLMAKE=BLACKSMITHING 99.9, ARMSLORE 99.9
VALUE=3000
ON=@Create
COLOR=color_o_Acid
HITPOINTS=50
ON=@EQUIP
SRC.TAG0.APFRES +=6 //скока процентов дает резиста
ON=@UNEQUIP
SRC.TAG0.APFRES -=6
[ITEMDEF i_scorpion_gorget]
DEFNAME=i_scorpion_gorget
NAME=Scorpion Leather Gorget
ID=i_leather_gorget
ARMOR=50
REQSTR=50
WEIGHT=9
CATEGORY=Freedom-Leather
SUBSECTION=Scorpion
DESCRIPTION=Scorpion Leather Gorget
RESOURCES=10 i_scorpion_hide_cut
SKILLMAKE=TAILORING 70.0, t_sewing_kit
vALUE=1000
ON=@Create
COLOR=09a3
HITPOINTS={35 40}
ON=@EQUIP
SRC.TAG0.InnoxSREs +=5
ON=@UNEQUIP
SRC.TAG0.InnoxSRES -=5