summaryrefslogtreecommitdiff
path: root/npc/033-1/misc.txt
blob: 360fffd4d06747c45038dcaee68688a503b9b757 (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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
// Moubootaur Legends Script
// Author:
//    Jesusalva
// Description:
//  Guild House & Warps

033-1,134,79,0	script	#GDoor	NPC_NO_SPRITE,0,0,{
    end;
OnTouch:
    if (getcharid(2) < 1) {
        dispbottom l("You do not belong to a guild.");
        end;
    }
    // Warp you to your guild house if exist.
    // Build the instance otherwise.

    // Well, "checking if instance exist by mapname" is an illusion.
    // So we try to build and if we fail, we warp the player to the instance.
    .@ID=getcharid(2);
    @MAP_NAME$="guild@"+str(.@ID); // Max 4 chars for map name

    .@INSTID = instance_create("guilds@a"+(.@ID), getcharid(2), IOT_GUILD);

    // Instance already exists - .@INSTID returns "-4"
    if (.@INSTID == -4) {
        warp @MAP_NAME$, any(34,35), 48;
        end;
    }

    .@instanceMapName$ = instance_attachmap("guilds", .@INSTID, 0, @MAP_NAME$);

    instance_set_timeout(0, 0, .@INSTID);
    instance_init(.@INSTID);
    warp @MAP_NAME$, any(34,35), 48;
    end;

}

033-1,118,190,0	script	Sign#0331A	NPC_SWORDS_SIGN,{
    mesc "↑ "+l("Porthos");
    mesc "↓ "+l("Dead end");
	close;
}

033-1,121,151,0	script	Sign#0331B	NPC_SWORDS_SIGN,{
    mesc "← "+l("Grandmaster's Residence");
    mesc "→ "+l("Porthos");
	close;
}

033-1,166,102,0	script	Sign#0331C	NPC_SWORDS_SIGN,{
    mesc l("Order of Ice Headquarters");
	mesc l("Status resets, magic, and more!");
	mes "";
    mesc "← "+l("Guild Hall, Warp Region, Bank");
    mesc "→ "+l("General Store, Training Area, Farming Fields");
    mesc "↓ "+l("Grandmaster's Residence");
	close;
}

033-1,161,91,0	script	Sign#0331D	NPC_SWORDS_SIGN,{
    mesc "← "+l("Warp Region, Guild Hall");
    mesc "→ "+l("Bank");
    mesc "↓ "+l("Order of Ice, General Store, Grandmaster's Residence");
	close;
}

033-1,141,89,0	script	Sign#0331E	NPC_SWORDS_SIGN,{
    mesc "↑ "+l("Guild Hall");
    mesc "→ "+l("Porthos");
	close;
}

033-1,52,192,0	script	Sign#0331F	NPC_SWORDS_SIGN,{
    mesc "↑ "+l("Event & Server Portals");
    mesc "→ "+l("Event Portal");
    mesc "← "+l("Porthos");
    mesc "↓ "+l("TMW Classic Portal");
	close;
}





