summaryrefslogtreecommitdiff
path: root/npc/re/jobs/2e/rebellion.txt
blob: 53beb11f55fcf3ee410cd5c4ece784f30b26a00c (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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
//================= Hercules Script =======================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2020 Hercules Dev Team
//= Copyright (C) Dastgir
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program.  If not, see <http://www.gnu.org/licenses/>.
//=========================================================================
//= Rebellion Job Quest
//================= Description ===========================================
//= Job change Quest from Gunslinger -> Rebellion
//================= Current Version =======================================
//= 1.0
//=========================================================================

job_gun,1,1,1	script	Administrator1	CLEAR_NPC,{
	callfunc("F_GM_NPC");
	mes("Please enter the password.");
	.@success = callfunc("F_GM_NPC", 1854, 0);
	if (.@sucess != 1)
		close();

	mes("[Time Administrator]");
	mes("What time would you like to return?");
	next();
	.@select = select("Cancel", "Test monster spawn", "Start from beginning", "Furnace Zone", "Shooting Zone", "Complete the test");
	if (.@select == 1) {
		close();
	} else if (.@select == 2) {
		donpcevent("#target::OnStart");
		donpcevent("#nontarget::OnStart");
		close();
	} else if (.@select == 4) {
		.@questComplete = 12341;
	} else if (.@select == 5) {
		.@questComplete = 12342;
	} else if (.@select == 6) {
		.@questComplete = 12344;
	}
	for (.@i = 12340; .@i <= 12345; .@i++) {
		erasequest(.@i);
		if (.@i <= .@questComplete) {
			setquest(.@i);
			completequest(.@i);
		}
	}
	close();

OnInit:
	disablenpc(strnpcinfo(NPC_NAME));
	end;
}

// Warps
job_gun,56,26,0	warp	rebelroom#1	2,2,einbroch,49,97
job_gun,18,10,0	warp	rebelroom#2	2,2,job_gun,81,29
job_gun,165,22,0	warp	rebelroom#3	2,2,job_gun,196,35
job_gun,197,49,0	warp	rebelroom#4	2,2,job_gun,157,21

job_gun,88,144,0	warp	shootingrange#1	3,3,job_gun,93,123
job_gun,105,97,0	warp	shootingrange#2	3,3,job_gun,125,98
job_gun,156,115,0	warp	shootingrange#3	3,3,job_gun,157,137
job_gun,152,154,0	warp	shootingrange#4	3,3,job_gun,135,154
job_gun,130,146,0	warp	shootingrange#5	3,3,job_gun,120,130

job_gun,165,18,1	script	Furnace Controller#1	CLEAR_NPC,{
	if (Class != Job_Gunslinger) {
		mes("Only authorized user can do the operation.");
		close();
	}
	if (getstatus(SC_MONSTER_TRANSFORM, 1) != G_L_SHECIL) {
		mes("Not an authorized user. Abort the operation.");
		close();
	}
	if (questprogress(12342) != 1) {
		mes("Not an authorized user. Abort the operation.");
		close();
	}
	mes("Do you want to dredge the mold up from the furnace?");
	next();
	if (select("Quit.", "Begin.") == 1) {
		mes("Switch to the Standby mode.");
		close();
	}
	hideonnpc("Furnace Controller#1");
	donpcevent("Furnace Controller#2::OnStart");
	mes("Initializing Furnace Controller ZX-3100...");
	close();

OnInit:
	hideoffnpc("Furnace Controller#1");
	end;
}

job_gun,214,36,1	script	Auto Anvil#1	CLEAR_NPC,{
	if (Class != Job_Gunslinger) {
		mes("Only authorized user can do the operation.");
		close();
	}
	if (countitem(Tiny_Flame) > 0) {
		mes("Unauthorized firearm creation has been detected. Report to Manager Elwin.");
		close();
	}
	if (checkweight(Tiny_Flame, 1) == 0) {
		mes("You have too many items, please reduce them to continue.");
		close();
	}
	if (getstatus(SC_MONSTER_TRANSFORM, 1) != G_L_SHECIL || countitem(Steel_Article_) <= 4 || questprogress(12342) != 1) {
		mes("Not an authorized user. Abort the operation.");
		close();
	}
	
	mes("Do you want to use the auto anvil and shape the standard Steel Artifacts into a firearm?");
	next();
	if (select("Quit.", "Begin.") == 1) {
		mes("For your safety, please step away from the auto anvil.");
		close();
	}
	if (rand(1, 10) > 6) {
		specialeffect(EF_REPAIRWEAPON);
		mes("You have successfully created a firearm using the auto anvil. ^ff0000Please report before your transformation expires^000000.");
		delitem(Steel_Article_, 5);
		getitem(Tiny_Flame, 1);
	} else {
		specialeffect(EF_SUI_EXPLOSION);
		mes("Failed to create a firearm.");
		delitem(Steel_Article_, 5);
	}
	close();
	
