summaryrefslogtreecommitdiff
path: root/npc/029-1/valon.txt
blob: 15d4ed29a3856353981226e988eefbdd27820410 (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
-	script	#ValonConfig	NPC32767,{
    end;

OnInit:
    setarray $@ValonMob, Maggot, HouseMaggot, TameScorpion, Scorpion;
    setarray $@ValonMobCnt, 10,5,3,1;
    end;
}
029-1,74,86,0	script	ValonDebug	NPC156,{
    mes "[Valon Debug]";
    mes "Reset?";

    if (askyesno() == ASK_YES) {
        setq CandorQuest_Valon, 0;
        STARTAREA = (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT));
        mes "";
        mes "Reset!";
    }
    close;

OnInit:
    if (!debug)
        disablenpc "ValonDebug";
    end;
}
029-1,72,86,0	script	Valon	NPC156,{
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    ValonCount();
    .@q=getq(CandorQuest_Valon);
    if (.@q >= 6)
        goto L_QuestComplete;
    if (.@q == 1)
        goto L_QuestAskAgain;
    if (@valon_count >= $@ValonMobCnt[@valon_mob])
        goto L_NextMob;
    if ((.@q >= 2) && (.@q < 6))
        goto L_QuestStarted;
    goto L_QuestAsk;

L_QuestAskAgain:
    mesn;
    mesq l("Hello, Adventurer! Have you come back to help?");
    menu
        "Yes. I will help with the island beasts.", L_Accept,
        "Maybe some other time.", -;
    close;

L_QuestAsk:
    mesn;
    mes "\"Hello!";
    mes "You're looking for adventures, right?\"";
    mes "\"But you shouldn't underestimate this island, it is dangerous.\"";
    mes "\"It's crawling with scorpions, and the heat has overcome adventurers tougher than you are.\"";
    mes "\"I should know I guard this gate from all manner of island beasts.\"";
    mes "\"Maybe you would like help and earn your stripes?\"";
    mes "\"The Council of Wizard's does offer a reward for helping...\"";
    setq CandorQuest_Valon, 1;
    ResetValonCntMask();
    menu
        "YES!!! let me at them!", L_Accept,
        "Maybe some other time.", -;
    close;

L_Accept:
    setq CandorQuest_Valon, 2;
    ValonCount();
    goto L_NewMob;

L_NextMob:
    getexp 40, 0;
    mesq l("I see you killed all the %s needed.", getmonsterlink(@valon_mob));
    mesq l("The Wizard's thank thee as well.");
    Zeny += 25;
    setq CandorQuest_Valon, (.@q + 1);
    ResetValonCntMask();
    ValonCount();
    if (@valon_mob == getarraysize($@ValonMob))
        goto L_QuestOver;
    goto L_NewMob;

L_NewMob:
    mesq l("Let's see whats on the list. Ah ok, I need you to kill me %d %s.",  $@ValonMobCnt[@valon_mob], getmonsterlink($@ValonMob[@valon_mob]));
    mesq l("I'll be waiting here, come back and see after you've killed those mobs.");
    close;

L_QuestStarted:
    mesn;
    mesq l("Hail adventurer! You are well on your way to mastering the beasts of the island.");
    mesq l("You need to kill %s: %d/%d.", getmonsterlink($@ValonMob[@valon_mob]), @valon_count, $@ValonMobCnt[@valon_mob]);
    mesq l("\"Come back and see me when the job is done.\"");
    close;

L_QuestOver:
    mesn;
    mesq l("Thanks once again for helping with the monsters in the island.");
    getexp 50, 0;
    setq CandorQuest_Valon, (.@q + 1);
    close;

L_QuestComplete:
    mesn;
    mesq l("Thanks once again for helping with the monsters in the island.");
    close;
}