SCENE 207 fight, SCENE, "Goldsmith"
ACTOR 1, "Goldsmith", ronie, 1,20,80
GIVE L9999
GIVE M9999
LOCK 1
COMPARE #<num.peopleInScene>, "1"
IF>,@mob
IF #0, @robcheck
@reallynormal
COMPARE #<loan>, "1"
IF=, @onlywithdraw
COMPARE #<totalmoney>, "499999"
IF>, @special2
@normal2
COMPARE #<totalmoney>, "249999"
IF>, @special
@normal3
1: Ahh, welcome! I am the goldsmith!
COMPARE #<goldsmithtaught>, 1
IF= @normal
1: While the bank may be gone, I'm even better!
1: Here, you can exchange gold that you find for bills.
1: These bills can be kept in your inventory, traded, and sold.
1: If you sell a bill, you will get just as much money back as you paid when you got the bill to begin with.
1: If you trade a bill, be sure that you get the item you were promised!
1: Like always, if you get ripped off, contact either Gandalf or Simmen and we will be sure to stop this person.
1: All of your bank funds have been transferred to me, so if you need money, just ask.
SET goldsmithtaught, 1
@normal
1: What would you like to do?
WAIT 0.5
@normalmenu
MENU "Buy Bills=@buy","Withdraw Money From Bank=@withdraw","Sell Bills=@sell"
WAIT 1
GOTO @normalmenu

@buy
N: Buy what kind of bill?
WAIT 1
@buymenu
MENU "100 Gold Bill=@buy100","500 Gold Bill=@buy500","1,000 Gold Bill=@buy1000","5,000 Gold Bill=@buy5000","10,000 Gold Bill=@buy10000","50,000 Gold Bill=@buy50000","100,000 Gold Bill=@buy100000","500,000 Gold Bill=@buy500000","Back=@normal"
WAIT 1
GOTO @buymenu

@buy100
COMPARE #<host.GP>, 100
IF< @cantafford
ADD totalmoney, 100
TAKE G100
GIVE I20
N: 100 gold bill bought.
GOTO @normal

@buy500
COMPARE #<host.GP>, 500
IF< @cantafford
ADD totalmoney, 500
TAKE G500
GIVE I25
N: 500 gold bill bought.
GOTO @normal

@buy1000
COMPARE #<host.gp>, 1000
IF< @cantafford
ADD totalmoney, 1000
TAKE G1000
GIVE I21
N: 1,000 gold bill bought.
GOTO @normal

@buy5000
COMPARE #<host.GP>, 5000
IF< @cantafford
ADD totalmoney, 5000
TAKE G5000
GIVE I26
N: 5000 gold bill bought.
GOTO @normal

@buy10000
COMPARE #<host.gp>, 10000
IF< @cantafford
ADD totalmonet, 10000
TAKE G10000
GIVE I22
N: 10,000 gold bill bought.
GOTO @normal

@buy50000
COMPARE #<host.GP>, 50000
IF< @cantafford
ADD totalmoney, 50000
TAKE G50000
GIVE I27
N: 50000 gold bill bought.
GOTO @normal

@buy100000
COMPARE #<host.gp>, 100000
IF< @cantafford
ADD totalmoney, 100000
TAKE G100000
GIVE I23
N: 100,000 gold bill bought.
GOTO @normal

@buy500000
COMPARE #<host.gp>, 500000
IF< @cantafford
TAKE G500000
GIVE I24
N: 500,000 gold bill bought.
GOTO @normal

@cantafford
1: Hey! You don't have enough money to buy that!
GOTO @normal

@sell
1: Alright. Sell whatever you would like to here. When you're done, right click me.
OFFER -1
END

@eventactorclick1
GOTO @normal
END

@withdraw
1: How much money would you like to withdraw?
WAIT 1
SET withdraw, "0"
@withdrawmenu
MENU "100 Gold=@withdraw1","1,000 Gold=@withdraw2","10 000 Gold=@withdraw3","50,000 Gold=@withdraw4","100,000 Gold=@withdraw5","500,000 Gold=@withdraw6","Back=@normal"
WAIT 1
GOTO @withdrawmenu
END

