Newbie Spellweaver
- Joined
- Nov 28, 2007
- Messages
- 55
- Reaction score
- 0
If you do not wish to do this, there is a download link at the bottom!
I made a stat reseter and I cleaned up the 1st Jon NPCs.
Create a new file called Henesys.cpp and add this in it
Add these two codes to NPCScript.h
Add these to NPCs.h
and finally add this to NPCs.cpp
Create a new file called 1stJob and put this in it
You also need this in NPCscript.h
Nana(H) in Henesys is the Stat Reseter
Download link:
I made a stat reseter and I cleaned up the 1st Jon NPCs.
Create a new file called Henesys.cpp and add this in it
Code:
#include "NPCs.h"
#include "NPCsScripts.h"
#include "Player.h"
#include "Levels.h"
//Created by Reiyhn
//Fixed correct AP gained by Nalox@ragezone
void NPCsScripts::npc_9201001(NPC *npc) // Nana(H)
{
Player* player = npc->getPlayer();
int state = npc->getState();
if(state == 0) {
{
npc->addText("Want a free stat reset? Make sure to log out after to see the full effects properly!");
state = 1;
npc->sendYesNo();
}
}
else if(state == 1) {
if(npc->getSelected() == YES)
{
if(player->getLevel()==1)
{
npc->addText("Here you go! Remember to log out and then back in for this to work properly!");
npc->setSTR(4);
npc->setDEX(4);
npc->setLUK(4);
npc->setINT(4);
npc->setAP(short(player->getLevel()*1+8));
npc->sendOK();
npc->end();
}
else
{
if(player->getLevel()>=2)
{
npc->addText("Here you go! Remember to log out and then back in for this to work properly!");
npc->setSTR(4);
npc->setDEX(4);
npc->setLUK(4);
npc->setINT(4);
npc->setAP(short(player->getLevel()*5+4));
npc->sendOK();
npc->end();
}
}
}
else
{
npc->addText("Oh well, have a fun day!");
npc->sendOK();
npc->end();
}
}
}
Add these two codes to NPCScript.h
Code:
case 9201001: npc_9201001(npc); break;
Code:
static void npc_9201001(NPC* npc);
Add these to NPCs.h
Code:
void setLUK(short luk);
void setINT(short Int);
void setDEX(short dex);
void setSTR(short str);
void setAP(short ap);
void setSP(short sp);
and finally add this to NPCs.cpp
Code:
void NPC::setDEX(short dex)
{
player->setDex(dex);
}
void NPC::setLUK(short luk)
{
player->setLuk(luk);
}
void NPC::setSTR(short str)
{
player->setStr(str);
}
void NPC::setINT(short Int)
{
player->setInt(Int);
}
void NPC::setAP(short ap)
{
player->setAp(ap);
}
void NPC::setSP(short sp)
{
player->setSp(sp);
}
Create a new file called 1stJob and put this in it
Code:
#include "NPCs.h"
#include "NPCsScripts.h"
#include "Player.h"
#include "Levels.h"
//Created by Reiyhn
void NPCsScripts::npc_1012100(NPC *npc) //Athena Pierce
{
Player* player = npc->getPlayer();
int state = npc->getState();
if(state ==0)
{
if(player->getJob() == 000)
{
if(player->getLevel() >= 10 && player->getDex() >= 25)
{
npc->addText("You have trained well, you now have the ability to become an archer, do you wish to become a bowman? (Warning: Requires level 10 and 25 DEX)");
state = 1;
npc->sendYesNo();
}
else
{
npc->addText("You do not have the requirements to become a bowman.");
npc->sendOK();
npc->end();
}
}
}
else if(state == 1) {
if(npc->getSelected() == YES)
{
player->setJob(300);
npc->addText("Congratulations! You are now a bowman, come back at level 30 and maybe we shall see you advance once again.");
npc->setSP(player->getSp() + 1);
npc->sendOK();
npc->end();
}
else
{
npc->addText("Ah, feel free to change your mind and please return.");
npc->sendOK();
npc->end();
}
}
}
void NPCsScripts::npc_1032001(NPC *npc) //Grendel the Really Old
{
Player* player = npc->getPlayer();
int state = npc->getState();
if(state ==0)
{
if(player->getJob() == 000)
{
if(player->getLevel() >= 8 && player->getInt() >= 25)
{
npc->addText("You have trained well, you now have the ability to become a magician, do you wish to become a magician? (Warning: Requires level 8 and 25 INT)");
state = 1;
npc->sendYesNo();
}
else
{
npc->addText("You do not have the requirements to become a magician.");
npc->sendOK();
npc->end();
}
}
}
else if(state == 1) {
if(npc->getSelected() == YES)
{
player->setJob(200);
npc->addText("Congratulations! You are now a magician, continue on your way and maybe we shall meet again.");
npc->setSP(player->getSp() + 1);
npc->sendOK();
npc->end();
}
else
{
npc->addText("Ah, feel free to change your mind and please return.");
npc->sendOK();
npc->end();
}
}
}
void NPCsScripts::npc_1022000(NPC *npc) //Dances with Balrog
{
Player* player = npc->getPlayer();
int state = npc->getState();
if(state ==0)
{
if(player->getJob() == 000)
{
if(player->getLevel() >= 10 && player->getStr() >= 25)
{
npc->addText("Heh who is this lonely punk? So you wanna become a warrior huh? Well lets see if you got it. (Warning: Requires level 10 and 25 STR)");
state = 1;
npc->sendYesNo();
}
else
{
npc->addText("Silly punk, you are too weak to be a bold warrior!");
npc->sendOK();
npc->end();
}
}
}
else if(state == 1) {
if(npc->getSelected() == YES)
{
player->setJob(100);
npc->addText("Heh, so you decided to become a warrior, huh? As you grow more powerful see me again.");
npc->setSP(player->getSp() + 1);
npc->sendOK();
npc->end();
}
else
{
npc->addText("Get outta here punk!");
npc->sendOK();
npc->end();
}
}
}
void NPCsScripts::npc_1052001(NPC *npc) //Dark Lord
{
Player* player = npc->getPlayer();
int state = npc->getState();
if(state ==0)
{
if(player->getJob() == 000)
{
if(player->getLevel() >= 10 && player->getDex() >= 25)
{
npc->addText("Who are you? Heh how did you know where I reside? Very well, you want to join the guild of thieves, hmm? (Warning: Requires level 10 and 25 DEX)");
state = 1;
npc->sendYesNo();
}
else
{
npc->addText("Who are you? You are not fit to be one of us!");
npc->sendOK();
npc->end();
}
}
}
else if(state == 1) {
if(npc->getSelected() == YES)
{
player->setJob(400);
npc->addText("Welcome to our guild, we expand everyday with our sly and witty members!");
npc->sendOK();
npc->setSP(player->getSp() + 1);
npc->end();
}
else
{
npc->addText("Very well, tell no one of this meeting.");
npc->sendOK();
npc->end();
}
}
}
You also need this in NPCscript.h
Code:
case 1012100: npc_1012100(npc); break;
case 1032001: npc_1032001(npc); break;
case 1022000: npc_1022000(npc); break;
case 1052001: npc_1052001(npc); break;
Code:
static void npc_1012100(NPC* npc);
static void npc_1032001(NPC* npc);
static void npc_1022000(NPC* npc);
static void npc_1052001(NPC* npc);
Nana(H) in Henesys is the Stat Reseter
Download link:
You must be registered to see links
Last edited: