Hey RaGEZONE people
I made this Gachapon Ticket, The Summoning Rock and The Magic Rock seller!
And the best is. ITS WORKING
Copy this and paste it in NPCs.cpp
EDIT:
I forgot to say this:
Open NPCsScripts.h
and add
and
-AlmarM-
I made this Gachapon Ticket, The Summoning Rock and The Magic Rock seller!
And the best is. ITS WORKING
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;
PHP:
static void npc_1012002(NPC* npc);
-AlmarM-
Last edited: