- Code:
void NPCsScripts::npc_2100(NPC* npc){
int state = npc->getState();
int map = npc->getPlayerMap();
if(npc->getPlayerMap() == 0){
if(state == 0){
npc->addText("Welcome to the world of AkatsukiMS. The purpose of this training camp is to ");
npc->addText("help beginners. Would you like to enter this training camp? Some people start thier journey ");
npc->addText(" without taking the training program. But I strongly recommend you take the training program first.");
npc->sendYesNo();
}
else if(state == 1){
if(npc->getSelected() == YES){
npc->addText("Ok then, I will let you enter the training camp. Please follow your instructor's lead.");
npc->sendNext();
}
else {
npc->addText("Do you really wanted to start your journey right away?");
npc->setState(npc->getState()+1);
npc->sendYesNo();
}
}
else if(state == 2){
npc->teleport(1);
npc->end();
}
else if(state == 3){
if(npc->getSelected() == NO){
npc->addText("Please talk to me again when you finally made your decision.");
npc->sendNext();
npc->end();
}
else{
npc->addText("It seems like you want to start your journey without taking the ");
npc->addText("training program. Then, I will let you move on the training ground. Be careful~");
npc->sendNext();
}
}
else if(state == 4){
npc->teleport(40000);
npc->end();
}
}
2 posters
I think this works??? [NPC SCRIPT]
[HeadGM]-Harry-- Moderator
- Posts : 135
Join date : 2009-02-10
Age : 1353
Location : Beside You. o.O
- Post n°1
I think this works??? [NPC SCRIPT]
1337- Addict
- Posts : 49
Join date : 2009-02-13
Age : 34
Location : Houston, TX
That's a different kind of script than the one I know...
[HeadGM]-Harry-- Moderator
- Posts : 135
Join date : 2009-02-10
Age : 1353
Location : Beside You. o.O
- Post n°3
lol
i think i didnt complete it or i gave the wrong script? lol im just a NOOB in scripting and well........
ya know i put in all the effort i got. o.O sorry if it doesnt works.
ya know i put in all the effort i got. o.O sorry if it doesnt works.
[HeadGM]-Harry-- Moderator
- Posts : 135
Join date : 2009-02-10
Age : 1353
Location : Beside You. o.O
- Post n°4
lol
btw? did i put in the brackets correctly? cause i think i didnt o.O
1337- Addict
- Posts : 49
Join date : 2009-02-13
Age : 34
Location : Houston, TX
This is what I meant by different script.
The script I know is like this (This is a starter pack NPC) :
The script I know is like this (This is a starter pack NPC) :
- Code:
var status = 0;
function start() {
status = -1;
action(1,0,0);
}
function action(mode, type, selection) {
if (mode == -1) {//ExitChat
cm.dispose();
}else if (mode == 0){//No
cm.sendOk("Are you sure you don't want the starter pack? Click #bOK#k if you want to go to henesys without getting the starter pack. #rIf you do want the starter pack#k, click #gExitChat#k and click on me again.");
cm.warp(100000000,0);
cm.dispose();
}else{ //Regular Talk
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("Hey #h #. Do you want your #bstarter pack#k?");
}else if (status == 1) {
if(cm.getChar().getLevel() > 1 && cm.getReborns() > 0) {
cm.sendOk("Either you already got the starter pack or it's too late now.");
cm.warp(100000000,0);
cm.dispose();
}else{
cm.sendOk("Have a nice day =D.");
}
}else if (status == 2) {
cm.resetStats();
cm.getChar().maxAllSkills();
cm.teachSkill(3221007,0,0);
cm.teachSkill(4120005,0,0);
cm.teachSkill(4220005,0,0);
cm.teachSkill(3110001,0,0);
cm.teachSkill(3210001,0,0);
cm.teachSkill(1320009,0,0);
cm.gainNX(20000);
cm.gainItem(2022179, 100);
cm.gainItem(2022282, 300);
cm.gainItem(1452008, 1);
cm.gainItem(1452004, 1);
cm.gainItem(1452009, 1);
cm.gainItem(1472018, 1);
cm.gainItem(1472025, 1);
cm.gainItem(1472029, 1);
cm.gainItem(1462007, 1);
cm.gainItem(1462008, 1);
cm.gainItem(1462009, 1);
cm.gainItem(1332003, 1);
cm.gainItem(1332015, 1);
cm.gainItem(1332018, 1);
cm.gainItem(1442005, 1);
cm.gainItem(1442010, 1);
cm.gainItem(1442008, 1);
cm.gainItem(1432004, 1);
cm.gainItem(1432006, 1);
cm.gainItem(1432007, 1);
cm.gainItem(1382006, 1);
cm.gainItem(1382007, 1);
cm.gainItem(1412003, 1);
cm.gainItem(1412007, 1);
cm.gainItem(1412008, 1);
cm.gainItem(1422009, 1);
cm.gainItem(1422010, 1);
cm.gainItem(1402003, 1);
cm.gainItem(1402011, 1);
cm.gainItem(1402012, 1);
cm.getChar().levelUp();
cm.warp(100000000,0);
cm.dispose();
}
}
}