Newbie Spellweaver
- Joined
- Dec 23, 2007
- Messages
- 89
- Reaction score
- 8
First open a new .cpp File in Source Files section, and name it however you want. and put the following code inside:
Then go to NPCScripts.h file and insert the line:
Below:
And this:
Below this:
This is suppose to be Violet Balloon in crack on the wall, you can use iGoofy's script to teleport there by Paul Andy and Maritin:
http://forum.ragezone.com/f427/release-event-npcs-andy-paul-martin-updated-fixed-387934/
If you dont have the Violet Balloon in the Crack on the Wall map extract the attached file in */MapleStoryServer/Maps
Credits:
monsoon2004 for helping me to fix the code :O
and me for building the basic :O
PHP:
#include "NPCs.h"
#include "NPCsScripts.h"
#include "Mobs.h"
#include "Inventory.h"
#include "Player.h"
void NPCsScripts::npc_2040044(NPC* npc){
int type = npc->getSelected();
npc->setVariable("type", type);
Player* player = npc->getPlayer();
int state = npc->getState();
if(state == 0){
npc->addText("Hello, I'm hosting the currect event.");
npc->sendNext();
}
else if(state == 1){
npc->addText("What do you want to do?\r\n");
npc->addText("#L0##bI want to spawn some event monsters!#k#l\r\n");
npc->addText("#L1##bI would like to get a prize.#k#l\r\n");
npc->addText("#L2##bI would like to go to henesys.#k#l");
npc->sendSimple();
}
else if(state == 2){
if(type == 0){
npc->addText("Alright, there you go!");
npc->sendOK();
npc->end();
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
Mobs::spawnMobPos(player, 9400551, 843, 184);
}
else if(type == 1){
npc->addText("I can give you Stormcaster gloves for 50 pieces of Broken Mirror Glass.");
npc->addText("Are you sure you want to get it?");
npc->sendYesNo();
}
else if(type == 2){
npc->addText("Alright then, good bye!");
npc->sendNext();
}
}
if(state == 3){
if(type == 1){
if(npc->getSelected() == YES){
if(npc->getItemAmount(4031155) >= 50){
npc->giveItem(4031155, -50);
npc->giveItem(1082223, 1);
npc->addText("Thank you, come back if you need more Stormcaster gloves. :)");
npc->sendOK();
npc->end();
}
else{
npc->addText("Sorry but you don't have 50 Broken Mirror Glass.");
npc->sendOK();
npc->end();
}
}
else{
npc->addText("Fine come back if you're still intrested. :)");
npc->sendOK();
npc->end();
}
}
else if(type == 2){
npc->teleport(100000000);
npc->end();
}
}
}
Then go to NPCScripts.h file and insert the line:
PHP:
case 2040044: npc_2040044(npc); break; // Balloon - A Crack on the wall
Below:
PHP:
case 9900000: npc_9900000(npc); break;
And this:
PHP:
static void npc_2040044(NPC* npc); // Balloon - A Crack on the wall
Below this:
PHP:
static void npc_9900000(NPC* npc);
This is suppose to be Violet Balloon in crack on the wall, you can use iGoofy's script to teleport there by Paul Andy and Maritin:
http://forum.ragezone.com/f427/release-event-npcs-andy-paul-martin-updated-fixed-387934/
If you dont have the Violet Balloon in the Crack on the Wall map extract the attached file in */MapleStoryServer/Maps
Credits:
monsoon2004 for helping me to fix the code :O
and me for building the basic :O
Attachments
You must be registered for see attachments list
Last edited: