[TYPEDEF T_FISH_NOVO]
ON=@Dclick
IF (<CONT>)
IF (<TOPOBJ.UID>==<SRC>)
IF !(<SRC.JATEMHABILIDADE <TAG0.COISA>>)
SERV.NEWITEM i_fishing_hability
NEW.TAG.COISA=<TAG0.COISA>
NEW.MORE1=<MORE1>
NEW.EQUIP
NEW.TIMER=20
TRY SRC.<TAG0.COISA>=<EVAL <SRC.<TAG0.COISA>>+<MORE1>>
SRC.FOOD += 3
IF (<SRC.FOOD> > <SRC.MAXFOOD>)
SRC.FOOD=<SRC.MAXFOOD>
ENDIF
CONSUME 1
ENDIF
ENDIF
ENDIF

[ITEMDEF 12694]
DEFNAME=i_white_pearl
NAME=white pearl
TYPE=T_NORMAL

[ITEMDEF i_prize_fish]
ID=i_fish_small
NAME=prize fish
TYPE=T_FISH_NOVO
TAG.COISA=MODINT

ON=@Create
MORE1=5

ON=@ClientToolTip
SRC.ADDCLILOC 1060432,5

[ITEMDEF i_Wondrous_fish]
ID=i_fish_small
NAME=wondrous fish
TYPE=T_FISH_NOVO
TAG.COISA=MODDEX

ON=@Create
MORE1=5

ON=@ClientToolTip
SRC.ADDCLILOC 1060409,5

[ITEMDEF i_Truly_Rare_fish]
ID=i_fish_small
NAME=truly rare fish
TYPE=T_FISH_NOVO
TAG.COISA=MODSTR

ON=@Create
MORE1=5

ON=@ClientToolTip
SRC.ADDCLILOC 1060485,5

[ITEMDEF i_Highly_Peculiar_fish]
ID=i_fish_small
NAME=highly peculiar fish
TYPE=T_FOOD

ON=@Dclick
SRC.STAM += 10
IF (<SRC.STAM> > <SRC.MAXSTAM>)
SRC.STAM=<SRC.MAXSTAM>
ENDIF

[ITEMDEF i_fishing_hability]
ID=i_memory
TYPE=T_EQ_SCRIPT
NAME=fishing hability

ON=@Timer
TRY CONT.<TAG0.COISA>=<EVAL <CONT.<TAG0.COISA>>-<MORE1>>
REMOVE
RETURN 1

[FUNCTION JATEMHABILIDADE]
IF (<FINDID.i_fishing_hability>)
FORCONTID i_fishing_hability
IF !(STRCMPI(<TAG0.COISA>,<ARGS>))
RETURN 1
ENDIF
ENDFOR
ENDIF
RETURN 0

///////////////////////////

[ITEMDEF i_special_fishing_net]
ID=i_fishing_net_3
NAME=Special fishing net

ON=@Create
COLOR=colors_all
DORAND 3
MORE1=c_elem_water
MORE1=c_sea_serpent
MORE1=c_kraken
ENDDO

ON=@Dclick
TARGETG @55 Where to throw the net?
RETURN 1

ON=@Targon_Ground
IF !(<SRC.TARGP.ISNEARTYPE T_WATER>)
SRC.SYSMESSAGE @55 Throw it in water.
ELSE
SERV.NEWNPC=<MORE1>
NEW.P=<SRC.TARGP>
NEW.ATTACK=<SRC>
NEW.REMOVETIMER=<EVAL 60*30>
SERV.NEWNPC=c_elem_water
NEW.P=<SRC.TARGP>
NEW.ATTACK=<SRC>
NEW.REMOVETIMER=<EVAL 60*30>
SERV.NEWNPC=c_sea_serpent
NEW.P=<SRC.TARGP>
NEW.ATTACK=<SRC>
NEW.REMOVETIMER=<EVAL 60*30>
SERV.NEWNPC=c_kraken
NEW.P=<SRC.TARGP>
NEW.ATTACK=<SRC>
NEW.REMOVETIMER=<EVAL 60*30>
CONSUME 1
ENDIF
RETURN 1

[ITEMDEF i_Fabled_Fishing_Net]
ID=i_fishing_net_3
NAME=Fabled Fishing Net

ON=@Create
COLOR=0481

