[Programming] Starter Pack

Results 1 to 10 of 10
  1. #1
    Member FlameGuy is offline
    MemberRank
    Apr 2012 Join Date
    37Posts

    [Programming] Starter Pack

    I've been trying to code a "starter pack" that play need to get 30 etc item and trade for some equips and he would choose by his job, I don't have sucess, anyone could help?


  2. #2
    Grand Master TiredGuy is offline
    Grand MasterRank
    Mar 2012 Join Date
    Behind YouLocation
    1,527Posts

    Re: [Programming] Starter Pack

    tell us what items the player has to collect and what happens after he collects the items

  3. #3
    Member FlameGuy is offline
    MemberRank
    Apr 2012 Join Date
    37Posts

    Re: [Programming] Starter Pack

    Quote Originally Posted by TiredGuy View Post
    tell us what items the player has to collect and what happens after he collects the items
    30 snail shells and he get some equips by the job that he choose.

  4. #4
    Grand Master TiredGuy is offline
    Grand MasterRank
    Mar 2012 Join Date
    Behind YouLocation
    1,527Posts

    Re: [Programming] Starter Pack

    Edit the stuff
    PHP Code:
    var status 0;

    function 
    start() {
        
    status = -1;
        
    action(100);
    }

    function 
    action(modetypeselection) {
        if (
    mode == -1) {
            
    cm.dispose();
        }else if (
    mode == 0){
            
    cm.dispose();
            return;        
        } else {
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
            if (
    cm.haveItem(shellid30)) {
                
    cm.sendNext("Which job would you like?");
                
    cm.gainItem(shellid, -30);
                } else {
                
    cm.sendOk("You do not have 30 snail shells");
                
    cm.dispose();
                }
            } else if (
    status == 1) {
                
    cm.sendSimple("#L1#Warrior\r\n#L2#Magician\r\n#L3#Thief\r\n#L4#Archer\r\n#L5#Pirate");
        }else if (
    selection == 1) {
              
    cm.gainItem(itemamount); 
              
    cm.dispose();
        }else if (
    selection == 2) {
              
    cm.gainItem(itemamount); 
              
    cm.dispose();
        }else if (
    selection == 3) {
              
    cm.gainItem(itemamount); 
              
    cm.dispose();
        }else if (
    selection == 4) {
              
    cm.gainItem(itemamount);
              
    cm.dispose();
        }else if (
    selection == 5) {
              
    cm.gainItem(itemamount); 
              
    cm.dispose();
            }
        }


  5. #5
    Member FlameGuy is offline
    MemberRank
    Apr 2012 Join Date
    37Posts

    Re: [Programming] Starter Pack

    It works a little bit different than I wanted (75% working). When I click to choose my pack, I get dc'ed.

    PHP Code:
    var status 0;

    function 
    start() {
        
    status = -1;
        
    action(100);
    }

    function 
    action(modetypeselection) {
        if (
    mode == -1) {
            
    cm.dispose();
        }else if (
    mode == 0){
            
    cm.dispose();
            return;        
        } else {
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
            if (
    cm.haveItem(400001930)) {
                
    cm.sendNext("Which job would you like?");
                
    cm.gainItem(4000019, -30);
                } else {
                
    cm.sendOk("You do not have 30 snail shells");
                
    cm.dispose();
                }
            } else if (
    status == 1) {
                
    cm.sendSimple("#L1#Warrior\r\n#L2#Magician\r\n#L3#Thief\r\n#L4#Archer\r\n#L5#Pirate");
        }else if (
    selection == 1) {
            
    cm.gainItem(20222822); // Elixir
            
    cm.gainItem(13020821); // Bandana
            
    cm.gainItem(2000005100);  // Pot
            
    cm.gainItem(13020201); // Maple
            
    cm.warp(1000000000);
            
    cm.sendOk("Enjoy #rFlameStory#k!");
            
    cm.getPlayer().maxAllSkills();
        
    cm.dispose();
        }else if (
    selection == 2) {
           
    cm.gainItem(20222822); // Elixir
            
    cm.gainItem(13020821); // Bandana
            
    cm.gainItem(2000005100);  // Pot
            
    cm.gainItem(13820091); // Maple
            
    cm.warp(1000000000);
            
    cm.sendOk("Enjoy #rFlameStory#k!");
            
    cm.getPlayer().maxAllSkills();
        
    cm.dispose();

        }else if (
    selection == 3) {
             
    cm.gainItem(20222822); // Elixir
            
    cm.gainItem(13020821); // Bandana
            
    cm.gainItem(2000005100);  // Pot
            
    cm.gainItem(14720301); // Maple
            
    cm.warp(1000000000);
            
    cm.sendOk("Enjoy #rFlameStory#k!");
            
    cm.getPlayer().maxAllSkills();
        
    cm.dispose();

        }else if (
    selection == 4) {
             
    cm.gainItem(20222822); // Elixir
            
    cm.gainItem(13020821); // Bandana
            
    cm.gainItem(2000005100);  // Pot
            
    cm.gainItem(14520161); // Maple
            
    cm.warp(1000000000);
            
    cm.sendOk("Enjoy #rFlameStory#k!");
            
    cm.getPlayer().maxAllSkills();
        
    cm.dispose();

        } else if (
    selection == 5) {
            
    cm.gainItem(20222822); // Elixir
            
    cm.gainItem(13020821); // Bandana
            
    cm.gainItem(2000005100);  // Pot
            
    cm.gainItem(14920201); // Maple
            
    cm.warp(1000000000);
            
    cm.sendOk("Enjoy #rFlameStory#k!");
            
    cm.getPlayer().maxAllSkills();
        
    cm.dispose();
        }
    }
            } 
    Any idea, guys?

  6. #6
    Grand Master TiredGuy is offline
    Grand MasterRank
    Mar 2012 Join Date
    Behind YouLocation
    1,527Posts

    Re: [Programming] Starter Pack

    use cm.getPlayer().message("Enjoy FlameStory!"); or
    cm.getPlayer().dropMessage("Enjoy FlameStory!"); instead of cm.sendOk("Enjoy #rFlameStory#k!");

  7. #7
    Member FlameGuy is offline
    MemberRank
    Apr 2012 Join Date
    37Posts

    Re: [Programming] Starter Pack

    It says: "This NPC isn't working" but I still get my equips I just don't know if I get the maxskills.

  8. #8
    Grand Master TiredGuy is offline
    Grand MasterRank
    Mar 2012 Join Date
    Behind YouLocation
    1,527Posts

    Re: [Programming] Starter Pack

    can i see your maplecharacter.java

  9. #9
    Grand Master Liv3 is offline
    Grand MasterRank
    Dec 2011 Join Date
    CanadaLocation
    817Posts

    Re: [Programming] Starter Pack

    Make sure you have maxAllSkills function within MapleCharacter.

  10. #10
    Member FlameGuy is offline
    MemberRank
    Apr 2012 Join Date
    37Posts

    Re: [Programming] Starter Pack

    Thanks for try to help me, I've found another way to use Max Skll! Thanks guys!



Advertisement