[DIALOG D_PEERLESS_ENTER]
150,50
noclose

src.closealldialogs
PAGE 0
gumppic 0 0 3600

gumppictiled 0 14 15 200 3603
gumppictiled 380 14 14 200 3605
gumppic 0 201 3606
gumppictiled 15 201 370 16 3607
gumppictiled 15 0 370 16 3601
gumppic 380 0 3602
gumppic 380 201 3608
gumppictiled 15 15 365 190 2624

radio 30 140 9727 9730 1 1
xmfhtmlgumpcolor 65 145 300 25 1050050 0 0 32767 // Yes, let's go!

radio 30 175 9727 9730 0 0
xmfhtmlgumpcolor 65 178 300 25 1050049 0 0 32767 // No thanks, I'd rather stay here.

xmfhtmlgumpcolor 30 20 360 35 1072678 0 0 32767 // You have awakened the master of this realm. You need to hurry to defeat it in time!

gumppic 65 72 5605
gumppictiled 80 90 200 1 9107
gumppictiled 95 92 200 1 9157

dtext 90 70 1645 <SERV.CHARDEF.<TAG0.PEERLESS.BOSS>.NAME>

button 290 175 247 248 1 0 2

gumppictiled 15 14 365 1 9107
gumppictiled 380 14 1 190 9105
gumppictiled 15 205 365 1 9107
gumppictiled 15 14 1 190 9105
gumppictiled 0 0 395 1 9157
gumppictiled 394 0 1 217 9155
gumppictiled 0 216 395 1 9157
gumppictiled 0 0 1 217 9155

[DIALOG D_PEERLESS_ENTER BUTTON]
ON=2
IF (<ARGCHK[1]>)
	IF ((<COLOR> == 33) && ((<TAG0.PARTIES> == 3) || (!(<TAG0.PARTIES>))))
	SAY @,,2 1075213
	ELIF (<DISTANCE> <= 30)
	TAG0.PLAYERS ++
	TRY TAG.PLAYERS.<dTAG0.PLAYERS>=<SRC.UID>
	SRC.GO <TAG0.PEERLESS.ROOM>
	ELSE
	SRC.SYSMESSAGELOC -1,1050051 // The invitation has been revoked.
	ENDIF
ELSE
SRC.SYSMESSAGELOC -1,1050052 // You have declined their invitation.
ENDIF

[TYPEDEF T_PEERLESS_SUMMONING_BAG]
ON=@Dropon_Self
IF ((<COLOR> == 33) && ((<TAG0.PARTIES> == 3) || (!(<TAG0.PARTIES>))))
SAY @,,2 1075213
RETURN 1
ELIF ((!(<ARGO.ISEVENT.t_peerless_key>)) || (!(STRMATCH(*<ARGO.BASEID>*,<TAG0.KEYLIST>))))
SAY @,,2 1072682
RETURN 1
ELSE
	IF (<SRC.ISDIALOGOPEN D_PEERLESS_ENTER>)
	RETURN 1
	ENDIF
	IF (<FINDID.<ARGO.BASEID>>)
	SAY @,,2 1072682
	RETURN 1
	ENDIF
ARGO.ATTR |= ATTR_MOVE_NEVER
ARGO.TIMERF CLEAR
ARGO.EVENTS -t_peerless_key
ARGO.TIMER=-1
TAG0.KEYS.TOTAL ++
	IF (<TAG0.KEYS.TOTAL> >= <TAG0.KEYS.NEEDED>)
	TAG.KEYS.TOTAL
	EMPTY
	ARGO.TIMERF 1,REMOVE
	SAY @55,,2 1072678
		IF (!(<TAG0.PARTIES>))
		COLOR=33
		SERV.NEWITEM I_PEERLESS_TIMER
		NEW.P=<TAG0.PEERLESS.ROOM>
		NEW.LINK=<UID>
		NEW.TIMER=<EVAL 60*60*3>
		TAG.PEERLESSTIMER=<NEW>
		REF2=<NEW.UID>
		ELSE
		REF2=<TAG0.PEERLESSTIMER>
		ENDIF
	TAG0.PLAYERS ++
	TRY TAG.PLAYERS.<dTAG0.PLAYERS>=<SRC>
	SRC.GO <TAG0.PEERLESS.ROOM>
		IF (<SRC.ISINPARTY>)
			FOR 0 <EVAL (<SRC.PARTY.MEMBERS>-1)>
			REF1=<SRC.PARTY.MEMBER.<dLOCAL._FOR>.UID>
				IF (<REF1.DISTANCE <UID>> <= 35) && (<REF1.UID> != <SRC.UID>)
				TRYSRC <REF1.UID> I.DIALOG D_PEERLESS_ENTER
				ENDIF
			ENDFOR
		ENDIF
	UPDATEX
		IF (!(<TAG0.PARTIES>))
		SERV.NEWNPC <TAG0.PEERLESS.BOSS>
		NEW.EVENTS +E_PEERLESS_BOSS
		NEW.TAG.SUMMONBAG=<UID>
		NEW.TAG.COUNTDOWN=<REF2.UID>
		NEW.REMOVETIMER=<EVAL 60*60*3>
		NEW.GO <TAG0.PEERLESS.BOSSROOM>
		ENDIF
	TAG0.PARTIES ++
	ENDIF
ENDIF

[EOF]