summaryrefslogtreecommitdiff
path: root/npc/001-8/hub.txt
blob: 3fae0afab4bde1c4b3d57eda29081f875127a7fc (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
// TMW2 Script
// Author:
//    Ernando <ernando.quirino@hotmail.com> (Creator)
//    Jesusalva <admin@tmw2.org>
// Description:
//    Hunger Games™ version for The Mana World Brazil v2, created by Ernando Quirino.

001-8,0,0,0	script	#QuirinoHUB	NPC_HIDDEN,{
    end;

OnStart:
    maptimer("001-8", 5000, "#QuirinoHUB::OnCount10");
    announce("##1HUNGRY QUIRIN EVENT: ##3##BCountdown: 15 seconds!", bc_all|bc_npc);
    end;

OnCount10:
    misceffect(4);
    addtimer(5000, "#QuirinoHUB::OnCount5");
    dispbottom l("10 seconds!");
    end;

OnCount5:
    misceffect(4);
    addtimer(5000, "#QuirinoHUB::OnBegin");
    dispbottom l("5 seconds!");
    end;

OnBegin:
    setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
    misceffect(60);
    misceffect(11);
    dispbottom col("Run! Event started!", 1);
    end;

OnSendWave:
    end;


OnPCLogoutEvent:
OnPCDieEvent:
    if (checkpcblock() & PCBLOCK_ATTACK)
        setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
    getmapxy(.@mapa$, .@a,.@b, 0);
    if (.@mapa$ == "001-8") {
        clearitem();

        // Check if to reduce clearitem() efficiency you've used the cart in an illegal way.
        getcartinventorylist();
    	if (@cartinventorylist_count>=1) {
            // Obviously a cheater, you should not be using the cart on the event. I HATE CHEATERS!
            // Destroy everything you had on the cart
            query_sql("DELETE FROM `cart_inventory` WHERE `char_id`="+getcharid(0));
            // Destroy the cart. Cheaters doesn't deserve it!!
            setcart(0);
            // Delete the storage register. You now need to pay it again, to don't cheat anymore!
            setq General_Banker, 0;
            // And be happy I did not removed your experience or gold!
        }

        // You'll be revived/fully healed, and then warped.
        recovery(getcharid(3));
        warp "000-1", 22, 22;
    }
    end;

}