Newbie Spellweaver
- Joined
- Apr 13, 2008
- Messages
- 48
- Reaction score
- 0
It's kinda useless, but it's still kinda useful.
Make a new CPP and put in this code.
And don't forget to add the cases and static void thingies to NPCScripts.h~
Have fun.
Make a new CPP and put in this code.
Code:
#include "NPCs.h"
#include "NPCsScripts.h"
void NPCsScripts::npc_1002003(NPC* npc){
int state = npc->getState();
int type = npc->getSelected();
if(state == 0){
npc->addText("Hello, I can teleport you to a job advancement area.");
npc->sendYesNo();
}
else if(state == 1){
if(npc->getSelected() == YES){
npc->addText("Okay.");
npc->sendNext();
}
else{
npc->addText("Where would you like to go?");
npc->sendOK();
}
}
else if(state == 2){
if(npc->getSelected() == YES){
npc->addText("#L0##bAthena Pierce's Office#k 1,000 Mesos#l\r\n#L1##bDances With Balrog's Chamber#k 1,000 Mesos#l\r\n#L2##bDark Lord's Lair#k 1,000 Mesos#l\r\n#L4##bGrendel the Really Old's Library#k 1,000 Mesos");
npc->sendSimple();
}
}
else if(state == 3){
npc->setVariable("type", type);
if(type == 0)
{
if(npc->getMesos() >= 1000)
{
npc->addText("Alright, I'll take you there.");
npc->teleport(100000201);
npc->giveMesos(-1000);
npc->sendNext();
npc->end();
}
else
{
npc->addText("You don't have enough mesos.");
npc->sendNext();
npc->end();
}
}
if(type == 1)
{
if(npc->getMesos() >= 1000)
{
npc->addText("Alright, I'll take you there.");
npc->teleport(102000003);
npc->giveMesos(-1000);
npc->sendNext();
npc->end();
}
else
{
npc->addText("You don't have enough mesos.");
npc->sendNext();
npc->end();
}
}
if(type == 2)
{
if(npc->getMesos() >= 1000)
{
npc->addText("Alright, I'll take you there.");
npc->teleport(103000003);
npc->giveMesos(-1000);
npc->sendNext();
npc->end();
}
else
{
npc->addText("You don't have enough mesos.");
npc->sendNext();
npc->end();
}
}
if(type == 3)
{
if(npc->getMesos() >= 1000)
{
npc->addText("Okay, I'll take you there.");
npc->teleport(101000003);
npc->giveMesos(-1000);
npc->sendNext();
npc->end();
}
else
{
npc->addText("You don't have enough mesos.");
npc->sendNext();
npc->end();
}
}
else if(type == 4){
npc->addText("Good Luck!");
npc->sendNext();
}
}
else if(state == 4){
npc->addText("Come back later!");
npc->sendOK();
}
else
{
npc->end();
}
}
And don't forget to add the cases and static void thingies to NPCScripts.h~
Have fun.
Last edited: