[DIALOG D_TRANSCENDENCE_SCROLL]
25,50
src.closealldialogs

PAGE 0
resizepic 25 10 420 200 5054
gumppictiled 33 20 401 181 2624
checkertrans 33 20 401 181

xmfhtmlgump 40 48 387 100 1094933 1 1
xmfhtmlgumpcolor 125 148 200 20 1049478 0 0 32767

button 100 172 4005 4007 1 0 1
xmfhtmlgumpcolor 135 172 120 20 1046362 0 0 32767
button 275 172 4005 4007 1 0 0
xmfhtmlgumpcolor 310 172 120 20 1046363 0 0 32767

xmfhtmlgumpcolor 40 20 260 20 1094934 0 0 32767
xmfhtmlgumpcolor 310 20 120 20 <EVAL 1044060+<TAG0.SKILL>> 0 0 32767

[DIALOG D_TRANSCENDENCE_SCROLL BUTTON]
ON=1
IF (<CONT> != <SRC.FINDLAYER.layer_pack>)
SRC.SYSMESSAGELOC -1,1042001
RETURN 1
ENDIF
IF (<EVAL <SRC.SKILLTOTAL>+<TAG0.SKILLVAL>> < <SERV.SKILLCLASS.0.SKILLSUM>) && (((<EVAL <SRC.<TAG.SKILL>>+<TAG.SKILLVAL>> < <SERV.SKILLCLASS.0.<SERV.SKILL.<TAG.SKILL>.KEY>>) && (!(<SRC.TAG0.OVERRIDE.SKILLCAP_<dTAG.SKILL>>))) || ((<EVAL <SRC.<TAG.SKILL>>+<TAG.SKILLVAL>> < <SRC.TAG0.OVERRIDE.SKILLCAP_<dTAG.SKILL>>) && (<SRC.TAG0.OVERRIDE.SKILLCAP_<dTAG.SKILL>>)))
TRY SRC.<TAG0.SKILL>=<EVAL <SRC.<TAG0.SKILL>>+<TAG.SKILLVAL>>
SRC.EFFECT 3,i_fx_sparkle,16,20
SRC.SYSMESSAGELOC -1,1062311
SRC.SOUND 0243
CONSUME 1
ELSE
SRC.SYSMESSAGELOC -1,1094935
ENDIF

[ITEMDEF I_SCROLL_TRANSCENDENCE]
ID=i_deed
NAME=Scroll of Transcendence
TYPE=T_NORMAL

ON=@Create
COLOR=0e2
TAG.SKILL=<R0,48>
TAG.SKILLVAL=<R30,50>

ON=@ClientToolTip
SRC.ADDCLILOC 1070722,Skill: <SERV.SKILL.<TAG.SKILL>.KEY> <FVAL <TAG.SKILLVAL>> Skill Points

ON=@Dclick
IF (<TOPOBJ.UID> == <SRC>)
SDIALOG D_TRANSCENDENCE_SCROLL
ELSE
SRC.SYSMESSAGELOC -1,1042001
ENDIF
RETURN 1

[FUNCTION POWERSCROLLNAME]
IF (<MORE2> == 50)
RETURN Wonderous
ELIF (<MORE2> == 100)
RETURN Exalted
ELIF (<MORE2> == 150)
RETURN Mythical
ELIF (<MORE2> == 200)
RETURN Legendary
ELIF (<MORE2> == 250)
RETURN Ultimate
ENDIF

[itemdef i_power_scroll]
ID=i_deed
NAME=Power Scroll
TYPE=t_normal

ON=@create
MORE1=<HVAL {1 1 2 1 5 1 9 1 15 1 16 1 17 1 22 1 25 1 26 1 27 1 29 1 31 1 32 1 35 1 39 1 40 1 41 1 42 1 46 1 49 1 50 1 51 1 52 1}>
IF (<FLOATVAL 0.05> >= <RANDOMDOUBLE>)
MORE2=20.0
ELIF (<FLOATVAL 0.4> >= <RANDOMDOUBLE>)
MORE2=15.0
ELSE
MORE2=10.0
ENDIF
name=<POWERSCROLLNAME> Power Scroll of <SERV.SKILL.<MORE1>.NAME> (<EVAL (<MORE2>/10)+100> Skill)
color=0481

