[DEFNAME NEW_TRACKING_SYS]
USENEWTRACKING 1

[DIALOG d_NEW_TRACKING]
200,130
SRC.CLOSEALLDIALOGS
SRC.SKILLGAIN TRACKING <EVAL <SRC.TRACKING>/10>
PAGE 0
RESIZEPIC 20 20 2600 400 400
RESIZEPIC 60 60 5120 320 320
CHECKERTRANS 60 60 320 320

PAGE 1
DTEXT 140 70 88 You have tracked <dCTAG0.TRACKINGCHARS> creatures.
button 70 112 015e1 015e5 0 2 1
dtext 90 110 33 Players (<dCTAG0.TRACKEDPLAYERS>)
button 70 142 015e1 015e5 0 3 1
dtext 90 140 33 Humans (<dCTAG0.TRACKEDHUMANS>)
button 70 172 015e1 015e5 0 4 1
dtext 90 170 33 Monsters (<dCTAG0.TRACKEDMONSTERS>)
button 70 202 015e1 015e5 0 5 1
dtext 90 200 33 Animals (<dCTAG0.TRACKEDANIMALS>)

PAGE 2
DTEXT 150 70 88 Tracking - Players
IF (<CTAG0.TRACKEDPLAYERS>)
FOR 0 <EVAL <CTAG0.TRACKEDPLAYERS>-1>
DTEXT <QVAL (<LOCAL._FOR> < 14) ? 90:300> <EVAL (<QVAL (<LOCAL._FOR> < 14) ? <LOCAL._FOR>:<EVAL <LOCAL._FOR>-14>>*20)+100> <QVAL <UID.<CTAG0.TRACKEDPLAYERS.<EVAL <LOCAL._FOR>+1>>.ISPK> ? 33:55> <UID.<CTAG0.TRACKEDPLAYERS.<EVAL <LOCAL._FOR>+1>>.NAME>
button <QVAL (<LOCAL._FOR> < 14) ? 70:280> <EVAL (<QVAL (<LOCAL._FOR> < 14) ? <LOCAL._FOR>:<EVAL <LOCAL._FOR>-14>>*20)+102> 015e1 015e5 1 0 <EVAL <LOCAL._FOR>+10>
ENDFOR
ELSE
DTEXT 90 110 55 No players tracked.
ENDIF
button 70 385 015e3 015e7 0 1 1

PAGE 3
DTEXT 150 70 88 Tracking - Humanos
IF (<CTAG0.TRACKEDHUMANS>)
FOR 0 <EVAL <CTAG0.TRACKEDHUMANS>-1>
DTEXT <QVAL (<LOCAL._FOR> < 14) ? 90:300> <EVAL (<QVAL (<LOCAL._FOR> < 14) ? <LOCAL._FOR>:<EVAL <LOCAL._FOR>-14>>*20)+100> <QVAL <UID.<CTAG0.TRACKEDHUMANS.<EVAL <LOCAL._FOR>+1>>.ISPK> ? 33:55> <UID.<CTAG0.TRACKEDHUMANS.<EVAL <LOCAL._FOR>+1>>.NAME>
button <QVAL (<LOCAL._FOR> < 14) ? 70:280> <EVAL (<QVAL (<LOCAL._FOR> < 14) ? <LOCAL._FOR>:<EVAL <LOCAL._FOR>-14>>*20)+102> 015e1 015e5 1 0 <EVAL <LOCAL._FOR>+100>
ENDFOR
ELSE
DTEXT 90 110 55 No humans tracked.
ENDIF
button 70 385 015e3 015e7 0 1 1

PAGE 4
DTEXT 150 70 88 Tracking - Monstros
IF (<CTAG0.TRACKEDMONSTERS>)
FOR 0 <EVAL <CTAG0.TRACKEDMONSTERS>-1>
DTEXT <QVAL (<LOCAL._FOR> < 14) ? 90:300> <EVAL (<QVAL (<LOCAL._FOR> < 14) ? <LOCAL._FOR>:<EVAL <LOCAL._FOR>-14>>*20)+100> <QVAL <UID.<CTAG0.TRACKEDMONSTERS.<EVAL <LOCAL._FOR>+1>>.ISPK> ? 33:55> <UID.<CTAG0.TRACKEDMONSTERS.<EVAL <LOCAL._FOR>+1>>.NAME>
button <QVAL (<LOCAL._FOR> < 14) ? 70:280> <EVAL (<QVAL (<LOCAL._FOR> < 14) ? <LOCAL._FOR>:<EVAL <LOCAL._FOR>-14>>*20)+102> 015e1 015e5 1 0 <EVAL <LOCAL._FOR>+1000>
ENDFOR
ELSE
DTEXT 90 110 55 No monsters tracked.
ENDIF
button 70 385 015e3 015e7 0 1 1

