All pastes #986524 Raw Edit

Untitled

public text v1 · immutable
·published 2008-04-15 21:28 UTC
rendered paste body
//#################################################################################
//#                                                                               #
//# this script file contains the script for the cloth dyer. It first needs a     #
//# large amount of money to unlock (cooporative quest). Then it will exchange    #
//# Cotton Shirts, T-Neck Sweaters and V-Neck Sweaters for colored versions       #
//# of them.                                                                      #
//#                                                                               #
//#################################################################################


new_19-1.gat,59,47,0	script	Dyer	142, {

	if ($QUEST_clothdyer_collected > 500000000) goto L_paid;
	
	if (QUEST_clothdyer_state == 1) goto L_shortversion;
	
	mes "[Cloth Dyer]";
	mes "*snif* The world is so unfair!";
	next;
	
	menu "I know. Goodbye!", close, "What's wrong?", -;
	
	mes "I came to the mana world to open a cloth";
	mes "dying shop. But when I bought my machine";
	mes "here it fell down and now it is broken.";
	next;
	
	menu "Can't it be repaired?", -;
	
	mes "Yes, it can, but the replacement parts are";
	mes "very expensive.";
	mes "They cost 500 million GP!";
	mes "I only got " + $QUEST_clothdyer_collected + "gp yet.";
	set QUEST_clothdyer_state, 1;
	next;
	goto L_donate;
	
	L_shortversion:
	mes "Please help me to collect the money to";
	mes "repair my dyeing machine.";
	mes "I need 500000000gp";
	mes "I already got " + $QUEST_clothdyer_collected + "gp";
	next;
	
	L_donate:
	menu
		"Sorry, I am poor myself.", -,
		"Here are 1.000gp", L_donate_1k,
		"Here are 5.000gp", L_donate_5k,
		"Here are 10.000gp", L_donate_10k,
		"Here are 50.000gp", L_donate_50k,
		"Here are 100.000gp", L_donate_100k,
		"Here are 500.000gp", L_donate_500k,
		"Here are 1.000.000gp", L_donate_1m,
		"Here are 5.000.000gp", L_donate_5m,
		"Here are 10.000.000gp", L_donate_10m,
		"Here are 50.000.000gp", L_donate_50m;
	
	mes "What a pity. But I heard that there are some";
	mes "incredable rich people in this world who have";
	mes "more money than they could ever spend.";
	mes "Maybe you could persuade them to give me";
	mes "some money.";
	close;
	
	L_donate_1k:
		if (zeny < 1000) goto L_nomoney;
		set zeny, zeny - 1000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 1000;
		goto L_thanks;
	L_donate_5k:
		if (zeny < 5000) goto L_nomoney;
		set zeny, zeny - 5000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 5000;
		goto L_thanks;
	L_donate_10k:
		if (zeny < 10000) goto L_nomoney;
		set zeny, zeny - 10000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 10000;
		goto L_thanks;
	L_donate_50k:
		if (zeny < 50000) goto L_nomoney;
		set zeny, zeny - 50000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 50000;
		goto L_thanks;
	L_donate_100k:
		if (zeny < 100000) goto L_nomoney;
		set zeny, zeny - 100000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 100000;
		goto L_thanks;
	L_donate_500k:
		if (zeny < 500000) goto L_nomoney;
		set zeny, zeny - 500000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 500000;
		goto L_thanks;
	L_donate_1m:
		if (zeny < 1000000) goto L_nomoney;
		set zeny, zeny - 1000000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 1000000;
		goto L_thanks;
	L_donate_5m:
		if (zeny < 5000000) goto L_nomoney;
		set zeny, zeny - 5000000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 5000000;
		goto L_thanks;
	L_donate_10m:
		if (zeny < 10000000) goto L_nomoney;
		set zeny, zeny - 10000000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 10000000;
		goto L_thanks;
	L_donate_50m:
		if (zeny < 50000000) goto L_nomoney;
		set zeny, zeny - 50000000;
		set $QUEST_clothdyer_collected, $QUEST_clothdyer_collected + 50000000;
		goto L_thanks;
	
	L_thanks:
		mes "Thank you for your generosity.";
		next;
		menu
			"I can give you even more", L_donate,
			"I do what I can", -;
		close;
	
	L_nomoney:
		mes "You don't have that much money.";
		next;
		goto L_donate;


	L_paid:
		mes "Thanks to the generous donations I received";
		mes "I could finally repair my dyeing machine.";
		mes "What item can I dye for you?";
		next;
		menu
			"Cotton Shirt", L_cottonshirt,
			"V-Neck Sweater", L_vneck,
			"Turtleneck Sweater", L_tneck,
			"nothing, thanks.", -;
		close;
	
	L_cottonshirt:
		if (countitem(1202) == 0) goto L_havenone;
		set @del, 1202;
		set @new, 2050;
		goto L_color;
	
	L_vneck:
		if (countitem(624) == 0) goto L_havenone;
		set @del, 624;
		set @new, 2060;
		goto L_color;
	
	L_tneck:
		if (countitem(564) == 0) goto L_havenone;
		set @del, 564;
		set @new, 2070;
		goto L_color;
	
	L_color:
		mes "What color do you want?";
		next;
		menu
			"Red", L_color0,
			"Green", L_color1,
			"Dark Blue", L_color2,
			"Yellow", L_color3,
			"Light Blue", L_color4,
			"Pink", L_color5,
			"Black", L_color6,
			"I've changed my mind.", -;
		close;
		
	L_color0:
		set @color, 0;
		goto L_finish;
	L_color1:
		set @color, 1;
		goto L_finish;
	L_color2:
		set @color, 2;
		goto L_finish;
	L_color3:
		set @color, 3;
		goto L_finish;
	L_color4:
		set @color, 4;
		goto L_finish;
	L_color5:
		set @color, 5;
		goto L_finish;
	L_color6:
		set @color, 6;
		goto L_finish;
		
	L_finish:
		delitem @del, 1;
		getitem @new + @color, 1;
		mes "Here is your colored item.";
		close;
	
	L_havenone:
		mes "Sorry, but I can't find any uncolored ones in your bag.";
		close;
		
}