OnInit:
	hideoffnpc("Auto Anvil#1");
	end;
}

job_gun,165,18,1	script	Furnace Controller#2	CLEAR_NPC,{
	mes("The system is busy dredging a completed mold from the furnace.");
	close();

OnInit:
	hideonnpc("Furnace Controller#2");
	end;

OnStart:
	hideoffnpc("Furnace Controller#2");
	sleep(3000);
	mapannounce("job_gun", "Furnace Controller: Dredging a mold up from the furnace... Workers, stand by at the production line.", bc_map, "0x00ff44");
	sleep(500);
	.@wh_start = 0;
	while (true) {
		if (.@wh_start >= 30)
			break;
		
		.@eff_rnd = rand(1, 100);
		if (.@eff_rnd < 33) { // 0 - 32
			donpcevent("Heating Furnace#3::OnStart");
		} else if (.@eff_rnd > 66) { // 67-100
			donpcevent("Heating Furnace#4::OnStart");
		} else { // 33-66
			donpcevent("Heating Furnace#5::OnStart");
		}
		sleep(200);
		makeitem(Steel_Article, 1, "job_gun", rand(127, 143), rand(26, 29));
		if (rand(1, 10) > 7) {
			makeitem(Steel_Article_, 1, "job_gun", rand(127, 143), rand(26, 29));
		}
		.@wh_start += 1;
		sleep(500);
		
	}
	sleep(2000);
	mapannounce("job_gun", "Furnace Controller: Finishing the operation... Entering Standby mode in 15 seconds.", bc_map, "0x00ff44");
	sleep(15000);
	hideonnpc("Furnace Controller#2");
	hideoffnpc("Furnace Controller#1");
	end;
}

job_gun,130,31,1	script	Heating Furnace#3	CLEAR_NPC,{
	end;

OnStart:
	specialeffect(EF_FIREPILLAR);
	sleep(500);
	specialeffect(EF_FIREPILLARBOMB);
	end;
}

job_gun,136,31,1	script	Heating Furnace#4	CLEAR_NPC,{
	end;

OnStart:
	specialeffect(EF_FIREPILLAR);
	sleep(500);
	specialeffect(EF_FIREPILLARBOMB);
	end;
}

job_gun,141,31,1	script	Heating Furnace#5	CLEAR_NPC,{
	end;

OnStart:
	specialeffect(EF_FIREPILLAR);
	sleep(500);
	specialeffect(EF_FIREPILLARBOMB);
	end;
}

function	script	F_summonTargetMonster	{
	.@monster_id = getarg(0);
	.@max_mob_count = getarg(1);
	.@monster_name$ = getarg(2);
	.@event_name$ = getarg(3);
	while(true) {
		.@mob_dead_num = mobcount("job_gun", .@event_name$);
		if (.@mob_dead_num >= .@max_mob_count)
			break;

		switch(rand(1, 5)) {
			case 1:
				.@mobx = rand(88, 99);
				.@moby = rand(143, 147);
				break;
			case 2:
				.@mobx = rand(92, 96);
				.@moby = rand(95, 122);
				break;
			case 3:
				.@mobx = rand(143, 159);
				.@moby = rand(99, 100);
				break;
			case 4:
				.@mobx = rand(157, 158);
				.@moby = rand(137, 160);
				break;
			case 5:
				.@mobx = rand(119, 134);
				.@moby = rand(156, 160);
				break;
		}
		monster("job_gun", .@mobx, .@moby, .@monster_name$, .@monster_id, 1, .@event_name$);
	}
	return;
}

job_gun,1,4,1	script	#target	CLEAR_NPC,{
	end;

OnStart:
	killmonster("job_gun", "#target::OnTargetDead");
	callfunc("F_summonTargetMonster", J_REB_SHECIL1, 16, _("Standard-issue Target"), "#target::OnTargetDead");
	end;

OnInit:
	hideonnpc("#target");
	callfunc("F_summonTargetMonster", J_REB_SHECIL1, 16, _("Standard-issue Target"), "#target::OnTargetDead");
	end;

OnTargetDead:
	hideonnpc("#target");
	callfunc("F_summonTargetMonster", J_REB_SHECIL1, 16, _("Standard-issue Target"), "#target::OnTargetDead");
	end;
}

