You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
SigFiesta/ScenarioBookShelf/KQ/ConditionOfHero.ps

170 lines
4.2 KiB

open [main]
var InterruptBlock ""
InterruptArg ""
Players ""
Count ""
ResultList ""
PlayerHandle ""
Winner0 ""
Winner1 ""
Winner2 "".
;;;;;;;;;;;;;;;;;;;; printf InitFlag. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
battlestop PK.; freepk OFF. ; 새로운 명령어
printf "WaitPlayer".
waitlogin Players.
printf "Player : " % Players.
if Players == 0 ; 일정시간 지나도록 로긴 안함
then open
call "QuestFail".
close
pause Sec 7.
scriptfile "KQConditionOfHero".
chatwin "RouTownChiefRoumenus" "Intro0".
pause Sec 2.
chatwin "RouTownChiefRoumenus" "Intro1".
pause Sec 2.
chatwin "RouTownChiefRoumenus" "Intro2".
pause Sec 2.
chatwin "RouTownChiefRoumenus" "Intro3".
pause Sec 2.
chatwin "RouTownChiefRoumenus" "Intro4".
timelimit Min 3.
; 광석 리젠
Count = 0.
while Count < 20
open
regengroup "KDHero" "HERO" % InitFlag.
Count = Count + 1.
pause Sec 3.
close
interruptclear.
call "WaitTimeLimit".
chatwin "RouTownChiefRoumenus" "DualStart".
call "PKON". ; PK 시작
timelimit Min 7.
interruptclear.
interruptset Sec "" 99999 10 "PKON".
interruptset Sec "" 99999 30 "MineRegen".
; interruptset PlayerDead "" 1 "PlayerDead". ; 인터럽트 인덱스 추가 - 코딩필요(InterruptArg에는 죽은 플레이어의 핸들) 작동 안함 - 수정필요
call "WaitTimeLimit".
chatwin "RouTownChiefRoumenus" "DualStop".
battlestop PK.; freepk OFF.
; 등수체크
ResultList = @KQResultList("ConditionOfHero"). ; 점수순으로 소트해서 플레이어들에게 보낸 리스트에 저장
open [RewardBlock]
Count = 0.
infinite
open
PlayerHandle = @RemoveFirst("ResultList" " "). ; 리스트형태인 ResultList에서 " "로 분리된 첫째원소를 x에 넣고 ResultList에서는 지움.
if PlayerHandle === ""
then open
break "RewardBlock".
close
if Count < 3
then open
sendquestresult Suc PlayerHandle. ; 개인에게만 성공패킷 날림
invidualreward PlayerHandle "HERO_" % InitFlag % "_" % Count. ; 개인에게 따로 보상을 줌
#("Winner" % Count) = @CharName(PlayerHandle).
close
else open
sendquestresult Fail PlayerHandle. ; 개인에게만 실패패킷 날림
invidualreward PlayerHandle "HERO_" % InitFlag % "_3". ; 개인에게 따로 보상을 줌
close
Count = Count + 1.
close
close
chatwin "RouTownChiefRoumenus" "DualResult" Winner0 Winner1 Winner2.
broadcast all "KQReturn30".
pause sec 10.
broadcast all "KQReturn20".
pause sec 10.
broadcast all "KQReturn10".
pause sec 5.
broadcast all "KQReturn5".
pause sec 5.
linkto all "Eld" "Eld" 17214 13445.
endofkq.
close
open [MineRegen]
regengroup "KDHero" "HERO" % InitFlag.
close
open [PKON]
battlestart PK.;freepk ON. ; 새로운 명령어
close
open [WaitTimeLimit]
interruptset TimeOut "" 1 "LimitTimeOut".
interruptset PlayerEliminate "" 1 "QuestFail".
infinite
open
waitinterrupt InterruptBlock "InterruptArg".
call InterruptBlock.
close
close
open [LimitTimeOut]
break "WaitTimeLimit".
close
open [QuestFail] ; 모두 나간 상태(죽은 사람이 있을 수도 있으므로)
battlestop PK.; freepk OFF.
broadcast all "KQReturn30".
pause sec 10.
broadcast all "KQReturn20".
pause sec 10.
broadcast all "KQReturn10".
pause sec 5.
broadcast all "KQReturn5".
pause sec 5.
linkto all "Eld" "Eld" 17214 13445.
endofkq.
break "main".
close
;open [PlayerDead]
; sendquestresult Fail InterruptArg. ; 개인에게만 실패패킷 날림
;close