[DIALOG D_TINKER_ITEM_PROPS]
40, 20
src.closealldialogs
PAGE 0
resizepic 0 0 5054 550 465
checkertrans 10 10 530 445
gumppictiled 10 205 170 45 2624
checkertrans 10 205 170 45
gumppictiled 10 390 365 30 2624
checkertrans 10 390 365 30
gumppictiled 10 285 170 70 2624
checkertrans 10 285 170 70
gumppictiled 10 10 530 30 2624
checkertrans 10 10 530 30
gumppictiled 10 45 160 155 2624
checkertrans 10 45 160 155
gumppictiled 175 45 365 100 2624
checkertrans 175 45 365 100
gumppictiled 175 150 365 100 2624
checkertrans 175 150 365 100
gumppictiled 175 255 365 100 2624
checkertrans 175 255 365 100
gumppictiled 175 360 365 60 2624
checkertrans 175 360 365 60

tilepic 40 60 <SERV.ITEMDEF.<SRC.CTAG.TINKER.ITEM>.ID>

xmfhtmlgumpcolor 190 15 200 35 1044007 0 0 32767 //tinkering menu

xmfhtmlgumpcolor 180 55 100 30 1011152 0 0 32767 //item
dhtmlgump 330 55 250 30 0 0 <DEF.BFONT_WHITE><SERV.ITEMDEF.<SRC.CTAG.TINKER.ITEM>.NAME><DEF.BFONTE>
IF (0<serv.itemdef.<SRC.CTAG.TINKER.ITEM>.skillmake.1.val>)
LOCAL.CRAFTCHANCE=<eval <floatval ((<src.tinkering>/(<serv.itemdef.<SRC.CTAG.TINKER.ITEM>.skillmake.1.val>/10))*0.75)-0.05>/10000>
LOCAL.EXCEPTIONALCHANCE=<eval <floatval ((<src.armslore>/(<serv.itemdef.<SRC.CTAG.TINKER.ITEM>.skillmake.1.val>/10))*0.75)-0.30>/10000>
ELSE
LOCAL.CRAFTCHANCE=100
LOCAL.EXCEPTIONALCHANCE=100
ENDIF
IF (<LOCAL.CRAFTCHANCE> > 100)
LOCAL.CRAFTCHANCE=100
ENDIF
IF (<LOCAL.EXCEPTIONALCHANCE> > 100)
LOCAL.EXCEPTIONALCHANCE=100
ENDIF

xmfhtmlgumpcolor 180 100 120 30 1044057 0 0 32767 //success chance
dtext 420 100 1153 <FVAL <LOCAL.CRAFTCHANCE>*10>%
xmfhtmlgumpcolor 180 120 120 30 1044058 0 0 32767 //exceptional chance
dtext 420 120 1153 <FVAL <LOCAL.EXCEPTIONALCHANCE>*10>%

dhtmlgump 180 160 250 30 0 0 <DEF.BFONT_WHITE>Tinkering<DEF.BFONTE>
dtext 420 160 1153 <FVAL <serv.itemdef.<SRC.CTAG.TINKER.ITEM>.skillmake.1.val>>

xmfhtmlgumpcolor 30 260 100 30 1044055 0 0 32767
dhtmlgump 200 260 300 200 0 0 <DEF.BFONT_WHITE><serv.itemdef.<SRC.CTAG.TINKER.ITEM>.RESMAKE><DEF.BFONTE>

xmfhtmlgumpcolor 30 360 100 30 1044056 0 0 32767
xmfhtmlgumpcolor 200 360 300 30 1044059 0 0 32767
xmfhtmlgumpcolor 200 380 300 30 1044152 0 0 32767

resizepic 10 430 5120 530 23
checkertrans 10 430 530 23

button 20 431 0fae 0fb0 1 0 1
xmfhtmlgumpcolor 55 433 100 30 1044150 0 0 32767 //back

button 320 431 4005 4006 1 0 2
xmfhtmlgumpcolor 355 433 100 30 1044151 0 0 32767 //make now

[DIALOG D_TINKER_ITEM_PROPS BUTTON]
ON=1
DIALOG d_newcraft_dialog_tinker

ON=2
SRC.F_CRAFTITEM_TINKER

