; QUEST 1160 - Win a summon spell!
;
; made by Silver
;
; In this quest I'll make a quest where you have to kill different monsters in 4 or 5 scenes within a time limit. If you succeed
; than you win a low level summon spell. You'll be able to this quest 8 times in total, starting from level 20 till level 100.
; quest for level 20-30, 30-40,40-50,50-60,60-70,70-80,80-90 and 90-100.
; the calculation for the monsters you'll have to fight goes like this: maximal level you can still do the quest (20-30, maximum level is 29)
; times 125%, this counts for level 20-39. (f.e. level 29 x 125% =36,25 you have to fight level 35 - 38 monsters). 
; From level 40-59 it goes maximal level times 130% 60-79 times 140% and 80-100 times 165%.
;
; This system will make the quests hard and challengeable. I'll find something to calculate the time later, I'll make it almost impossible
; to complete this quest, ppl will team up on line anyway probably, at least that's what I expect them to do. 
; I can already hear the newbs scream: MAMA! Silver is being a cruel pain in the ass!
; SOUND evillaugh.wav ;-p
;
; Aight, I'm half done with this quest already and I just had a new reboot cause of another freeze. Suddenly a great idea for the time limit hit me! =D
; Time limit will be based on this, 20 - 40 = 100% time, 40 - 60 = 120% time, 60 - 80 = 125% time, 80 - 100 = 135% time.
; If you don't understand this then that's okay, I'm the only one who needs to understand >) In fact...if you're name isn't Atsu, <edit>
;
; Final adjustments, I just noticed Atsu didn't make enough monsters =S Therefore I'll make the quest harder instead >) Ow I'm so cruel...
; The last fight will be a fight to remember... In fact... since this fight is for level 100's I'll make it almost impossible to do this time
; Yeah I know I said that before already, but now you need a team of level 100's to complete the quest =D
;
;
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;info for Atsu:
;
;SCENE 1160 (Home Point)
;
;REQUIRED TOKEN TO ENTER - none 
;
;PLACE - In the special map you made for it in the middle
;oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
;SCENE 1161 (Challenge 1)
;
;REQUIRED TOKEN TO ENTER - none 
;
;PLACE - In the special map you made for it North of Home Point
;oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
;SCENE 1162 (Challenge 2)
;
;REQUIRED TOKEN TO ENTER - 163 
;
;PLACE - In the special map you made for it South of Home Point
;oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
;SCENE 1163 (Challenge 3)
;
;REQUIRED TOKEN TO ENTER - 164 
;
;PLACE - In the special map you made for it West of Home Point
;oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
;SCENE 1164 (Challenge 4)
;
;REQUIRED TOKEN TO ENTER - 165 
;
;PLACE - In the special map you made for it East of Home Point
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; [added later]
; SCENE 1166 (Exit)
;
; REQUIRED TOKEN TO ENTER - none
;
; PLACE - Exit of map "The Challenges"
;
; Token 155 - You accept the first challenge.
; Token 156 - You accept the second challenge. 
; Token 157 - You accept the third challenge.
; Token 158 - You accept the fourth challenge.
; Token 159 - You accept the fifth challenge.
; Token 160 - You accept the sixth challenge.
; Token 161 - You accept the seventh challenge.
; Token 162 - You accept the eighth challenge.
; Token 163 - You beat the first challenge node.
; Token 164 - You beat the second challenge node.
; Token 165 - You beat the thirth challenge node.
; Token 166 - You beat the fourth challenge node.
;

SCENE 1160 	scenes054, SCENE, "Home Point", 2, 0
MUSIC	 	"axel_theme.mid"
ACTOR	1,	"Clemiro",	monster008, 4, 30, 85

	COMPARE #<num.timeHour>, "7"
	IF> @backgroundch

@returnchallnu
	LOCK 1
	EJECT -M0
	EJECT -M2
	EJECT -M4

	IF T447, @foxop