ON=@Dclick
TARGETG @55 Where to throw the net?
RETURN 1

ON=@Targon_Ground
IF (!(<SRC.TARGP.ISNEARTYPE T_WATER>))
SRC.SYSMESSAGE @55 You must target the water.
ELSE
SERV.NEWNPC=c_leviathan
NEW.P=<SRC.TARGP>
NEW.ATTACK=<SRC>
NEW.REMOVETIMER=<EVAL 60*30>
NEW.UPDATE 1
CONSUME 1
ENDIF
RETURN 1

////////////////////////////

[itemdef i_sea_mapa_tesouro]
NAME=Treasure Map (ocean)
ID=i_map_rolled
VALUE=5000
TYPE=t_normal
WEIGHT=3

ON=@Create
tag.status=Nao decifrado
f_selecionar_local_tesouro_mar

ON=@ClientToolTip
SRC.ADDCLILOC 1060658,Status,<TAG0.STATUS>
IF (STRMATCH(*Deciphered by*,<TAG0.STATUS>))
SRC.ADDCLILOC 1060663,Location,<SEXTANTP <MOREX>,<MOREY>,<MOREM>>
ENDIF

on=@dclick
if (<more2>) && !(<more1>) && !(<src.isnextp <eval <morex>> <eval <morey>> 10>)
sDIALOG d_tesouro_mapa
elif (<topobj.uid>!=<src>) && !(<src.isgm>)
src.message @04a3 The map isn't in your pocession.
elif (<more1>)
src.sysmessage @04a0 The treasure has already been found.
elif (<more2>)
IF (<src.isnextp <eval <morex>> <eval <morey>> 10>)
IF (<SRC.FISHING> < 80.0)
src.sysmessage @04a3 You must have 80.0 fishing or more to find this treasure.
ELIF !(<src.findid.i_fishing_pole>)
src.sysmessage @04a3 You need a fishing pole.
else
serv.newitem i_chest_metal
new.name=a treasure chest recovered from a shipwreck
new.timer=60
new.attr=attr_decay|attr_move_never|attr_can_decay
new.p=<morep>
local.new=<new>
new.color=<color>
new.randmagicitem
IF !(<color>)
serv.newitem i_gold,5000,<local.new>
serv.newitem i_orb,1,<local.new>
serv.newitem i_Fabled_Fishing_Net,1,<local.new>
ELSE
new.randmagicitemgreat
serv.newitem i_gold,9000,<local.new>
serv.newitem i_orb,1,<local.new>
serv.newitem i_Fabled_Fishing_Net,1,<local.new>
ENDIF
ENDIF
ENDIF
ELIF !(<R6>)
If (<src.cartography> == 0)
src.cartography=1
Endif
SRC.SKILLGAIN cartography <EVAL <SRC.cartography>/10>
MORE2=1
src.message @0ad You decipher the map.
tag.status=Deciphered by <src.name>
dispid=i_map
attr=attr_newbie
update
ELSE
src.message @0ad You fail!
ENDIF
RETURN 1

[function f_selecionar_local_tesouro_mar]
LOCAL.OLDNEW=<NEW>
SERV.NEWITEM i_gold
NEW.ATTR=ATTR_INVIS
NEW.SEALOCATION
MOREP=<NEW.P>
NEW.REMOVE
NEW=<LOCAL.OLDNEW>

[FUNCTION SEALOCATION]
IF (<VAR0.SEALOCATION.TRIES> >= 5000)
VAR.SEALOCATION.TRIES
REMOVE
RETURN 1
ENDIF
DORAND 2
P=<eval {8 712}>,<eval {7 520}>
P=<eval {2202 5048}>,<eval {1552 2984}>
ENDDO
LOCAL.TMP=<OBJ>
OBJ=<region.uid>
IF (<obj.type> == t_ship)
OBJ=<LOCAL.TMP>
VAR0.SEALOCATION.TRIES ++
SEALOCATION
RETURN 1
ELIF (<region.flags>&region_flag_guarded) || (<region.flags>&region_flag_safe) || !(<isneartype t_water>) || (<isneartype t_ship 10>)
OBJ=<LOCAL.TMP>
VAR0.SEALOCATION.TRIES ++
SEALOCATION
RETURN 1
ENDIF
VAR.SEALOCATION.TRIES
FIX
OBJ=<LOCAL.TMP>

[EOF]