summaryrefslogtreecommitdiff
path: root/world/map/npc/items/magic_gm_top_hat.txt
blob: f4f6b0782115181a8f718365fdb119f9e41b99cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function|script|ActivateMagicGMTophat
{
    if (getgmlevel() < 60) goto L_Return;
    getinventorylist;
    if ((checkweight("MurdererCrown", 1) == 0) || (@inventorylist_count == 100))
        goto L_Inventory;
    // Get the current reward of the event. This may be changed later
    getitem "MurdererCrown", 1;
    // Display an effect
    misceffect FX_CHANNELLING_CAST, strcharinfo(0);
    // Log the usage of this spell
    gmcommand "@l "+strcharinfo(0)+" used the Magic GM Top Hat.";
    return;

L_Inventory:
    message strcharinfo(0), "You cannot create this item. You're too heavy or you don't have a free slot.";
    return;

L_Return:
    return;
}