@foxop2
	
	IF V90, @levelh
	IF V80-V90, @levelg
	IF V70-V80, @levelf
	IF V60-V70, @levele
	IF V50-V60, @leveld
	IF V40-V50, @levelc
	IF V30-V40, @levelb
	IF V20-V30, @levela
	IF V1-V20, @level

	1: There is currently no challenge for you, please return later. 
	END
@foxop
	HOST_GIVE T448
	GOTO @foxop2
@backgroundch
	COMPARE #<num.timeHour>, "20"
	IF> @returnchallnu
	BKGND #<scene.bkgnd>1
	GOTO @returnchallnu
@level
	1: There is currently no challenge for you, 
	1: please come back when you reached at least level 20.
	END
@no
	1: Please return later.
	END
@noparty
	1: I'm sorry but parties are not allowed in this challenge.
	1: Perhaps later.
	END
;==============
; LEVEL 20 - 30
;==============

@levela
	IF T155, @backa
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	IF DEAD, @died
	1: You seem to be strong enough for the challenge.
	1: This challenge tests your strength, intelligence and other skills.
	1: Also you win a special summon spell if you finish the challenge.
	1: A small change that got added is a 5 second wait before to fight to block certain bug abusings.
	1: Don't worry though, you received 20 seconds extra to make it up, 
	1: Use the time well and prepare yourself.
	1: Are you ready for the challenge?
	ASK 30.0
	IF NO, @no
	IF YES,@accept0
@accept0
	1: I thought you would be.
	1: The challenge is simple, there are 4 scenes on this map with monsters.
	1: Kill all monsters within the time limit and you win the summon spell.
	GOTO, @accepta
@accepta
	1: Good luck.
	WAIT 1.0
	GIVE T155
	COUNTDOWN 420 	; 320 original - 60 sec compensation
	GOTO EXIT
	
@backa
	IF S35, @no
	IF XP, @tryagaina
	IF T163+T164+T165+T166,@wina
@tryagaina
	CALL @takeTokensAndResetCountdown
	1: You didn't succeed in beating the challenge.
	1: Do you wish to try again?
	ASK 30.0
	IF YES, @accepta
	IF NO, @no
	END
@wina
	CALL @takeTokensAndResetCountdown
	1: Congratulations!
	1: You beat the challenge in the time limit.
	1: Here is your summon spell!
	HOST_GIVE S35
	N: You have learned the spell %S35!
	WAIT 3.0
	1: There is another challenges available at level 30.
	END
;==============
; LEVEL 30 - 40
;==============
@levelb
	IF T156, @backb
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	IF DEAD, @died
	1: You seem to be strong enough for the challenge.
	1: Are you ready for the challenge?
	ASK 30.0
	IF NO, @no
	IF YES,@accept1
@accept1
	1: I thought you would be.
	1: The challenge is simple, there are 4 scenes on this map with monsters.
	1: Kill all monsters within the time limit and you win the summon spell.
	GOTO, @acceptb
@acceptb
	1: Good luck.
	WAIT 1.0
	GIVE T156
	COUNTDOWN 420 ; 320 original
	GOTO EXIT
	
@backb
	IF S65, @no
	IF XP, @tryagainb
	IF T163+T164+T165+T166,@winb
@tryagainb
	CALL @takeTokensAndResetCountdown
	1: You didn't succeed in beating the challenge.
	1: Do you wish to try again?
	ASK 30.0
	IF YES, @acceptb
	IF NO, @no
	END
@winb
	CALL @takeTokensAndResetCountdown
	1: Congratulations!
	1: You beat the challenge in the time limit.
	1: Here is your summon spell!
	HOST_GIVE S65
	N: You have learned the spell %S65!
	WAIT 3.0
	1: There are more challenges available at level 40.
	END
;==============
; LEVEL 40 - 50
;==============
@levelc
	IF T157, @backc
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	IF DEAD, @died
	1: You seem to be strong enough for the challenge.
	1: Are you ready for the challenge?
	ASK 30.0
	IF NO, @no
	IF YES,@accept2