@withdrawcheck
COMPARE #<money>, #<withdraw>
COMPARE #<withdraw>, 1000000
IF> @nogo
IF< @continuew
IF= @continuew
1: You do not have that much money deposited.  Your current balance is #<money>.
GOTO @withdraw
END

@continuew
SET loanLevel, #<num.hostLevel>
MUL loanLevel, 10000
ADD loanLevel, 10000
SUB loanLevel, #<num.hostGP>
COMPARE #<withdraw>, #<loanLevel>
IF>, @cantholdit
1: Withdrawing #<withdraw> gold..
GIVE G#<withdraw>
SUB money, #<withdraw>
1: Thank you for using our bank!
GOTO @normal
END 

@cantholdit
1: Looks like you can't hold that much gold.
1: Please choose a number up to #<loanLevel> gold.
GOTO @withdraw
END

@withdraw1
SET withdraw, 100
GOTO @withdrawcheck

@withdraw2
SET withdraw, 1000
GOTO @withdrawcheck

@withdraw3
SET withdraw, 10000
GOTO @withdrawcheck

@withdraw4
SET withdraw, 50000
GOTO @withdrawcheck

@withdraw5
SET withdraw, 100000
GOTO @withdrawcheck

@withdraw6
SET withdraw, 500000
GOTO @withdrawcheck

@special
IF T1059, @normal3
1: Wow, you've already bought #<totalmoney> gold in bills!
1: That's a lot of money! Here, have a stick!
1: Hope you like it!
GIVE I454
GIVE T1059
GOTO @normal3
END

@special2
IF T720, @normal2
1: Hey, you've already bought #<totalmoney> gold in bills!
1: For being such a good customer, here's a brand new TV!
H: Alright! No more squinting for me!
1: I'll deliver it to your house!
GIVE T720
GOTO @normal2
END

@robcheck
COMPARE #<didhearrob>, 0
IF= @reallynormal
IF XP, @robexp
ACTOR 2, "Robber", robber, 1,50,90
ACTOR 3, "Robber", robber, 4,40,70
2: Yeah, thanks for the money!
3: We really appreciate it!
1: Wait! Wait! Don't leave!
2: Yeah, so long suckers!
3: See ya!
H: Hold it right there!
2: *gasp* It is %1!
3: %1? Who is that?!
H: Put down that lot -o- money!
3: Never! You'll have to fight us for it!
2: Hey, hey, you don't know who that guy is...
H: Very well then! Prepare to die!
WAIT 1
MOVE 2,-100,-100,1
MOVE 3,-100,-100,1
FIGHT 511,511
IF WIN, @robwin
MOVE 2,50,90,1
MOVE 3,40,70,1
SET robbed1, #<money>
DIV robbed1, 5
SUB money, #<robbed1>
SET didhearrob, 0
3: Ehehe, we showed you!
2: Yea, and we'll be takin' this money here with us!
2: So long!
BKGND black.jpg
WAIT 0.5
MOVE 2,-100,-100,1
MOVE 3,-100,-100,1
WAIT 0.5
BKGND fight.jpg
1: Oh no! They took one fifth of the money in the bank!
1: That means you've lost #<robbed1> gold!
1: Well, thanks for trying for trying to stop the robbers.
1: I suppose it is back to business, just with less gold!
1: Hahahahaha...
END

@robwin
MOVE 2,50,90,1
MOVE 3,40,70,1
SEL 2
POSE 3
SEL 3
POSE 3
3: Ugg...
2: Agg...
2: I tried to warn you...
3: ...
2: ...
1: Thank you, %1!
1: The robbers were carrying away a TON of money!
SET robbed2, #<money>
DIV robbed2, 2
ADD money, #<robbed2>
SET didhearrob, 0
1: For your heroism, we are adding #<robbed2> gold to your account!
1: Also, I'm going to add a channel to your TV!
H: Wonderful!
1: No problem! It'll be ready by the time you get home!
GIVE T721
END

@robexp
SET robbed1, #<money>
DIV robbed1, 5
SUB money, #<robbed1>
SET didhearrob, 0
1: Hey! We've just been robbed!
1: They stole #<robbed1> gold from your account!
1: I sure hope this never happens again...
END

@mob
1: I'm sorry, but I can only help one person at a time.
1: Come back soon!
END