job_gun,1,5,1	script	#nontarget	CLEAR_NPC,{
	end;
OnStart:
	killmonster("job_gun", "#nontarget::OnNonTargetDead");
	hideonnpc("#nontarget");
	callfunc("F_summonTargetMonster", J_REB_SHECIL2, 56, _("Defective Target"), "#nontarget::OnNonTargetDead");
	end;

OnInit:
	hideonnpc("#nontarget");
	callfunc("F_summonTargetMonster", J_REB_SHECIL2, 56, _("Defective Target"), "#nontarget::OnNonTargetDead");
	end;

OnNonTargetDead:
	hideonnpc("#nontarget");
	callfunc("F_summonTargetMonster", J_REB_SHECIL2, 56, _("Defective Target"), "#nontarget::OnNonTargetDead");
	end;
}

moc_fild12,261,318,3	script	Suspicious Man	4_M_MOCASS2,2,2,{
	end;
OnTouch:
	if (Class != Job_Gunslinger || BaseLevel < 99 || JobLevel < 70)
		end;
	if (questprogress(12340) < 1) {
		mes("[Suspicious Man]");
		mes("Finally I've found you, Vagabond Spike! Your neck is mine!");
		next();
		select("Say what?");
		
		mes("[Suspicious Man]");
		mes("*Snort* Don't pretend like you don't know. Look at this poster! You're in it!");
		next();
		select("I see the resemblance, but that's not me.");

		mesf("[%s]", strcharinfo(PC_NAME));
		mes("Forget the resemblance. Where did you get that poster? I've never committed a crime.");
		next();
		mes("[Suspicious Man]");
		mes("I knew you'd try to lie your way out.");
		next();
		mes("[Suspicious Man]");
		mes("The ^0000ffEinbroch Private Pub^000000 has released that wanted poster. You have many bounty hunters like me on your heels.");
		next();
		mes("[Suspicious Man]");
		mes("I don't care if you're the right one so long as you look it and I can take you dead or alive.");
		next();
	} else {
		mes("[Suspicious Man]");
		mes("It's you again! You've got guts to come back here!");
		next();
	}
	switch (select("Make a run for it.", "Fight him.")) {
	case 1:
		mes("^0000ffI should run for now and think about this later.^000000");
		close2();
		break;
	case 2:
		mes("^0000ffHe's not the only bounty hunter after me, if he's telling the truth. I need time to strategize.^000000");
		close2();
		break;
	}
	setquest(12340);
	warp("moc_fild12", 186, 83);
	end;
}

einbroch,54,97,3	script	Bouncer	4_M_REBELLION,2,2,{
	if (Class != Job_Gunslinger) {
		mes("[Bouncer]");
		mes("No loitering around the venue.");
		close();
	}
	if (questprogress(12340) < 1) {
		mes("[Bouncer]");
		mes("Under construction, can't get in.");
		close();
	} else if (questprogress(12340) == 1) {
		mes("[Bouncer]");
		mes("*Gasp* You! I thought you were already captured. Ooh, doesn't matter now. You're my Get Out of Jail Free card!");
		next();
		select("I'm not the criminal you think I am!");
		mes("[Bouncer]");
		mes("You aren't?");
		next();
		mes("^0000ffThe bouncer examines your face.^000000");
		next();
		mes("[Bouncer]");
		mes("Hm, you bear a striking resemblance, though you don't look not as menacing as that criminal Spike");
		next();
		select("I want to talk to the poster publisher.");
		mes("[Bouncer]");
		mes("Your problem is a bit out of my league. Get in. If I find out you're the real deal all along, I'll see that you'll never see the outside again.");
		close2();
		warp("job_gun", 81, 29);
	} else if (questprogress(12340) > 1) {
		mes("[Bouncer]");
		mes("You're back. Why?");
		next();
		if (select("I want in.", "I was passing by.") == 2) {
			mes("[Bouncer]");
			mes("You're silly.");
			close();
		}
		mes("[Bouncer]");
		mes("Go ahead. Stay out of trouble.");
		close2();
		warp("job_gun", 70, 28);
	}
	end;
}

job_gun,68,33,3	script	Ruthless Rebellion	4_F_REBELLION,2,2,{
	mes("[Ruthless Rebellion]");
	mes("Do you know how to use a gun?");
	close();
}

job_gun,78,33,6	script	Suspicious Gunslinger	4_M_JOB_BLACKSMITH,2,2,{
	mes("[Suspicious Gunslinger]");
	mes("... ");
	next();
	mes("[Quiet Gunslinger]");
	mes("Don't say I look like a blacksmith you know.");
	close();
}