@accept2
	1: I thought you would be.
	1: You know the drill.
	GOTO, @acceptc
@acceptc
	1: Good luck, you'll need it.
	WAIT 1.0
	GIVE T157
	COUNTDOWN 510	; 380 original
	GOTO EXIT
	
@backc
	IF S95, @no
	IF XP, @tryagainc
	IF T163+T164+T165+T166,@winc
@tryagainc
	CALL @takeTokensAndResetCountdown
	1: You didn't succeed in beating the challenge.
	1: Do you wish to try again?
	ASK 30.0
	IF YES, @acceptc
	IF NO, @no
	END
@winc
	CALL @takeTokensAndResetCountdown
	1: Congratulations!
	1: You beat the challenge in the time limit.
	1: Here is your summon spell!
	HOST_GIVE S95
	N: You have learned the spell %S95!
	WAIT 3.0
	1: There are more challenges available at level 50.
	END
;==============
; LEVEL 50 - 60
;==============
@leveld
	IF T158, @backd
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	IF DEAD, @died
	1: You seem to be strong enough for the challenge.
	1: Are you ready for the challenge?
	ASK 30.0
	IF NO, @no
	IF YES,@accept3
@accept3
	1: Let's begin, the fights will be harder than last time.
	GOTO, @acceptd
@acceptd
	1: Good luck.
	WAIT 1.0
	GIVE T158
	COUNTDOWN 510	; 380 original
	GOTO EXIT
	
@backd
	IF S115, @no
	IF XP, @tryagaind
	IF T163+T164+T165+T166,@wind
@tryagaind
	CALL @takeTokensAndResetCountdown
	1: You didn't succeed in beating the challenge.
	1: Do you wish to try again?
	ASK 30.0
	IF YES, @acceptd
	IF NO, @no
	END
@wind
	CALL @takeTokensAndResetCountdown
	1: Congratulations!
	1: You beat the challenge in the time limit.
	1: Here is your summon spell!
	HOST_GIVE S115
	N: You have learned the spell %S115!
	WAIT 3.0
	1: There are more challenges available at level 60.
	END
;==============
; LEVEL 60 - 70
;==============
@levele
	IF T159, @backe
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	IF DEAD, @died
	1: You seem to be strong enough for the challenge.
	1: Are you ready for the challenge?
	ASK 30.0
	IF NO, @no
	IF YES,@accept4
@accept4
	1: You will like this challenge.
	GOTO, @accepte
@accepte
	1: Good luck.
	WAIT 1.0
	HOST_GIVE T159
	COUNTDOWN 600	; 440 original
	GOTO EXIT
	
@backe
	IF S135, @no
	IF XP, @tryagaine
	IF T163+T164+T165+T166,@wine
@tryagaine
	CALL @takeTokensAndResetCountdown
	1: You didn't succeed in beating the challenge.
	1: Do you wish to try again?
	ASK 30.0
	IF YES, @accepte
	IF NO, @no
	END
@wine
	CALL @takeTokensAndResetCountdown
	1: Congratulations!
	1: You beat the challenge in the time limit.
	1: Here is your summon spell!
	HOST_GIVE S135
	N: You have learned the spell %S135!
	WAIT 3.0
	1: There are more challenges available at level 70.
	END
;==============
; LEVEL 70 - 80
;==============
@levelf
	IF T160, @backf
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	IF DEAD, @died
	1: You seem to be strong enough for the challenge.
	1: Are you ready for the challenge?
	ASK 30.0
	IF NO, @no
	IF YES,@accept5
@accept5
	1: Only the best warriors will survive the next challenge.
	GOTO, @acceptf
@acceptf
	1: Good luck.
	WAIT 1.0
	GIVE T160
	COUNTDOWN 600	; 440 original
	GOTO EXIT
	
