summaryrefslogtreecommitdiff
path: root/world/map/npc/items/brawling_item.txt
blob: a3162b93ff65e4bd2cb70925cb279f7f10186f6d (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
// Items which can only be used while unarmed
// Variables passed to this script:
//  @slotId The slot in which the item would have been equipped in. This is passed automagically when called in an equip script.

function|script|BrawlingItem
{
    cleararray @skilllist_name$[0], "", 8;
    cleararray @skilllist_id[0], 0, 8;
    cleararray @skilllist_count[0], 0, 8;
    getactivatedpoolskilllist;

    if (@skilllist_id[0] != SKILL_BRAWLING)
        goto L_BrawlingItem_Check_Weapon;

        bonus bStr, 2;
        bonus bDex, 1;

    goto L_BrawlingItem_Check_Weapon;

L_BrawlingItem_Check_Weapon:

    if (getequipid(equip_hand1) == -1)
        goto L_Return;

    message strcharinfo(0), "This item's curse does not allow it to be used with weapons equipped.";

    goto L_BrawlingItem_UnequipLater;

L_BrawlingItem_UnequipLater:

    // This is for debug
    if (getgmlevel() >= 60)
        bonus bAgi, -7;
    if (getgmlevel() >= 60)
        goto L_Return;

    callfunc "UnequipLater";
    goto L_Return;

L_Return:
    return;
}