[DIALOG d_newcraft_dialog_tinker]
40, 20
src.closealldialogs
PAGE 0 
resizepic 0 0 5054 550 465
gumppictiled 10 10 530 30 2624
checkertrans 10 10 530 30
gumppictiled 10 45 160 280 2624
checkertrans 10 45 160 280
gumppictiled 175 45 365 280 2624
checkertrans 175 45 365 280
//////
gumppictiled 10 330 160 40 2624
checkertrans 10 330 160 40
gumppictiled 175 330 365 40 2624
checkertrans 175 330 365 40
gumppictiled 10 375 530 85 2624
checkertrans 10 375 530 85
xmfhtmlgumpcolor 190 15 200 35 1044007 0 0 32767 //tinkering menu
xmfhtmlgumpcolor 10 45 150 35 1044010 0 0 32767 //categories

xmfhtmlgumpcolor 40 <EVAL 65+(22*0)> 100 35 1044042 0 0 32767 //wooden items
button 10 <EVAL 65+(22*0)> 4005 4006 0 2 1
xmfhtmlgumpcolor 40 <EVAL 65+(22*1)> 100 35 1044046 0 0 32767 //tools
button 10 <EVAL 65+(22*1)> 4005 4006 0 3 1
xmfhtmlgumpcolor 40 <EVAL 65+(22*2)> 100 35 1044047 0 0 32767 //parts
button 10 <EVAL 65+(22*2)> 4005 4006 0 4 1
xmfhtmlgumpcolor 40 <EVAL 65+(22*3)> 100 35 1044048 0 0 32767 //utensils
button 10 <EVAL 65+(22*3)> 4005 4006 0 5 1
xmfhtmlgumpcolor 40 <EVAL 65+(22*4)> 100 35 1044049 0 0 32767 //jewelry
button 10 <EVAL 65+(22*4)> 4005 4006 0 6 1
xmfhtmlgumpcolor 40 <EVAL 65+(22*5)> 100 35 1044050 0 0 32767 //Miscellaneous
button 10 <EVAL 65+(22*5)> 4005 4006 0 7 1
xmfhtmlgumpcolor 40 <EVAL 65+(22*6)> 100 35 1044051 0 0 32767 //Assemblies
button 10 <EVAL 65+(22*6)> 4005 4006 0 8 1
xmfhtmlgumpcolor 40 <EVAL 65+(22*7)> 100 35 1073107 0 0 32767 //Magic Jewelry
button 10 <EVAL 65+(22*7)> 4005 4006 0 9 1

xmfhtmlgumpcolor 280 45 150 35 1044011 0 0 32767 //selections
xmfhtmlgumpcolor 20 340 100 35 1044012 0 0 32767 //notices
dhtmlgump 200 330 320 35 0 0 <DEF.BFONT_WHITE><SRC.CTAG.TINKER.MESSAGE><DEF.BFONTE>

button 290 425 4005 4006 1 0 56
xmfhtmlgumpcolor 325 427 100 35 1044013 0 0 32767 //make last
button 290 400 4005 4006 1 0 10000
IF (!(<SRC.TAG0.MARKITEM>))
xmfhtmlgumpcolor 325 402 100 35 1044017 0 0 32767 //mark item
ELSE
xmfhtmlgumpcolor 325 402 100 35 1044018 0 0 32767 //do not mark
ENDIF

button 20 425 0fb1 0fb3 1 0 0
xmfhtmlgumpcolor 55 427 100 35 1011441 0 0 32767 //exit

PAGE 2 //Wooden Items
xmfhtmlgumpcolor 215 65 150 35 1075059 0 0 32767 //Jointing Plane
button 180 65 4005 4006 1 0 2
button 500 65 0FAB 0FAD 1 0 1002
xmfhtmlgumpcolor 215 <EVAL 65+(22*1)> 150 35 1024174 0 0 32767 //clock frame
button 180 <EVAL 65+(22*1)> 4005 4006 1 0 3
button 500 <EVAL 65+(22*1)> 0FAB 0FAD 1 0 1003
xmfhtmlgumpcolor 215 <EVAL 65+(22*2)> 150 35 1024187 0 0 32767 //axle
button 180 <EVAL 65+(22*2)> 4005 4006 1 0 4
button 500 <EVAL 65+(22*2)> 0FAB 0FAD 1 0 1004