@backf
	IF S155, @no
	IF XP, @tryagainf
	IF T163+T164+T165+T166,@winf
@tryagainf
	CALL @takeTokensAndResetCountdown
	1: You didn't succeed in beating the challenge.
	1: Do you wish to try again?
	ASK 30.0
	IF YES, @acceptf
	IF NO, @no
	END
@winf
	CALL @takeTokensAndResetCountdown
	1: Congratulations!
	1: You beat the challenge in the time limit.
	1: Here is your summon spell!
	HOST_GIVE S155
	N: You have learned the spell %S155!
	WAIT 3.0
	1: There are more challenges available at level 80.
	END
;==============
; LEVEL 80 - 90
;==============
@levelg
	IF T161, @backg

	IF DEAD, @died
	1: You seem to be strong enough for the challenge.
	1: Also party members are allowed this time.
	1: Are you ready for the challenge?
	ASK 30.0
	IF NO, @no
	IF YES,@accept6
@accept6
	1: You'll probably die this time...
	GOTO, @acceptg
@acceptg
	1: Good luck.
	WAIT 1.0
	HOST_GIVE T161
	COUNTDOWN 650	; 450 original - no more compensating
	GOTO EXIT
	
@backg
	IF S175, @no
	IF XP, @tryagaing
	IF T163+T164+T165+T166,@wing
@tryagaing
	CALL @takeTokensAndResetCountdown
	1: You didn't succeed in beating the challenge.
	1: Do you wish to try again?
	ASK 30.0
	IF YES, @acceptg
	IF NO, @no
	END
@wing
	LOCK 1
	EJECT T166
	CALL @takeTokensAndResetCountdown
	1: Congratulations!
	1: You beat the challenge in the time limit.
	1: Here is your summon spell!
	HOST_GIVE S175
	N: You have learned the spell %S175!
	WAIT 3.0
	1: There is one last challenge available at level 90.
	END
;==============
; LEVEL 90 - 100
;==============
@levelh
	IF T162, @backh

	IF DEAD, @died
	1: You seem to be strong enough for the challenge.
	1: It is recommended that you team up with others.
	1: Are you ready for the final challenge?
	ASK 30.0
	IF NO, @no
	IF YES,@accept7
@accept7
	1: Only the best of the best survive this challenge.
	GOTO, @accepth
@accepth
	1: Good luck.
	WAIT 1.0
	HOST_GIVE T162
	COUNTDOWN 720	; 480 original
	GOTO EXIT
	
@backh
	IF S197, @finalno
	IF XP, @tryagainh
	IF T163+T164+T165+T166,@winh
@tryagainh
	CALL @takeTokensAndResetCountdown
	1: You didn't succeed in beating the challenge.
	1: Do you wish to try again?
	ASK 30.0
	IF YES, @accepth
	IF NO, @no
	END
@winh
	LOCK 1
	EJECT T166
	CALL @takeTokensAndResetCountdown
	1: Congratulations!
	1: You beat the challenge in the time limit.
	1: Here is your summon spell!
	HOST_GIVE S197
	N: You have learned the spell %S197!
	WAIT 3.0
	1: There are no more challenges, you have beaten them all!
	END
@finalno
	1: There are no more challenges available now for you.
	1: I wish you good luck on your future quests.
	1: Go now mighty warrior.
	WAIT 3.0
	GOTO EXIT	

@takeTokensAndResetCountdown
	LOCK 1
	EJECT T172
	HOST_TAKE T163
	HOST_TAKE T164
	HOST_TAKE T165
	HOST_TAKE T166
	COUNTDOWN 0
	RETURN

@died
	1: Ahem, it will be hard for you to fight in your current state.
	1: You should seek a resurrection before attempting to do this challenge.
	END

; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;
; LET THE CHALLENGES BEGIN! (In other words, here come the fight scenes! ^_^) I love this quest already =D
;
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