PAGE 5
DTEXT 150 70 88 Tracking - Animais
IF (<CTAG0.TRACKEDANIMALS>)
FOR 0 <EVAL <CTAG0.TRACKEDANIMALS>-1>
DTEXT <QVAL (<LOCAL._FOR> < 14) ? 90:300> <EVAL (<QVAL (<LOCAL._FOR> < 14) ? <LOCAL._FOR>:<EVAL <LOCAL._FOR>-14>>*20)+100> <QVAL <UID.<CTAG0.TRACKEDANIMALS.<EVAL <LOCAL._FOR>+1>>.ISPK> ? 33:55> <UID.<CTAG0.TRACKEDANIMALS.<EVAL <LOCAL._FOR>+1>>.NAME>
button <QVAL (<LOCAL._FOR> < 14) ? 70:280> <EVAL (<QVAL (<LOCAL._FOR> < 14) ? <LOCAL._FOR>:<EVAL <LOCAL._FOR>-14>>*20)+102> 015e1 015e5 1 0 <EVAL <LOCAL._FOR>+10000>
ENDFOR
ELSE
DTEXT 90 110 55 No animals tracked.
ENDIF
button 70 385 015e3 015e7 0 1 1

[DIALOG d_NEW_TRACKING BUTTON]
ON=10 99
DIALOG d_NEW_TRACKING_MAP 1 <CTAG0.TRACKEDPLAYERS.<EVAL <ARGN1>-9>>
ARROWQUEST <UID.<CTAG0.TRACKEDPLAYERS.<EVAL <ARGN1>-9>>.P>
SERV.NEWITEM i_new_tracking_updater
NEW.MORE1=1
NEW.MORE2=<CTAG0.TRACKEDPLAYERS.<EVAL <ARGN1>-9>>
NEW.TIMER=1
NEW.CONT=<SRC>

ON=100 999
DIALOG d_NEW_TRACKING_MAP 1 <CTAG0.TRACKEDHUMANS.<EVAL <ARGN1>-99>>
ARROWQUEST <UID.<CTAG0.TRACKEDHUMANS.<EVAL <ARGN1>-99>>.P>
SERV.NEWITEM i_new_tracking_updater
NEW.MORE1=1
NEW.MORE2=<CTAG0.TRACKEDHUMANS.<EVAL <ARGN1>-99>>
NEW.TIMER=1
NEW.CONT=<SRC>

ON=1000 9999
DIALOG d_NEW_TRACKING_MAP 1 <CTAG0.TRACKEDMONSTERS.<EVAL <ARGN1>-999>>
ARROWQUEST <UID.<CTAG0.TRACKEDMONSTERS.<EVAL <ARGN1>-999>>.P>
SERV.NEWITEM i_new_tracking_updater
NEW.MORE1=1
NEW.MORE2=<CTAG0.TRACKEDMONSTERS.<EVAL <ARGN1>-999>>
NEW.TIMER=1
NEW.CONT=<SRC>

ON=10000 99999
DIALOG d_NEW_TRACKING_MAP 1 <CTAG0.TRACKEDANIMALS.<EVAL <ARGN1>-9999>>
ARROWQUEST <UID.<CTAG0.TRACKEDANIMALS.<EVAL <ARGN1>-9999>>.P>
SERV.NEWITEM i_new_tracking_updater
NEW.MORE1=1
NEW.MORE2=<CTAG0.TRACKEDANIMALS.<EVAL <ARGN1>-9999>>
NEW.TIMER=1
NEW.CONT=<SRC>

[DIALOG d_NEW_TRACKING_MAP]
200,130
SRC.CLOSEALLDIALOGS
PAGE 0
RESIZEPIC 20 20 2600 450 490
CHECKERTRANS 20 20 450 490
gumppic 50 50 5528 
gumppic <EVAL (10+((<UID.<ARGS>.P.X>*100)/1337))> <EVAL (10+((<UID.<ARGS>.P.Y>*100)/1067))> 0938
gumppic <EVAL (10+((<src.p.x>*100)/1337))> <EVAL (10+((<src.p.y>*100)/1067))> 0939
dtext 70 450 55 <UID.<ARGS>.NAME> is at <UID.<ARGS>.SEXTANTP> in the sextant.
dtext 70 470 55 Your distance is <UID.<ARGS>.DISTANCE> tiles.

[DIALOG d_NEW_TRACKING_MAP BUTTON]
ON=0
FINDID.i_new_tracking_updater.MORE1=0
ARROWQUEST

[ITEMDEF i_new_tracking_updater]
ID=i_memory
TYPE=T_EQ_SCRIPT
NAME=New Tracking Updater

ON=@Timer
IF (<MORE1>) && (<UID.<MORE2>.DISTANCE <CONT>> <= 40)
TRYSRC <CONT> SRC.DIALOG d_NEW_TRACKING_MAP 1 <MORE2>
CONT.ARROWQUEST <UID.<MORE2>.P>
MORE1=1
TIMERD=1
ELSE
TRYSRC <CONT> SRC.DIALOGCLOSE D_NEW_TRACKING_MAP
REMOVE
ENDIF
RETURN 1

[EOF]