Код
[itemdef i_robe_magical]
ID=i_robe
NAME=Magical Robe
WEIGHT=3
ARMOR=2
VALUE=5000
ON=@CREATE
COLOR=0b51
HITPOINTS={2 8}
more2=<EVAL {7.0 7 6.0 6 5.0 5 4.0 4 3.0 3 2.0 2 1.0 1}>
MORE1=<r0,48>
NAME=Magical Robe [<SERV.SKILL.<MORE1>.NAME>]
IF (<more2>==7.0)
NAME=<name> [+7]
elseIF (<more2>==6.0)
NAME=<name> [+6]
elseIF (<more2>==5.0)
NAME=<name> [+5]
elseIF (<more2>==4.0)
NAME=<name> [+4]
elseIF (<more2>==3.0)
NAME=<name> [+3]
elseIF (<more2>==2.0)
NAME=<name> [+2]
elseIF (<more2>==1.0)
NAME=<name> [+1]
ENDIF
ON=@EQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + <more2>
ON=@UNEQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + (-<more2>)
[itemdef i_cape_magical]
ID=i_cape
NAME=Magical Cape
WEIGHT=3
ARMOR=2
VALUE=5000
ON=@CREATE
COLOR=0b51
HITPOINTS={2 8}
more2=<EVAL {7.0 7 6.0 6 5.0 5 4.0 4 3.0 3 2.0 2 1.0 1}>
MORE1=<r0,48>
NAME=Magical Cape [<SERV.SKILL.<MORE1>.NAME>]
IF (<more2>==7.0)
NAME=<name> [+7]
elseIF (<more2>==6.0)
NAME=<name> [+6]
elseIF (<more2>==5.0)
NAME=<name> [+5]
elseIF (<more2>==4.0)
NAME=<name> [+4]
elseIF (<more2>==3.0)
NAME=<name> [+3]
elseIF (<more2>==2.0)
NAME=<name> [+2]
elseIF (<more2>==1.0)
NAME=<name> [+1]
ENDIF
ON=@EQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + <more2>
ON=@UNEQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + (-<more2>)
[itemdef i_earrings_magical]
ID=i_earrings_gold
NAME=Magical Earrings
WEIGHT=3
VALUE=5000
ON=@CREATE
COLOR=0b51
more2=<EVAL {7.0 7 6.0 6 5.0 5 4.0 4 3.0 3 2.0 2 1.0 1}>
MORE1=<r0,48>
NAME=Magical Earrings [<SERV.SKILL.<MORE1>.NAME>]
IF (<more2>==7.0)
NAME=<name> [+7]
elseIF (<more2>==6.0)
NAME=<name> [+6]
elseIF (<more2>==5.0)
NAME=<name> [+5]
elseIF (<more2>==4.0)
NAME=<name> [+4]
elseIF (<more2>==3.0)
NAME=<name> [+3]
elseIF (<more2>==2.0)
NAME=<name> [+2]
elseIF (<more2>==1.0)
NAME=<name> [+1]
ENDIF
ON=@EQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + <more2>
ON=@UNEQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + (-<more2>)
[itemdef i_ring_magical]
ID=i_ring_gold
NAME=Magical Ring
WEIGHT=3
VALUE=5000
ON=@CREATE
COLOR=0b51
more2=<EVAL {7.0 7 6.0 6 5.0 5 4.0 4 3.0 3 2.0 2 1.0 1}>
MORE1=<r0,48>
NAME=Magical Ring [<SERV.SKILL.<MORE1>.NAME>]
IF (<more2>==7.0)
NAME=<name> [+7]
elseIF (<more2>==6.0)
NAME=<name> [+6]
elseIF (<more2>==5.0)
NAME=<name> [+5]
elseIF (<more2>==4.0)
NAME=<name> [+4]
elseIF (<more2>==3.0)
NAME=<name> [+3]
elseIF (<more2>==2.0)
NAME=<name> [+2]
elseIF (<more2>==1.0)
NAME=<name> [+1]
ENDIF
ON=@EQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + <more2>
ON=@UNEQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + (-<more2>)
[itemdef i_necklace_magical]
ID=i_necklace_gold
NAME=Magical Necklace
WEIGHT=3
VALUE=5000
ON=@CREATE
COLOR=0b51
more2=<EVAL {7.0 7 6.0 6 5.0 5 4.0 4 3.0 3 2.0 2 1.0 1}>
MORE1=<r0,48>
NAME=Magical Necklace [<SERV.SKILL.<MORE1>.NAME>]
IF (<more2>==7.0)
NAME=<name> [+7]
elseIF (<more2>==6.0)
NAME=<name> [+6]
elseIF (<more2>==5.0)
NAME=<name> [+5]
elseIF (<more2>==4.0)
NAME=<name> [+4]
elseIF (<more2>==3.0)
NAME=<name> [+3]
elseIF (<more2>==2.0)
NAME=<name> [+2]
elseIF (<more2>==1.0)
NAME=<name> [+1]
ENDIF
ON=@EQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + <more2>
ON=@UNEQUIP
src.<SERV.SKILL.<more1>.NAME> = <src.<SERV.SKILL.<more1>.NAME>> + (-<more2>)
[TEMPLATE t_msi]
ITEM={ i_robe_magical 1 i_cape_magical 1 i_ring_magical 1 i_necklace_magical 1 i_earrings_magical }
[EoF]
И еще один
Код
[ITEMDEF i_power_scroll]
ID=014f0
TYPE=t_normal
VALUE=40000
ON=@Create
COLOR=0481
more1=<r0,48> //To allow AOS, SE and ML skill set this line to <r0,54>
more2=<EVAL {105.0 4 110.0 3 115.0 2 120.0 1}>
IF (<more2>==105.0)
NAME=Wonderous Scroll of <SERV.SKILL.<MORE1>.NAME> (105 Skill)
ELIF (<more2>==110.0)
NAME=Exalted Scroll of <SERV.SKILL.<MORE1>.NAME> (110 Skill)
ELIF (<more2>==115.0)
NAME=Mythical Scroll of <SERV.SKILL.<MORE1>.NAME> (115 Skill)
ELSE
NAME=Legendary Scroll of <SERV.SKILL.<MORE1>.NAME> (120 Skill)
ENDIF
ON=@DClick
IF (<cont> != <src.findlayer.21.uid>)
src.sysmessage @03b2 The item must be in your backpack to use it.
ELIF (<src.<more1>> < 100.0)
src.sysmessage @03b2 You can't use that scroll without being grandmaster in that skill.
ELSE
src.dialog d_powerscroll
ENDIF
return 1
[DIALOG d_powerscroll]
25,50
resizepic 25 10 5054 420 200
gumppictiled 33 20 401 181 2624
checkertrans 33 20 401 181
xmfhtmlgump 40 48 387 100 1049469 1 1 // Using a scroll increases the maximum amount of a specific skill or your maximum statistics. When used, the effect is not immediately seen without a gain of points with that skill or statistics. You can view your maximum skill values in your skills window. You can view your maximum statistic value in your statistics window.
xmfhtmlgumpcolor 125 148 200 20 1049478 0 0 16777215 // Do you wish to use this scroll?
button 100 172 4005 4007 1 0 1
xmfhtmlgumpcolor 135 172 120 20 1046362 0 0 16777215 // Yes
button 275 172 4005 4007 1 0 0
xmfhtmlgumpcolor 310 172 120 20 1046363 0 0 16777215 // No
IF (<targ.more2>==105.0)
xmfhtmlgumpcolor 40 20 260 20 1049635 0 0 16777215 // Wonderous Scroll (105 Skill):
ELIF (<targ.more2>==110.0)
xmfhtmlgumpcolor 40 20 260 20 1049636 0 0 16777215 // Exalted Scroll (110 Skill):
ELIF (<targ.more2>==115.0)
xmfhtmlgumpcolor 40 20 260 20 1049637 0 0 16777215 // Mythical Scroll (115 Skill):
ELSE
xmfhtmlgumpcolor 40 20 260 20 1049638 0 0 16777215 // Legendary Scroll (120 Skill):
ENDIF
dhtmlgump 310 20 120 20 0 0 <def.bfont_white><SERV.SKILL.<TARG.MORE1>.NAME>
[DIALOG d_powerscroll BUTTON]
ON=1
IF (<targ.cont> != <src.findlayer.21.uid>)
src.sysmessage @03b2 The item must be in your backpack to use it.
ELIF (<src.<SERV.SKILL.<targ.more1>.NAME>> >= <eval <targ.more2>>)
src.sysmessage @084d You're already too strong in that skill.
ELSE
TRY src.Tag.Override.SkillCap_<dtarg.more1>=<dtarg.more2>
powerscroll_fx
IF (<targ.more2>==110.0)
src.title Elder <SERV.SKILL.<targ.MORE1>.TITLE>
ELIF (<targ.more2>==115.0)
src.title Mythical <SERV.SKILL.<targ.MORE1>.TITLE>
ELSE
src.title Legendary <SERV.SKILL.<targ.MORE1>.TITLE>
ENDIF
targ.remove
ENDIF
[FUNCTION powerscroll_fx]
sound 579
effect 3,i_fx_sparkle,1,80,0
IF (<SRC.P.Z> < 0)
IF (<eval <SRC.P.Z>-5> >= <SERV.MAP(<SRC.P.X>,<SRC.P.Y>,<SRC.P.Z>,<SRC.P.M>).TERRAIN.Z>)
FORCLIENTS 18
specialeffect 0,i_fx_fireball,5,0,1,0497,0,0,<eval <SRC.P.X>-5>,<eval <SRC.P.Y>-3>,<eval <SRC.P.Z>+20>,<SRC.P.X>,<SRC.P.Y>,<SRC.P.Z>,0,0
specialeffect 0,i_fx_fireball,5,0,1,0497,0,0,<eval <SRC.P.X>-5>,<eval <SRC.P.Y>-5>,<eval <SRC.P.Z>+20>,<SRC.P.X>,<SRC.P.Y>,<SRC.P.Z>,0,0
specialeffect 0,i_fx_fireball,5,0,1,0497,0,0,<eval <SRC.P.X>-3>,<eval <SRC.P.Y>-5>,<eval <SRC.P.Z>+20>,<SRC.P.X>,<SRC.P.Y>,<SRC.P.Z>,0,0
ENDFOR
ENDIF
ELSE
FORCLIENTS 18
specialeffect 0,i_fx_fireball,5,0,1,0497,0,0,<eval <SRC.P.X>-5>,<eval <SRC.P.Y>-3>,<eval <SRC.P.Z>+20>,<SRC.P.X>,<SRC.P.Y>,<SRC.P.Z>,0,0
specialeffect 0,i_fx_fireball,5,0,1,0497,0,0,<eval <SRC.P.X>-5>,<eval <SRC.P.Y>-5>,<eval <SRC.P.Z>+20>,<SRC.P.X>,<SRC.P.Y>,<SRC.P.Z>,0,0
specialeffect 0,i_fx_fireball,5,0,1,0497,0,0,<eval <SRC.P.X>-3>,<eval <SRC.P.Y>-5>,<eval <SRC.P.Z>+20>,<SRC.P.X>,<SRC.P.Y>,<SRC.P.Z>,0,0
ENDFOR
ENDIF
[FUNCTION specialeffect]
sendpacket 0c0 <argv[0]> d0 d0 w<argv[1]> w<argv[8]> w<argv[9]> <argv[10]> w<argv[11]> w<argv[12]> <argv[13]> <argv[2]> <argv[3]> w0 <argv[6]> <argv[4]> d<argv[5]> d<argv[7]>
[eof]