PAGE 3 //tools
xmfhtmlgumpcolor 215 65 150 35 1023999 0 0 32767 //scissors
button 180 65 4005 4006 1 0 5
button 500 65 0FAB 0FAD 1 0 1005
xmfhtmlgumpcolor 215 <EVAL 65+(22*1)> 150 35 1023739 0 0 32767 //mortar and pestle
button 180 <EVAL 65+(22*1)> 4005 4006 1 0 6
button 500 <EVAL 65+(22*1)> 0FAB 0FAD 1 0 1006
xmfhtmlgumpcolor 215 <EVAL 65+(22*2)> 150 35 1024327 0 0 32767 //scorp
button 180 <EVAL 65+(22*2)> 4005 4006 1 0 7
button 500 <EVAL 65+(22*2)> 0FAB 0FAD 1 0 1007
xmfhtmlgumpcolor 215 <EVAL 65+(22*3)> 150 35 1027868 0 0 32767 //tinker's tools
button 180 <EVAL 65+(22*3)> 4005 4006 1 0 8
button 500 <EVAL 65+(22*3)> 0FAB 0FAD 1 0 1008
xmfhtmlgumpcolor 215 <EVAL 65+(22*4)> 150 35 1029584 0 0 32767 //hatchet
button 180 <EVAL 65+(22*4)> 4005 4006 1 0 9
button 500 <EVAL 65+(22*4)> 0FAB 0FAD 1 0 1009
xmfhtmlgumpcolor 215 <EVAL 65+(22*5)> 150 35 1024324 0 0 32767 //draw knife
button 180 <EVAL 65+(22*5)> 4005 4006 1 0 10
button 500 <EVAL 65+(22*5)> 0FAB 0FAD 1 0 1010
xmfhtmlgumpcolor 215 <EVAL 65+(22*6)> 150 35 1023997 0 0 32767 //sewing kit
button 180 <EVAL 65+(22*6)> 4005 4006 1 0 11
button 500 <EVAL 65+(22*6)> 0FAB 0FAD 1 0 1011
xmfhtmlgumpcolor 215 <EVAL 65+(22*7)> 150 35 1024148 0 0 32767 //saw
button 180 <EVAL 65+(22*7)> 4005 4006 1 0 12
button 500 <EVAL 65+(22*7)> 0FAB 0FAD 1 0 1012
xmfhtmlgumpcolor 215 <EVAL 65+(22*8)> 150 35 1024137 0 0 32767 //dovetail saw
button 180 <EVAL 65+(22*8)> 4005 4006 1 0 13
button 500 <EVAL 65+(22*8)> 0FAB 0FAD 1 0 1013
xmfhtmlgumpcolor 215 <EVAL 65+(22*9)> 150 35 1011193 0 0 32767 //froe
button 180 <EVAL 65+(22*9)> 4005 4006 1 0 14
button 500 <EVAL 65+(22*9)> 0FAB 0FAD 1 0 1014
xmfhtmlgumpcolor 215 <EVAL 65+(22*10)> 150 35 1011188 0 0 32767 //shovel
button 180 <EVAL 65+(22*10)> 4005 4006 1 0 15
button 500 <EVAL 65+(22*10)> 0FAB 0FAD 1 0 1015
xmfhtmlgumpcolor 400 <EVAL 83+(22*10)> 150 35 1044045 0 0 32767 //next page
button 360 <EVAL 82+(22*10)> 4005 4006 0 10 1

PAGE 10
xmfhtmlgumpcolor 215 65 150 35 1011186 0 0 32767 //smith's hammer
button 180 65 4005 4006 1 0 16
button 500 65 0FAB 0FAD 1 0 1016
xmfhtmlgumpcolor 215 <EVAL 65+(22*1)> 150 35 1011194 0 0 32767 //inshave
button 180 <EVAL 65+(22*1)> 4005 4006 1 0 17
button 500 <EVAL 65+(22*1)> 0FAB 0FAD 1 0 1017
xmfhtmlgumpcolor 215 <EVAL 65+(22*2)> 150 35 1011189 0 0 32767 //pickaxe
button 180 <EVAL 65+(22*2)> 4005 4006 1 0 18
button 500 <EVAL 65+(22*2)> 0FAB 0FAD 1 0 1018
xmfhtmlgumpcolor 215 <EVAL 65+(22*3)> 150 35 1011180 0 0 32767 //lockpick
button 180 <EVAL 65+(22*3)> 4005 4006 1 0 19
button 500 <EVAL 65+(22*3)> 0FAB 0FAD 1 0 1019
xmfhtmlgumpcolor 215 <EVAL 65+(22*4)> 150 35 1044166 0 0 32767 //fletcher's tools
button 180 <EVAL 65+(22*4)> 4005 4006 1 0 20
button 500 <EVAL 65+(22*4)> 0FAB 0FAD 1 0 1020
xmfhtmlgumpcolor 215 <EVAL 65+(22*5)> 150 35 1072154 0 0 32767 //metal container engraving tool
button 180 <EVAL 65+(22*5)> 4005 4006 1 0 55
button 500 <EVAL 65+(22*5)> 0FAB 0FAD 1 0 1055
xmfhtmlgumpcolor 230 <EVAL 83+(22*10)> 150 35 1044044 0 0 32767 //prev page
button 310 <EVAL 82+(22*10)> 0fae 0fb0 0 3 1

