[TYPEDEF T_SHIP_TILLER]
ON=@Dclick
IF !(<UID.<LINK.MORE1>.ISPLAYER>)
LINK.REMOVE
ELIF (<LINK.TYPE> == t_ship) && (<SRC> == <LINK.MORE1>) || (<SRC.ISGM>)
LINK.TAG.CARINHA=<UID>
SDIALOG d_ship_pod 1
ELIF (<LINK.TYPE>==t_ship)
SDIALOG d_ship_pod 2
ENDIF
RETURN 1

[DIALOG d_ship_pod]
200,200
src.closealldialogs
PAGE 0
resizepic 20 20 3600 220 170
checkertrans 20 20 220 170
dtext 95 35 88 Ship System
PAGE 1
dtext 40 60 1152 Name:
dtext 80 60 2010 <link.name>
button 40 90 093A 0939 1 0 1
dtext 55 85 1152 Owner:
dtext 90 85 2010 <uid.<link.more1>.name>
button 40 120 093A 0939 1 0 2
dtext 55 115 1152 Redeed (<eval <link.value>/10>gps)
button 40 150 093A 0939 1 0 3
dtext 55 145 1152 Remote control

PAGE 2
dtext 40 60 1152 Name:
dtext 80 60 2010 <link.name>
dtext 55 90 1152 Owner:
dtext 90 90 2010 <uid.<link.more1>.name>

[DIALOG d_ship_pod BUTTON]
ON=1
link.targetf transfer_owner_boat
src.sysmessage Who shall be the new owner?

ON=2
IF !(<src.gold> >= <eval <link.value>/10>) && !(<SRC.ISGM>)
src.sysmessage You don't have enough money.
ELSE
src.gold -= <eval <link.value>/10>
serv.newitem=i_deed_ship
new.more=<link.baseid>
new.name=<link.name> deed
new.bounce
link.remove
ENDIF

ON=3
LINK.SDIALOG d_barco_controleremoto

[FUNCTION transfer_owner_boat]
IF (<argo.uid> == <src>)
src.sysmessage You can't transfer your boat to yourself.
ELIF (<distance> > 10)
src.sysmessage The boat is too far away.
ELIF !(<argo.canseelos>)
src.sysmessage You can't see the target.
ELIF !(<argo.isplayer>)
src.sysmessage You must choose a player.
ELIF (<argo.barcos>==2)
src.sysmessage <argo.name> already has 2 boats.
ELSE
try uid.<more1>.removeboat <uid> <argo.uid>
ARGO.sysmessage @04a3 <uid.<more1>.name> has given you his boat.
more1=<argo.uid>
timer -1
ENDIF

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

[DIALOG d_barco_controleremoto]
200,200
src.closealldialogs
PAGE 0
resizepic 20 0 3600 220 325
checkertrans 20 0 220 325
dtext 100 13 88 Navigate to:
button 110 80 09e1 09e1 1 0 1
gumppic 110 80 09e1 <EVAL {55 110}>
button 107 30 01194 01194 1 0 2
button 107 130 01198 01198 1 0 3
button 60 82 0119a 0119a 1 0 4
button 155 82 01196 01196 1 0 5
button 150 40 01195 01195 1 0 6
button 60 40 0119b 0119b 1 0 7
button 150 130 01197 01197 1 0 8
button 60 130 01199 01199 1 0 9
dtext 100 180 88 Turn to:
button 40 200 093A 0939 1 0 10
dtext 55 195 1152 Left
button 165 200 093A 0939 1 0 11
dtext 180 195 1152 Right
dtext 100 220 88 Others:
button 40 240 093A 0939 1 0 12
dtext 55 235 1152 Anchor down
button 40 260 093A 0939 1 0 13
dtext 55 255 1152 Anchor up
button 40 285 4016 4015 1 0 14

[DIALOG d_barco_controleremoto BUTTON]
ON=1
IF (<SRC.REGION.UID> == <UID>)
SHIPSTOP
SDIALOG d_barco_controleremoto
ENDIF

ON=2
IF (<SRC.REGION.UID> == <UID>)
SHIPFORE
SDIALOG d_barco_controleremoto
ENDIF

ON=3
IF (<SRC.REGION.UID> == <UID>)
SHIPBACK
SDIALOG d_barco_controleremoto
ENDIF

ON=4
IF (<SRC.REGION.UID> == <UID>)
SHIPDRIFTLEFT
SDIALOG d_barco_controleremoto
ENDIF

ON=5
IF (<SRC.REGION.UID> == <UID>)
SHIPDRIFTRIGHT
SDIALOG d_barco_controleremoto
ENDIF

ON=6
IF (<SRC.REGION.UID> == <UID>)
SHIPFORERIGHT
SDIALOG d_barco_controleremoto
ENDIF

ON=7
IF (<SRC.REGION.UID> == <UID>)
SHIPFORELEFT
SDIALOG d_barco_controleremoto
ENDIF

ON=8
IF (<SRC.REGION.UID> == <UID>)
SHIPBACKRIGHT
SDIALOG d_barco_controleremoto
ENDIF

ON=9
IF (<SRC.REGION.UID> == <UID>)
SHIPBACKLEFT
SDIALOG d_barco_controleremoto
ENDIF

ON=10
IF (<SRC.REGION.UID> == <UID>)
LOCAL.TMP=<OBJ>
OBJ=<UID>
FORITEMS 8
IF (<TYPE>==t_ship) || ((<UID.<REGION.UID>.ISAMULTI>) && (<UID>!=<OBJ>))
IF (<UID>!=<OBJ>)
SRC.SYSMESSAGE There's a boat too near of yours.
return 1
ENDIF
ENDIF
ENDFOR
OBJ.SHIPTURNLEFT
OBJ.shipfix
OBJ.SDIALOG d_barco_controleremoto
OBJ=<LOCAL.TMP>
ENDIF

ON=11
IF (<SRC.REGION.UID> == <UID>)
LOCAL.TMP=<OBJ>
OBJ=<UID>
FORITEMS 8
IF (<TYPE>==t_ship) || ((<UID.<REGION.UID>.ISAMULTI>) && (<UID>!=<OBJ>))
IF (<UID>!=<OBJ>)
SRC.SYSMESSAGE There's a boat too near of yours.
return 1
ENDIF
ENDIF
ENDFOR
OBJ.SHIPTURNRIGHT
OBJ.shipfix
OBJ.SDIALOG d_barco_controleremoto
OBJ=<LOCAL.TMP>
ENDIF

ON=12
IF (<SRC.REGION.UID> == <UID>)
SHIPANCHORDROP
SDIALOG d_barco_controleremoto
ENDIF

ON=13
IF (<SRC.REGION.UID> == <UID>)
SHIPANCHORRAISE
SDIALOG d_barco_controleremoto
ENDIF

ON=14
IF (<SRC.REGION.UID> == <UID>)
TRY UID.<TAG.CARINHA>.SDIALOG d_ship_pod 1
ENDIF

[EOF]