找到 TeleportNPCs.cpp
在前面#include "Inventory.h"
的后面添加 (如果有就不用添加了)
Copy code
#include "Mobs.h"
#include "Players.h"
#include "PlayersPacket.h"
在最后面添加这句
Copy code
//Deep Inside the Clocktower - Tombstone --//Made By Lir//-- Thanksfull for CCoffee
void NPCsScripts::npc_2041024(NPC* npc){
int state = npc->getState();
if(state == 0){
npc->addText("Do you sure you are strong enough to fight papulatus?");
npc->sendYesNo();
}
else if(state == 1){
if(npc->getSelected() == YES){
npc->addText("Alright, Be careful and dont forget to click on #bMachine Apparatus#k to summon papulatus!");
npc->sendOK();
}
else{
npc->addText("Well you did clicked No, Come back next time");
npc->sendOK();
}
}
else if(state == 2){
if(npc->getSelected() == YES){
npc->teleport(220080001);
}
npc->end();
}
}
//Origin of Clocktower - Machine Apparatus
void NPCsScripts::npc_2041025(NPC* npc){
int state = npc->getState();
if(state == 0){
npc->addText("Welcome to Origin of Clocktower, What can i do for you?");
npc->sendNext();
}
if(state == 1){
npc->addText("Please choose what you would like to do:\r\n#L0#Summon papulatus#l\r\n#L1#Leave this place#l");
npc->sendSimple();
}
if(state == 2){
type = npc->getSelected();
npc->setVariable("type", type);
if(type == 0){ // Summon Papulatus
npc->addText("Are you sure you want to summon #bPapulatus#k?");
npc->sendYesNo();
}
else if(type == 1){ // Exit the place
npc->addText("You don’t have anything else to do here, Do you really want to go back to #bDeep Inside the Clocktower#k?");
npc->sendYesNo();
}
}
if(state == 3 && type == 0){
if(npc->getSelected() == YES){
Player* player = npc->getPlayer();
npc->end();
Mobs::spawnMob(player, 8500001);
}
else{
npc->addText("Ok i will get u out now.");
npc->sendOK();
}
npc->end();
}
if(state == 3 && type == 1){
if(npc->getSelected() == YES){
npc->end();
npc->teleport(220080000);
}
else{
npc->addText("I think #bPapulatus#k is too much strong for you");
npc->sendOK();
}
npc->end();
}
}
之后打开NPCsScripts.h
在类似case 9900000: npc_9900000(npc); break; (可能你的不是9900000,不过都可以)的后面添加
Copy code
case 2041024: npc_2041024(npc); break; // Deep Inside the Clocktower - Tombstone
case 2041025: npc_2041025(npc); break; // Origin of Clocktower - Machine Apparatus
在类似static void npc_9900000(NPC* npc); (可能你的不是9900000,不过都可以)的后面添加
Copy code
static void npc_2041024(NPC * npc);
static void npc_2041025(NPC * npc);
--------------------------------------------------------------------------------
转载请注名: Www.CnMxD.CoM
--------------------------------------------------------------------------------
下面为祭坛召唤扎昆的代码
同样是加在TeleportNPCs.cpp 的最后面
Copy code
//The Door To Zakum - Adobis
void NPCsScripts::npc_2030008(NPC* npc){
int state = npc->getState();
if(state == 0){
npc->addText("You think your tough enough to take on Zakum?");
npc->sendYesNo();
}
else if(state == 1){
if(npc->getSelected() == YES){
npc->addText("Alright, Be careful though Zakum is one of the most powerful monsters in maplestory!");
npc->sendOK();
}
else{
npc->addText("Hmm... Well come back if you ever want to try.");
npc->sendOK();
}
}
else if(state == 2){
if(npc->getSelected() == YES){
npc->teleport(280030000);
}
npc->end();
}
}
//Zakums Altar - Amon
void NPCsScripts::npc_2030010(NPC* npc){
int state = npc->getState();
if(state == 0){
npc->addText("Welcome to Zakums Altar, What can i do for you?");
npc->sendNext();
}
if(state == 1){
npc->addText("Please choose what you would like to do:\r\n#L0#Summon Zakum#l\r\n#L1#Leave#l");
npc->sendSimple();
}
if(state == 2){
type = npc->getSelected();
npc->setVariable("type", type);
if(type == 0){ // Summon Zakum
npc->addText("Are you sure you want to summon #bZakum#k?");
npc->sendYesNo();
}
else if(type == 1){ // Leave
npc->addText("You don’t have anything else to do here, huh? Do you really want to go back to #bAdobis#k?");
npc->sendYesNo();
}
}
if(state == 3 && type == 0){
if(npc->getSelected() == YES){
Player* player = npc->getPlayer();
npc->end();
Mobs::spawnMob(player, 8800000);
Mobs::spawnMob(player, 8800003);
Mobs::spawnMob(player, 8800004);
Mobs::spawnMob(player, 8800005);
Mobs::spawnMob(player, 8800006);
Mobs::spawnMob(player, 8800007);
Mobs::spawnMob(player, 8800008);
Mobs::spawnMob(player, 8800009);
Mobs::spawnMob(player, 8800010);
}
else{
npc->addText("Wise choice zakum is #bExtreamly#k powerful.");
npc->sendOK();
}
npc->end();
}
if(state == 3 && type == 1){
if(npc->getSelected() == YES){
npc->end();
npc->teleport(211042300);
}
else{
npc->addText("Waste my time why dont you.");
npc->sendOK();
}
npc->end();
}
}
然后在类似case 9900000: npc_9900000(npc); break; (可能你的不是9900000,不过都可以)的后面添加
Copy code
case 2030008: npc_2030008(npc); break; // Adobis - The Door To Zakum (801040000)
case 2030010: npc_2030010(npc); break; // Amon - Zakum's Altar (280030000)
在类似static void npc_9900000(NPC* npc); (可能你的不是9900000,不过都可以)的后面添加
Copy code
----------------------------------------------------------------------
冒险岛私服