/////////////////////////////////////////////////////////////////////////
[ITEMDEF 0F39]
DEFNAME I_SHOVEL
NAME Shovel
TYPE T_WEAPON_MACE_PICK
SKILLMAKE TINKERING 51.1, T_TINKER_TOOLS
RESOURCES 4 I_INGOT_IRON
WEIGHT 5
SPEED 5
//DUPEITEM 0F3A
CATEGORY=Items by Professions
SUBSECTION=Miner
DESCRIPTION=Shovel
ON=@CREATE
HITPOINTS {20 70}
ON=@TARGON_ITEM
RETURN 1
ON=@TARGON_CHAR
RETURN 1
ON=@TARGON_GROUND
RETURN <F_START_DIGGING_SAND>
[ITEMDEF 0F3A]
//shovel
DUPEITEM=0F39
/////////////////////////////////////////
[FUNCTION F_START_DIGGING_SAND]
IF <SRC.DISTANCE <SRC.TARGP>> > 3
SRC.SYSMESSAGE @,,1 That is too far away.
RETURN 1
ENDIF
IF <SRC.TARGP.TYPE> == T_ROCK
RETURN 0
ENDIF
IF <SRC.TARGP.TYPE> != T_SAND
SRC.SYSMESSAGE @,,1 Try mining elsewhere.
RETURN 1
ENDIF
LOCAL.OLDNEW <NEW>
SERV.NEWITEM I_GOLD
REF1 <NEW>
NEW <LOCAL.OLDNEW>
REF1.P <SRC.TARGP>
REF1.FIX
IF <REF1.F_DIG_FOR_STUFF> >= 1
REF1.REMOVE
LOCAL.OLDNEW <NEW>
SERV.NEWITEM I_WORLDGEM_BIT
REF1 <NEW>
NEW <LOCAL.OLDNEW>
REF1.ATTR 092
REF1.P <SRC.TARGP>
REF1.TIMER 120
REF1.TYPE T_ROCK
REF1.MORE1 MR_SAND
REF1.AMOUNT <EVAL { <SERV.REGIONRESOURCE.MR_SAND.AMOUNT> } >
ELSE
REF1.REMOVE
ENDIF
RETURN 0
[FUNCTION F_DIG_FOR_STUFF]
LOCAL.COUNTER 0
FORITEMS 0
IF (<BASEID> == I_WORLDGEM_BIT) && (<TYPE> == T_ROCK)
RETURN 0
ENDIF
LOCAL.COUNTER += 1
ENDFOR
RETURN <LOCAL.COUNTER>
/////////////////////////////////////////
[ITEMDEF I_ORE_SAND]
NAME Sand
ID 011EA
WEIGHT 1
VALUE 3
TYPE T_ORE
SKILLMAKE MINING 10.0
TDATA1 I_INGOT_SAND
ON=@CREATE
MORE1 <R1,65535>
DISPID 011EA
[ITEMDEF I_INGOT_SAND]
ID 01BEF
NAME Glass%es
TYPE T_INGOT
WEIGHT 1
SKILLMAKE MINING 10.0
RESOURCES I_ORE_SAND
TDATA1 10.0
TDATA2 20.0
VALUE 6
ON=@CREATE
COLOR 077B
/////////////////////////////////////////
[REGIONRESOURCE MR_SAND]
REAP I_ORE_SAND
REGEN 60
AMOUNT 20,25
REAPAMOUNT 1
/////////////////////////////////////////////////////////////////////////
[EOF]