on=@dclick
IF (<CONT.UID> != <SRC.FINDLAYER.layer_pack>)
SRC.SYSMESSAGELOC -1,1042001
ELSE
	IF (<MORE2> == 50)
		IF (<SRC.TAG0.OVERRIDE.SKILLCAP_<dMORE1>> >= 105.0)
		SRC.SYSMESSAGELOC -1,1049511,<SERV.SKILL.<dMORE1>.KEY>
		RETURN 1
		ENDIF
	ELIF (<MORE2> == 100)
		IF (<SRC.TAG0.OVERRIDE.SKILLCAP_<dMORE1>> >= 110.0)
		SRC.SYSMESSAGELOC -1,1049511,<SERV.SKILL.<dMORE1>.KEY>
		RETURN 1
		ENDIF
	ELIF (<MORE2> == 150)
		IF (<SRC.TAG0.OVERRIDE.SKILLCAP_<dMORE1>> >= 115.0)
		SRC.SYSMESSAGELOC -1,1049511,<SERV.SKILL.<dMORE1>.KEY>
		RETURN 1
		ENDIF
	ELIF (<MORE2> == 200)
		IF (<SRC.TAG0.OVERRIDE.SKILLCAP_<dMORE1>> >= 120.0)
		SRC.SYSMESSAGELOC -1,1049511,<SERV.SKILL.<dMORE1>.KEY>
		RETURN 1
		ENDIF
	ENDIF
SDIALOG D_POWER_SCROLL
ENDIF
RETURN 1

[DIALOG D_POWER_SCROLL]
25,50
src.closealldialogs

PAGE 0
resizepic 25 10 420 200 5054
gumppictiled 33 20 401 181 2624
checkertrans 33 20 401 181

xmfhtmlgump 40 48 387 100 1049469 1 1
xmfhtmlgumpcolor 125 148 200 20 1049478 0 0 32767

button 100 172 4005 4007 1 0 1
xmfhtmlgumpcolor 135 172 120 20 1046362 0 0 32767
button 275 172 4005 4007 1 0 0
xmfhtmlgumpcolor 310 172 120 20 1046363 0 0 32767

IF (<MORE2> == 50)
xmfhtmlgumpcolor 40 20 260 20 1049635 0 0 32767
ELIF (<MORE2> == 100)
xmfhtmlgumpcolor 40 20 260 20 1049636 0 0 32767
ELIF (<MORE2> == 150)
xmfhtmlgumpcolor 40 20 260 20 1049637 0 0 32767
ELIF (<MORE2> == 200)
xmfhtmlgumpcolor 40 20 260 20 1049638 0 0 32767
ENDIF
xmfhtmlgumpcolor 310 20 120 20 <EVAL 1044060+<MORE1>> 0 0 32767

[DIALOG D_POWER_SCROLL BUTTON]
ON=1
IF (<CONT> != <SRC.FINDLAYER.layer_pack>)
SRC.SYSMESSAGELOC -1,1042001
RETURN 1
ENDIF
IF (<MORE2> == 50)
TRY SRC.TAG.OVERRIDE.SKILLCAP_<dMORE1>=105.0
ELIF (<MORE2> == 100)
TRY SRC.TAG.OVERRIDE.SKILLCAP_<dMORE1>=110.0
ELIF (<MORE2> == 150)
TRY SRC.TAG.OVERRIDE.SKILLCAP_<dMORE1>=115.0
ELIF (<MORE2> == 200)
TRY SRC.TAG.OVERRIDE.SKILLCAP_<dMORE1>=120.0
ENDIF
SRC.SYSMESSAGELOC -1,1049513,<SERV.SKILL.<dMORE1>.KEY>
SRC.SOUND 0243
SRC.EFFECT 3,i_fx_sparkle,16,20
CONSUME 1
RETURN 1

[itemdef i_stat_power_scroll]
ID=i_deed
NAME=Stat Power Scroll
TYPE=t_normal

