summaryrefslogtreecommitdiff
path: root/npc/commands/info.txt
blob: b333cdedb5da8225e141ffcdca0a541819ebb067 (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
// Evol script
// Author: Jesusalva <admin@tmw2.org>
//
// Main player information (@player)
// TODO: Magic Levels do nothing (how do we even fix this under Native C Magic D:)
// TODO: Quest Experience need to be tweaked. Again. Monsters could give some XP?
// TODO: Cooking & Brewing level does nothing

-	script	@info	32767,{
    end;

function barHandler {
    .@bf$=" ";
    .@min=getarg(0);
    .@max=getarg(1);

    //▒
    for (.@i=1; .@i <= 10; .@i++) {
        if (.@min / .@i >= .@max / 10)
            .@bf$+="##2▒";
        else
            .@bf$+="##9▒";
    }
    .@bf$ += sprintf("##0 %s/%s", fnum(.@min), fnum(.@max));
    return .@bf$;
}

// Your information
OnCall:
    mes b(".:: " + l("Basic Stats") + " ::.");
    mes "";
    mes b(l("Strength"));
    mes l("%s (Lv %d)", barHandler(EXP_STR, NEXT_Str()), readparam(bStr));
    mes "";
    mes b(l("Agility"));
    mes l("%s (Lv %d)", barHandler(EXP_AGI, NEXT_Agi()), readparam(bAgi));
    mes "";
    mes b(l("Vitality"));
    mes l("%s (Lv %d)", barHandler(EXP_VIT, NEXT_Vit()), readparam(bVit));
    mes "";
    mes b(l("Intelligence"));
    mes l("%s (Lv %d)", barHandler(EXP_INT, NEXT_Int()), readparam(bInt));
    mes "";
    mes b(l("Dexterity"));
    mes l("%s (Lv %d)", barHandler(EXP_DEX, NEXT_Dex()), readparam(bDex));
    mes "";
    mes b(l("Luck"));
    mes l("%s (Lv %d)", barHandler(EXP_LUK, NEXT_Luk()), readparam(bLuk));
    next;
    clear;

    mes b(".:: " + l("Job Stats") + " ::.");
    mes "";
    mes b(l("Foraging & Woodcutting"));
    mes l("%s (Lv %d)", barHandler(EXP_FORA, NEXT_Fora()), LVL_FORA);
    mes "";
    mes b(l("Mining"));
    mes l("%s (Lv %d)", barHandler(EXP_MINE, NEXT_Mine()), LVL_MINE);
    mes "";
    mes b(l("Fishing"));
    mes l("%s (Lv %d)", barHandler(EXP_FISH, NEXT_Fish()), LVL_FISH);
    mes "";
    mes b(l("Cooking & Brewing"));
    mes l("%s (Lv %d)", barHandler(EXP_COOK, NEXT_Cook()), LVL_COOK);
    mes "";
    mes b(l("Forging & Tailoring"));
    mes l("%s (Lv %d)", barHandler(EXP_FORG, NEXT_Forg()), LVL_FORG);
    mes "";
    mes b(l("Hunting"));
    mes l("%s (Lv %d)", barHandler(EXP_HUNT, NEXT_Hunt()), LVL_HUNT);
    next;
    clear;

    mes b(".:: " + l("Magic Stats") + " ::.");
    mes "";
    mes b(l("Fire"));
    mes l("%s (Lv %d)", barHandler(EXP_MF, NEXT_Mf()), LVL_M_FIRE);
    mes "";
    mes b(l("Water"));
    mes l("%s (Lv %d)", barHandler(EXP_MW, NEXT_Mw()), LVL_M_WATER);
    mes "";
    mes b(l("Nature"));
    mes l("%s (Lv %d)", barHandler(EXP_MN, NEXT_Mn()), LVL_M_NATURE);
    mes "";
    mes b(l("Harmony"));
    mes l("%s (Lv %d)", barHandler(EXP_MH, NEXT_Mh()), LVL_M_HARMONY);
    mes "";
    mes b(l("Combat"));
    mes l("%s (Lv %d)", barHandler(EXP_MC, NEXT_Mc()), LVL_M_COMBAT);
    mes "";
    mes b(l("Support"));
    mes l("%s (Lv %d)", barHandler(EXP_MS, NEXT_Ms()), LVL_M_SUPPORT);
    close;

OnInit:
    bindatcmd "player", "@info::OnCall", 0, 100, 0;
    bindatcmd "ucp", "@info::OnCall", 0, 100, 0;
    end;
}