job_gun,74,24,6	script	Drunken Man	4_M_LIEMAN,2,2,{
	mes("[Drunken Man]");
	mes("*Hiccups* Oh, I'm the owner here.");
	mes("Oh wait, am I in the pub or someplace else? Zzz...");
	close();
}

job_gun,64,33,6	script	Anxious Man	4_M_ALCHE_A,2,2,{
	mes("[Anxious Man]");
	mes("Maybe I'm in the wrong place. This place doesn't look like a pub.");
	close();
}

job_gun,86,29,3	script	Kulbertinov	4_M_REBELLION,2,2,{
	if (Class != Job_Gunslinger) {
		mes("[Kulbertinov]");
		mes("Are you looking for me?");
		close();
	}
	if (questprogress(12340) < 1) {
		mes("[Kulbertinov]");
		mes("Can I help you?");
		close();
	} else if (questprogress(12340) == 1) {
		mes("[Kulbertinov]");
		mes("What do you want?");
		next();
		select("I'm mistaken for a criminal!");
		mes("[Kulbertinov]");
		mes("Wait a minute... Mwah hah hah!");
		next();
		mes("^0000ffHe scans your face, then guffaws.^000000");
		next();
		mes("[Kulbertinov]");
		mes("I'm sorry. For a moment, I thought Spike came back to life. He was found dead three days ago.");
		next();
		select("He was captured already?");
		mes("[Kulbertinov]");
		mes("Yes, and the bounty hunter was already paid. The news hasn't spread, and you're the spitting image of him. Go figure.");
		next();
		select("You have to do something!");
		mes("[Kulbertinov]");
		mes("I'm sorry, but I can't talk to every single bounty hunter for you. Of course, I'm willing to compensate for your inconvenience.");
		next();
		mes("[Kulbertinov]");
		mes("Hey, how about you join our ranks? At the very last, you won't get shot.");
		next();
		select("You want me become a bounty hunter?");
		mes("[Kulbertinov]");
		mes("No, bounty hunting is just a pastime. We're the experts of all the firearms in the world.");
		next();
		mes("[Kulbertinov]");
		mes("Carefree spirits!");
		mes("Magical spitfires!");
		mes("We call ourselves the ^0000ffRebellion^000000.");
		next();
		mes("[Kulbertinov]");
		mes("You look like you know how to use a gun. How'd you like to join our ranks? You won't have to worry about other bounty hunters anymore too.");
		next();
		switch (select("Let me think it over.", "I don't think I have a choice.")) {
		case 1:
			mes("[Kulbertinov]");
			mes("You can think it over and over, but the answer won't change. Just take the offer.");
			break;
		case 2:
			mes("[Kulbertinov]");
			mes("Good thinking. Might as well do it now and get it over with.");
			break;
		}
		next();
		mes("[Kulbertinov]");
		mes("Talk to Enwin Conick. She guides drifting spirits like you to the way of the Rebellion. I'll send word to her. Ah, and don't point your gun at her.");
		setquest(12341);
		completequest(12340);
	} else if (questprogress(12340) > 1) {
		mes("[Kulbertinov]");
		mes("Do you have business with Elwin Conick?");
		next();
		if (select("No.", "Send me to Elwin Conick.") == 1) {
			mes("[Kulbertinov]");
			mes("All right. Care for a shot of vodka?");
			close();
		}
		mes("[Kulbertinov]");
		mes("Okay, I'll let her know.");	
	}
	close2();
	warp("job_gun", 19, 15);
	end;
}

