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!

[Release] Gachapon,SummoningRock,MagiRock Seller [Working]

Newbie Spellweaver
Joined
Apr 22, 2008
Messages
54
Reaction score
0
Hey RaGEZONE people :D
I made this Gachapon Ticket, The Summoning Rock and The Magic Rock seller!
And the best is. ITS WORKING :D

Copy this and paste it in NPCs.cpp
PHP:
void NPCsScripts::npc_1012002(NPC* npc){ //Vicious
	int state = npc->getState();
	int type = npc->getSelected();
	if(state == 0){
		npc->addText("Would you like to buy some stuff? ");
		npc->sendYesNo();
	}
	else if(state == 1){
		if(npc->getSelected() == YES){
		npc->addText("Ok take a look around! ");
		npc->sendNext();
	}
	else{
	npc->addText("Ok, well come back when ever you changed your mind!");
	npc->sendOK();
	}
}
	else if(state == 2){
	if(npc->getSelected() == YES){
	npc->addText("#L0##bGachapon Ticket#k 1,000,000 Mesos#l\r\n#L1##bThe Summoning Rock#k 20,000 Mesos#l\r\n#L2##bThe Magic Rock#k 20,000 Mesos#l\r\n");
	npc->sendSimple();
	}
}
	else if(state == 3){
	npc->setVariable("type", type);
	if(type == 0){
	if(npc->getMesos() >= 1000000){
	npc->addText("Gachapon Ticket...");
	npc->giveItem(5220000, 1);
	npc->giveMesos(-1000000);
	npc->sendNext();
	npc->end();
}
	else{
	npc->addText("You don't have enough mesos!");
	npc->sendNext();
	npc->end();
	}
}
	if(type == 1){
	if(npc->getMesos() >= 20000){
	npc->addText("The Summoning Rock...");
	npc->giveItem(4006001, 1);
	npc->giveMesos(-20000);
	npc->sendNext();
	npc->end();
}
	else{
	npc->addText("You don't have enough mesos!");
	npc->sendNext();
	npc->end();
	}
}
	if(type == 2){
	if(npc->getMesos() >= 20000){
	npc->addText("The Magic Rock...");
	npc->giveItem(4006000, 1);
	npc->giveMesos(-20000);
	npc->sendNext();
	npc->end();
}
	else{
	npc->addText("You don't have enough mesos!");
	npc->sendNext();
	npc->end();
	}
}
	else if(type == 3){
	npc->addText("Have Fun ...");
	npc->sendNext();
	}
}
	else if(state == 4){
	npc->addText("Bye!");
	npc->sendOK();
}
	else{
	npc->end();
	}
}

EDIT:
I forgot to say this:
Open NPCsScripts.h
and add
PHP:
case 1012002: npc_1012002(npc); break;
and
PHP:
static void npc_1012002(NPC* npc);

-AlmarM-
 
Last edited:
Skilled Illusionist
Joined
Apr 12, 2008
Messages
397
Reaction score
0
Thanx for this ;D
I'll test it soon... Might change the the number of summoning rocks and magic rocks it gives tho...
 
Initiate Mage
Joined
Aug 16, 2007
Messages
3
Reaction score
0
yeah.. I/we where thinking about making an amount box.. but we/HE is kinda busy atm ^^
 
Newbie Spellweaver
Joined
Apr 19, 2008
Messages
96
Reaction score
0
compiling right now i will see if i get errors and if it work i will post update later

Compiling:perfect compile

Edit:Awsome dude it worked perfectly ~.^ keep up the good work =)

Almar i need some help, how can i change the prices xD

RE RE RE RE RE RE RE RE RE EDIT >.> xD: dont need anymore help got it changed gacha tick to 500k ea =D
 
ツ
Loyal Member
Joined
Apr 12, 2008
Messages
729
Reaction score
28
i had errors, but when i added

Code:
#include "NPCs.h"
#include "NPCsScripts.h"


// Gach seller

To the top, perfect compile. thanks m8 :)
 
Back
Top