summaryrefslogtreecommitdiff
path: root/npc/commands/debug-look.txt
blob: bb535ba220b245714503bbb031943de25e478d70 (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
function	script	BarberDebug	{
    function setStyle {
        clear;
        setnpcdialogtitle l("Appearance Debug - Barber");
        mes l("Hair style") + ": " + getlook(LOOK_HAIR);
        next;
        mes l("Please enter the desired style") + " (1-255)";
        input .@h, 1, 0xFF;
        setlook LOOK_HAIR, max(1, min(0xFF, .@h));
        return;
    }
    function setColor {
        clear;
        setnpcdialogtitle l("Appearance Debug - Barber");
        mes l("Hair color") + ": " + getlook(LOOK_HAIR_COLOR);
        next;
        mes l("Please enter the desired color") + " (0-255)";
        input .@h, 0, 0xFF;
        setlook LOOK_HAIR_COLOR, max(0, min(0xFF, .@h));
        return;
    }
    function setRace {
        clear;
        setnpcdialogtitle l("Appearance Debug - Race");
        mes l("Race") + ": " + Class + " (" + get_race(GETRACE_FULL) + ")";
        next;
        mes l("Please enter the desired race") + " (0-32767)";
        input .@r, 0, 0x7FFF;
        jobchange max(0, min(0x7FFF, .@r));
        return;
    }

    do
    {
        clear;
        setnpcdialogtitle l("Appearance Debug");
        mes l("This menu allows you to customize your appearance.");
        mes "";

        mes "---";
        mes l("Gender") + ": " + genderToString(Gender);
        mes l("Hair style") + ": " + getlook(LOOK_HAIR);
        mes l("Hair color") + ": " + getlook(LOOK_HAIR_COLOR);
        mes l("Race") + ": " + Class + " (" + get_race() + ")";;
        mes "---";

        next;
        mes l("What do you want to change?");
        select
            menuimage("actions/edit", l("Gender") + " [" + l("Requires logout") + "]"),
            menuimage("actions/edit", l("Hair style")),
            menuimage("actions/edit", l("Hair color")),
            menuimage("actions/edit", l("Race")),
            rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu")));

        switch (@menu)
        {
            case 1: BarberChangeGender(); break;
            case 2: setStyle; break;
            case 3: setColor; break;
            case 4: setRace; break;
            case 5: return;
        }
    } while (1);
}



-	script	@look	32767,{
    end;

OnCall:
    if (!debug && !is_dev())
    {
        end;
    }
    BarberDebug;
    closeclientdialog;
    end;

OnInit:
    bindatcmd "look", "@look::OnCall", 0, 99, 0;
}