job_gun,19,24,3	script	Elwin Conick#1	4_F_REBELLION,2,2,{
	if (Class != Job_Gunslinger) {
		mes("[Elwin Conick]");
		mes("If you don't want to join Rebellions, just get out.");
		close2();
		warp("job_gun", 81, 29);
		end;
	}
	if (questprogress(12341) == 1) {
		mes("[Elwin Conick]");
		mes("Do you to join us Rebellions?");
		next();
		mes("^0000ffThe short woman with keen eyes stares into your eyes.^000000");
		next();
		mes("[Elwin Conick]");
		mes("Sign here.");
		next();
		mes("^0000ffThe undersigned party [_____] will not speak of the test even if he or she suffers injury, mutilation, or death in an unforeseen accident that may occur during the test.^000000");
		next();
		select("WHAT?!");
		mes("[Elwin Conick]");
		mes("Do you want join us or not?");
		next();
		if (select("I give up.", "...I'll sign.") == 1) {
			mes("[Elwin Conick]");
			mes("Your choice.");
			close2();
			warp("job_gun", 81, 29);
			end;
		}
		mes("[Elwin Conick]");
		mes("Good. Now, follow me.");
		close2();
		warp("job_gun", 117, 41);
		end;
	}
	if (questprogress(12342) == 1) {
		mes("[Elwin Conick]");
		mes("Do you want to try again?");
		next();
		if (select("I give up.", "Do it.") == 1) {
			mes("[Elwin Conick]");
			mes("Your choice.");
			close2();
			warp("job_gun", 81, 29);
			end;
		}
		mes("[Elwin Conick]");
		mes("Follow me.");
		close2();
		warp("job_gun", 117, 41);
		end;
	}
	if (questprogress(12343) == 1) {
		mes("[Elwin Conick]");
		mes("You still have Ivan's shooting test, do you want to try again?");
		next();
		if (select("I give up.", "Do it.") == 1) {
			mes("[Elwin Conick]");
			mes("It's not worth to give up, now go out and relax.");
			close2();
			warp("job_gun", 81, 29);
			end;
		}
		mes("[Elwin Conick]");
		mes("Remember to give your best.");
		close2();
		warp("job_gun", 120, 130);
		end;
	}
	if (questprogress(12343) > 1) {
		mes("[Elwin Conick]");
		mes("Ivan's shooting test have not finished yet, do you want to try again?");
		next();
		if (select("I give up.", "Do it.") == 1) {
			mes("[Elwin Conick]");
			mes("It's not worth to give up, now go out and relax.");
			close2();
			warp("job_gun", 81, 29);
			end;
		}
		mes("[Elwin Conick]");
		mes("Remember to give your best.");
		close2();
		warp("job_gun", 120, 130);
		end;
	}
	if (questprogress(12345) == 1) {
		mes("[Elwin Conick]");
		mes("Ivan is waiting for you, go find him.");
		close2();
		warp("job_gun", 120, 130);
		end;
	}
	mes("[Elwin Conick]");
	mes("You have no more test to take. Why don't you go out and have a drink?");
	close2();
	warp("job_gun", 81, 29);
	end;
}

job_gun,117,46,3	script	Elwin Conick#2	4_F_REBELLION,2,2,{
	if (Class != Job_Gunslinger) {
		mes("[Elwin Conick]");
		mes("If you don't want to join Rebellions, just get out.");
		close2();
		warp("job_gun", 81, 29);
		end;
	}
	if (getstatus(SC_MONSTER_TRANSFORM, 1) == G_L_SHECIL) {
		mes("^0000ffYou are already in the test form. If you have finished all your tests, report to Elwin Conick in the Assembly Room^000000.");
		close();
	} else if (getstatus(SC_MONSTER_TRANSFORM, 1) > 1) {
		mes("[Elwin Conick]");
		mes("Look at yourself, do you really want to test?");
		next();
		mes("^0000ffElwin see you turn into another form and she is very angry. Wait for your current form ends, and then find her again.^000000");
		next();
		if (select("Wait.", "Go away.") == 1) {
			mes("[Elwin Conick]");
			mes("It's not worth to give up, now go out and relax..");
			close();
		}
		mes("[Elwin Conick]");
		mes("Come back when you aren't in any form.");
		close2();
		warp("job_gun", 81, 29);
		end;
	}
	if (questprogress(12341) == 1) {
		.@st_job1 = countitem(Steel_Article);
		.@st_job2 = countitem(Steel_Article_);
		if (.@st_job1 > 0) {
			delitem(Steel_Article, .@st_job1);
			mes("[Elwin Conick]");
			mes("Any leftover Steel Artifacts must be returned after the test.");
			close();
		}
		if (.@st_job2 > 0) {
			delitem(Steel_Article_, .@st_job2);
			mes("[Elwin Conick]");
			mes("Any leftover Steel Artifacts must be returned after the test.");
			close();
		}
		if (countitem(Tiny_Flame) > 0) {
			delitem(Tiny_Flame, 1);
			mes("[Elwin Conick]");
			mes("Time over. You failed the test. Let me take all your leftover test materials.");
			close();
		}
		setquest(12342);
		completequest(12341);
		.@showDialog = true;
	} else if (questprogress(12342) == 1) {
		.@st_job1 = countitem(Steel_Article);
		.@st_job2 = countitem(Steel_Article_);
		if (.@st_job1 > 0) {
			delitem(Steel_Article, .@st_job1);
			mes("[Elwin Conick]");
			mes("Any leftover Steel Artifacts must be returned after the test.");
			close();
		}
		if (.@st_job2 > 0) {
			delitem(Steel_Article_, .@st_job2);
			mes("[Elwin Conick]");
			mes("Time over. You failed the test. Let me take all your leftover test materials.");
			close();
		}
		if (countitem(Tiny_Flame) > 0) {
			delitem(Tiny_Flame, 1);
			mes("[Elwin Conick]");
			mes("Time over. You failed the test. Let me take all your leftover test materials.");
			close2();
			end;
		}
		.@showDialog = true;
	}
	if (.@showDialog) {
		mes("[Elwin Conick]");
		mes("Listen up. I'm not going to great lengths trying to explain the test to you.");
		next();
		select("Okay.");
		mes("[Elwin Conick]");
		mes("This is where the firearm molds are cast. Everywhere you can see Steel Artifacts are being produced.");
		next();
		mes("[Elwin Conick]");
		mes("You'll be asked to control switches on the machine and select 5 standard Steel Artifacts.");
		next();
		mes("[Elwin Conick]");
		mes("You'll then take them to the next Assembly Room and assemble them into a complete firearm. You'll be given 3 minutes to finish all that. ^0000ffTo check the elapsed time, you'll be transformed into a different job^000000.");
		next();
		mes("[Elwin Conick]");
		mes("I'll be in the next room, waiting for you to bring me a complete firearm. Remember, ^0000ffyou fail the test when your transformation expires after 3 minutes^000000.");
		montransform(G_L_SHECIL, 180000);
		close();
	}
	mes("[Elwin Conick]");
	mes("Ah? Are you lost? You need to register first and then get back here.");
	close2();
	warp("job_gun", 81, 29);
	end;
}

