summaryrefslogtreecommitdiff
path: root/npc/commands/exp.txt
blob: b8be2fa057c5e8a8a094a544f5f9b735ded19332 (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
// TMW2 Script
// Author: Jesusalva

// @getexp atcommand
// Gets experience (cannot be negative)
//
// group lv: 60
// group char lv: 60
// log: True

-	script	@getexp	32767,{
    end;

OnCall:
    .@delta$ = .@atcmd_parameters$[0];
    .@d = atoi(.@delta$);

    getexp .@d, 0;
    end;

/*
OnHomun:
    if (!gethominfo(0)) {
        dispbottom l("No homunculus found!");
        end;
    }
    .@delta$ = .@atcmd_parameters$[0];
    .@d = atoi(.@delta$);

    gethomunexp .@d; // [TMW2 Only] [Broken in TMW]
    end;
*/

OnGuild:
    if (getcharid(2) < 1) {
        dispbottom l("No guild found!");
        end;
    }
    .@delta$ = .@atcmd_parameters$[0];
    .@d = atoi(.@delta$);

    guildgetexp .@d;
    end;

OnInit:
    bindatcmd "getexp", "@getexp::OnCall", 60, 60, 1;
    //bindatcmd "gethexp", "@getexp::OnHomun", 60, 60, 1;
    bindatcmd "getgexp", "@getexp::OnGuild", 60, 60, 1;
}