SCENE 1161 	newscenes002, SCENE, "Challenge 1", 1, 0

	LOCK 1
	EJECT -M0
	EJECT -M2
	EJECT -M4
	MUSIC "axel_theme.mid"
	IF T163, @won	

	IF T162, @fighth
	IF T161, @fightg
	IF T160, @fightf
	IF T159, @fighte
	IF T158, @fightd
	IF T157, @fightc
	IF T156, @fightb
	IF T155, @fighta

@nochallenge
	N: There is currently no challenge here for you.
	END
@won
	GIVE T163
	N: You beat the first challenge, hurry up to the next one!
	IF -V80, @doublepartycheck
	END
	
@doublepartycheck
	COMPARE #<num.peopleInScene>, "1"
	IF> @bancheaternow
	WAIT 2.0
	END
	
@bancheaternow
	HOST_GIVE T172
	EJECT T172
	GOTO LINK 99,0,1
; 98 = cheated with party at the challenges.

@lost
	N: You lost the challenge, try again later.
	COUNTDOWN 0
	GOTO LINK 28, 1, 0
	
@noparty
	N: I'm sorry but party members aren't allowed.
	N: You need to beat this challenge on your own.
	END
;==============
; LEVEL 20 - 30
;==============
@fighta
	WAIT 5.0
	EJECT T172	
	IF S35, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	18, 18, 18
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 30 - 40
;==============
@fightb
	WAIT 5.0
	EJECT T172	
	IF S65, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	69, 69, 69
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 40 - 50
;==============
@fightc
	WAIT 5.0
	EJECT T172	
	IF S95, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	111, 111, 111
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 50 - 60
;==============
@fightd
	WAIT 5.0
	EJECT T172	
	IF S115, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	127, 127, 127
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 60 - 70
;==============
@fighte
	WAIT 5.0
	EJECT T172	
	IF S135, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	153, 153, 153
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 70 - 80
;==============
@fightf
	WAIT 5.0
	EJECT T172	
	IF S155, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	209, 209, 209
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 80 - 90
;==============
@fightg
	IF S175, @nochallenge

	FIGHT2	212, 212, 212
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 90 - 100
;==============
@fighth
	IF S197, @nochallenge

	FIGHT2	241,600,600,600,600
	IF WIN, @won
	IF LOSE, @lost
	END
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;
;REQUIRED TOKEN TO ENTER SCENE IS T163
;
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

SCENE 1162 	newscenes003, SCENE, "Challenge 2", 1, 0

	LOCK 1
	EJECT -M0
	EJECT -M2
	EJECT -M4
	MUSIC	 	"axel_theme.mid"
	IF T164, @won

	IF T162, @fighth
	IF T161, @fightg	
	IF T160, @fightf
	IF T159, @fighte
	IF T158, @fightd
	IF T157, @fightc
	IF T156, @fightb
	IF T155, @fighta

@nochallenge
	N: There is currently no challenge here for you.
	END
@won
	GIVE T164
	N: You beat the second challenge, hurry up to the next one!
	IF -V80, @doublepartycheck
	END
	
@doublepartycheck
	COMPARE #<num.peopleInScene>, "1"
	IF> @bancheaternow
	WAIT 2.0
	END
	
@bancheaternow
	HOST_GIVE T172
	EJECT T172
	GOTO LINK 99,0,1
; 98 = cheated with party at the challenges.

@lost
	N: You lost the challenge, try again later.
	COUNTDOWN 0
	GOTO LINK 28, 1, 0

@noparty
	N: I'm sorry but party members aren't allowed.
	N: You need to beat this challenge on your own.
	END