job_gun,198,39,3	script	Elwin Conick#3	4_F_REBELLION,2,2,{
	if (Class != Job_Gunslinger) {
		mes("[Elwin Conick]");
		mes("If you don't want to join Rebellions, just get out.");
		close2();
		warp("job_gun", 81, 29);
		end;
	}
	if (questprogress(12342) != 1) {
		mes("[Elwin Conick]");
		mes("Ah? Are you lost? You need to register first and then get back here.");
		close2();
		warp("job_gun", 81, 29);
		end;
	}
	if (getstatus(SC_MONSTER_TRANSFORM, 1) == G_L_SHECIL) {
		if (countitem(Tiny_Flame) == 0) {
			mes("[Elwin Conick]");
			mes("Are you done? I don't see any completed firearm in your inventory.");
			close();
		}
		delitem(Tiny_Flame, 1);
		mes("[Elwin Conick]");
		mes("It's shoddy but not bad, given the time. You passed.");
		next();
		mes("[Elwin Conick]");
		mes("Let me take all your leftover test materials.");
		.@st_job1 = countitem(Steel_Article);
		.@st_job2 = countitem(Steel_Article_);
		if (.@st_job1 > 0) {
			delitem(Steel_Article, .@st_job1);
		}
		if (.@st_job2 > 0) {
			delitem(Steel_Article_, .@st_job2);
		}
		next();
		mes("[Elwin Conick]");
		mes("Now you can move on to the next course. Ivan Sidorenko will oversee your test.");
		completequest(12342);
		close2();
		warp("job_gun", 120, 133);
		end;

	} else if (getstatus(SC_MONSTER_TRANSFORM, 1) > 1) {
		mes("[Elwin Conick]");
		mes("Look at yourself, do you really want to test?");
		next();
		mes("^0000ffElwin see you turn into another form and she is very angry. Wait for your current form ends, and then find her again.^000000");
		next();
		if (select("Wait.", "Go away.") == 1) {
			mes("[Elwin Conick]");
			mes("It's not worth to give up, now go out and relax..");
			close();
		}
		mes("[Elwin Conick]");
		mes("Come back when you aren't in any form.");
		close2();
		warp("job_gun", 81, 29);
		end;
	} else {
		mes("[Elwin Conick]");
		mes("Time over. You failed the test. Let me take all your leftover test materials.");
		.@st_job1 = countitem(Steel_Article);
		.@st_job2 = countitem(Steel_Article_);
		if (.@st_job1 > 0) {
			delitem(Steel_Article, .@st_job1);
		}
		if (.@st_job2 > 0) {
			delitem(Steel_Article_, .@st_job2);
		}
		if (countitem(Tiny_Flame) > 0) {
			delitem(Tiny_Flame, 1);
		}
		next();
		mes("[Elwin Conick]");
		mes("Let's start again.");
		close2();
		warp("job_gun", 117, 41);
		end;
	}
	end;
}

