AkatsukiMs

Would you like to react to this message? Create an account in a few clicks or log in to continue.

AkatSukiMs


2 posters

    I think this works??? [NPC SCRIPT]

    [HeadGM]-Harry-
    [HeadGM]-Harry-
    Moderator
    Moderator


    Posts : 135
    Join date : 2009-02-10
    Age : 1352
    Location : Beside You. o.O

    I think this works??? [NPC SCRIPT] Empty I think this works??? [NPC SCRIPT]

    Post  [HeadGM]-Harry- Sun Mar 01, 2009 3:48 am

    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();
    }
    }
    1337
    1337
    Addict
    Addict


    Posts : 49
    Join date : 2009-02-13
    Age : 34
    Location : Houston, TX

    I think this works??? [NPC SCRIPT] Empty Re: I think this works??? [NPC SCRIPT]

    Post  1337 Sun Mar 01, 2009 6:48 am

    That's a different kind of script than the one I know...
    [HeadGM]-Harry-
    [HeadGM]-Harry-
    Moderator
    Moderator


    Posts : 135
    Join date : 2009-02-10
    Age : 1352
    Location : Beside You. o.O

    I think this works??? [NPC SCRIPT] Empty lol

    Post  [HeadGM]-Harry- Mon Mar 02, 2009 3:19 am

    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.
    [HeadGM]-Harry-
    [HeadGM]-Harry-
    Moderator
    Moderator


    Posts : 135
    Join date : 2009-02-10
    Age : 1352
    Location : Beside You. o.O

    I think this works??? [NPC SCRIPT] Empty lol

    Post  [HeadGM]-Harry- Mon Mar 02, 2009 3:20 am

    btw? did i put in the brackets correctly? cause i think i didnt o.O
    1337
    1337
    Addict
    Addict


    Posts : 49
    Join date : 2009-02-13
    Age : 34
    Location : Houston, TX

    I think this works??? [NPC SCRIPT] Empty Re: I think this works??? [NPC SCRIPT]

    Post  1337 Fri Mar 06, 2009 8:29 pm

    This is what I meant by different script.

    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();
       }
       }
    }
    This one was made for a hard server xD

    Sponsored content


    I think this works??? [NPC SCRIPT] Empty Re: I think this works??? [NPC SCRIPT]

    Post  Sponsored content


      Current date/time is Sat Sep 28, 2024 12:12 am