PAGE 4 //parts
xmfhtmlgumpcolor 215 65 150 35 1024180 0 0 32767 //geArs
button 180 65 4005 4006 1 0 21
button 500 65 0FAB 0FAD 1 0 1021
xmfhtmlgumpcolor 215 <EVAL 65+(22*1)> 150 35 1024176 0 0 32767 //clock parts
button 180 <EVAL 65+(22*1)> 4005 4006 1 0 22
button 500 <EVAL 65+(22*1)> 0FAB 0FAD 1 0 1022
xmfhtmlgumpcolor 215 <EVAL 65+(22*2)> 150 35 1024100 0 0 32767 //barrel tap
button 180 <EVAL 65+(22*2)> 4005 4006 1 0 23
button 500 <EVAL 65+(22*2)> 0FAB 0FAD 1 0 1023
xmfhtmlgumpcolor 215 <EVAL 65+(22*3)> 150 35 1011201 0 0 32767 //springs
button 180 <EVAL 65+(22*3)> 4005 4006 1 0 24
button 500 <EVAL 65+(22*3)> 0FAB 0FAD 1 0 1024
xmfhtmlgumpcolor 215 <EVAL 65+(22*4)> 150 35 1011226 0 0 32767 //sextant parts
button 180 <EVAL 65+(22*4)> 4005 4006 1 0 25
button 500 <EVAL 65+(22*4)> 0FAB 0FAD 1 0 1025
xmfhtmlgumpcolor 215 <EVAL 65+(22*5)> 150 35 1011228 0 0 32767 //barrel hoops
button 180 <EVAL 65+(22*5)> 4005 4006 1 0 26
button 500 <EVAL 65+(22*5)> 0FAB 0FAD 1 0 1026
xmfhtmlgumpcolor 215 <EVAL 65+(22*6)> 150 35 1024181 0 0 32767 //hinge
button 180 <EVAL 65+(22*6)> 4005 4006 1 0 27
button 500 <EVAL 65+(22*6)> 0FAB 0FAD 1 0 1027
xmfhtmlgumpcolor 215 <EVAL 65+(22*7)> 150 35 1040012 0 0 32767 //bola ball
button 180 <EVAL 65+(22*7)> 4005 4006 1 0 28
button 500 <EVAL 65+(22*7)> 0FAB 0FAD 1 0 1028

PAGE 5 //utensils
xmfhtmlgumpcolor 215 65 150 35 1025111 0 0 32767 //butcher knife
button 180 65 4005 4006 1 0 29
button 500 65 0FAB 0FAD 1 0 1029
xmfhtmlgumpcolor 215 <EVAL 65+(22*1)> 150 35 1044158 0 0 32767 //spoon
button 180 <EVAL 65+(22*1)> 4005 4006 1 0 30
button 500 <EVAL 65+(22*1)> 0FAB 0FAD 1 0 1030
xmfhtmlgumpcolor 215 <EVAL 65+(22*2)> 150 35 1022519 0 0 32767 //plate
button 180 <EVAL 65+(22*2)> 4005 4006 1 0 31
button 500 <EVAL 65+(22*2)> 0FAB 0FAD 1 0 1031
xmfhtmlgumpcolor 215 <EVAL 65+(22*3)> 150 35 1022468 0 0 32767 //fork
button 180 <EVAL 65+(22*3)> 4005 4006 1 0 32
button 500 <EVAL 65+(22*3)> 0FAB 0FAD 1 0 1032
xmfhtmlgumpcolor 215 <EVAL 65+(22*4)> 150 35 1011204 0 0 32767 //cleaver
button 180 <EVAL 65+(22*4)> 4005 4006 1 0 33
button 500 <EVAL 65+(22*4)> 0FAB 0FAD 1 0 1033
xmfhtmlgumpcolor 215 <EVAL 65+(22*5)> 150 35 1022469 0 0 32767 //knife
button 180 <EVAL 65+(22*5)> 4005 4006 1 0 34
button 500 <EVAL 65+(22*5)> 0FAB 0FAD 1 0 1034
xmfhtmlgumpcolor 215 <EVAL 65+(22*6)> 150 35 1022483 0 0 32767 //goblet
button 180 <EVAL 65+(22*6)> 4005 4006 1 0 35
button 500 <EVAL 65+(22*6)> 0FAB 0FAD 1 0 1035
xmfhtmlgumpcolor 215 <EVAL 65+(22*7)> 150 35 1024095 0 0 32767 //pewter mug
button 180 <EVAL 65+(22*7)> 4005 4006 1 0 36
button 500 <EVAL 65+(22*7)> 0FAB 0FAD 1 0 1036