ON=@create
FLOAT.RANDOM=<RANDOMDOUBLE>
IF (<FLOATVAL 0.1> >= <FLOAT.RANDOM>)
MORE2=25.0
ELIF (<FLOATVAL 0.25> >= <FLOAT.RANDOM>)
MORE2=20.0
ELIF (<FLOATVAL 0.45> >= <FLOAT.RANDOM>)
MORE2=15.0
ELIF (<FLOATVAL 0.70> >= <FLOAT.RANDOM>)
MORE2=10.0
ELSE
MORE2=5.0
ENDIF
name=<POWERSCROLLNAME> Stat Power Scroll (+<EVAL <MORE2>/10> Maximum Stats)
color=0481

on=@dclick
IF (<CONT> != <SRC.FINDLAYER.layer_pack>)
SRC.SYSMESSAGELOC -1,1042001
ELSE
	IF (<MORE2> == 50)
		IF (<SRC.TAG0.OVERRIDE.STATSUM> >= 235)
		SRC.SYSMESSAGELOC -1,1049510
		RETURN 1
		ENDIF
	ELIF (<MORE2> == 100)
		IF (<SRC.TAG0.OVERRIDE.STATSUM> >= 240)
		SRC.SYSMESSAGELOC -1,1049510
		RETURN 1
		ENDIF
	ELIF (<MORE2> == 150)
		IF (<SRC.TAG0.OVERRIDE.STATSUM> >= 245)
		SRC.SYSMESSAGELOC -1,1049510
		RETURN 1
		ENDIF
	ELIF (<MORE2> == 200)
		IF (<SRC.TAG0.OVERRIDE.STATSUM> >= 250)
		SRC.SYSMESSAGELOC -1,1049510
		RETURN 1
		ENDIF
	ELIF (<MORE2> == 250)
		IF (<SRC.TAG0.OVERRIDE.STATSUM> >= 255)
		SRC.SYSMESSAGELOC -1,1049510
		RETURN 1
		ENDIF
	ENDIF
SDIALOG D_STAT_POWER_SCROLL
ENDIF
RETURN 1

[DIALOG D_STAT_POWER_SCROLL]
25,50
src.closealldialogs

PAGE 0
resizepic 25 10 420 200 5054
gumppictiled 33 20 401 181 2624
checkertrans 33 20 401 181

xmfhtmlgump 40 48 387 100 1049469 1 1
xmfhtmlgumpcolor 125 148 200 20 1049478 0 0 32767

button 100 172 4005 4007 1 0 1
xmfhtmlgumpcolor 135 172 120 20 1046362 0 0 32767
button 275 172 4005 4007 1 0 0
xmfhtmlgumpcolor 310 172 120 20 1046363 0 0 32767

IF (<MORE2> == 50)
xmfhtmlgumpcolor 40 20 260 20 1049458 0 0 32767
ELIF (<MORE2> == 100)
xmfhtmlgumpcolor 40 20 260 20 1049459 0 0 32767
ELIF (<MORE2> == 150)
xmfhtmlgumpcolor 40 20 260 20 1049460 0 0 32767
ELIF (<MORE2> == 200)
xmfhtmlgumpcolor 40 20 260 20 1049461 0 0 32767
ELIF (<MORE2> == 250)
xmfhtmlgumpcolor 40 20 260 20 1049462 0 0 32767
ENDIF
xmfhtmlgumpcolor 310 20 120 20 1038019 0 0 32767

[DIALOG D_STAT_POWER_SCROLL BUTTON]
ON=1
IF (<CONT> != <SRC.FINDLAYER.layer_pack>)
SRC.SYSMESSAGELOC -1,1042001
RETURN 1
ENDIF
IF (<MORE2> == 50)
SRC.TAG.OVERRIDE.STATSUM=235
ELIF (<MORE2> == 100)
SRC.TAG.OVERRIDE.STATSUM=240
ELIF (<MORE2> == 150)
SRC.TAG.OVERRIDE.STATSUM=245
ELIF (<MORE2> == 200)
SRC.TAG.OVERRIDE.STATSUM=250
ELIF (<MORE2> == 250)
SRC.TAG.OVERRIDE.STATSUM=255
ENDIF
SRC.SYSMESSAGELOC -1,1049512
SRC.SOUND 0243
SRC.EFFECT 3,i_fx_sparkle,16,20
CONSUME 1
RETURN 1

[EOF]