[Release]Prank NPC for Maplestory **With TitanMS Source**

Status
Not open for further replies.
Newbie Spellweaver
Joined
Dec 23, 2008
Messages
55
Reaction score
7
Ok first off:
THIS IS A TITAN SOURCE SCRIPT, NOT AN ODIN SOURCE SCRIPT MEANING IT IS C++ PROGRAMMING.
Overview::
A player will double click an NPC and then it will ask: "Are you gay?"; if the player says "NO" then it will not let them leave the conversation, but if they say yes; a red notice at the bottom says: <player who clicked "YES"> admitted to being gay. Then the conversation will be over.

Lets get started! *NOTE* Replace <NPC ID> with the ID of the NPC that will prank people

Ok, create a new file called: PrankNPC.cpp
Next copy this code into your new file (PrankNPC.cpp)
PHP:
#include "NPCs.h"
#include "NPCsScripts.h"
#include "Player.h"
#include "PlayersPacket.h"

void NPCsScripts::<NPC ID>(NPC* npc) {
	Player* player = npc->getPlayer();
	int state = npc->getState();
	if (state == 0) {
		npc->addText("Are you gay?");
		npc->sendYesNo();
		} 
		else {
			npc->addText("You can't leave this chat then...");
			npc->sendOK();
			int state = npc->getState();
		}
	}

	else if (state == 1) {
		if(npc->getSelected() == YES){ 
			npc->getPlayer()->getName();
			PlayersPacket::showMassage(%s admitted to being gay, 5);
			npc->end()
		}
Now goto NPCsScripts.cpp and find the line:
PHP:
            case 2030000: npc_2030000(npc); break;
Underneath that write:
PHP:
            case <NPC ID>: npc_<NPC ID>(npc); break;
Now find the line:
PHP:
    static void npc_2030000(NPC* npc);
Underneath that write:
PHP:
    static void npc_<NPC ID>(NPC* npc);


If you have any questions or comments please post them here.
 
Thanks Jordan! I took someone elses idea (I forgot who, might be you, i dont know) and expanded on it. It was originally done in Odin Source but I made into Titan.
 
Ok first off:
THIS IS A TITAN SOURCE SCRIPT, NOT AN ODIN SOURCE SCRIPT MEANING IT IS C++ PROGRAMMING.
Overview::
A player will double click an NPC and then it will ask: "Are you gay?"; if the player says "NO" then it will not let them leave the conversation, but if they say yes; a red notice at the bottom says: <player who clicked "YES"> admitted to being gay. Then the conversation will be over.

Lets get started! *NOTE* Replace <NPC ID> with the ID of the NPC that will prank people

Ok, create a new file called: PrankNPC.cpp
Next copy this code into your new file (PrankNPC.cpp)
PHP:
#include "NPCs.h"
#include "NPCsScripts.h"
#include "Player.h"
#include "PlayersPacket.h"

void NPCsScripts::<NPC ID>(NPC* npc) {
	Player* player = npc->getPlayer();
	int state = npc->getState();
	if (state == 0) {
		npc->addText("Are you gay?");
		npc->sendYesNo();
		} 
		else {
			npc->addText("You can't leave this chat then...");
			npc->sendOK();
			int state = npc->getState();
		}
	}

	else if (state == 1) {
		if(npc->getSelected() == YES){ 
			npc->getPlayer()->getName();
			PlayersPacket::showMassage(%s admitted to being gay, 5);
			npc->end()
		}
Now goto NPCsScripts.cpp and find the line:
PHP:
            case 2030000: npc_2030000(npc); break;
Underneath that write:
PHP:
            case <NPC ID>: npc_<NPC ID>(npc); break;
Now find the line:
PHP:
    static void npc_2030000(NPC* npc);
Underneath that write:
PHP:
    static void npc_<NPC ID>(NPC* npc);


If you have any questions or comments please post them here.

I have a question similar to this. I use c++ and the source for this, but I want to make like a npc say want 200 messos. Then, you click yes and in the chatbox it says you get all these items. But you can't leave the chat which I know how to do. Though somehowm y c++ doesnt pop up the thing where you're typing "give" then it gives all these other stuff like messo, item, exp. So I basically need the code for taking away the good items when you click no, which you finally leave the chat, but you lose the great items. Or maybe you can get all those items if you're a gm.
 
Status
Not open for further replies.
Back