PAGE 6 //jewelry
xmfhtmlgumpcolor 215 65 150 35 1024234 0 0 32767 //ring
button 180 65 4005 4006 1 0 37
button 500 65 0FAB 0FAD 1 0 1037
xmfhtmlgumpcolor 215 <EVAL 65+(22*1)> 150 35 1024232 0 0 32767 //necklace
button 180 <EVAL 65+(22*1)> 4005 4006 1 0 38
button 500 <EVAL 65+(22*1)> 0FAB 0FAD 1 0 1038
xmfhtmlgumpcolor 215 <EVAL 65+(22*2)> 150 35 1024230 0 0 32767 //bracelet
button 180 <EVAL 65+(22*2)> 4005 4006 1 0 39
button 500 <EVAL 65+(22*2)> 0FAB 0FAD 1 0 1039

PAGE 7 //Miscellaneous
xmfhtmlgumpcolor 215 65 150 35 1025993 0 0 32767 //key ring
button 180 65 4005 4006 1 0 40
button 500 65 0FAB 0FAD 1 0 1040
xmfhtmlgumpcolor 215 <EVAL 65+(22*1)> 150 35 1011215 0 0 32767 //globe
button 180 <EVAL 65+(22*1)> 4005 4006 1 0 41
button 500 <EVAL 65+(22*1)> 0FAB 0FAD 1 0 1041
xmfhtmlgumpcolor 215 <EVAL 65+(22*2)> 150 35 1025365 0 0 32767 //spyglass
button 180 <EVAL 65+(22*2)> 4005 4006 1 0 42
button 500 <EVAL 65+(22*2)> 0FAB 0FAD 1 0 1042
xmfhtmlgumpcolor 215 <EVAL 65+(22*3)> 150 35 1022597 0 0 32767 //lantern
button 180 <EVAL 65+(22*3)> 4005 4006 1 0 43
button 500 <EVAL 65+(22*3)> 0FAB 0FAD 1 0 1043
xmfhtmlgumpcolor 215 <EVAL 65+(22*4)> 150 35 1029403 0 0 32767 //shoji lantern
button 180 <EVAL 65+(22*4)> 4005 4006 1 0 44
button 500 <EVAL 65+(22*4)> 0FAB 0FAD 1 0 1044
xmfhtmlgumpcolor 215 <EVAL 65+(22*5)> 150 35 1029405 0 0 32767 //paper lantern
button 180 <EVAL 65+(22*5)> 4005 4006 1 0 45
button 500 <EVAL 65+(22*5)> 0FAB 0FAD 1 0 1045

PAGE 8 //assemblies
xmfhtmlgumpcolor 215 65 150 35 1024178 0 0 32767 //axle with gears
button 180 65 4005 4006 1 0 46
button 500 65 0FAB 0FAD 1 0 1046
xmfhtmlgumpcolor 215 <EVAL 65+(22*1)> 150 35 1024176 0 0 32767 //clock parts
button 180 <EVAL 65+(22*1)> 4005 4006 1 0 47
button 500 <EVAL 65+(22*1)> 0FAB 0FAD 1 0 1047
xmfhtmlgumpcolor 215 <EVAL 65+(22*2)> 150 35 1024185 0 0 32767 //sextant parts
button 180 <EVAL 65+(22*2)> 4005 4006 1 0 48
button 500 <EVAL 65+(22*2)> 0FAB 0FAD 1 0 1048
xmfhtmlgumpcolor 215 <EVAL 65+(22*3)> 150 35 1024171 0 0 32767 //clock
button 180 <EVAL 65+(22*3)> 4005 4006 1 0 49
button 500 <EVAL 65+(22*3)> 0FAB 0FAD 1 0 1049
xmfhtmlgumpcolor 215 <EVAL 65+(22*4)> 150 35 1024183 0 0 32767 //sextant
button 180 <EVAL 65+(22*4)> 4005 4006 1 0 50
button 500 <EVAL 65+(22*4)> 0FAB 0FAD 1 0 1050
xmfhtmlgumpcolor 215 <EVAL 65+(22*5)> 150 35 1044258 0 0 32767 //potion keg
button 180 <EVAL 65+(22*5)> 4005 4006 1 0 51
button 500 <EVAL 65+(22*5)> 0FAB 0FAD 1 0 1051