job_gun,120,138,3	script	Ivan Sidorenko#1	4_M_REBELLION,2,2,{
	if (Class != Job_Gunslinger) {
		mes("[Ivan Sidorenko]");
		mes("This is shooting test area, you can't come here as you like.");
		close2();
		warp("job_gun", 81, 29);
		end;
	}
	if (questprogress(12342) < 2) {
		mes("[Ivan Sidorenko]");
		mes("There seems to be a mistake, you can't stay here.");
		close2();
		warp("job_gun", 81, 29);
		end;
	}
	if (questprogress(12343) < 1) {
		mes("[Ivan Sidorenko]");
		mes("Hey, stay focused--we're using live ammo here, and you can get shot anytime.");
		next();
		mes("[Ivan Sidorenko]");
		mes("Let me make this quick. Basically you'll be running in this shooting range consisting of 5 sections.");
		next();
		mes("[Ivan Sidorenko]");
		mes("The objective is to find enemies in the midst of a crowd quickly and without fail.");
		next();
		mes("[Ivan Sidorenko]");
		mes("Among all the targets, you must shoot only the ^0000ffStandard-issue Targets^000000. If you make a mistake, you'll lose points.");
		next();
		mes("[Ivan Sidorenko]");
		mes("Let's try. There aren't many ^0000ffStandard-issue Targets^000000, so keep your eyes peeled.");
		next();
		mes("[Ivan Sidorenko]");
		mes("^0000ffYou have 3 minutes to finish this test. If you can't finish before your transformation expires^000000, you'll fail. If that happens, just follow the path back to me.");
		next();
		mes("[Ivan Sidorenko]");
		mes("^0000ffYou'll fail if you miss a Standard-issue Target, or shoot 3 incorrect targets^000000. Let's get started.");
		setquest(12343);
		setquest(12344);
		montransform(G_L_SHECIL, 180000);
		close2();
		warp("job_gun", 102, 146);
		end;
	} else if (questprogress(12343) == 1) {
		.@standard_target = 0;
		.@failed_target = 0;
		.@total_target = 0;
		if (questprogress(12343, HUNTING) == 2) {
			.@standard_target = 10;
		}
		if (questprogress(12344, HUNTING) == 2) {
			.@failed_target = 2;
		}
		if (getstatus(SC_MONSTER_TRANSFORM, 1) != G_L_SHECIL) {
			.@total_target = 5;
		}
		.@target_count = .@standard_target - (.@failed_target + .@total_target);	// 
		if (.@target_count > 9) { // Killed 10 Standard, 0 Failed
			completequest(12343);
			completequest(12344);
			setquest(12345);
			mes("[Ivan Sidorenko]");
			mes("Good job. I didn't think you could pass so quickly.");
			next();
			mes("[Ivan Sidorenko]");
			mes("You may leave and wait outside. I'll bring other instructors' evaluation reports to see you.");
			close2();
			warp("job_gun", 210, 132);
			end;
		} else if (.@target_count == 8) { // Killed 10 Standard, 3 failed
			erasequest(12343);
			erasequest(12344);
			mes("[Ivan Sidorenko]");
			mes("You're quick enough, but you shot too many incorrect targets. You failed.");
			next();
		} else if (.@target_count == 5) { // Timeout
			erasequest(12343);
			erasequest(12344);
			mes("[Ivan Sidorenko]");
			mes("You accurate enough, but you took too much time. Slow Rebellions don't survive long enough.");
			next();
		} else if (.@target_count < 5) { // Timeout and failed targets
			erasequest(12343);
			erasequest(12344);
			mes("[Ivan Sidorenko]");
			mes("You failed at both speed and accuracy. How did you survive this long?");
			next();
		} else {
			erasequest(12343);
			erasequest(12344);
			mes("[Ivan Sidorenko]");
			mes("There's a problem, the statistic seems to be wrong. Well... This can happen sometimes.");
			next();
		}
		mes("[Ivan Sidorenko]");
		mes("Let's try again. Be more careful this time.");
		setquest(12343);
		setquest(12344);
		montransform(G_L_SHECIL, 180000);
		close2();
		warp("job_gun", 102, 146);
		end;
	} else {
		mes("[Ivan Sidorenko]");
		mes("How did you not leave?");
		next();
		mes("[Ivan Sidorenko]");
		mes("You may leave and wait outside. I'll bring other instructors' evaluation reports to see you.");
		close2();
		warp("job_gun", 210, 132);
		end;
	}
	end;
}