function	script	SetPorthosPortal	{
    .@id = getarg(0);
        mesn l("Portal %02d", .@id);
        switch (.@id) {
            case 6:
            mesc l("Event: Moubootaur Showdown"), 1; break;
            case 7:
            mesc l("Warp: TMW Classic"), 1; close;
            case 8:
            mesc l("Event: Blanc's Showdown"), 1; break;
            case 9:
            mesc l("Warp: TMW ML"), 1; close;
            default:
            mesc l("This portal has not been coded yet."); close;
        }
        next;
        mes l("Do you want to activate the event?");
        if (askyesno() == ASK_NO) close;
        switch (.@id) {
        case 6:
            setd(sprintf("$@EVENT_%02d", .@id), PORTHOS_ACTIVE);
            setd(sprintf("$@EVENT_%02d_M$", .@id), "001-13-2");
            setd(sprintf("$@EVENT_%02d_X", .@id), 47);
            setd(sprintf("$@EVENT_%02d_Y", .@id), 52);
            break;
        case 8:
            // Clean-up 001-3 in case there are already mobs there
            killmonsterall("001-3");
            // Environment Monsters, they do not respawn
            .@m$="001-3";
            // Thematic mobs
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, Thug), Thug, 150);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, Swashbuckler), Swashbuckler, 150);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, Grenadier), Grenadier, 140);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, OceanPirate), OceanPirate, 100);
            // There's `Marley` but they're listed as boss
            // We'll likely use them in the mazes, as your target?
            // Environment runt
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, DeathCat), DeathCat, 100);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, BlackSlime), BlackSlime, 90);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, SmallFrog), SmallFrog, 80);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, BigFrog), BigFrog, 80);
            // The lower tier
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, WickedMushroom), WickedMushroom, 50);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, Forain), Forain, 50);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, Assassin), Assassin, 50);
            // The mid tier
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, HoodedNinja), HoodedNinja, 30);
            // The high tier
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, BlackSlimeMother), BlackSlimeMother, 10);
            // The boss level spawns
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, Reaper), Reaper, 2);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, NightmareDragon), NightmareDragon, 2);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, Mandragora), Mandragora, 1);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, SiegeTower), SiegeTower, 1);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, Golem), Golem, 2);
            areamonster(.@m$, 20, 20, getmapinfo(MAPINFO_SIZE_X, .@m$), getmapinfo(MAPINFO_SIZE_Y, .@m$), strmobinfo(1, ShadowTortuga), ShadowTortuga, 1);
            // Set everything up
            setd(sprintf("$@EVENT_%02d", .@id), PORTHOS_ACTIVE);
            setd(sprintf("$@EVENT_%02d_M$", .@id), "001-3");
            setd(sprintf("$@EVENT_%02d_X", .@id), 164);
            setd(sprintf("$@EVENT_%02d_Y", .@id), 33);
            kamibroadcast("Blanc's Showdown was enabled.");
            break;
        default:
            mes l("Error.");
            break;
        }
        close;
    return;
}


// Shortcut to TMW Classic?
033-1,85,227,0	script	#Porthos07	NPC_NO_SPRITE,0,0,{
    end;
OnTouch:
    slide 85, 228;
    mes l("Do you want to visit The Mana World: Classic?");
    next;
    if (askyesno() == ASK_YES)
        MirrorLakeSendTo(MLP_TMW, 0);
    closeclientdialog;
    end;
}

// Event: Blanc's Manhunt
033-1,72,190,0	script	#Porthos08	NPC_NO_SPRITE,0,0,{
    end;
OnTouch:
    if ($@EVENT_06 == PORTHOS_BUSY) {
        dispbottom l("This portal is currently busy - an event must be in progress.");
        end;
    }
    // 001-3 portals
    if ($@EVENT_08 == PORTHOS_UNUSED) {
        if (is_admin() || is_master())
            SetPorthosPortal(8);
        dispbottom l("This portal is not currently active.");
        end;
    }
    warp $@EVENT_08_M$, $@EVENT_08_X, $@EVENT_08_Y;
    end;
}

// Shortcut to Moubootaur Legends?
033-1,31,155,0	script	#Porthos09	NPC_NO_SPRITE,0,0,{
    end;
OnTouch:
    slide 31, 156;
    mes l("Do you want to visit The Mana World: Moubootaur Legends?");
    next;
    if (askyesno() == ASK_YES)
        MirrorLakeSendTo(MLP_ML, 0);
    closeclientdialog;
    end;
}

// TODO: Event: Zax De'Kagen Showdown
// Event: Moubootaur Showdown
// This is a draft in npc/config/events.txt
033-1,154,238,0	script	#Porthos06	NPC_NO_SPRITE,0,0,{
    end;
OnTouch:
    if ($@EVENT_06 == PORTHOS_BUSY) {
        dispbottom l("This portal is currently busy - an event must be in progress.");
        end;
    }
    if ($@EVENT_06 == PORTHOS_UNUSED) {
        if (is_admin() || is_master())
            SetPorthosPortal(6);
        dispbottom l("This portal is not currently active.");
        end;
    }
    warp $@EVENT_06_M$, $@EVENT_06_X, $@EVENT_06_Y;
    end;
}