;Scene 15, 16, 17, 18, 51, 52, 53, 55, 56
;Token 998, 997

SCENE 56, cloudymountain2, scene, "Class Claim", 0, 0, 0
IF T1012 @claim
END
@claim
STRCMP #<str.soul>, "5160213A"
IF= @ult
END
@ult
N: Greetings Ult.
WAIT .3
N: Are you ready for your new class?
WAIT .3
N: Underwater basket weaver..
WAIT .3
ASK 9999
IF YES @ultup
END
@ultup
N: Not really a Underwater basket weaver but meh.
SET #<num.hostClass>, "10"
END

SCENE 55, dungeon05, scene, "Finish", 0, 0, 0
IF xp @lose
ADD tick, "1"
N: You earn a ticket.
GOTO LINK 0,1
END
@lose
N: Too slow.
GOTO LINK 0,1
END

SCENE 53, cloudymountain2, scene, "Blockage", 0, 0, 0
ACTOR 1, "Guard", Monster91, 1, 24, 82
IF T5 @pass
' You haven't been given permission to pass through here yet.
END
@pass
EJECT "T5"
GOTO LINK 3, 0
END


SCENE 52, town01, scene, "Bank", 0, 0, 0
#include banned.txt
ACTOR 1, "Banker", joshroyalty, 4, 24, 82
SEL 1
COMPARE #<bank>, "2"
IF= @cii
GOTO @new
@cii
IF T997 @perm
IF T998 @notwelcome
' Welcome to the bank of Felashor.
' If you need anything just right click me.
END
@new
' This is your first visit eh?
SET balance, "0"
SET curry, "0"
' In this bank you can deposit and withdraw money that we will keep safe.
SET bank, "2"
' If you ever need anything just right click on me.
GOTO @cii
END
@eventActorAttack1
' Brigand, your bank account is closed.
HOST_GIVE T998
' Guards....
FIGHT2 503, 503, 503
' I hope you had no funds in your bank.
' We will be taking them.
END
@notwelcome
' Your not welcome here.
' You need someone to appeal for you.
WAIT 1
GOTO EXIT
END
@eventactorclick1
MENU "Balance=@ba", "Desposit=@de", "Withdraw=@wi", "Appeal my friend=@ap"
END
@ba
COMPARE #<balance>, #<curry>
IF= @cll
GOTO @cheat
@cll
' Your current balance is #<balance> GP.
END
@de
COMPARE #<balance>, #<curry>
IF= @ckk
GOTO @cheat
@ckk
' You currently have #<balance> GP.
' How much do you wish to deposit?
' Don't use commas.
ASK 9999
COMPARE #<lastask>, "0"
IF< @pos
COMPARE #<num.hostGP>, #<lastask>
IF< @inde
HOST_TAKE G#<lastask>
ADD balance, #<lastask>
SET curry, #<balance>
' You deposited #<lastask> successfully.
END
@inde
' You don't have that much GP.
END
@wi
COMPARE #<balance>, #<curry>
IF= @cpp
GOTO @cheat
@cpp
' You currently have #<balance> GP.
' How much do you wish to withdraw?
' Don't use commas.
ASK 9999
COMPARE #<lastask>, "0"
IF< @pos
COMPARE #<balance>, #<lastask>
IF< @inwi
SUB balance, #<lastask>
HOST_GIVE G#<lastask>
SET curry, #<balance>
' You withdrew #<lastask> successfully.
END
@inwi
' You don't have that much in your account.
END
@ap
EJECT "T998"
COMPARE #<num.peopleInScene>, "1"
IF= @noone
' This process costs 2,000 gp.
' Are you sure?
ASK 9999
IF YES @ye
' I figured as much.
END
@ye
IF G2000 @go
' You can't appeal without the money.
END
@go
HOST_TAKE G2000
TAKE T998
' Approved.
END
@pos
' Please use a positive integer.
END
@cheat
' Something seems wrong here.
' I don't recall you entering this much money.
' I'm going to need to ask you to leave.
HOST_GIVE T998
HOST_GIVE T997
END
@perm
' You are not welcome to this bank, or any other for that matter.
' You hacked into your bank account and try to increase your funds.
' A good try but it will not work.
' You have 3 seconds to leave.
WAIT 1
FIGHT2 503, 503, 503, 503, 503, 503, 503, 503, 503, 503
GOTO EXIT
END
@noone
' I don't see anyone you are trying to appeal.
END

