summaryrefslogtreecommitdiff
path: root/npc/functions/mobpoint.txt
blob: aa1e694363c5e5522c07e22eee25f1436d6e192e (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
// TMW2 Scripts
// Author: Crazyfefe
//         Jesusalva
// Desc:   Mob Points for Aidan & Ishi. You will gain MONSTER-LEVEL mob points.

function	script	mobpoint	{
    if (!MPQUEST)
        return;
    //if (killedrid < 1002) goto L_Return;

    // You get MobLv + 10% as MobPoints.
    // So a level 100 monster gives you 110 MobPt.
    .@addval=strmobinfo(3,killedrid)*11/10;
    Mobpt = Mobpt + .@addval;
    return;

}

000-0,0,0,0	script	#mobptsys	NPC_HIDDEN,{
    end;

OnNPCKillEvent:
    if (killedrid == MonsterKing) {
        announce "An illusionary monster king was killed.", bc_all | bc_pc;
        getexp min(641500, BaseLevel**3), 0;
    }

    // Remove undue Job exp
    // The check is probably correct, but setparam is not working =/
    /*
    if (strmobinfo(7, killedrid) == 0 && readparam(JobExp) > 0) {
        setparam(JobExp, readparam(JobExp)-1);
    }
    */

    // call functions
    callfunc "mobpoint";
    callfunc "mobhunter";
    callfunc "SQuest_Hasan";
    end;

// When you kill a player, some special care is needed
// Only a few maps will give you experience for PK: Tulimshar's Guards Arena, 
// Frostia Imperial PVP Arena, Call Of Dusty, Arena Quirino Voraz, Terranite Cave.
OnPCKillEvent:
    // killedrid
    // This is actually just a bunch of tests.
    if (is_staff()) {
        // First: Assume the killedrid is the actual Account ID
        dispbottom l("ID: @@", killedrid);
        .@killed$=strcharinfo(0,"error",killedrid);
        dispbottom l("You murder @@ in cold blood.", .@killed$);
        // Second: Assume the killedrid is actually the Char ID
        .@killed$=strcharinfo(0,"error",charid2rid(killedrid));
        dispbottom l("In case of false positive, @@ was murdered.", .@killed$);
        // Third: this one may crash
        getexp readparam(BaseLevel, killedrid), 0;
    }

    end;

}