;;;QQ:67762207
[@main]
#IF
checkhum E006
#ACT
mov D1 %P9
#ELSEACT
mov D1 0

#IF
#ACT
loadvalue D0 "PlayerParam\PK赛记录.ini" [状态] [状态]

#IF
EQUAL D0 0
#ACT
mov A0 " PK Arena is empty."

#IF
EQUAL D0 1
#ACT
mov A0 " PK Arena has a player but has not made any challenges."

#IF
EQUAL D0 2
#ACT
mov A0 " Challenge has been made, waiting for reply."

#IF
EQUAL D0 3
#ACT
mov A0 " The two players are about to fight."

#IF
EQUAL D0 4
#ACT
mov A0 " The two players are currently fighting."

#IF
EQUAL D0 5
#ACT
mov A0 " Fight has ended, Arena will now close."


#IF
#SAY
_____________{FCOLOR/1}[{FCOLOR/12} {FCOLOR/14}PK Arena{FCOLOR/12} {FCOLOR/1}]{FCOLOR/12} \\
{FCOLOR/2}Welcome to the PKArena Feature.\
{FCOLOR/2}Minimum bet value {FCOLOR/10}10 Gamepoint{FCOLOR/12}{FCOLOR/2} both must pay.\\

{FCOLOR/1}Arena currently has <$OUTPUT(D1)> players{FCOLOR/12}\
{FCOLOR/2}Arena Status:{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
<[Arena Information]/@info>\\
<[Enter PK Arena]/@EnterPKPlace> \
<[Watch The Fight]/@EnterPK>\\

#IF
Isadmin
#SAY
<[Initialize]/@初始化PK>

[@info]
#SAY
_____________{FCOLOR/1}[{FCOLOR/12} {FCOLOR/14}PK Arena{FCOLOR/12} {FCOLOR/1}]{FCOLOR/12} \\
{FCOLOR/2}Arena Information:\\
Players must wait 2 minutes before fight starts.\
Use ArenaJudge enter betting amount, player name.\
Challenge will work if players have correct points.\
Can make challenges 5 minutes after last match.\
If you die, other player will be announced winner,\
After 10 Minutes will still take 10% Gamepoints.\
Players will recieve the remaining Gamepints back.\\

Watching the fight does not grant any Gamepoints.\
If watching the fight cannot attack or use spells.\\

[@初始化PK]
#ACT
actcmd delfile "envir\PlayerParam\PK赛记录.ini"
mapting E007 1 405 117
SetAreaAttr "E007,40,40,200" "SAFE"
sysmsg "Initialization Complete"

[@EnterPK]
#ACT
loadvalue D0 "PlayerParam\PK赛记录.ini" [状态] [状态]
#IF
ELARGE D0 1
#ACT
mapmove E007 22 34
#ELSESAY
对不起，尚没有人发起挑战，现在不能观战.\
<关闭/@exit>

[@EnterPKPlace]
#IF
#ACT
loadvalue D0 "PlayerParam\PK赛记录.ini" [状态] [状态]

#IF
EQUAL D0 0
#ELSESAY
Sorry, have people go into the stadium.
#ELSEACT
break

#IF
#ACT
SetAreaAttr "E007,40,40,200" "SAFE"
ChangeMapAttr "E007" "NoSpell"
Delaygoto [grobal] 300 @Entercheck
mapmove E007,40,40
savevalue "PlayerParam\PK赛记录.ini" [用户] [申请人] %USERNAME
savevalue "PlayerParam\PK赛记录.ini" [状态] [状态] 1
#ELSEACT
break
#ELSESAY
对不起，你的积分不足5积分.\




[@Entercheck]
#IF
#ACT
loadvalue D0 "PlayerParam\PK赛记录.ini" [状态] [状态]

#IF
SMALL D0 3
#ACT
actcmd delfile "envir\PlayerParam\PK赛记录.ini"
mapting E007 1 405 117
SetAreaAttr "E007,40,40,200" "SAFE"



;;;QQ:67762207