PAGE 9 //magic jewelry
xmfhtmlgumpcolor 215 65 150 35 1072933 0 0 32767 //Resillient Bracer
button 180 65 4005 4006 1 0 52
button 500 65 0FAB 0FAD 1 0 1052
xmfhtmlgumpcolor 215 <EVAL 65+(22*1)> 150 35 1072935 0 0 32767 //Essence of Battle
button 180 <EVAL 65+(22*1)> 4005 4006 1 0 53
button 500 <EVAL 65+(22*1)> 0FAB 0FAD 1 0 1053
xmfhtmlgumpcolor 215 <EVAL 65+(22*2)> 150 35 1072937 0 0 32767 //Pendant of the Magi
button 180 <EVAL 65+(22*2)> 4005 4006 1 0 54
button 500 <EVAL 65+(22*2)> 0FAB 0FAD 1 0 1054

[DIALOG d_newcraft_dialog_tinker BUTTON]
ON=0
SRC.CTAG.TINKER.MESSAGE=

ON=2 56
IF (<ARGN1> != 56)
F_SELECT_TINKERITEM <EVAL <ARGN1>-2>
ENDIF
SRC.F_CRAFTITEM_TINKER

ON=1002 1055
F_SELECT_TINKERITEM <EVAL <ARGN1>-1002>
DIALOG D_TINKER_ITEM_PROPS

ON=10000
IF (<SRC.TAG0.MARKITEM>)
SRC.TAG.MARKITEM=
ELSE
SRC.TAG.MARKITEM=1
ENDIF
DIALOG d_newcraft_dialog_tinker

[FUNCTION F_CRAFTITEM_TINKER]
LOCAL.ARMSLOREPROPCHANCE=<FEVAL <FLOATVAL ((<SRC.ARMSLORE>/3.25)+(<SRC.TINKERING>/3.25)+(<SRC.LUCK>/45))+5>>
	IF (<LOCAL.ARMSLOREPROPCHANCE> > 98)
	LOCAL.ARMSLOREPROPCHANCE=98
	ENDIF
LOCAL.ITEMIDPROPCHANCE=<FEVAL <FLOATVAL ((<SRC.ITEMID>/3.25)+(<SRC.TINKERING>/3.25)+(<SRC.LUCK>/45))+5>>
	IF (<LOCAL.ITEMIDPROPCHANCE> > 98)
	LOCAL.ITEMIDPROPCHANCE=98
	ENDIF