;==============
; LEVEL 20 - 30
;==============
@fighta
	WAIT 5.0
	EJECT T172	
	IF S35, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	65,65,65
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 30 - 40
;==============
@fightb
	WAIT 5.0
	EJECT T172	
	IF S65, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	70, 70, 70
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 40 - 50
;==============
@fightc
	WAIT 5.0
	EJECT T172	
	IF S95, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	112,112,112
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 50 - 60
;==============
@fightd
	WAIT 5.0
	EJECT T172	
	IF S115, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	128, 128, 128
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 60 - 70
;==============
@fighte
	WAIT 5.0
	EJECT T172	
	IF S135, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	154, 154, 154
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 70 - 80
;==============
@fightf
	WAIT 5.0
	EJECT T172	
	IF S155, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	32, 32, 32
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 80 - 90
;==============
@fightg
	IF S175, @nochallenge

	FIGHT2	212, 212, 212, 212
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 90 - 100
;==============
@fighth
	IF S197, @nochallenge

	FIGHT2	242, 243, 601
	IF WIN, @won
	IF LOSE, @lost
	END
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;
;REQUIRED TOKEN TO ENTER SCENE IS T164
;
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

SCENE 1163 	newscenes002, SCENE, "Challenge 3", 1, 0

	LOCK 1
	EJECT -M0
	EJECT -M2
	EJECT -M4
	MUSIC	 	"axel_theme.mid"
	IF T165, @won	

	IF T162, @fighth
	IF T161, @fightg
	IF T160, @fightf
	IF T159, @fighte
	IF T158, @fightd
	IF T157, @fightc
	IF T156, @fightb
	IF T155, @fighta

@nochallenge
	N: There is currently no challenge here for you.
	END
@won
	GIVE T165
	N: You beat the third challenge, hurry up to the last one!
	IF -V80, @doublepartycheck
	END
	
@doublepartycheck
	COMPARE #<num.peopleInScene>, "1"
	IF> @bancheaternow
	WAIT 2.0
	END
	
@bancheaternow
	HOST_GIVE T172
	EJECT T172
	GOTO LINK 99,0,1
; 98 = cheated with party at the challenges.

@lost
	N: You lost the challenge, try again later.
	COUNTDOWN 0
	GOTO LINK 28, 1, 0

@noparty
	N: I'm sorry but party members aren't allowed.
	N: You need to beat this challenge on your own.
	END
;==============
; LEVEL 20 - 30
;==============
@fighta
	WAIT 5.0
	EJECT T172	
	IF S35, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	20,20,20
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 30 - 40
;==============
@fightb
	WAIT 5.0
	EJECT T172	
	IF S65, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	100,100,100
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 40 - 50
;==============
@fightc
	WAIT 5.0
	EJECT T172	
	IF S95, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	114,114,114
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 50 - 60
;==============
@fightd
	WAIT 5.0
	EJECT T172	
	IF S115, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	130, 130, 130
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 60 - 70
;==============
@fighte
	WAIT 5.0
	EJECT T172	
	IF S135, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	155, 155, 155
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 70 - 80
;==============
@fightf
	WAIT 5.0
	EJECT T172	
	IF S155, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	33, 33, 33
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 80 - 90
;==============
@fightg
	IF S175, @nochallenge

	FIGHT2	39, 39, 39, 39, 39
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 90 - 100
;==============
@fighth
	IF S197, @nochallenge

	FIGHT2	610,606,612,616
	IF WIN, @won
	IF LOSE, @lost
	END
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;
;REQUIRED TOKEN TO ENTER SCENE IS T165
;
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

SCENE 1164 	newscenes003, SCENE, "Challenge 4", 1, 0

	LOCK 1
	EJECT -M0
	EJECT -M2
	EJECT -M4
	MUSIC	 	"axel_theme.mid"
	IF T166, @won

	IF T162, @fighth
	IF T161, @fightg	
	IF T160, @fightf
	IF T159, @fighte
	IF T158, @fightd
	IF T157, @fightc
	IF T156, @fightb
	IF T155, @fighta

@nochallenge
	N: There is currently no challenge here for you.
	END
@won
	GIVE T166
	N: You beat the last challenge, hurry up to the Home Point!
	IF -V80, @doublepartycheck
	WAIT 2.0
	GOTO EXIT
