Jump to content

hadiesyafiq

Members
  • Content Count

    156
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by hadiesyafiq


  1. Quote

    //===== Hercules Script ======================================
    //= Job Master
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.4
    //===== Description: =========================================
    //= A fully functional job changer.
    //===== Additional Comments: =================================
    //= 1.1 Fixed reset on Baby job change. [Euphy]
    //= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support. [Euphy]
    //= 1.3 Kagerou/Oboro added. [Euphy]
    //= 1.4 Improved legibility (renamed variables, replaced
    //      numbers with constants; Changed syntax to match
    //      Hercules standards; Fixed status point exploit upon
    //      Baby Novice job change. [Haru]
    //= 1.5 Add Cost for 2nd,Rebirth and 3rd job. [Hadie]
    //============================================================

    prontera,153,193,6    script    Job Master    2_F_MAGICMASTER,{
        function Job_Menu; function A_An;

        mes "[Job Master]";
        if (Class > Job_Soul_Linker) {
            mes "No more jobs are available.";
            close;
        }
        if (checkfalcon() || checkcart() || checkmount() || hascashmount()) {
            mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkmount() || hascashmount())?"mount":"")
                +" before proceeding.";
            close;
        }
        if (.skill_point_check && SkillPoint > 0) {
            mes "Please use all your skill points before proceeding.";
            close;
        }

        .@eac = eaclass();
        .@base = .third_classes ? roclass(.@eac&EAJ_UPPERMASK) : Class;
        if (.@base >= Job_Knight && .@base <= Job_Crusader2) {
            if (BaseLevel < .rebirth_blevel || JobLevel < .rebirth_jlevel) {
                .@blvl = .rebirth_blevel - BaseLevel;
                .@jlvl = .rebirth_jlevel - JobLevel;
                mes "You need "
                    + (BaseLevel < .rebirth_blevel ? ((.rebirth_blevel - BaseLevel) +" more base levels "+ (JobLevel < .rebirth_jlevel ? "and " : "")) : "")
                    + (JobLevel < .rebirth_jlevel ? (.rebirth_jlevel - JobLevel) +" more job levels " : "")
                    + "to continue.";
                close;
            }
            if (Class > Job_Crusader2) {
                mes "Switch to third class?";
                next;
                Job_Menu(roclass(.@eac|EAJL_THIRD));
                close;
            }
            while (true) {
                mes "Select an option.";
                next;
                .@choice = select(" ~ ^0055FFRebirth^000000", (.third_classes ? " ~ ^FF0000Third Class^000000":""), " ~ ^777777Cancel^000000");
                if (.@choice == 3)
                    close;
                mes "[Job Master]";
                mes "Are you sure?";
                next;
                if (.@choice == 1)
                    Job_Menu(Job_Novice_High);
                else
                    Job_Menu(roclass(.@eac|EAJL_THIRD));
                mes "[Job Master]";
            }
        }
        .@job1 = roclass(.@eac|EAJL_2_1);
        .@job2 = roclass(.@eac|EAJL_2_2);
        if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE) {
            .@newclass = roclass(.@eac|EAJL_THIRD);
            .@required_jlevel = 99;
        } else if (Class == Job_Ninja || Class == Job_Gunslinger) {
            .@newclass = .@job1;
            .@required_jlevel = 70;
        }
        if (.@newclass && .third_classes) {
            if (BaseLevel < .rebirth_blevel || JobLevel < .@required_jlevel) {
                mes "You need "
                    + (BaseLevel < .rebirth_blevel ? ((.rebirth_blevel - BaseLevel) +" more base levels "+ (JobLevel < .@required_jlevel ? "and " : "")) : "")
                    + (JobLevel < .@required_jlevel ? (.@required_jlevel - JobLevel) +" more job levels " : "")
                    + "to continue.";
                close;
            }
            mes "Switch to "+jobname(.@newclass)+"?";
            next;
            Job_Menu(.@newclass);
            close;
        }
        if (.@eac&EAJL_2)
            if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) {
                mes "No more jobs are available.";
                close;
            }
        if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {
            if (JobLevel < .jobchange_first) {
                mes "A job level of "+.jobchange_first+" is required to change into the 1st Class.";
            } else if (Class == Job_Novice_High && .linear_jobchange && lastJob) {
                mes "Switch classes now?";
                next;
                Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
            } else if (Class == Job_Novice) {
                Job_Menu(Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief,
                         Job_SuperNovice, Job_Taekwon, Job_Gunslinger, Job_Ninja, Job_Baby);
            } else if (Class == Job_Novice_High) {
                Job_Menu(Job_Swordman_High, Job_Mage_High, Job_Archer_High, Job_Acolyte_High, Job_Merchant_High, Job_Thief_High);
            } else if (Class == Job_Baby) {
                Job_Menu(Job_Baby_Swordman, Job_Baby_Mage, Job_Baby_Archer, Job_Baby_Acolyte, Job_Baby_Merchant, Job_Baby_Thief,
                         Job_Super_Baby);
            } else {
                mes "An error has occurred.";
            }
            close;
        }
        if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1) {
            mes "No more jobs are available.";
        } else if (!(.@eac&EAJL_2) && JobLevel < .jobchange_second) {
            mes "A job level of "+.jobchange_second+" is required to change into the 2nd Class.";
        } else if (.linear_jobchange && lastJob && (.@eac&EAJL_UPPER)) {
            mes "Switch classes now?";
            next;
            Job_Menu(lastJob+Job_Novice_High);
        } else {
            Job_Menu(.@job1, .@job2);
        }
        close;

    function Job_Menu {
        while (true) {
            if (getargcount() > 1) {
                mes "Select a job.";
                .@menu$ = "";
                for (.@i = 0; .@i < getargcount(); ++.@i)
                    .@menu$ += " ~ "+jobname(getarg(.@i))+":";
                .@menu$ += " ~ ^777777Cancel^000000";
                next;
                .@newjob = getarg(select(.@menu$)-1, 0);
                if (!.@newjob) close;
                if ((.@newjob == Job_SuperNovice || .@newjob == Job_Super_Baby) && BaseLevel < .supernovice_level) {
                    mes "[Job Master]";
                    mes "A base level of "+.supernovice_level+" is required to turn into a "+jobname(.@newjob)+".";
                    close;
                }
                mes "[Job Master]";
                mes "Are you sure?";
                next;
            } else {
                .@newjob = getarg(0);
            }
            if (select(" ~ Change into ^0055FF"+ jobname(.@newjob) +"^000000 class", " ~ ^777777"+(getargcount() > 1 ? "Go back": "Cancel")+"^000000") == 1) {
                set .@eac, eaclass(.@i);
                if ( ( .@eac&EAJL_2_1 || .@eac&EAJL_2_2 ) && Zeny < .cost_2nd && !(.@eac&EAJL_UPPER) && !( .@eac&EAJL_THIRD ) ) {
                    mes "[Job Master]";
                    mes "You need "+ .cost_2nd +" zeny to proceed.";
                    close;
                }
                else if( ( .@eac&EAJL_2_1 || .@eac&EAJL_2_2 ) && !(.@eac&EAJL_UPPER) && !( .@eac&EAJL_THIRD )) {
                    mes "[Job Master]";
                    mes "It will cost "+ .cost_2nd +" zeny to proceed.";
                    next;
                    if( select( " ~ Proceed", " ~ Leave" ) -1 ) close;
                    set Zeny, Zeny - .cost_2nd;
                }
                else if ( .@eac&EAJL_UPPER && Zeny < .cost_rebirth && !( .@eac&EAJL_THIRD ) && !( .@eac&EAJL_2 ) && Class != 4001 ) {
                    mes "[Job Master]";
                    mes "You need "+ .cost_rebirth +" zeny to proceed.";
                    close;
                }
                else if( .@eac&EAJL_UPPER && !( .@eac&EAJL_THIRD ) && !( .@eac&EAJL_2 ) && Class != 4001 ) {
                    mes "[Job Master]";
                    mes "It will cost "+ .cost_rebirth +" zeny to proceed.";
                    next;
                    if( select( " ~ Proceed", " ~ Leave" ) -1 ) close;
                    set Zeny, Zeny - .cost_rebirth;
                }
                else if ( .@eac&EAJL_THIRD && Zeny < .cost_3rd ) {
                    mes "[Job Master]";
                    mes "You need "+ .cost_3rd +" zeny to proceed.";
                    close;
                }
                else if( .@eac&EAJL_THIRD ) {
                    mes "[Job Master]";
                    mes "It will cost "+ .cost_3rd +" zeny to proceed.";
                    next;
                    if( select( " ~ Proceed", " ~ Leave" ) -1 ) close;
                    set Zeny, Zeny - .cost_3rd;
                }
                mes "[Job Master]";
                mes "You are now "+A_An(jobname(.@newjob))+"!";
                if (.@newjob == Job_Novice_High && .linear_jobchange)
                    lastJob = Class; // Note: This is incompatible with the Valkyrie rebirth script.
                jobchange .@newjob;
                if (.@newjob == Job_Novice_High)
                    resetlvl(1);
                if (.@newjob == Job_Baby) {
                    resetlvl(4);
                    SkillPoint = 0;
                }
                specialeffect(EF_ANGEL2, AREA, playerattached());
                specialeffect(EF_ELECTRIC, AREA, playerattached());
                if (.platinum)
                    callsub Get_Platinum;
                close;
            }
            if (getargcount() == 1)
                return;
            mes "[Job Master]";
        }
        end;
    }

    function A_An {
        setarray .@vowels$, "a", "e", "i", "o", "u";
        .@firstletter$ = strtolower(charat(getarg(0), 0));
        for (.@i = 0; .@i < getarraysize(.@vowels); ++.@i) {
            if (.@vowels$[.@i] == .@firstletter$)
                return "an "+getarg(0);
        }
        return "a "+getarg(0);
    }

    Get_Platinum:
        skill NV_FIRSTAID, 1, 0;
        if (BaseClass == Job_Novice) {
            if (Class != Job_SuperNovice)
                skill NV_TRICKDEAD, 1, 0;
        } else if (BaseClass == Job_Swordman) {
            skill SM_MOVINGRECOVERY, 1, 0;
            skill SM_FATALBLOW, 1, 0;
            skill SM_AUTOBERSERK, 1, 0;
        } else if (BaseClass == Job_Mage) {
            skill MG_ENERGYCOAT, 1, 0;
        } else if (BaseClass == Job_Archer) {
            skill AC_MAKINGARROW, 1, 0;
            skill AC_CHARGEARROW, 1, 0;
        } else if (BaseClass == Job_Acolyte) {
            skill AL_HOLYLIGHT, 1, 0;
        } else if (BaseClass == Job_Merchant) {
            skill MC_CARTREVOLUTION, 1, 0;
            skill MC_CHANGECART, 1, 0;
            skill MC_LOUD, 1, 0;
        } else if (BaseClass == Job_Thief) {
            skill TF_SPRINKLESAND, 1, 0;
            skill TF_BACKSLIDING, 1, 0;
            skill TF_PICKSTONE, 1, 0;
            skill TF_THROWSTONE, 1, 0;
        }

        if (BaseJob == Job_Knight) {
            skill KN_CHARGEATK, 1, 0;
        } else if (BaseJob == Job_Priest) {
            skill PR_REDEMPTIO, 1, 0;
        } else if (BaseJob == Job_Wizard) {
            skill WZ_SIGHTBLASTER, 1, 0;
        } else if (BaseJob == Job_Blacksmith) {
            skill BS_UNFAIRLYTRICK, 1, 0;
            skill BS_GREED, 1, 0;
        } else if (BaseJob == Job_Hunter) {
            skill HT_PHANTASMIC, 1, 0;
        } else if (BaseJob == Job_Assassin) {
            skill AS_SONICACCEL, 1, 0;
            skill AS_VENOMKNIFE, 1, 0;
        } else if (BaseJob == Job_Crusader) {
            skill CR_SHRINK, 1, 0;
        } else if (BaseJob == Job_Monk) {
            skill MO_KITRANSLATION, 1, 0;
            skill MO_BALKYOUNG, 1, 0;
        } else if (BaseJob == Job_Sage) {
            skill SA_CREATECON, 1, 0;
            skill SA_ELEMENTWATER, 1, 0;
            skill SA_ELEMENTGROUND, 1, 0;
            skill SA_ELEMENTFIRE, 1, 0;
            skill SA_ELEMENTWIND, 1, 0;
        } else if (BaseJob == Job_Rogue) {
            skill RG_CLOSECONFINE, 1, 0;
        } else if (BaseJob == Job_Alchemist) {
            skill AM_BIOETHICS, 1, 0;
        } else if (BaseJob == Job_Bard) {
            skill BA_PANGVOICE, 1, 0;
        } else if (BaseJob == Job_Dancer) {
            skill DC_WINKCHARM, 1, 0;
        }
        return;

    OnInit:
        .rebirth_blevel = 99;    // Minimum base level to reborn OR change to third class
        .rebirth_jlevel = 50;    // Minimum base job level to reborn OR change to third class
        .jobchange_first = 10;   // Minimum job level to turn into 1st class
        .jobchange_second = 40;  // Minimum job level to turn into 2nd class
        .third_classes = 1;      // Enable third classes/Extended Classes? (1: yes / 0: no)
        .supernovice_level = 45; // Minimum base level to turn into Super Novice
        .linear_jobchange = 1;   // Enforce linear class changes? (1: yes / 0: no)
        .skill_point_check = 1;  // Force player to use up all skill points? (1: yes / 0: no)
        .platinum = 1;           // Get platinum skills automatically? (1: yes / 0: no)
        .cost_2nd = 150000;    // cost to pass 2nd job
        .cost_3rd = 1000000;    // cost to pass 3rd job
        .cost_rebirth = 1000000;    // cost to pass rebirth
        end;
    }

    above is Default Herc Euphy job changer script but i add cyro script gave to me for add cost zeny..

    the problem is when change to 1st job npc ask for zeny but not on 2nd job and rebirth...

    can someone help me?

    the script i need is 

    1st job = free

    2nd job = 150k

    rebirth = 1m


  2. Hi all....can someone share to me npc like a warper but it for send player to making job quest...

    i got some npc from rathena but not work on my server...

    Quote

    //===== Hercules Script ======================================
    //= Job Warper
    //===== By: ==================================================
    //= Euphy, edit by Hadie
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: ===================================== 
    //= Project : Geovani
    //===== Description: =========================================
    //= A functional job warper.
    //============================================================

    prontera,153,182,6    script    Job Warper    2_F_MAGICMASTER,{
    function Job_Menu;
        mes "[Job Warper]";
        if (Class > 4049) {
            mes "No more jobs are available.";
            close;
        }
        set .@eac, eaclass();
        set .@i, ((.ThirdClass)?roclass(.@eac&EAJ_UPPERMASK):Class);
        if (.@i > 6 && .@i < 22) {
            if (BaseLevel < .Rebirth[0] || JobLevel < .Rebirth[1]) {
                set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .Rebirth[1]-JobLevel;
                mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue.";
                close;
            }
            while(1) {
                mes "Select an option.";
                next;
                set .@i, select(" ~ ^0055FFRebirth^000000:"+((.ThirdClass)?" ~ ^FF0000Third Class^000000":"")+": ~ ^777777Cancel^000000");
                if (.@i==3) close;
                mes "[Job Warper]";
                mes "Are you sure?";
                next;
                Job_Menu(((.@i==1)?4001:roclass(.@eac|EAJL_THIRD)));
                mes "[Job Warper]";
            }
        }
        set .@j1, roclass(.@eac|EAJL_2_1); set .@j2,roclass(.@eac|EAJL_2_2);
        if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE) setarray .@exp[0],roclass(.@eac|EAJL_THIRD),99;
        if (Class == Job_Ninja || Class == Job_Gunslinger) setarray .@exp[0],.@j1,70;
        if (.@exp[0] && .SecondExpanded) {
            if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) {
                set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .@exp[1]-JobLevel;
                mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue.";
                close;
            }
            mes "Switch to "+jobname(.@exp[0])+"?";
            next;
            Job_Menu(.@exp[0]);
            close;
        }
        if (.@eac&EAJL_2)
            if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) {
                mes "No more jobs are available.";
                close;
            }
        if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {
            if (JobLevel < .JobReq[0])
                mes "A job level of "+.JobReq[0]+" is required to change into the 1st Class.";
            else if (Class == 4001 && .LastJob && lastJob) {
                mes "Switch classes now?";
                next;
                Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
            } else switch(Class) {
                case 0: Job_Menu(1,2,3,4,5,6,23,4046,24,25,4023);
                case 4001: Job_Menu(4002,4003,4004,4005,4006,4007);
                case 4023: Job_Menu(4024,4025,4026,4027,4028,4029,4045);
                default: mes "An error has occurred."; break;
            }
            close;
        }
        if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1)
            mes "No more jobs are available.";
        else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1])
            mes "A job level of "+.JobReq[1]+" is required to change into the 2nd Class.";
        else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
            mes "Switch classes now?";
            next;
            Job_Menu(lastJob+4001);
        } else
            Job_Menu(.@j1,.@j2);
        close;

    function Job_Menu {
        while(1) {
            if (getargcount() > 1) {
                mes "Select a job.";
                set .@menu$,"";
                for(set .@i,0; .@i<getargcount(); set .@i,.@i+1)
                    set .@menu$, .@menu$+" ~ "+jobname(getarg(.@i))+":";
                set .@menu$, .@menu$+" ~ ^777777Cancel^000000";
                next;
                set .@i, getarg(select(.@menu$)-1,0);
                if (!.@i) close;
                if ((.@i == 23 || .@i == 4045) && BaseLevel < .SNovice) {
                    mes "[Job Warper]";
                    mes "A base level of "+.SNovice+" is required to turn into a "+jobname(.@i)+".";
                    close;
                }
                mes "[Job Warper]";
                mes "Are you sure?";
                next;
            } else
                set .@i, getarg(0);
            if (select(" ~ Want to become a ^0055FF"+jobname(.@i)+"^000000 class: ~ ^777777"+((getargcount() > 1)?"Go back":"Cancel")+"^000000") == 1) {
                mes "[Job Warper]";
                mes "You are getting Warped to "+callfunc("F_InsertArticle",jobname(.@i))+" Quest Npc!";
                if (.@i==4001 && .LastJob) set lastJob, Class;
                //mes .@i;
                goto Job;
                //Warps here !!!!
                if (.@i==4001 || .@i==4023) warp "yuno_in02",88,164;
                //specialeffect2 EF_ANGEL2; specialeffect2 EF_ELECTRIC;
                close;
            }
            if (getargcount() == 1) return;
            mes "[Job Warper]";
        }
        end;
        
    }
    Job:
        if(.@i > 4000 && .@i < 4030 && !4046 && !4047 && !4049){
            warp "valkyrie", 48, 48;
        }else{
            switch(.@i){
                case 1:
                    warp "izlude", 52, 137;
                    break;
                case 2:
                    warp "geffen", 64, 177;
                    break;
                case 3:
                    warp "pay_arche", 145, 164;
                    break;        
                case 4:
                    warp "prontera", 234, 314;
                    break;
                case 5:
                    warp "alberta", 36, 42;
                    break;
                case 6:
                    warp "moc_ruins", 58, 159;
                    break;    
                case 7:
                    warp "prontera", 35, 346;
                    break;    
                case 8:
                    warp "prt_church", 16, 41;
                    break;    
                case 9:
                    warp "geffen", 120, 111;
                    break;    
                case 10:
                    warp "einbroch", 255, 107;
                    break;    
                case 11:
                    warp "hu_in01", 381, 368;
                    break;            
                case 12:
                    warp "in_moc_16", 19, 33;
                    break;    
                case 14:
                    warp "prontera", 156, 356;
                    break;
                case 15:
                    warp "prt_monk", 184, 16;
                    break;    
                case 16:
                    warp "yuno_in03", 154, 35;
                    break;    
                case 17:
                    warp "cmd_fild07", 196, 117;
                    break;    
                case 18:
                    warp "alde_alche", 27, 185;
                    break;    
                case 19:
                    warp "comodo", 226, 122;
                    break;    
                case 20:
                    warp "comodo", 193, 150;
                    break;    
                case 23:
                    warp "aldebaran", 116, 63;
                    break;
                case 24:
                    warp "Einbroch Tower", 134,199;
                    break;
                case 25:
                    warp "alberta", 30,63;
                    break;
                case 4046:
                    warp "payon", 158, 140;
                    break;
                case 4047:
                    warp "payon", 215, 102;
                    break;
                case 4049:
                    warp "morocc", 55,259;
                    break;
    //==============3rd============================================
                case 4054:
                case 4060:
                    warp "prt_in", 164, 23;
                    break;
                case 4055:
                case 4061:
                    warp "morroc", 102, 143;
                    break;
                case 4056:
                case 4062:
                    warp "tur_dun01", 157, 54;
                    break;
                case 4057:
                case 4063:
                    warp "prt_church", 103, 88;
                    break;
                case 4058:
                case 4064:
                    warp "yuno", 129, 156;
                    break;
                case 4059:
                case 4065:
                    warp "morroc", 45, 107;
                    break;
                case 4066:
                case 4073:
                    warp "prt_castle", 48, 161;
                    break;
                case 4067:
                case 4074:
                    warp "gef_tower", 102, 34;
                    break;
                case 4068:
                case 4075:
                    warp "alberta", 196, 133;
                    break;
                case 4069:
                case 4076:
                    warp "xmas", 161, 209;
                    break;
                case 4070:
                case 4077:
                    warp "ve_in", 241, 128;
                    break;
                case 4071:
                case 4078:
                    warp "alde_alche", 35, 185;
                    break;
                case 4072:
                case 4079:
                    warp "morroc", 156, 70;
                    break;
                case 4211:
                case 4212:
                    warp "amatsu", 21, 76;
                    break;
                case 4215:
                    warp "Hugel", 70,137;
                    break;
            } 
        }
        end;
    OnInit:

        setarray .Rebirth[0],99,50;    // Minimum base level, job level to rebirth OR change to third class
        setarray .JobReq[0],10,40;    // Minimum job level to turn into 1st class, 2nd class
        set .ThirdClass,0;        // Enable third classes? (1: yes / 0: no)
        set .SecondExpanded,1;        // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? (1: yes / 0: no)
        set .SNovice,45;        // Minimum base level to turn into Super Novice
        set .LastJob,1;            // Enforce linear class changes? (1: yes / 0: no)
        set .SkillPointCheck,1;        // Force player to use up all skill points? (1: yes / 0: no)
        set .Platinum,0;        // Get platinum skills automatically? (1: yes / 0: no)
        end;
    }

     


  3. 9 hours ago, Ridley said:

    This can not be done with a single script. You could adjust the rates using an Login Event, but the other scripts need to be edited to offer different effects by usergroup. As for storage, you would need a source mod.

    Thank you sir...can you teach menhow to write script login event for adjust the rates and give me example so i can make new npc only group id 2 can access (if group id 2 = hai...if group id 0 = sorry sir you don’t have permission to access this)


  4. hai all it possible to change rate/drop/refine rate for group id 2 and above?

    example:

    group id 0 - normal player (noting change)

    group id 2 - vip player got this ...

    if (getgroupid() >=2)

    double exp,

    double drop,

    double refine rates,

    double kafra storage,

    half fees for change job to rebirh,

    can use some npc like healer,

    free use kafra service and auto get blessing when login

    can someone teach me how to set this?


  5. 3 hours ago, Ridley said:

    I try to explain it on this custom script. You have several options to customize it. Please read the comments. Also added @happy and @endhappy. Duration is always 2 hours. Card rates are not affected by this.

    Be aware this script won't work if loaded with @loadnpc. It needs to start with your server.

    
    -	script	Happy Hour	FAKE_NPC,{
    
    OnInit:	// fetch your basic rates on server start
    	bindatcmd("happy", strnpcinfo(0) +"::OnAtcommand", 93, 99);
    	bindatcmd("endhappy", strnpcinfo(0) +"::OnAtcommand2", 93, 99);
    
    	// BaseExp
    	.base_exp_rate = getbattleflag("base_exp_rate");
    	// JobExp
    	.job_exp_rate = getbattleflag("job_exp_rate");
    	// Drops
    	.item_rate_common = getbattleflag("item_rate_common");
    	.item_rate_heal = getbattleflag("item_rate_heal");
    	.item_rate_use = getbattleflag("item_rate_use");
    	.item_rate_equip = getbattleflag("item_rate_equip");
    	end;
    
    OnAtcommand:
    OnClock0900:	// you can add more times to trigger using https://github.com/HerculesWS/Hercules/blob/857650c4f58d347455b0d075b49a53f69e6d0c51/doc/script_commands.txt#L1013
    //OnWed1500:	// would start at Wednesday, 3pm server time
    	announce("Happy Hour has started!", bc_blue|bc_all);	// Announce Happy Hour
    	callsub(L_rate, 2); // L_rate, 2 = your basic rate *2, L_rate,3 = your basic rate *3. You said basic is 25 and you want happy hour to be 50. So 25*2 = 50x rates
    	end;
    
    OnAtcommand2:
    OnTimer7200000: // When the Timer from line 49 reaches 7200000ms (2 hours) reset the rates to 1x
    	stopnpctimer();	// stop the timer
    	announce("Happy Hour has ended!", bc_blue|bc_all);	// Announce Happy Hour
    	callsub(L_rate, 1); // L_rate, 25*1 = 25x
    	end;
    
    L_rate:
    	.@rate = getarg(0);
    	.@base_exp_rate = (.@rate * .base_exp_rate);
    	.@job_exp_rate = (.@rate * .job_exp_rate);
    	.@item_rate_common = (.@rate * .item_rate_common);
    	.@item_rate_heal = (.@rate * .item_rate_heal);
    	.@item_rate_use = (.@rate * .item_rate_use);
    	.@item_rate_equip = (.@rate * .item_rate_equip);
    
    	setbattleflag("base_exp_rate",.@base_exp_rate);
    	setbattleflag("job_exp_rate",.@job_exp_rate);
    	setbattleflag("item_rate_common",.@item_rate_common);
    	setbattleflag("item_rate_heal",.@item_rate_heal);
    	setbattleflag("item_rate_use",.@item_rate_use);
    	setbattleflag("item_rate_equip",.@item_rate_equip);
    
    	atcommand("@reloadmobdb");
    	initnpctimer();	// start the timer
    	announce(sprintf("Current rates are: Base %dx, Job %dx, Drop %dx.", (.@base_exp_rate/100), (.@job_exp_rate/100), (.@item_rate_common/100)), bc_blue|bc_all);	// Announce the rates
    	end;
    }

     

    happyhour.txt 2.19 kB · 1 download

    Thank you very much sir...


  6. On 11/2/2019 at 9:59 PM, Ridley said:

    This script changes the rates random at a specific time. If you want it as some kind of event, it would be good to know your basic rates, the rates you want to take effect during the event, how long the event should take and when it should start (everyday? Only on specific dates,...)

    The more info you provide, the easier it is to help.

    Ya everyday sir...9am to 11am...when event start server will announce and event end also server announce..

    normal rates 25x

    when happy hour it will be 50x like that


  7. On 10/17/2019 at 7:42 AM, Virtue said:

    There's one included in Herc. 

    \npc\custom\etc\floating_rates

    just set it up to your preferred time.

    OnInit: //add any other HOURS OnHour00: OnHour06: OnHour12: OnHour18:

    
    OnInit:
    //add any other HOURS
    OnHour00:
    OnHour06:
    OnHour12:
    OnHour18:

    Then the rates here:

    //------------------- set $@brate,rand(100,150); set $@jrate,rand(100,150); set $@drate,rand(100,150); //Base exp setbattleflag("base_exp_rate",$@brate); //Job exp setbattleflag("job_exp_rate",$@jrate); //Drops setbattleflag("item_rate_common",$@drate); setbattleflag("item_rate_heal",$@drate); setbattleflag("item_rate_use",$@drate); setbattleflag("item_rate_equip",$@drate); //we don't change card drops rate, because these values won't change them anyway

    
    //-------------------
    	set $@brate,rand(100,150);
    	set $@jrate,rand(100,150);
    	set $@drate,rand(100,150);
    	//Base exp
    	setbattleflag("base_exp_rate",$@brate);
    	//Job exp
    	setbattleflag("job_exp_rate",$@jrate);
    	//Drops
    	setbattleflag("item_rate_common",$@drate);
    	setbattleflag("item_rate_heal",$@drate);
    	setbattleflag("item_rate_use",$@drate);
    	setbattleflag("item_rate_equip",$@drate);
    	//we don't change card drops rate, because these values won't change them anyway

     

    And how to add the announcement when the floating rate event start and end?


  8. Hi all can someone help me to build premium account or vip account alike...

    Have 3 type

    daily,weekly and monthly 

    use vip coupon and claim group id on NPC

    benefit got double exp on all,refine rate 50% success can use all cash npc like stylish,font changer,font color....and will get increase agility and blessing when warp or login...

    and got custom aura for known as VIP...when level 99 the aura become double...normal aura 99 + VIP aura

    if possible please teach me how...


  9. 22 hours ago, Chatterboy said:

    CREATE TABLE IF NOT EXISTS `e_freebie` (
        `id` int(11) unsigned NOT NULL auto_increment,
        `aid` int(11) unsigned NOT NULL default '0',
        `status` int(11) unsigned NOT NULL default '0',
        `time` datetime NOT NULL,
    ) ENGINE=MyISAM;

    Thank you very much sir


  10. Good Day Citizens of Midgard!

    Be a pioneer on this upcoming Ragnarok Level-UP Episode 12: Nightmare of Midgard The Destruction of Morroc

    Downloads will be available NOW!

    Registration is now available at 
    http://bit.ly/RPG-reg

    Join our GROUP!
    https://www.facebook.com/groups/rpglevelup/

    Tag your friends on the comment box and invite them on this awesome server!

    ➡️USEFUL LINKS
    Official Website:
    http://www.ragnaroklevelup.com

    Register here:
    http://bit.ly/RPG-reg

    Downloads:
    http://bit.ly/RPG-Downloads

    Support Ticket:
    http://myaccount.ragnaroklevelup.com/support/tickets

    Share for Points:
    http://bit.ly/RPG-s4p

    Vote for Points:
    http://bit.ly/RPG-v4p

    286F4A60-0EF6-4C07-92EA-F5E119C74467.jpeg


  11. i have script but i lost the SQL Table

    can someone teach me how to create new one for the script...

    here some query sql on the script

    query_sql( "SELECT `id` FROM `e_freebie` WHERE `aid` = "+.@aid+" LIMIT 1", .@id );

    query_sql( "INSERT INTO `e_freebie` ( `aid` ) VALUES ( "+.@aid+" )" );

    query_sql( "SELECT COUNT(`id`) FROM `e_freebie` WHERE `status` = 2",.@total_id );

    query_sql( "SELECT `id`, `time` FROM `e_freebie` WHERE `status` = 1 AND `aid` = "+ .@aid, .@id, .@time$ );

    query_sql( "UPDATE `e_freebie` SET `status` = 2, `time` = NOW() WHERE `id` = "+.@id+" LIMIT 1" );
     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.