SCENE 15, cloudymountain2, scene, "Spring", 0, 0, 0
FX 2
N: The soothing spring relaxes your muscles
GIVE L1
SET hpinc, "#<num.hostmaxhp>"
SET mpinc, "#<num.hostmaxmp>"
DIV hpinc, "15"
DIV mpinc, "20"

@healing
GIVE H#<hpinc>
GIVE M#<mpinc>
WAIT .5
COMPARE #<num.hosthp>, #<num.hostmaxhp>
IF< @healing
COMPARE #<num.hostmp>, #<num.hostmaxmp>
IF< @healing
N: The effect seems to wear off..
FX 0
END

SCENE 16, cloudymountain2, scene, "Cave", 0, 0, 0
ACTOR	1,	"Guard", monster91, 1, 25, 90
IF -V20 @end
TAKE T999
TAKE T998
SEL 1
' Choose your traveling method, take note players under level 20 cannot enter.
WAIT 1
MENU "Walk mode (For training)=@walk", "Race mode (small reward)=@race", "Battle mode (larger rewards)=@battle", "Complete mode (largest rewards)=@comp"
@end
END
@eventactorgive1
IF T999 @end
IF Z20 @secret
END
@secret
' Wtf is this for? I only want Crystal Shards.
' Wanna give me one?
ASK 9999
IF YES @scye
' Bite me then.
END
@scye
' How did you found out my secret anyway?
' Meh it doesn't matter.
TAKE Z20
' Here is a pair of %I5110.
GIVE I5110
GIVE T999
END

@walk
PARTY "V20"
GOTO LINK 4, 0
END
@race
PARTY "V20"
COUNTDOWN 210
GIVE T998
GOTO LINK 4, 0
END
@battle
PARTY "V20"
GIVE T999
GOTO LINK 4, 0
END
@comp
PARTY "-V20"
GIVE T999
GIVE T998
COUNTDOWN 420
GOTO LINK 4, 0
END

SCENE 17, dungeon05, scene, "Exit", 0, 0, 0
TAKE T999
TAKE T998
COUNTDOWN 0
GOTO LINK 0, 8
END

SCENE 18, dungeon05, scene, "Boss", 0, 0, 0
IF T999+T998 @comp
IF T999 @battle
IF T998 @race
END
;Complete mode--------------------------------------------------
@comp
IF XP @kick
FIGHT 600, 600, 600, 601, 601, 601
IF WON @cw
GOTO @kick
END
@cw
IF XP @kick
SET random, "%r6"
GOTO @cr#<random>
END
;Complete Rewards----------------------------------------------
@cr1
N: You found a %I5105
GIVE I5105
GOTO @kick
END
@cr2
N: You found a %I5104
GIVE I5104
GOTO @kick
END
@cr3
N: You found a %I5106
GIVE I5106
GOTO @kick
END
@cr4
N: You found a %I5107
GIVE I5107
GOTO @kick
END
@cr5
N: You found a %I5108
GIVE I5108
GOTO @kick
END
@cr6
N: You found a %I5109
GIVE I5109
GOTO @kick
END
;Battle mode-----------------------------------------------------
@battle
FIGHT 600, 600, 601, 601
IF WON @bw
GOTO @kick
END
SET random, "%r2"
GOTO @br#<random>
;battle rewards--------------------------------------------------
@br1
N: You found a %i5103
GIVE I5103
GOTO @kick
END
@br2
N: You found a %I5102
GIVE I5102
GOTO @kick
END
Race---------------------------------------------------------
@race
IF XP @kick
SET random, "%r2"
GOTO @rr#<random>
GOTO @race
END
@rr1
N: You found a %i5100
GIVE I5100
GOTO @kick
END
@rr2
N: You found a %I5101
GIVE I5101
GOTO @kick
END
@kick
Countdown 0
TAKE T999

TAKE T998
GOTO LINK 0, 8
END

SCENE 51, black, cut, "Sleeping...", 0, 0, 0
N: You rest your eyes..
SET hpinc, #<num.hostmaxhp>
SET mpinc, #<num.hostmaxmp>
DIV hpinc, "100"
DIV mpinc, "150"
SET hmax, #<num.hostmaxhp>
SET mmax, #<num.hostmaxmp>
DIV hmax, "2"
DIV mmax, "2"
@healing1
GIVE H#<hpinc>
@healing
GIVE M#<mpinc>
WAIT .5
COMPARE #<num.hosthp>, #<hmax>
IF< @healing1
COMPARE #<num.hostmp>, #<mmax>
IF< @healing
N: You are fully rested...
END


;a blank line