summaryrefslogtreecommitdiff
path: root/npc/003-13/arnea.txt
blob: 49f1da0c46016a1272a07b1b7f0919d13ff0adc3 (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// TMW2 Scripts
// Author:
//    4144
//    Jesusalva
// Description:
//    Arena for Duels and PVP (temporary map)

003-13,29,29,0	script	Arnea#003-13	NPC_ELF_F,{
    /*
    // FIXME
    warp "003-10", 22, 62;
    close;
    */
    if (is_staff()) {
        mes "npc name: " + .name$;
        mes "npc ext name: " + .extname$;
        mes "npc id: " + .id;
        mes "npc parent id: " + .parent;
        mes "npc src id: " + .srcId;
        mes "char id 3: " + getcharid(3);
        mes "instance id: " + instance_id();
        mes "Map ID: " + instance_mapname("003-13");
    }
    if (instance_id() >= 0) {
        goto L_Manage;
    } else {
        // Non staff and on 003-13? That's a bug!
        if (!is_staff()) {
            atcommand "@request Hey hey hey, player found in 003-13 - regular map! Report this to Jesusalva at once!";
            warp "Save", 0, 0;
            close;
        }
        mes "npc not in instance";
    }

    close;

L_Manage:
    mesn;
    select
        l("warp back"),
        l("spawn challenge monster! How far can you go?"),
        l("cancel");

    switch (@menu)
    {
        case 1:
            warp "003-10", 22, 62;
            break;
        case 2:
            .@mg=monster("003-13", 38, 32, "Gladiator", TestingMob, 1);
            setunitdata(.@mg, UDT_LEVEL,    BaseLevel+@UDTf);
            setunitdata(.@mg, UDT_HP,       MaxHp+(@UDTf*45));
            setunitdata(.@mg, UDT_MAXHP,    MaxHp+(@UDTf*45));

            setunitdata(.@mg, UDT_STR, readparam(bStr)+(@UDTf*rand(1,3)));
            setunitdata(.@mg, UDT_AGI, readparam(bAgi)+(@UDTf*rand(1,3)));
            setunitdata(.@mg, UDT_VIT, readparam(bVit)+(@UDTf*rand(1,3)));
            setunitdata(.@mg, UDT_INT, readparam(bInt)+(@UDTf*rand(1,3)));
            setunitdata(.@mg, UDT_DEX, readparam(bDex)+(@UDTf*rand(1,3)));
            setunitdata(.@mg, UDT_LUK, readparam(bLuk)+(@UDTf*rand(1,3)));

            // Now, I don't have this info from player, so...
            // We must generate it
            .@str=getunitdata(.@mg, UDT_STR);
            .@agi=getunitdata(.@mg, UDT_AGI);
            .@vit=getunitdata(.@mg, UDT_VIT);
            .@int=getunitdata(.@mg, UDT_INT);
            .@dex=getunitdata(.@mg, UDT_DEX);
            .@luk=getunitdata(.@mg, UDT_LUK);
            .@blv=getunitdata(.@mg, UDT_LEVEL);

            // And then fill it
            setunitdata(.@mg, UDT_ATKRANGE, any(1,1,1,2));
            setunitdata(.@mg, UDT_ATKMIN,   .@blv+.@str+(@UDTf*4));
            setunitdata(.@mg, UDT_ATKMAX,   .@blv+.@str+.@luk+(@UDTf*6));

            setunitdata(.@mg, UDT_DEF,      .@blv+.@vit+(@UDTf*2));
            setunitdata(.@mg, UDT_MDEF,     .@blv+.@int+(@UDTf*2));
            setunitdata(.@mg, UDT_HIT,      .@blv+.@dex+(@UDTf*2));
            setunitdata(.@mg, UDT_FLEE,     .@blv+.@agi+(@UDTf*2));
            setunitdata(.@mg, UDT_PDODGE,   min(30, .@luk/10+(@UDTf/3)));
            setunitdata(.@mg, UDT_CRIT,     (.@blv/2)+.@luk+(@UDTf*2));
            @UDTf+=1;
            npctalk l("UDT Challenge, wave @@! @@ spawned a fighter!", @UDTf, strcharinfo(0));
            closeclientdialog;
            break;
        case 3:
            break;
    }
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, Darkelm);
    setunitdata(.@npcId, UDT_HEADMIDDLE, CopperArmor);
    setunitdata(.@npcId, UDT_HEADBOTTOM, JeansChaps);
    setunitdata(.@npcId, UDT_WEAPON, RockKnife);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 18);

    .sex = G_FEMALE;
    .distance = 9;
    end;

OnInstanceInit:
    .@npcId = getnpcid(instance_npcname(.name$));
    setunitdata(.@npcId, UDT_HEADTOP, Darkelm);
    setunitdata(.@npcId, UDT_HEADMIDDLE, CopperArmor);
    setunitdata(.@npcId, UDT_HEADBOTTOM, JeansChaps);
    setunitdata(.@npcId, UDT_WEAPON, RockKnife);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 18);
    end;

}