IF (0<serv.itemdef.<SRC.CTAG.TINKER.ITEM>.skillmake.1.val>)
LOCAL.CRAFTCHANCE=<eval <floatval ((<src.tinkering>/(<serv.itemdef.<SRC.CTAG.TINKER.ITEM>.skillmake.1.val>/10))*0.75)-0.05>/10000>
LOCAL.EXCEPTIONALCHANCE=<eval <floatval ((<src.armslore>/(<serv.itemdef.<SRC.CTAG.TINKER.ITEM>.skillmake.1.val>/10))*0.75)-0.30>/10000>
ELSE
LOCAL.CRAFTCHANCE=100
LOCAL.EXCEPTIONALCHANCE=100
ENDIF
REF1=<SRC.FINDTYPE.t_tinker_tools>
IF (!(<SRC.CTAG0.TINKER.ITEM>))
SRC.CTAG.TINKER.MESSAGE=You must select an item to make.
ELIF (!(<SRC.FINDTYPE.t_tinker_tools>))
SRC.CTAG.TINKER.MESSAGE=The tool must be on your person to use.
ELIF (!(<SRC.CANMAKESKILL <SRC.CTAG.TINKER.ITEM>>))
SRC.CTAG.TINKER.MESSAGE=You don't have the required skills to attempt this item.
ELIF (!(<SRC.CANMAKE <SRC.CTAG.TINKER.ITEM>>))
SRC.CTAG.TINKER.MESSAGE=You don't have the components needed to make that.
ELIF (<SRC.CTAG0.IJUSTCRAFTED>)
SRC.CTAG.TINKER.MESSAGE=You must wait a few moments before crafting another item.
ELIF (<LOCAL.CRAFTCHANCE> >= <R1,100>)
SRC.SKILLGAIN tinkering <EVAL (<SRC.TINKERING>/10)+1>
SRC.CTAG.IJUSTCRAFTED=1
SRC.TIMERF 2,CTAG.IJUSTCRAFTED=
SRC.CTAG.TINKER.MESSAGE=You craft the item.
SERV.NEWITEM=<SRC.CTAG.TINKER.ITEM>
SERV.LOG <NAME> (<UID>) crafts <NEW.NAME> (<NEW.BASEID>)
	IF (!(<NEW.TAG0.ISARTIFACT>))
		IF (<LOCAL.EXCEPTIONALCHANCE> >= <R1,100>)
			IF (<NEW.TAG0.CHARGES>)
			NEW.TAG0.CHARGES += <R25,50>
			ENDIF
		SRC.CTAG.TINKER.MESSAGE=You create an exceptional quality item.
			IF (<SRC.TAG0.MARKITEM>)
			NEW.TAG.CRAFTEDBY=<SRC.NAME>
			ENDIF
		ENDIF
		IF (<NEW.BASEID> == i_ring_gold) || (<NEW.BASEID> == i_bracelet_gold)
		NEW.GIVEITEMEVENT T_PROPRIEDADES
			FOR 4
			LOCAL.GAVEPROP=0
				IF (<LOCAL.ITEMIDPROPCHANCE> >= <R1,100>)
					WHILE (!(<LOCAL.GAVEPROP>))
						DORAND 10
							BEGIN
								IF (!(<LOCAL.GAVELOWERMANACOST>))
								NEW.TAG0.LOWERMANACOST += <R3,8>
								LOCAL.GAVELOWERMANACOST=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
							BEGIN
								IF (!(<LOCAL.GAVEINCREASE>))
								NEW.GIVEITEMEVENT T_STATUS_BONUS
									DORAND 3
									NEW.TAG0.MANAINCREASE += <R2,5>
									NEW.TAG0.STAMINCREASE += <R2,5>
									NEW.TAG0.HITSINCREASE += <R2,5>
									ENDDO
								LOCAL.GAVEINCREASE=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
							BEGIN
								IF (!(<LOCAL.GAVESTATINCREASE>))
								NEW.GIVEITEMEVENT T_STATUS_BONUS
									DORAND 3
									NEW.TAG0.INTINCREASE += <R3,8>
									NEW.TAG0.STRINCREASE += <R3,8>
									NEW.TAG0.DEXINCREASE += <R3,8>
									ENDDO
								LOCAL.GAVESTATINCREASE=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
							BEGIN
								IF (!(<LOCAL.GAVEENCHANCEPOTIONS>))
								NEW.TAG0.ENCHANCEPOTIONS += <R10,25>
								LOCAL.GAVEENCHANCEPOTIONS=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
							BEGIN
								IF (!(<LOCAL.GAVELUCK>))
								NEW.GIVEITEMEVENT T_LUCK_ITEM
								NEW.TAG0.LUCK += <R25,50>
								LOCAL.GAVELUCK=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
							BEGIN
								IF (!(<LOCAL.GAVELOWERREAGENTCOST>))
								NEW.TAG0.LOWERREAGENTCOST += <R10,20>
								LOCAL.GAVELOWERREAGENTCOST=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
							BEGIN
								IF (!(<LOCAL.GAVEMAGICDAMINCREASE>))
								NEW.TAG0.MAGICDAMINCREASE += <R5,12>
								LOCAL.GAVEMAGICDAMINCREASE=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
							BEGIN
								IF (!(<LOCAL.GAVEDAMINCREASE>))
								NEW.TAG0.DAMINCREASE += <R5,12>
								LOCAL.GAVEDAMINCREASE=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
							BEGIN
								IF (!(<LOCAL.GAVEFASTERCASTING>))
								NEW.TAG0.FASTERCASTING += <R1,2>
								LOCAL.GAVEFASTERCASTING=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
							BEGIN
								IF (!(<LOCAL.GAVEFASTERCASTRECOVERY>))
								NEW.TAG0.FASTERCASTRECOVERY += <R1,2>
								LOCAL.GAVEFASTERCASTRECOVERY=1
								LOCAL.GAVEPROP=1
								ENDIF
							END
						ENDDO
					ENDWHILE
				ENDIF
			ENDFOR
		ENDIF
	ENDIF
NEW.BOUNCE
SRC.CONSUME <SERV.ITEMDEF.<SRC.CTAG.TINKER.ITEM>.RESOURCES>
	IF (<REF1.TAG0.CHARGES> == 1)
	SRC.MESSAGE @,,2 1044262
	REF1.TIMERF 1,REMOVE
	ELSE
	REF1.TAG0.CHARGES --
	REF1.RESENDTOOLTIP 1
	ENDIF
ELSE
SRC.CTAG.TINKER.MESSAGE=You failed to create the item, and some of your materials are lost.
	FOR <SERV.ITEMDEF.<SRC.CTAG.TINKER.ITEM>.RESOURCES.COUNT>
	SRC.CONSUME <EVAL (30*<SERV.ITEMDEF.<SRC.CTAG.TINKER.ITEM>.RESOURCES.<dLOCAL._FOR>.VAL>)/100> <SERV.ITEMDEF.<SRC.CTAG.TINKER.ITEM>.RESOURCES.<dLOCAL._FOR>.KEY>
	ENDFOR
	IF (<REF1.TAG0.CHARGES> == 1)
	SRC.MESSAGE @,,2 1044262
	REF1.TIMERF 1,REMOVE
	ELSE
	REF1.TAG0.CHARGES --
	REF1.RESENDTOOLTIP 1
	ENDIF
