summaryrefslogtreecommitdiff
path: root/npc/003-0-1/luca.txt
blob: fa4a0ebdf8fd220429e35c7825004355da5c0e76 (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
// TMW2 script.
// Author:
//    Saulc
//    Jesusalva
// Description:
//    Luca and Colin assigns player a class. This may end up contradicting races,
//    so expect core changes!

003-0-1,35,29,0	script	Luca	NPC_PLAYER,{

    mesn;
    mesq l("I am the Magic Warriors master.");
    if (!MAGIC_LVL) goto L_NoMagic;
    if (getskilllv(WIZARD_MAGE) && !is_admin()) close;

    // Sanity check
    if (getskilllv(SM_BASH) >= 1) mesq l("Are you using my skill?");
    if (getskilllv(SM_BASH) >= 1) close;

    if (getskilllv(MAGIC_WARRIOR) == 0) goto L_SignUp;
    close;

L_SignUp:
    next;
    mesn;
    mesq l("You have some magic power. Do you want to join the Magic Warriors? ##BThis cannot be undone##b.");
    next;
    mesn;
    mesq l("We use swords and bows to protect the people, and we use magic to spice things up! Because we're strong even without it!");
    next;
    menu
        l("What do I need to do to join?"), L_JoinReq,
        l("I'm not interested, sorry."), -;
    close;

L_JoinReq:
    mesn;
    mesq l("Ah, nothing too major, as you already have magic.");
    next;
    mesn;
    mesq l("We only require a small fee of 1 @@, or 40 @@", getitemlink(DivineApple), getitemlink(SnakeEgg));
    next;
    switch(select(
        rif(countitem(DivineApple) >= 1, l("I got the apple.")),
        rif(countitem(SnakeEgg) >= 40, l("I got the eggs.")),
        l("I will apply later."))) {

        case 1:
            delitem DivineApple, 1;
            goto L_Tier1Ok;
            break;
        case 2:
            // If player had 40 eggs, and eat 1 - they are clearly cheating.
            // It will delete all 39 eggs, and when it tries to delete the 40th,
            // it won't find and will terminate the script. No lame cheating.
            // Of course, all 39 eggs are gone for and I can't do anything about it.
            delitem SnakeEgg, 40;
            goto L_Tier1Ok;
            break;
        default:
            break;
    }

    close;

L_Tier1Ok:
    // The last argument is duration: 0 - permanent 1- temporary. If omitted, defaults to 1.
    skill(SM_BASH,1,0);
    skill(MAGIC_WARRIOR,1,0);
    mes "";
    mesn;
    mesq l("Here, learn the ##BFalkon Punch##b. It is on Physical skills tab. You can drag it to the shortcut list. Use it to protect people!");
    close;

L_NoMagic:
    next;
    mesn;
    mesq l("Your lack of magical power is critical. I dare say, you might never in your life get access to a Mana Stone.");
    next;
    mesn;
    mesq l("Besides the Magic Council, Andrei Sakar have his own Mana Stone, but I doubt he would train the likes of you, or share his Mana Stone.");
    next;
    mesn;
    mesq l("Perhaps, in the city, someone knows rumors about Mana Stones and can teach you. Other than that, you're on your own.");
    close;

OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
    setunitdata(.@npcId, UDT_HEADMIDDLE, BromenalChest);
    setunitdata(.@npcId, UDT_HEADBOTTOM, JeansShorts);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 21);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 6);

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