summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/evil_obelisk.txt
blob: e2ba0bbeb988aad17cfa7ae140c8b9a8c755278f (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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// FIXME: There's no for loop so make a callsub loop
function|script|EvilObelisk
{
    mes "[Evil Obelisk]";
    //if (mobcount(getmap(), "All") > 300) goto L_Full; // , the craving done
    mes "(A mystical red aura surrounds this stone. The stone seems to glow brighter as your coin purse gets closer... It seems to crave money.)";
    next;

    set @cost_jacko, 5000;
    set @cost_gy1, 7500;
    set @cost_gy2, 11000;
    set @cost_skull, 4000;
    set @cost_snake, 4500;
    set @cost_keshlam, 18000;

    menu
        "Don't pay it anything.", L_Close,
        "Pay it " + @cost_skull + " gold.", L_SKULL,
        "Pay it " + @cost_snake + " gold.", L_SNAKE,
        "Pay it " + @cost_jacko + " gold.", L_JACKO,
        "Pay it " + @cost_gy1 + " gold.", L_GRAVEYARD1,
        "Pay it " + @cost_gy2 + " gold.", L_GRAVEYARD2,
        "Pay it " + @cost_keshlam + " gold.", L_KESHLAM;

L_JACKO:
    if (Zeny < @cost_jacko)
        goto L_NotEnough;
    set Zeny, Zeny - @cost_jacko;
    set @mob_id, JackO;
    set @mob_count, rand(1,3);
    goto L_Summon;


L_GRAVEYARD1:
    if (Zeny < @cost_gy1)
        goto L_NotEnough;
    set Zeny, Zeny - @cost_gy1;
    set @mob_count, rand(6,8);
    set @tmp_count, 0;
    goto L_GRAVEYARD1_1;

L_GRAVEYARD1_1:
    set @tmp_count, @tmp_count + 1;
    if (@tmp_count > @mob_count) goto L_Close;
    set @temp, rand(3);
    if(@temp == 0)
        set @mob_id, Zombie;
    if(@temp == 1)
        set @mob_id, Fallen;
    if(@temp == 2)
        set @mob_id, LadySkeleton;
    if(@temp == 3)
        set @mob_id, Skeleton;
    callsub S_Summon;
    goto L_GRAVEYARD1_1;


L_GRAVEYARD2:
    if (Zeny < @cost_gy2)
        goto L_NotEnough;
    set Zeny, Zeny - @cost_gy2;
    set @mob_count, rand(6,8);
    set @tmp_count, 0;
    goto L_GRAVEYARD2_1;

L_GRAVEYARD2_1:
    set @tmp_count, @tmp_count + 1;
    if (@tmp_count > @mob_count) goto L_Close;
    set @temp, rand(6);
    if(@temp == 0)
        set @mob_id, LadySkeleton;
    if(@temp == 1)
        set @mob_id, Skeleton;
    if(@temp == 2)
        set @mob_id, WitchGuard;
    if(@temp == 3)
        set @mob_id, RedBone;
    if(@temp == 4)
        set @mob_id, Stalker;
    if(@temp == 5)
        set @mob_id, Scythe;
    callsub S_Summon;
    goto L_GRAVEYARD2_1;


L_SKULL:
    if (Zeny < @cost_skull)
        goto L_NotEnough;
    set Zeny, Zeny - @cost_skull;
    set @mob_count, rand(7,9);
    set @tmp_count, 0;
    goto L_SKULL_1;

L_SKULL_1:
    set @tmp_count, @tmp_count + 1;
    if (@tmp_count > @mob_count) goto L_Close;
    set @temp, rand(3);
    if(@temp == 0)
        set @mob_id, PoisonSkull;
    if(@temp == 1)
        set @mob_id, FireSkull;
    if(@temp == 2)
        set @mob_id, IceSkull;
    callsub S_Summon;
    goto L_SKULL_1;


L_SNAKE:
    if (Zeny < @cost_snake)
        goto L_NotEnough;
    set Zeny, Zeny - @cost_snake;
    set @mob_count, rand(4,10);
    set @tmp_count, 0;
    goto L_SNAKE_1;

L_SNAKE_1:
    set @tmp_count, @tmp_count + 1;
    if (@tmp_count > @mob_count) goto L_Close;
    set @temp, rand(4);
    if(@temp == 0)
        set @mob_id, GrassSnake;
    if(@temp == 1)
        set @mob_id, MountainSnake;
    if(@temp == 2)
        set @mob_id, Snake;
    if(@temp == 3)
        set @mob_id, CaveSnake;
    callsub S_Summon;
    goto L_SNAKE_1;


L_KESHLAM:
    if (Zeny < @cost_keshlam)
        goto L_NotEnough;
    set Zeny, Zeny - @cost_keshlam;
    set @mob_count, rand(3,7);
    set @tmp_count, 0;
    goto L_KESHLAM_1;

L_KESHLAM_1:
    set @tmp_count, @tmp_count + 1;
    if (@tmp_count > @mob_count) goto L_Close;
    set @temp, rand(3);
    if(@temp == 0)
        set @mob_id, Tengu;
    if(@temp == 1)
        set @mob_id, Sasquatch;
    if(@temp == 2)
        set @mob_id, ManaSlayer;
    callsub S_Summon;
    goto L_KESHLAM_1;

S_Summon:
    areamonster @map$, @x0, @y0, @x1, @y1, "", @mob_id, 1;
    return;

L_Summon:
    areamonster @map$, @x0, @y0, @x1, @y1, "", @mob_id, @mob_count;
    goto L_Close;

L_NotEnough:
    mes "You don't have that much money.";
    goto L_Close;

L_Close:
    set @cost_jacko, 0;
    set @cost_gy1, 0;
    set @cost_gy2, 0;
    set @cost_skull, 0;
    set @cost_snake, 0;
    set @cost_keshlam, 0;
    set @temp, 0;
    set @tmp_count, 0;
    return;

}