job_gun,220,132,3	script	Ivan Sidorenko#2	4_M_REBELLION,2,2,{
	.@now_weight = MaxWeight - Weight;
	if (checkweight(Knife, 1) == 0) {
		mes("You have too many items, please reduce them to continue.");
		close();
	}
	if (.@now_weight < 1000) {
		mes("The items in your inventory are weighing you down. Lighten your weight first.");
		close();
	}
	if (questprogress(12345) != 1) {
		mes("[Ivan Sidorenko]");
		mes("There must have been a mistake. You aren't supposed to remain here.");
		close2();
		warp("job_gun", 81, 29);
		end;
	}
	if (Class == Job_Gunslinger) {
		if (BaseLevel < 99 || JobLevel < 70) {
			mes("[Ivan Sidorenko]");
			mes("Huh? You look so weak? I have nothing more to say.");
			close();
		}
		if (SkillPoint != 0) {
			mes("[Ivan Sidorenko]");
			mes("Oh no~ You still have Skill Points.");
			close();
		}
		mes("[Ivan Sidorenko]");
		mes("Kulbertinov, Elwin, and I've evaluated your Rebellion test results.");
		next();
		mes("[Ivan Sidorenko]");
		mes("And...");
		next();
		mes("[Ivan Sidorenko]");
		mes("You've met all our requirements including the attitude and the test performance.");
		next();
		mes("[Ivan Sidorenko]");
		mes("That's right, you're now a member of the Rebellion. Get ready to be wowed.");
		next();
		jobchange(Job_Rebellion);
		completequest(12345);
		mes("[Ivan Sidorenko]");
		mes("And Elwin wants you to have this. Take good care of it. He made it for you.");
		getitem(Freedom_Flame, 1);
		next();
		mes("[Ivan Sidorenko]");
		mes("See you later.");
		close2();
		warp("job_gun", 81, 29);
		end;
	} else if (Class == Job_Rebellion) {
		mes("[Ivan Sidorenko]");
		mes("This life should be fun, not boring.");
		next();
		mes("[Ivan Sidorenko]");
		mes("And by becoming a Rebellion your life should be upgraded. So, go and create a great journey, make us proud!");
		close();
	} else {
		mes("[Ivan Sidorenko]");
		mes("Do you have something to say to me, don't you?");
		close();
	}
}

job_gun,220,138,4	trader	Prop Vending Machine	2_VENDING_MACHINE1,{
	end;
OnInit:
	sellitem(Slug_Bullet_1);
	sellitem(Slug_Bullet_2);
	sellitem(Slug_Bullet_3);
	sellitem(Slug_Bullet_4);
	sellitem(Slug_Bullet_5);
	sellitem(Fullmetal_Jacket_Bullet);
	sellitem(Mine_Projectile);
	sellitem(Dragon_Tail_Missile);
	end;
}

job_gun,216,138,4	script	Butler Karlex	1_M_01,{
	mes("[Butler Karlex]");
	mes("Use this temporary storage to keep your items safe while on the Advancement test.");
	next();
	.@select = select("Cancel", "Open the storage.");
	mes("[Butler Karlex]");
	mes("Thank you for using the service.");
	close2();
	if (.@select == 2) {
		openstorage();
	}
	end;
}

prontera,92,209,4	trader	Rebellion Weapons	2_VENDING_MACHINE1,{
	end;
OnInit:
	sellitem(H_FEATHER_H_FIRE);
	sellitem(ALTAIR_ARES);
	sellitem(COLORSCOPE);
	sellitem(RAG203);
	sellitem(DEATHFIRE);
	sellitem(R_THUNDER);
	sellitem(P_BREAKER);
	sellitem(MINIMAY);
	sellitem(TEMPEST);
	sellitem(END_OF_HORIZON);
	sellitem(Southern_Cross_R);
	end;
}

prontera,96,209,4	trader	Rebellion Accessories	2_VENDING_MACHINE1,{
	end;
OnInit:
	sellitem(Slug_Bullet);
	sellitem(Fullmetal_Jacket_Bullet);
	sellitem(Mine_Projectile);
	sellitem(Dragon_Tail_Missile);
	sellitem(Special_Alloy_Trap);
	sellitem(Bullet);
	sellitem(Silver_Bullet_);
	sellitem(Shell_Of_Blood_);
	sellitem(AP_Ammo);
	sellitem(Blaze_Bullet);
	sellitem(Freezing_Bullet);
	sellitem(Electric_Shock_Bullet);
	sellitem(Magical_Stone_Bullet);
	sellitem(Sanctified_Bullet);
	sellitem(Flare_Bullet);
	sellitem(Lightning_Bullet);
	sellitem(Poison_Bullet);
	sellitem(Blind_Bullet);
	sellitem(Ice_Bullet);
	end;
}