ENDIF
DIALOG d_newcraft_dialog_tinker

[FUNCTION F_SELECT_TINKERITEM]
DOSWITCH <ARGN1>
SRC.CTAG.TINKER.ITEM=i_plane_jointing
SRC.CTAG.TINKER.ITEM=i_clock_frame
SRC.CTAG.TINKER.ITEM=i_axEL
SRC.CTAG.TINKER.ITEM=I_SCISSORS
SRC.CTAG.TINKER.ITEM=I_MORTAR_PESTLE
SRC.CTAG.TINKER.ITEM=I_SCORP
SRC.CTAG.TINKER.ITEM=I_TINKER_TOOLS
SRC.CTAG.TINKER.ITEM=I_HATCHET
SRC.CTAG.TINKER.ITEM=I_KNIFE_DRAW
SRC.CTAG.TINKER.ITEM=I_SEWING_KIT
SRC.CTAG.TINKER.ITEM=I_SAW
SRC.CTAG.TINKER.ITEM=I_SAW_DOVETAIL
SRC.CTAG.TINKER.ITEM=I_FROE
SRC.CTAG.TINKER.ITEM=I_SHOVEL
SRC.CTAG.TINKER.ITEM=I_HAMMER_SMITH
SRC.CTAG.TINKER.ITEM=I_INSHAVE
SRC.CTAG.TINKER.ITEM=I_PICKAXE
SRC.CTAG.TINKER.ITEM=I_LOCKPICK
SRC.CTAG.TINKER.ITEM=I_ARROW_FLETCHING
SRC.CTAG.TINKER.ITEM=I_GEARS
SRC.CTAG.TINKER.ITEM=I_CLOCK_PARTS
SRC.CTAG.TINKER.ITEM=I_BARREL_TAP
SRC.CTAG.TINKER.ITEM=I_SPRINGS
SRC.CTAG.TINKER.ITEM=I_SEXTANT_PARTS
SRC.CTAG.TINKER.ITEM=I_BARREL_HOOPS
SRC.CTAG.TINKER.ITEM=I_HINGE
SRC.CTAG.TINKER.ITEM=I_BOLA_BALL
SRC.CTAG.TINKER.ITEM=I_KNIFE_BUTCHER
SRC.CTAG.TINKER.ITEM=I_SPOON
SRC.CTAG.TINKER.ITEM=I_PLATE
SRC.CTAG.TINKER.ITEM=I_FORK
SRC.CTAG.TINKER.ITEM=I_CLEAVER_MEAT
SRC.CTAG.TINKER.ITEM=I_KNIFE
SRC.CTAG.TINKER.ITEM=I_GOBLET
SRC.CTAG.TINKER.ITEM=I_MUG_PEWTER
SRC.CTAG.TINKER.ITEM=I_RING_GOLD
SRC.CTAG.TINKER.ITEM=I_NECKLACE_GOLD
SRC.CTAG.TINKER.ITEM=I_BRACELET_GOLD
SRC.CTAG.TINKER.ITEM=I_KEY_RING
SRC.CTAG.TINKER.ITEM=I_GLOBE
SRC.CTAG.TINKER.ITEM=I_SPYGLASS
SRC.CTAG.TINKER.ITEM=I_LANTERN
SRC.CTAG.TINKER.ITEM=9403 //SHOJI LANTERN
SRC.CTAG.TINKER.ITEM=9405 //PAPER LANTERN
SRC.CTAG.TINKER.ITEM=I_AXEL_AND_GEARS
SRC.CTAG.TINKER.ITEM=I_CLOCK_PARTS
SRC.CTAG.TINKER.ITEM=I_SEXTANT_PARTS
SRC.CTAG.TINKER.ITEM=I_CLOCK
SRC.CTAG.TINKER.ITEM=I_SEXTANT
SRC.CTAG.TINKER.ITEM=i_keg_potion
SRC.CTAG.TINKER.ITEM=I_RESILIENT_BRACER
SRC.CTAG.TINKER.ITEM=I_ESSENCE_BATTLE
SRC.CTAG.TINKER.ITEM=I_PENDANT_MAGI
SRC.CTAG.TINKER.ITEM=i_metal_graving_tool
ENDDO

[EOF]