Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

"Event" in crack on the wall

Status
Not open for further replies.
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:

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:
Newbie Spellweaver
Joined
Apr 9, 2008
Messages
60
Reaction score
0
Re: [Release] "Event" in crack on the wall

Are you using an autorestarter? When ever I spawn too much like over 5 with auto restarter it tends to crash the client.
 
Newbie Spellweaver
Joined
Dec 23, 2007
Messages
89
Reaction score
8
Re: [Release] "Event" in crack on the wall

Nope I'm running it by Visual C++
 
Newbie Spellweaver
Joined
Mar 23, 2008
Messages
58
Reaction score
0
Re: [Release] "Event" in crack on the wall

Gonna post the release with a guide as soon as I'll get some help to finish the code itself.
The other thread was deleted so I'll post the code here:

PHP:
#include "NPCs.h"
#include "NPCsScripts.h"
#include "Mobs.h"

void NPCsScripts::npc_2040044(NPC* npc){
Player* player = npc->getPlayer();
int state = npc->getState();
if(state == 0){
    npc->addText("Hello, I'm hosting the currect event.");
    npc->sendNext();
}
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();
}
if(state == 2){        
        int type = npc->getSelected();
        npc->setVariable("type", type);
            if(type == 0){
                    npc->addText("Alright, there you go!");
                    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){
                if(player->inv->getItemAmount(4031155) >= 50) {
                    npc->addText("I can give you Stormcaster gloves for 50 pieces of Broken Mirror Glass.\r\n");
                    npc->addText("Are you sure you want to get it?");
                    npc->sendYesNo();
                } 
                else {
                    npc->addText("I can give you Stormcaster gloves for 50 pieces of Broken Mirror Glass");
                    npc->sendOK();
                }
                npc->end();
            }
            else if(type == 2){
                npc->addText("Alright then, good bye!");
                npc->sendNext();
                npc->teleport(100000000);
            }
}
    if(state == 3){
        if(npc->getSelected() == YES){
        Player* player = npc->getPlayer();
        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("Fine come back if you're still intrested. :)");
        npc->sendOK();
    }
}
Now I have another problem, when I click the NPC I get autodc but it doesn't crash the server or something.
Anyone can help?

I fixed the code up a bit and tested it and it works fine for me so here it is

Code:
#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();
        }
    }
}
 
Experienced Elementalist
Joined
Apr 13, 2008
Messages
211
Reaction score
0
Re: [Release] "Event" in crack on the wall

lol SCG giver oO
 
Banned
Banned
Joined
Apr 6, 2008
Messages
120
Reaction score
0
Re: [Release] "Event" in crack on the wall

sounds a tad like mine >.>
 
Newbie Spellweaver
Joined
Dec 23, 2007
Messages
89
Reaction score
8
Re: [Release] "Event" in crack on the wall

Well at least I tried to help.
 
Newbie Spellweaver
Joined
Apr 13, 2008
Messages
14
Reaction score
0
Re: [Release] "Event" in crack on the wall

How do you add NPCs into the maps? Some Party Quest maps do not have NPCs. How do I add them?
 
Newbie Spellweaver
Joined
Apr 5, 2008
Messages
22
Reaction score
0
Re: [Release] "Event" in crack on the wall

How do you add NPCs into the maps? Some Party Quest maps do not have NPCs. How do I add them?
Code:
        <NPC>
            <id>NPC ID HERE</id>  Look up on MapleTip or Sauna.gibbed
            <x>X Coord</x>  Go in game and use !pos command
            <cy>Y Coord</cy>  Go in game and use !pos command
            <fh>Foothold HERE</fh>  Count footholds lower in the map file & pick correct one in ranges of your X & Y
            <rx0>RX0 HERE</rx0>  X Coord + 50
            <rx1>RX1 HERE</rx1>  RX0 + 100
        </NPC>
:drinks_no (Be sure your editing the correct map!)
 
Newbie Spellweaver
Joined
Apr 13, 2008
Messages
14
Reaction score
0
Re: [Release] "Event" in crack on the wall

What do you mean by Foothold? Can explain further? Thanks!

Btw, i checked in game and realized that the Violet Balloon are not placed at the same positions. Is it the same as Maple Global's one?
 
Newbie Spellweaver
Joined
Apr 15, 2008
Messages
41
Reaction score
0
Re: [Release] "Event" in crack on the wall

d/cs when i click on npc
 
Newbie Spellweaver
Joined
Apr 20, 2008
Messages
7
Reaction score
0
Re: [Release] "Event" in crack on the wall

No offence, but this was taken from Kryticals repack -_-
 
Newbie Spellweaver
Joined
May 6, 2008
Messages
8
Reaction score
0
Re: [Release] "Event" in crack on the wall

how can you start the event?
 
Skilled Illusionist
Joined
Apr 11, 2008
Messages
302
Reaction score
0
Re: [Release] "Event" in crack on the wall

The npcs are too close to each other. it's hard to click the other npc that warps you out
 
Newbie Spellweaver
Joined
May 6, 2008
Messages
8
Reaction score
0
Re: [Release] "Event" in crack on the wall

i want to test it out but i don't know how to start.. please help !!!
 
Status
Not open for further replies.
Back
Top