Reset Stats Prob

Results 1 to 8 of 8
  1. #1
    Elite Member Cheezpuff is offline
    Member +Rank
    Jul 2011 Join Date
    Former programmLocation
    238Posts

    Reset Stats Prob

    Im use MoopleDev rev 116.
    and i dont know, what wrong with my script.
    or that for v62. :(

    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) {
                
    cm.sendSimple("Hello. I am the AP Reseter NPC! Would you like to Reset your AP?\r\n\#L0#Yes#l\r\n\#L1#No#l");
            } else if (
    selection == 0) {
            
    cm.resetStats();
            
    cm.sendOk("Your AP has been reseted!");
            
    cm.dispose();
            } else if (
    selection == 1) {
            
    cm.sendOk("Alright, see ya! Come back if you want to have your AP reseted! :)");
            
    cm.dispose();
            }
        }

    that make a reset but have a prob with this script, not give all ap back.

    have maybe new script?


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

    Re: Reset Stats Prob

    show me the resetStats function in NPCConversationManager.

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

    Re: Reset Stats Prob

    Reaplce your ResetStats in npcconversation to this
    PHP Code:
        public void resetStats() {
            
    int totAp getPlayer().getStr() + getPlayer().getDex() + getPlayer().getLuk() + getPlayer().getInt() + getPlayer().getRemainingAp();
            
    getPlayer().setStr(4);
            
    getPlayer().setDex(4);
            
    getPlayer().setLuk(4);
            
    getPlayer().setInt(4);
            
    getPlayer().setRemainingAp(totAp 16);
            
    getPlayer().updateSingleStat(MapleStat.STR4);
            
    getPlayer().updateSingleStat(MapleStat.DEX4);
            
    getPlayer().updateSingleStat(MapleStat.LUK4);
            
    getPlayer().updateSingleStat(MapleStat.INT4);
            
    getPlayer().updateSingleStat(MapleStat.AVAILABLEAPtotAp);
        } 

  4. #4
    Elite Member Cheezpuff is offline
    Member +Rank
    Jul 2011 Join Date
    Former programmLocation
    238Posts

    Re: Reset Stats Prob

    Quote Originally Posted by TiredGuy View Post
    Reaplce your ResetStats in npcconversation to this
    PHP Code:
        public void resetStats() {
            
    int totAp getPlayer().getStr() + getPlayer().getDex() + getPlayer().getLuk() + getPlayer().getInt() + getPlayer().getRemainingAp();
            
    getPlayer().setStr(4);
            
    getPlayer().setDex(4);
            
    getPlayer().setLuk(4);
            
    getPlayer().setInt(4);
            
    getPlayer().setRemainingAp(totAp 16);
            
    getPlayer().updateSingleStat(MapleStat.STR4);
            
    getPlayer().updateSingleStat(MapleStat.DEX4);
            
    getPlayer().updateSingleStat(MapleStat.LUK4);
            
    getPlayer().updateSingleStat(MapleStat.INT4);
            
    getPlayer().updateSingleStat(MapleStat.AVAILABLEAPtotAp);
        } 
    ty, i will check this

    Quote Originally Posted by Alienx3 View Post
    show me the resetStats function in NPCConversationManager.
    i think my prob was, Im dosen't put resetstats in NPCConver.
    ty guys.

    i just have to do first, my bug > rebirth system
    Last edited by Cheezpuff; 29-04-12 at 04:23 AM.

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

    Re: Reset Stats Prob

    Quote Originally Posted by Cheezpuff View Post

    i think my prob was, Im dosen't put resetstats in NPCConver.
    ty guys.

    i just have to do first my rebirth system
    MoopleDEV has resetstats in NPCConversation and it directs to MapleCharacter to reset

  6. #6
    Elite Member Cheezpuff is offline
    Member +Rank
    Jul 2011 Join Date
    Former programmLocation
    238Posts

    Re: Reset Stats Prob

    Quote Originally Posted by TiredGuy View Post
    MoopleDEV has resetstats in NPCConversation and it directs to MapleCharacter to reset
    ty, gnight tommrrow i will put for you my levelup method and all thing to fix my rb [reset stats , lacking skill]

  7. #7
    I have an ass and a hat. maplefreak26 is offline
    Grand MasterRank
    Sep 2008 Join Date
    1,098Posts

    Re: Reset Stats Prob

    Just a little note, reseted isn't a word.
    Reset is used for both past, present and future tenses.

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

    Re: Reset Stats Prob

    Where do you see the word reseted in this thread?
    Nvm lol saw it in script
    Posted via Mobile Device



Advertisement