[Release] pirate to gunslinger or infighter npc

Page 2 of 2 FirstFirst 12
Results 26 to 46 of 46
  1. #26
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by XxOsirisxX View Post
    nah, it will not works.

    net.sf.odinms.client.MapleJob? package?

    status+2? that dose'nt exist Oo

    status == 3 will never happends, unless status = 2 or status++.

    that's all :x
    Sry didnt import the package @_@ btw the status+2 works . i just tested it out .
    PHP Code:
    /****************************************  
        Done by bendanx3  
    *****************************************/  
    importPackage(net.sf.odinms.client);

    var 
    status 0

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


    function 
    action(modetypeselection)  

        if (
    mode == -1) { 
            
    cm.dispose(); 
        } else { 
        if (
    mode == && status == 0) { 
          
    cm.dispose(); 
          return; 
        } else if (
    mode == 1) { 
                
    status++; 
            } else { 
                
    status--; 
            } if (
    status == 0) { 
                if (
    cm.getJob().equals(net.sf.odinms.client.MapleJob.PIRATE)) {  
                        
    cm.sendSimple("Which would you like to become? #b\r\n#L0#gunslinger #l\r\n#L1#infighter#l#k");
            } else {
                
    cm.sendOk(" You are not a pirate! ");
                
    cm.dispose();
            }
        } else if (
    status == 1) { 
                if (
    selection == 0) {  
                        
    cm.sendNext("Are you sure you want to become an gunslinger?");  
                } else if (
    selection == 1) {  
                        
    cm.sendNext("Are you sure you want to become a infighter?"); 
                        
    status+2;  
                }  
        } else if (
    status == 2) { 
            
    cm.changeJob(MapleJob.GUNSLINGER); 
            
    cm.dispose();  
        } else if (
    status == 3) { 
            
    cm.changeJob(MapleJob.INFIGHTER); 
            
    cm.dispose(); 
        }  
         }  


  2. #27
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    status+2?

    well...

    it should be status+=2. and anyhow, when you get to that point, status = 1, status (1) + 2 = 3, but the mode == 1, so status will be = 4. But well, i haev never seem that way of doing that.. gratz i guess Oo

  3. #28
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Maybe i'm noob so i did the noob way? Lolz.

  4. #29
    Alpha Member Moogra is offline
    MemberRank
    Jul 2008 Join Date
    1,804Posts

    Re: [Release] pirate to gunslinger or infighter npc

    That doesn't work. It's either
    PHP Code:
    status+=
    or
    PHP Code:
    status=status+

  5. #30
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by bendanx3 View Post
    Maybe i'm noob so i did the noob way? Lolz.
    Not noob if it works, but weird.

  6. #31
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    So which is a better choice to use? O.o
    Lols thanks Moogra andXxOsirisxX for telling me :D

  7. #32
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by bendanx3 View Post
    So which is a better choice to use? O.o
    Lols thanks Moogra andXxOsirisxX for telling me :D
    boths ways that Moogra posted are the same, you can use the one you wants.

    But still, for this case, status+=2 is wrong. It should be status += 1/status++/status = 2. Because of the mode.

  8. #33
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    isnt status++ only increases the status by 1?

  9. #34
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by bendanx3 View Post
    isnt status++ only increases the status by 1?
    Yeah, all of the one i said, are +1 basically.

    because, the status need to be 3 in your script. So, if we put status = 3, mode, which is 1, will do status++, and then status will be 4, so, it will not get the 3. So we need status = 2, so mode makes status = 3.

  10. #35
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by XxOsirisxX View Post
    Yeah, all of the one i said, are +1 basically.

    because, the status need to be 3 in your script. So, if we put status = 3, mode, which is 1, will do status++, and then status will be 4, so, it will not get the 3. So we need status = 2, so mode makes status = 3.
    Confused -.- lol

  11. #36
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Lets take your script and explain

    I comment it :)

    PHP Code:
    /****************************************  
        Done by bendanx3  
    *****************************************/  
    importPackage(net.sf.odinms.client);

    var 
    status 0

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


    function 
    action(modetypeselection)  

        if (
    mode == -1) { 
            
    cm.dispose(); 
        } else { 
        if (
    mode == && status == 0) { 
          
    cm.dispose(); 
          return; 
        } else if (
    mode == 1) { 
                
    status++; 
            } else { 
                
    status--; 
            } if (
    status == 0) { 
                if (
    cm.getJob().equals(net.sf.odinms.client.MapleJob.PIRATE)) {  
                        
    cm.sendSimple("Which would you like to become? #b\r\n#L0#gunslinger #l\r\n#L1#infighter#l#k");
            } else {
                
    cm.sendOk(" You are not a pirate! ");
                
    cm.dispose();
            }
        } else if (
    status == 1) { 
                if (
    selection == 0) {  
                             
    //status = 1, so when you press Next, mode, which is 1, will make Status++, so status = 2
                        
    cm.sendNext("Are you sure you want to become an gunslinger?");  
                } else if (
    selection == 1) {  
                            
    //status = 1
                        
    cm.sendNext("Are you sure you want to become a infighter?"); 
                        
    status++;  //status = 2
                           //We ends here, mode will increase status++ since mode = 1.
                          //2 + 1 = 3
                
    }  
        } else if (
    status == 2) { 
           
    //We are here thanks to mode.
            
    cm.changeJob(MapleJob.GUNSLINGER); 
            
    cm.dispose();  
        } else if (
    status == 3) { 
            
    //We get 3 ^^
            
    cm.changeJob(MapleJob.INFIGHTER); 
            
    cm.dispose(); 
        }  
         }  


  12. #37
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by XxOsirisxX View Post
    Lets take your script and explain

    I comment it :)

    PHP Code:
    /****************************************  
        Done by bendanx3  
    *****************************************/  
    importPackage(net.sf.odinms.client);

    var 
    status 0

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


    function 
    action(modetypeselection)  

        if (
    mode == -1) { 
            
    cm.dispose(); 
        } else { 
        if (
    mode == && status == 0) { 
          
    cm.dispose(); 
          return; 
        } else if (
    mode == 1) { 
                
    status++; 
            } else { 
                
    status--; 
            } if (
    status == 0) { 
                if (
    cm.getJob().equals(net.sf.odinms.client.MapleJob.PIRATE)) {  
                        
    cm.sendSimple("Which would you like to become? #b\r\n#L0#gunslinger #l\r\n#L1#infighter#l#k");
            } else {
                
    cm.sendOk(" You are not a pirate! ");
                
    cm.dispose();
            }
        } else if (
    status == 1) { 
                if (
    selection == 0) {  
                             
    //status = 1, so when you press Next, mode, which is 1, will make Status++, so status = 2
                        
    cm.sendNext("Are you sure you want to become an gunslinger?");  
                } else if (
    selection == 1) {  
                            
    //status = 1
                        
    cm.sendNext("Are you sure you want to become a infighter?"); 
                        
    status++;  //status = 2
                           //We ends here, mode will increase status++ since mode = 1.
                          //2 + 1 = 3
                
    }  
        } else if (
    status == 2) { 
           
    //We are here thanks to mode.
            
    cm.changeJob(MapleJob.GUNSLINGER); 
            
    cm.dispose();  
        } else if (
    status == 3) { 
            
    //We get 3 ^^
            
    cm.changeJob(MapleJob.INFIGHTER); 
            
    cm.dispose(); 
        }  
         }  

    I dont really get the mode part.. Mind addin me on msn and explain? =X

  13. #38
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by bendanx3 View Post
    I dont really get the mode part.. Mind addin me on msn and explain? =X
    Code:
    function action(mode, type, selection)   
    { 
        if (mode == -1) { 
            cm.dispose(); 
        } else { 
        if (mode == 0 && status == 0) { 
          cm.dispose(); 
          return; 
        } else if (mode == 1) { 
                status++; 
            } else { 
                status--;
    If mode == -1 Means you press "Exit Chat".
    If mode == 0 Means you press NO on a YesNo or press Previous on a NextPrev
    if mode == 1 It means, you "continues"

    so when mode == 1, status = status + 1/status++
    if mode is not 1, in this case, if mode is 0, status = status - 1/status--

    I know i sucks to explain, but i hope you get it. It's a "cicle"

  14. #39
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    So the selection == 1 automatically adds 1 status and by adding status++ , the status = +2 ?

  15. #40
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by bendanx3 View Post
    So the selection == 1 automatically adds 1 status and by adding status++ , the status = +2 ?
    nah, selection no, as i said before, it's only mode, if you look the script, you may noticed.

    mode == 1){
    status++;
    else
    status--

  16. #41
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    in selection == 1 theres a cm.sendNext() which means mode = 1 and continues so there is a status 2. And when i put in status++; the status goes up to 3 ?
    Sorry im kindda stupid -.-

  17. #42
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by bendanx3 View Post
    in selection == 1 theres a cm.sendNext() which means mode = 1 and continues so there is a status 2. And when i put in status++; the status goes up to 3 ?
    Sorry im kindda stupid -.-
    yeah, in the selection 0 part, it will be 2 in the another one, it will be 3.

  18. #43
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by XxOsirisxX View Post
    yeah, in the selection 0 part, it will be 2 in the another one, it will be 3.
    THanks i get it now. Thinking of it now.. im surprised that status+2; works =X

  19. #44
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by bendanx3 View Post
    THanks i get it now. Thinking of it now.. im surprised that status+2; works =X
    Maybe because, it dose'nt means nothing, and remains as 2, and makes you the job that is at status 2.

  20. #45
    Account Upgraded | Title Enabled! bendanx3 is offline
    MemberRank
    Sep 2008 Join Date
    417Posts

    Re: [Release] pirate to gunslinger or infighter npc

    Quote Originally Posted by XxOsirisxX View Post
    Maybe because, it dose'nt means nothing, and remains as 2, and makes you the job that is at status 2.
    Ooh..Thanks very much! love you =X lols

  21. #46
    Infraction Banned XxOsirisxX is offline
    MemberRank
    Jul 2008 Join Date
    2,456Posts

    Re: [Release] pirate to gunslinger or infighter npc

    np ^^
    I'm glad you understand :D



Page 2 of 2 FirstFirst 12

Advertisement