summaryrefslogtreecommitdiff
path: root/npc/024-7/afking.txt
blob: f3d59c8cc31ad78e9d4c00900e74e2ff80800e5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// TMW2 scripts.
// Author:
//    TMW-BR
//    Jesusalva
// Description:
//    AFK Cap quest (Lv 47)

024-7,40,24,0	script	AF King	NPC_PLAYER,{
	function AFPrologue;
	function AFGrinding;
	function AFKingGelid;
	function AFItemList;
	function AFDeliver;

	if (BaseLevel < 47) {
		npctalkonce l("*AFK: I am Away From Keyboard*");
		end;
	}
	.@q=getq(FrostiaQuest_AFKCap);
	.@flag=false;

	switch (.@q) {
	case 0: // Mission not started
		mesn;
		mesq l("I'm back, I'm here, I'm great! I am the AF King Arthur!");
		next;
		do {
			mesn;
			mesq l("But can I help you?");
			next;
			select
				l("Good, I need to talk with the King."),
				l("You have a nice hat."),
				l("Do you know where I can level up?"),
				rif(.@flag, l("I would like a hat like yours.")),
				l("Nothing, good bye!");
			mes "";
			switch (@menu) {
			case 1:
				AFKingGelid();
			case 2:
				AFPrologue();
				.@flag=true;
			case 3:
				AFGrinding();
			case 4:
				setq FrostiaQuest_AFKCap, 1;
				AFItemList();
			default:
				close;
			}
		} while (true);
		break;
	case 1: // Mission accepted
		AFItemList();
		break;
	case 2: // Mission complete
		npctalkonce l("*AFK: I am Away From Keyboard*");
		end;
		break;
	}

    closedialog;
    goodbye;
    close;

function AFPrologue {
	mesn;
	mesq l("No one is more there than here than me! Look at my hat, it symbolizes that I am an useless player!");
	next;
	mesn;
	mesq l("And if you listen to Tulimshar's Professor lecture wearing it, you'll gain more experience!");
	next;
	mesn;
	mesq l("Basically, no one else disturbs me anymore when I'm busy snoring in class! ^.^");
	next;
	return;
}

function AFGrinding {
	mesn;
	mesq l("Uhh... Not really! I love to kill Yetis, but sometimes they are really shy!");
	next;
	mesn;
	mesq l("They must be hiding in some cave... It's a shame!");
	next;
	return;
}

function AFKingGelid {
	mesn;
	mesq l("Uhm, I'm not the king of Frostia, I'm the king of all useless adventurers.");
	next;
	mesn;
	mesq l("I just go out removing swords from rocks, and then throwing them again at the lake. All that while I drink coffee.");
	next;
	mesn;
	mesq l("If you need to talk with King Gelid, he should be in the castle north here.");
	next;
	return;
}

function AFItemList {
	mesn;
	mesq l("Sure, no problem! For this awesome hat which I can make it myself, you'll need to bring me a few items!");
	next;
	mes ".:: "+l("Item List")+" ::.";
	mesc l("@@/@@ @@", countitem(SilkCocoon), 300, getitemlink(SilkCocoon));
	mesc l("@@/@@ @@", countitem(CobaltHerb), 100, getitemlink(CobaltHerb));
	mesc l("@@/@@ @@", countitem(CottonCloth), 25, getitemlink(CottonCloth));
	mesc l("@@/@@ @@", countitem(BlueDye),      1, getitemlink(BlueDye));
	next;
	// FIXME Deprecate .@ scope on flag
	if (.@flag) {
		mesn;
		mesq l("Now I'll be waiting!");
		close;
	}
	select
		l("Okay, I'll be back!"),
		l("I have everything you've asked for.");
	mes "";
	if (@menu == 2)
		AFDeliver();
	return;
}

function AFDeliver {
	mesc l("TODO"), 1;
	return;
}

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, AFKCap);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 0);
    npcsit;

    .sex = G_MALE;
    .distance = 4;
    end;
}