@doublepartycheck
	COMPARE #<num.peopleInScene>, "1"
	IF> @bancheaternow
	WAIT 2.0
	GOTO EXIT
	
@bancheaternow
	HOST_GIVE T172
	EJECT T172
	GOTO LINK 99,0,1

@lost
	N: You lost the challenge, try again later.
	COUNTDOWN 0
	GOTO LINK 28, 1, 0

@noparty
	N: I'm sorry but party members aren't allowed.
	N: You need to beat this challenge on your own.
	END
;==============
; LEVEL 20 - 30
;==============
@fighta
	WAIT 5.0
	EJECT T172	
	IF S35, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	21, 21, 21
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 30 - 40
;==============
@fightb
	WAIT 5.0
	EJECT T172	
	IF S65, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	101,101,101
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 40 - 50
;==============
@fightc
	WAIT 5.0
	EJECT T172	
	IF S95, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	115,115,115
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 50 - 60
;==============
@fightd
	WAIT 5.0
	EJECT T172	
	IF S115, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	132, 132, 132
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 60 - 70
;==============
@fighte
	WAIT 5.0
	EJECT T172	
	IF S135, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	157, 157, 157
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 70 - 80
;==============
@fightf
	WAIT 5.0
	EJECT T172	
	IF S155, @nochallenge
	COMPARE #<num.peopleInScene>, "1"
	IF> @noparty

	FIGHT2	34, 34, 34
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 80 - 90
;==============
@fightg
	IF S175, @nochallenge

	FIGHT2	41,41,41,41,41
	IF WIN, @won
	IF LOSE, @lost
;==============
; LEVEL 90 - 100
;==============
@fighth
	IF S197, @nochallenge

	FIGHT2	602,619,609 ,606,603
	IF WIN, @won
	IF LOSE, @lost
	END

; 

SCENE 1166 bkroon, SCENE, "Exit", 0,0
ACTOR 1, "Chin Toi", a70, 4, 43, 70
ACTOR 2, "", mirrorx, 1, 24, 69

#include banscripts.txt

	1: Click on the mirror behind me to return to Kagoshima, click on me if you have a question.
	END

@eventActorAttack1
@eventActorClick1
@eventActorGive1	
@eventActorSpell1	
	MENU "What are the Challenges?=@challengeInfo", "How do I turn the warning message off?=@turnOff", "Cancel=@cancel"
@cancel
	END

@challengeInfo
	1: The Challenges are optional challenges to test your combat prowess. 
	1: You can earn a level 5 summon spell as a reward for each challenge that you complete.
	1: These summon spells can be incredibly useful in tough fights since they summon a strong monster to aid you.
	END

@turnOff
	1: The messages serve as a reminder so that you don't forget about the Challenge, however, it's possible to enable/ disable them.
	IF T5, @turnBackOn	
	1: Would you like to turn the warning off? (Yes/No)
	ASK 300
	IF -YES, @keepTurnedOn
	HOST_GIVE T5
	1: Very well, the warning is turned off now.
	END

@turnBackOn
	1: Would you like to turn the warnings on again? (Yes/No)
	ASK 300
	IF -YES, @keepTurnedOff
	HOST_TAKE T5
	1: The warning is turned on again.
	END
	
@keepTurnedOn
	1: Alright, the warning will remain on.
	END
	
@keepTurnedOff
	1: Very well, the warning will remain turned off.
	END	

@eventActorAttack2
@eventActorClick2
@eventActorGive2	
@eventActorSpell2
	SOUND glass
	SEL 2
	POSE 2
	WAIT 0.2	
	GOTO LINK 0,19,0



; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Comment: this quest is gonna be so cool...I'll be the most hated man in wos since the quest is almost impossible to do =P
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

; Comment 2: The difference between being a genius and a madman is just a slight border, I think I'm on that border, meaning I'm a smart idiot, or an idiotic genius =P
