Jump to content

PottScilgrim

Members
  • Content Count

    18
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

  • Days Won

    1

PottScilgrim last won the day on June 25 2020

PottScilgrim had the most liked content!

Community Reputation

11 Good

About PottScilgrim

  • Rank
    Poring

Profile Information

Contact Methods

Recent Profile Visitors

304 profile views
  1. Try this //===== rAthena Script ======================================= //= Job Master //===== Description: ========================================= //= A fully functional job changer. //===== Additional Comments: ================================= //= 1.0 Initial script. [Euphy] //= 1.1 Fixed reset on Baby job change. //= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support. //= 1.3 Kagerou/Oboro added. //= 1.4 Rebellion added. //= 1.5 Added option to disable RebirthClass. [mazvi] //= 1.6 Added option to get job related equipment on change. [Braniff] //= 1.7 Readability changes. Also added BabyExpanded and BabySummoner classes. [Jey] //= 1.8 Added option to disable Baby Novice Only but Baby Class can be Enabled [mazvi] //= 1.9 Migrate/Integrate to Global Functions Platinum Skills. [mazvi] //============================================================ prontera,153,193,6 script Job Master 123,{ function Get_Job_Equip; // Checks if the Player has the required level. // closes if not, returns if yes function Require_Level { if (BaseLevel < getarg(0) || JobLevel < getarg(1)) { [email protected] = getarg(0) - BaseLevel; [email protected] = getarg(1) - JobLevel; mes "Level requirement:"; mes ((getarg(0)>1)? "^bb0000"+getarg(0)+"^000000 (^bb0000Base^000000) / ":"")+"^00bb00"+ getarg(1)+"^000000 (^00bb00Job^000000)"; mes "You need " + (([email protected] > 0) ? "^bb0000"[email protected]+"^000000 more base levels " + (([email protected] > 0) ? "and " : "") : "") + (([email protected] > 0) ? "^00bb00"[email protected]+"^000000 more job levels " : "") + "to continue."; close; } return; } // Checks if the given eac is a baby class function Is_Baby { return ((getarg(0, eaclass())&EAJL_BABY)>0); } // Checks if the player can change to third class. // Note: This does not include the level checks. function Can_Change_Third { // To change to third class you either need to be: // * Second Class // * Transcendent Second Class // * Baby Second Class if( !.ThirdClass ) return false; // Third job change disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&EAJL_THIRD ) return false; // Already Third Class if( roclass(eaclass()|EAJL_THIRD) < 0 ) return false; // Job has no third Class if( (eaclass()&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE ) return false; // Exp. Super Novice equals 3rd Cls, but has it's own case if( Is_Baby() && (!.BabyClass || !.BabyThird) ) return false; // No Baby (Third) change allowed return true; } function Can_Rebirth { // To rebirth, you need to be: // * Second Class if( !.RebirthClass ) return false; // Rebirth disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&EAJL_UPPER ) return false; // Already Rebirthed if( roclass(eaclass()|EAJL_UPPER) < 0 ) return false; // Job has no transcended class if( Is_Baby() && !.BabyClass ) return false; // No Baby changes allowed return true; } // Checks if the given eac is a first class function Is_First_Cls { return (getarg(0) <= EAJ_TAEKWON); } function Check_Riding { // Note: Why we should always check for Riding: // Mounts are considered as another class, which // would make this NPC bigger just to handle with // those special cases. if (checkfalcon() || checkcart() || checkriding() || ismounting()) { mes "Please remove your " + ((checkfalcon()) ? "falcon" : "") + ((checkcart()) ? "cart" : "") + ((checkriding()) ? "Peco" : "") + ((ismounting()) ? "mount" : "") + " before proceeding."; close; } return; } function Check_SkillPoints { if (.SkillPointCheck && SkillPoint) { mes "Please use all your skill points before proceeding."; close; } return; } // addJobOptions is essentially the same like // setarray [email protected][getarraysize([email protected])],opt1,opt2,...; // It's just easier to read, since we're using it very often function Job_Options { [email protected] = getargcount(); [email protected]_size = getarraysize(getarg(0)); for( [email protected] = 1; [email protected] < [email protected]; [email protected]++) { setarray getelementofarray(getarg(0), [email protected]_size++),getarg([email protected]); } } // Begin of the NPC mes .NPCName$; Check_Riding(); Check_SkillPoints(); // initialisation deletearray [email protected]_opt[0],getarraysize([email protected]_opt); [email protected] = eaclass(); [email protected]_possible = Can_Change_Third(); [email protected]_possible = Can_Rebirth(); [email protected]_eac = [email protected]&EAJ_BASEMASK; [email protected]_eac = [email protected]&EAJ_UPPERMASK; // Note: These are already set in pc.cpp // BaseClass = roclass([email protected]&EAJ_BASEMASK) which is the players First Class // BaseJob = roclass([email protected]&EAJ_UPPERMASK) which is the players Second Class //dispbottom "Debug: eac ("[email protected]+"), third ("[email protected]_possible+"), rebirth("[email protected]_possible+"), BaseClass ("+BaseClass+"), BaseJob ("+BaseJob+")"; // From here on the jobmaster checks the current class // and fills the the array `[email protected]_opt` with possible // job options for the player. if( [email protected]_possible ) { // Rebirth option (displayed on the top of the menu) Require_Level(.Req_Rebirth[0], .Req_Rebirth[1]); Job_Options([email protected]_opt, Job_Novice_High); } if( [email protected]_possible ) { // Third Job change (displayed below rebirth) Require_Level(.Req_Third[0], .Req_Third[1]); Job_Options([email protected]_opt, roclass([email protected]|EAJL_THIRD)); } if (.SecondExpanded && ([email protected]&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE && // is Super Novice !(eaclass()&EAJL_THIRD) ) { // not already Expanded SN // (Baby) Super Novice to Expanded (Baby) Super Novice if( !Is_Baby([email protected]) || (.BabyClass && .BabyExpanded) ) { // .BabyClass & .BabyExpanded must be enabled if the is a baby Require_Level(.Req_Exp_SNOVI[0], .Req_Exp_SNOVI[1]); Job_Options([email protected]_opt,roclass([email protected]|EAJL_THIRD)); // Expanded SN is "third" cls } } if (.SecondExpanded && (([email protected]&(~EAJL_BABY)) == EAJ_NINJA || // is (Baby) Ninja ([email protected]&(~EAJL_BABY)) == EAJ_GUNSLINGER)) { // is (Baby) Gunslinger // (Baby) Ninja to (Baby) Kagerou / Oboro // (Baby) Gunslinger to (Baby) Rebellion if( !Is_Baby([email protected]) || (.BabyClass && .BabyExpanded) ) { // .BabyClass & .BabyExpanded must be enabled if the is a baby Require_Level(.Req_Exp_NJ_GS[0], .Req_Exp_NJ_GS[1]); // Kagerou, Oboro, Rebellion are considered as a 2-1 class Job_Options([email protected]_opt, roclass([email protected]|EAJL_2_1)); } } // Player is Job_Novice, Job_Novice_High or Job_Baby if ([email protected]_eac == EAJ_NOVICE && [email protected]_eac != EAJ_SUPER_NOVICE) { // MAPID_NOVICE, MAPID_SUPER_NOVICE, MAPID_NOVICE_HIGH, MAPID_BABY Require_Level(.Req_First[0], .Req_First[1]); switch(Class) { case Job_Novice: // First job change Job_Options([email protected]_opt,Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief, Job_Super_Novice, Job_Taekwon, Job_Gunslinger, Job_Ninja); if( .BabyNovice ) Job_Options([email protected]_opt, Job_Baby); break; case Job_Novice_High: // Job change after rebirth if( .LastJob && lastJob ) Job_Options([email protected]_opt, roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER)); else Job_Options([email protected]_opt, Job_Swordman_High, Job_Mage_High, Job_Archer_High, Job_Acolyte_High, Job_Merchant_High, Job_Thief_High); break; case Job_Baby: if( !.BabyClass ) break; // First job change as a baby Job_Options([email protected]_opt, Job_Baby_Swordman, Job_Baby_Mage, Job_Baby_Archer,Job_Baby_Acolyte, Job_Baby_Merchant, Job_Baby_Thief); if( .BabyExpanded ) Job_Options([email protected]_opt, Job_Super_Baby, Job_Baby_Taekwon, Job_Baby_Gunslinger, Job_Baby_Ninja); if( .BabySummoner ) Job_Options([email protected]_opt, Job_Baby_Summoner); break; default: mes "An error has occurred."; close; } } else if( Is_First_Cls([email protected]) || // First Class Is_First_Cls([email protected]&(~EAJL_UPPER)) || // Trans. First Cls (.BabyClass && Is_First_Cls([email protected]&(~EAJL_BABY))) ) { // Baby First Cls // Player is First Class (not Novice) // most jobs should have two options here (2-1 and 2-2) [email protected] = roclass([email protected]|EAJL_2_1); // 2-1 [email protected] = roclass([email protected]|EAJL_2_2); // 2-2 // dispbottom "Debug: Classes: class1 ("[email protected]+"), class2 ("[email protected]+")"; if(.LastJob && lastJob && ([email protected]&EAJL_UPPER)) { // Player is rebirth Cls and linear class changes are enforced Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options([email protected]_opt, lastJob + Job_Novice_High); } else { // Class is not enforced, player can decide. if( [email protected] > 0 ) { // 2-1 Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options([email protected]_opt, [email protected]); } if( [email protected] > 0 ) { // 2-2 Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options([email protected]_opt, [email protected]); } } } // Displaying the Job Menu defined by [email protected]_opt. // [email protected]_opt should not be changed below this line. function Job_Menu; Job_Menu([email protected]_opt); close; // Displays the job menu function Job_Menu { // getarg(0) is the [email protected]_opt array holding all available job changes. function Confirm_Change; while(true) { [email protected]_cnt = getarraysize(getarg(0)); if( [email protected]_cnt <= 0 ) { mes "No more jobs are available."; close; } [email protected] = 0; // Just a single job class given, no select needed if ([email protected]_cnt > 1) { // Multiple job classes given. Select one and save it to [email protected] // After that confirm [email protected] mes "Select a job."; [email protected]$ = ""; for ([email protected] = 0; [email protected] < [email protected]_cnt; [email protected]++) { if( getelementofarray(getarg(0), [email protected]) == Job_Novice_High) [email protected]$ = "^0055FFRebirth^000000"; else [email protected]$ = jobname(getelementofarray(getarg(0), [email protected])); [email protected]$ = [email protected]$ + " ~ " + [email protected]$ + ":"; } [email protected]$ = [email protected]$+" ~ ^777777Cancel^000000"; [email protected] = select([email protected]$) - 1; if( [email protected] < 0 || [email protected] >= [email protected]_cnt ) close; next; mes .NPCName$; } [email protected] = getelementofarray(getarg(0), [email protected]); if (([email protected] == Job_Super_Novice || [email protected] == Job_Super_Baby) && BaseLevel < .SNovice) { // Special Level Requirement because Super Novice and // Super Baby can both be selected in one of the first class // changes. That's why the Level Requirement is after and not before // the selection. mes "A base level of " + .SNovice + " is required to turn into a " + jobname([email protected]) + "."; return; } // Confirm the Class Confirm_Change([email protected], [email protected]_cnt > 1); next; mes .NPCName$; } return; } // Executes the actual jobchange and closes. function Job_Change { [email protected]_cls = getarg(0); next; mes .NPCName$; mes "You are now " + callfunc("F_InsertArticle", jobname([email protected]_cls)) + "!"; if ([email protected]_cls == Job_Novice_High && .LastJob) lastJob = Class; // Saves the lastJob for rebirth jobchange [email protected]_cls; if ([email protected]_cls == Job_Novice_High) resetlvl(1); else if ([email protected]_cls == Job_Baby) { resetstatus; resetskill; set SkillPoint,0; } specialeffect2 EF_ANGEL2; specialeffect2 EF_ELECTRIC; if (.Platinum) callfunc "F_GetPlatinumSkills"; if (.GetJobEquip) Get_Job_Equip(); close; // Always closes after the change } function Confirm_Change { // Player confirms he want to change into [email protected] [email protected] = getarg(0, -1); [email protected] = getarg(1, false); if( [email protected] < 0 ) { mes "Unknown Class Error."; close; } if(.ZCost != 0 && [email protected] == Job_Novice_High) { mes "Do you want to rebirth?"; mes "This will cost "+callfunc("F_InsertComma",.ZCost)+"z"; // Adds Zeny Cost message if ZCost is enabled [email protected]_option$ = " ~ ^0055FFRebirth^000000 - ("+callfunc("F_InsertComma",.ZCost)+"z)"; } else { mes "Do you want to change into ^0055FF"+jobname([email protected])+"^000000 class?"; [email protected]_option$ = " ~ Change into ^0055FF"+jobname([email protected])+"^000000 class"; } // if( [email protected] == Job_Novice_High) // [email protected]_option$ = " ~ ^0055FFRebirth^000000"; if (select([email protected]_option$+": ~ ^777777" + (([email protected]) ?"Go back" : "Cancel") + "^000000") == 1) { if(Zeny < .ZCost && [email protected] == Job_Novice_High) { clear; mes .NPCName$; mes "You are lacking "+callfunc("F_InsertComma",(.ZCost - Zeny))+" zeny."; close; } if([email protected] == Job_Novice_High) Zeny = Zeny-.ZCost; Job_Change([email protected]); } if ([email protected]) close; // "Cancel" pressed return; } // Function which gives a job related item to the player // the items are the rewards from the original job change quests function Get_Job_Equip { // Note: The item is dropping, when the player can't hold it. // But that's better than not giving the item at all. [email protected] = eaclass(); if( [email protected]&EAJL_THIRD ) { // Third Class Items getitem 2795,1; // Green Apple Ring for every 3rd Class switch(BaseJob) { // BaseJob of Third Cls // For Normal Third, Baby Third and Transcended Third Cls case Job_Knight: getitem 5746,1; break; // Rune Circlet [1] case Job_Wizard: getitem 5753,1; break; // Magic Stone Hat [1] case Job_Hunter: getitem 5748,1; break; // Sniper Goggle [1] case Job_Priest: getitem 5747,1; break; // Mitra [1] case Job_Blacksmith: getitem 5749,1; break; // Driver Band [1] case Job_Assassin: getitem 5755,1; break; // Silent Executor [1] case Job_Crusader: getitem 5757,1; break; // Dip Schmidt Helm [1] case Job_Sage: getitem 5756,1; break; // Wind Whisper [1] case Job_Bard: getitem 5751,1; break; // Maestro Song's Hat [1] case Job_Dancer: getitem 5758,1; break; // Dying Swan [1] case Job_Monk: getitem 5754,1; break; // Blazing Soul [1] case Job_Alchemist: getitem 5752,1; break; // Midas Whisper[1] case Job_Rogue: getitem 5750,1; // Shadow Handicraft [1] getitem 6121,1; // Makeover Brush getitem 6122,1; break; // Paint Brush } } else if ([email protected]&EAJL_2) { // Second Class (And not Third Class) switch(BaseJob) { // Second Class case Job_Knight: getitem 1163,1; break; // Claymore [0] case Job_Priest: getitem 1522,1; break; // Stunner [0] case Job_Wizard: getitem 1617,1; break; // Survivor's Rod [0] case Job_Blacksmith: getitem 1360,1; break; // Two-Handed-Axe [1] case Job_Hunter: getitem 1718,1; break; // Hunter Bow [0] case Job_Assassin: getitem 1254,1; break; // Jamadhar [0] case Job_Crusader: getitem 1410,1; break; // Lance [0] case Job_Monk: getitem 1807,1; break; // Fist [0] case Job_Sage: getitem 1550,1; break; // Book [3] case Job_Rogue: getitem 1222,1; break; // Damascus [1] case Job_Alchemist: getitem 1126,1; break; // Saber [2] case Job_Bard: getitem 1907,1; break; // Guitar [0] case Job_Dancer: getitem 1960,1; break; // Whip [1] case Job_Super_Novice: getitem 1208,1; break; // Main Gauche [4] case Job_Star_Gladiator: getitem 1550,1; break; // Book [3] case Job_Soul_Linker: getitem 1617,1; break; // Survivor's Rod [0] } } else { // Neither Second or Third Cls // => First Cls or not covered by the switch switch(BaseClass) { // First Class case Job_Swordman: getitem 1108,1; break; // Blade [4] case Job_Mage: getitem 1602,1; break; // Rod [4] case Job_Archer: getitem 1705,1; break; // Composite Bow [4] case Job_Acolyte: getitem 1505,1; break; // Mace [4] case Job_Merchant: getitem 1302,1; break; // Axe [4] case Job_Thief: getitem 1208,1; break; // Main Gauche [4] case Job_Gunslinger: getitem 13101,1; break; // Six Shooter [2] case Job_Ninja: getitem 13010,1; break; // Asura [2] } } return; } OnInit: // Initialisation, do not edit these .NPCName$ = "[Job Master]"; .ZCost = 25000; // Zeny cost per job change. Change to 0 to disable. // Settings .ThirdClass = false; // Enable third classes? .RebirthClass = true; // Enable rebirth classes? .SecondExpanded = false; // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? .BabyNovice = false; // Enable Baby novice classes? Disable it if you like player must have parent to get job baby. .BabyClass = false; // Enable Baby classes? .BabyThird = false; // Enable Baby third classes? .BabyExpanded = false; // Enable Baby Expanded classes: Ex. Baby Ninja, Baby Taekwon, etc. .BabySummoner = false; // Enable Baby Summoner? .LastJob = true; // Enforce linear class changes? .SkillPointCheck = true; // Force player to use up all skill points? .Platinum = true; // Get platinum skills automatically? .GetJobEquip = false; // Get job equipment (mostly weapons) on job change? // Level Requirements setarray .Req_First[0],1,10; // Minimum base level, job level to turn into 1st class setarray .Req_Second[0],1,40; // Minimum base level, job level to turn into 2nd class setarray .Req_Rebirth[0],99,50; // Minimum base level, job level to rebirth setarray .Req_Third[0],99,50; // Minimum base level, job level to change to third class setarray .Req_Exp_NJ_GS[0],99,70; // Minimum base level, job level to turn into Expanded Ninja and Gunslinger setarray .Req_Exp_SNOVI[0],99,99; // Minimum base level, job level to turn into Expanded Super Novice .SNovice = 45; // Minimum base level to turn into Super Novice // Setting adjustments by PACKETVER if( PACKETVER < 20161207 ) { if( .BabyExpanded ) debugmes "jobmaster: BabyExpanded is disabled due to outdated PACKETVER."; if( .BabySummoner ) debugmes "jobmaster: BabySummoner is disabled due to outdated PACKETVER."; .BabyExpanded = false; .BabySummoner = false; } end; }
  2. Not sure if it's the source of the issue, but it might be worth a try. The array is a string type array, and the script is attempting to store both strings and integers into it. Also, the script ends after the 3rd line of data, because of the ';'. Try this. setarray [email protected]$[0], "6908", "4807", "ASPD+1 only", // ASPDStone_Robe Atk_Speed1 "6963", "4992", "Absorption 1% of damage dealt to enemy into HP with 1% chance", // HPdrainStone_Robe HPdrain1 "6964", "4993", "Absorption 1% of damage dealt to enemy into SP with 1% chance", // SPdrainStone_Robe SPdrain1 "25067", "29056", "Fixed Cast Time -0.5s", // CastingStone_Robe FixedCasting05 "25170", "29154", "Fixed Cast Time -0.3s", // MinorCastingStone_Robe FixedCasting03 "25302", "29362", "Double Attack", // DoubleAttack_Stone DoubleAttack "25303", "29361", "Critical Damage +20%", // Critical_Stone_Robe Fatal_Robe "25306", "29358", "Variable Cast Time -20%"; // CastStone_Robe Casting_Robe
  3. Try this: You'll need to modify the settings in "OnInit" with the mob ID's of the bosses you want to use, the map(s) you'd like to use for the event, and the prize item ID's and amounts. //================================================================// // World Boss Script // Created by PottScilgrim //================================================================// - script WorldBossEvent -1,{ //================================================================// // Change the "OnClock" times to be when you want the event to begin //================================================================// OnClock1100: OnClock2300: if(.WBMAPS$[1] == "") { if(.WBMOBID[1] == 0){ monster .WBMAPS$[0],0,0,"[World Boss]",.WBMOBID[0],1,"WorldBossEvent::OnWBDead",2; } else { monster .WBMAPS$[0],0,0,"[World Boss]",.WBMOBID[rand(getarraysize(.WBMOBID))],1,"WorldBossEvent::OnWBDead",2; } } else { if(.WBMOBID[1] == 0){ monster .WBMAPS$[rand(getarraysize(.WBMAPS$))],0,0,"[World Boss]",.WBMOBID[0],1,"WorldBossEvent::OnWBDead",2; } else { monster .WBMAPS$[rand(getarraysize(.WBMAPS$))],0,0,"[World Boss]",.WBMOBID[rand(getarraysize(.WBMOBID))],1,"WorldBossEvent::OnWBDead",2; } } announce "[World Boss]: The world boss has spawned!",bc_all; end; //================================================================// // This event fires off when the world boss is killed //================================================================// OnWBDead: announce "[World Boss]: "+ strcharinfo(0)+" landed the final blow against the world boss!",bc_all; getitem .sprize,.sprizeamt; // Gives only the winning player this prize addrid 1,0; // Attaches all players on the current map getitem .mprize,.mprizeamt; // Gives all players a prize end; //================================================================// // These are the NPC settings //================================================================// OnInit: // Add your world boss mob ID's here. If you only need one, just put one. setarray .WBMOBID, 1002,1003; // Add the maps for your world boss event here. If you only want one, just add one. setarray .WBMAPS$,"prontera","geffen"; // This is the special prize for the player that lands the final hit. .sprize = 512; .sprizeamt = 1; // This is the prize that gets given to all players on the event map when it is killed .mprize = 513; .mprizeamt = 1; end; }
  4. Try this. //================================================================// // Happy Hour Script // Created by PottScilgrim //================================================================// - script HappyHourScript -1,{ //================================================================// // Hourly Triggers //================================================================// OnClock0100: OnClock0800: OnClock1300: OnClock2100: setbattleflag "base_exp_rate",1800,true; setbattleflag "job_exp_rate",1800,true; announce "[EVENT]: Happy hour has now begun, exp rates are now 18x!",bc_all,0xc4ff5e; end; OnClock0400: OnClock1100: OnClock1600: OnClock2300: setbattleflag "base_exp_rate",1500,true; setbattleflag "job_exp_rate",1500,true; announce "[EVENT]: Happy hour has ended, exp rates have returned to normal",bc_all,0xc4ff5e; end; }
  5. Try this: Modify this line (Line 459) to set the Zeny cost. .ZCost = 25000; // Zeny cost per job change. Change to 0 to disable. //===== rAthena Script ======================================= //= Job Master //===== Description: ========================================= //= A fully functional job changer. //===== Additional Comments: ================================= //= 1.0 Initial script. [Euphy] //= 1.1 Fixed reset on Baby job change. //= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support. //= 1.3 Kagerou/Oboro added. //= 1.4 Rebellion added. //= 1.5 Added option to disable RebirthClass. [mazvi] //= 1.6 Added option to get job related equipment on change. [Braniff] //= 1.7 Readability changes. Also added BabyExpanded and BabySummoner classes. [Jey] //= 1.8 Added option to disable Baby Novice Only but Baby Class can be Enabled [mazvi] //= 1.9 Migrate/Integrate to Global Functions Platinum Skills. [mazvi] //============================================================ prontera,153,193,6 script Job Master 123,{ function Get_Job_Equip; // Checks if the Player has the required level. // closes if not, returns if yes function Require_Level { if (BaseLevel < getarg(0) || JobLevel < getarg(1)) { [email protected] = getarg(0) - BaseLevel; [email protected] = getarg(1) - JobLevel; mes "Level requirement:"; mes ((getarg(0)>1)? "^bb0000"+getarg(0)+"^000000 (^bb0000Base^000000) / ":"")+"^00bb00"+ getarg(1)+"^000000 (^00bb00Job^000000)"; mes "You need " + (([email protected] > 0) ? "^bb0000"[email protected]+"^000000 more base levels " + (([email protected] > 0) ? "and " : "") : "") + (([email protected] > 0) ? "^00bb00"[email protected]+"^000000 more job levels " : "") + "to continue."; close; } return; } // Checks if the given eac is a baby class function Is_Baby { return ((getarg(0, eaclass())&EAJL_BABY)>0); } // Checks if the player can change to third class. // Note: This does not include the level checks. function Can_Change_Third { // To change to third class you either need to be: // * Second Class // * Transcendent Second Class // * Baby Second Class if( !.ThirdClass ) return false; // Third job change disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&EAJL_THIRD ) return false; // Already Third Class if( roclass(eaclass()|EAJL_THIRD) < 0 ) return false; // Job has no third Class if( (eaclass()&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE ) return false; // Exp. Super Novice equals 3rd Cls, but has it's own case if( Is_Baby() && (!.BabyClass || !.BabyThird) ) return false; // No Baby (Third) change allowed return true; } function Can_Rebirth { // To rebirth, you need to be: // * Second Class if( !.RebirthClass ) return false; // Rebirth disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&EAJL_UPPER ) return false; // Already Rebirthed if( roclass(eaclass()|EAJL_UPPER) < 0 ) return false; // Job has no transcended class if( Is_Baby() && !.BabyClass ) return false; // No Baby changes allowed return true; } // Checks if the given eac is a first class function Is_First_Cls { return (getarg(0) <= EAJ_TAEKWON); } function Check_Riding { // Note: Why we should always check for Riding: // Mounts are considered as another class, which // would make this NPC bigger just to handle with // those special cases. if (checkfalcon() || checkcart() || checkriding() || ismounting()) { mes "Please remove your " + ((checkfalcon()) ? "falcon" : "") + ((checkcart()) ? "cart" : "") + ((checkriding()) ? "Peco" : "") + ((ismounting()) ? "mount" : "") + " before proceeding."; close; } return; } function Check_SkillPoints { if (.SkillPointCheck && SkillPoint) { mes "Please use all your skill points before proceeding."; close; } return; } // addJobOptions is essentially the same like // setarray [email protected][getarraysize([email protected])],opt1,opt2,...; // It's just easier to read, since we're using it very often function Job_Options { [email protected] = getargcount(); [email protected]_size = getarraysize(getarg(0)); for( [email protected] = 1; [email protected] < [email protected]; [email protected]++) { setarray getelementofarray(getarg(0), [email protected]_size++),getarg([email protected]); } } // Begin of the NPC mes .NPCName$; Check_Riding(); Check_SkillPoints(); // initialisation deletearray [email protected]_opt[0],getarraysize([email protected]_opt); [email protected] = eaclass(); [email protected]_possible = Can_Change_Third(); [email protected]_possible = Can_Rebirth(); [email protected]_eac = [email protected]&EAJ_BASEMASK; [email protected]_eac = [email protected]&EAJ_UPPERMASK; // Note: These are already set in pc.cpp // BaseClass = roclass([email protected]&EAJ_BASEMASK) which is the players First Class // BaseJob = roclass([email protected]&EAJ_UPPERMASK) which is the players Second Class //dispbottom "Debug: eac ("[email protected]+"), third ("[email protected]_possible+"), rebirth("[email protected]_possible+"), BaseClass ("+BaseClass+"), BaseJob ("+BaseJob+")"; // From here on the jobmaster checks the current class // and fills the the array `[email protected]_opt` with possible // job options for the player. if( [email protected]_possible ) { // Rebirth option (displayed on the top of the menu) Require_Level(.Req_Rebirth[0], .Req_Rebirth[1]); Job_Options([email protected]_opt, Job_Novice_High); } if( [email protected]_possible ) { // Third Job change (displayed below rebirth) Require_Level(.Req_Third[0], .Req_Third[1]); Job_Options([email protected]_opt, roclass([email protected]|EAJL_THIRD)); } if (.SecondExpanded && ([email protected]&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE && // is Super Novice !(eaclass()&EAJL_THIRD) ) { // not already Expanded SN // (Baby) Super Novice to Expanded (Baby) Super Novice if( !Is_Baby([email protected]) || (.BabyClass && .BabyExpanded) ) { // .BabyClass & .BabyExpanded must be enabled if the is a baby Require_Level(.Req_Exp_SNOVI[0], .Req_Exp_SNOVI[1]); Job_Options([email protected]_opt,roclass([email protected]|EAJL_THIRD)); // Expanded SN is "third" cls } } if (.SecondExpanded && (([email protected]&(~EAJL_BABY)) == EAJ_NINJA || // is (Baby) Ninja ([email protected]&(~EAJL_BABY)) == EAJ_GUNSLINGER)) { // is (Baby) Gunslinger // (Baby) Ninja to (Baby) Kagerou / Oboro // (Baby) Gunslinger to (Baby) Rebellion if( !Is_Baby([email protected]) || (.BabyClass && .BabyExpanded) ) { // .BabyClass & .BabyExpanded must be enabled if the is a baby Require_Level(.Req_Exp_NJ_GS[0], .Req_Exp_NJ_GS[1]); // Kagerou, Oboro, Rebellion are considered as a 2-1 class Job_Options([email protected]_opt, roclass([email protected]|EAJL_2_1)); } } // Player is Job_Novice, Job_Novice_High or Job_Baby if ([email protected]_eac == EAJ_NOVICE && [email protected]_eac != EAJ_SUPER_NOVICE) { // MAPID_NOVICE, MAPID_SUPER_NOVICE, MAPID_NOVICE_HIGH, MAPID_BABY Require_Level(.Req_First[0], .Req_First[1]); switch(Class) { case Job_Novice: // First job change Job_Options([email protected]_opt,Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief, Job_Super_Novice, Job_Taekwon, Job_Gunslinger, Job_Ninja); if( .BabyNovice ) Job_Options([email protected]_opt, Job_Baby); break; case Job_Novice_High: // Job change after rebirth if( .LastJob && lastJob ) Job_Options([email protected]_opt, roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER)); else Job_Options([email protected]_opt, Job_Swordman_High, Job_Mage_High, Job_Archer_High, Job_Acolyte_High, Job_Merchant_High, Job_Thief_High); break; case Job_Baby: if( !.BabyClass ) break; // First job change as a baby Job_Options([email protected]_opt, Job_Baby_Swordman, Job_Baby_Mage, Job_Baby_Archer,Job_Baby_Acolyte, Job_Baby_Merchant, Job_Baby_Thief); if( .BabyExpanded ) Job_Options([email protected]_opt, Job_Super_Baby, Job_Baby_Taekwon, Job_Baby_Gunslinger, Job_Baby_Ninja); if( .BabySummoner ) Job_Options([email protected]_opt, Job_Baby_Summoner); break; default: mes "An error has occurred."; close; } } else if( Is_First_Cls([email protected]) || // First Class Is_First_Cls([email protected]&(~EAJL_UPPER)) || // Trans. First Cls (.BabyClass && Is_First_Cls([email protected]&(~EAJL_BABY))) ) { // Baby First Cls // Player is First Class (not Novice) // most jobs should have two options here (2-1 and 2-2) [email protected] = roclass([email protected]|EAJL_2_1); // 2-1 [email protected] = roclass([email protected]|EAJL_2_2); // 2-2 // dispbottom "Debug: Classes: class1 ("[email protected]+"), class2 ("[email protected]+")"; if(.LastJob && lastJob && ([email protected]&EAJL_UPPER)) { // Player is rebirth Cls and linear class changes are enforced Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options([email protected]_opt, lastJob + Job_Novice_High); } else { // Class is not enforced, player can decide. if( [email protected] > 0 ) { // 2-1 Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options([email protected]_opt, [email protected]); } if( [email protected] > 0 ) { // 2-2 Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options([email protected]_opt, [email protected]); } } } // Displaying the Job Menu defined by [email protected]_opt. // [email protected]_opt should not be changed below this line. function Job_Menu; Job_Menu([email protected]_opt); close; // Displays the job menu function Job_Menu { // getarg(0) is the [email protected]_opt array holding all available job changes. function Confirm_Change; while(true) { [email protected]_cnt = getarraysize(getarg(0)); if( [email protected]_cnt <= 0 ) { mes "No more jobs are available."; close; } [email protected] = 0; // Just a single job class given, no select needed if ([email protected]_cnt > 1) { // Multiple job classes given. Select one and save it to [email protected] // After that confirm [email protected] mes "Select a job."; [email protected]$ = ""; for ([email protected] = 0; [email protected] < [email protected]_cnt; [email protected]++) { if( getelementofarray(getarg(0), [email protected]) == Job_Novice_High) [email protected]$ = "^0055FFRebirth^000000"; else [email protected]$ = jobname(getelementofarray(getarg(0), [email protected])); [email protected]$ = [email protected]$ + " ~ " + [email protected]$ + ":"; } [email protected]$ = [email protected]$+" ~ ^777777Cancel^000000"; [email protected] = select([email protected]$) - 1; if( [email protected] < 0 || [email protected] >= [email protected]_cnt ) close; next; mes .NPCName$; } [email protected] = getelementofarray(getarg(0), [email protected]); if (([email protected] == Job_Super_Novice || [email protected] == Job_Super_Baby) && BaseLevel < .SNovice) { // Special Level Requirement because Super Novice and // Super Baby can both be selected in one of the first class // changes. That's why the Level Requirement is after and not before // the selection. mes "A base level of " + .SNovice + " is required to turn into a " + jobname([email protected]) + "."; return; } // Confirm the Class Confirm_Change([email protected], [email protected]_cnt > 1); next; mes .NPCName$; } return; } // Executes the actual jobchange and closes. function Job_Change { [email protected]_cls = getarg(0); next; mes .NPCName$; mes "You are now " + callfunc("F_InsertArticle", jobname([email protected]_cls)) + "!"; if ([email protected]_cls == Job_Novice_High && .LastJob) lastJob = Class; // Saves the lastJob for rebirth jobchange [email protected]_cls; if ([email protected]_cls == Job_Novice_High) resetlvl(1); else if ([email protected]_cls == Job_Baby) { resetstatus; resetskill; set SkillPoint,0; } specialeffect2 EF_ANGEL2; specialeffect2 EF_ELECTRIC; if (.Platinum) callfunc "F_GetPlatinumSkills"; if (.GetJobEquip) Get_Job_Equip(); close; // Always closes after the change } function Confirm_Change { // Player confirms he want to change into [email protected] [email protected] = getarg(0, -1); [email protected] = getarg(1, false); if( [email protected] < 0 ) { mes "Unknown Class Error."; close; } mes "Do you want to change into ^0055FF"+jobname([email protected])+"^000000 class?"; if(.ZCost) { mes "This will cost "+callfunc("F_InsertComma",.ZCost)+"z"; } // Adds Zeny Cost message if ZCost is enabled if(.ZCost) { [email protected]_option$ = " ~ Change into ^0055FF"+jobname([email protected])+"^000000 class - ("+callfunc("F_InsertComma",.ZCost)+"z)"; } else { [email protected]_option$ = " ~ Change into ^0055FF"+jobname([email protected])+"^000000 class"; } if( [email protected] == Job_Novice_High) [email protected]_option$ = " ~ ^0055FFRebirth^000000"; if (select([email protected]_option$+": ~ ^777777" + (([email protected]) ?"Go back" : "Cancel") + "^000000") == 1) { if(Zeny < .ZCost) { clear; mes .NPCName$; mes "You are lacking "+callfunc("F_InsertComma",(.ZCost - Zeny))+" zeny."; close; } Zeny = Zeny-.ZCost; Job_Change([email protected]); } if ([email protected]) close; // "Cancel" pressed return; } // Function which gives a job related item to the player // the items are the rewards from the original job change quests function Get_Job_Equip { // Note: The item is dropping, when the player can't hold it. // But that's better than not giving the item at all. [email protected] = eaclass(); if( [email protected]&EAJL_THIRD ) { // Third Class Items getitem 2795,1; // Green Apple Ring for every 3rd Class switch(BaseJob) { // BaseJob of Third Cls // For Normal Third, Baby Third and Transcended Third Cls case Job_Knight: getitem 5746,1; break; // Rune Circlet [1] case Job_Wizard: getitem 5753,1; break; // Magic Stone Hat [1] case Job_Hunter: getitem 5748,1; break; // Sniper Goggle [1] case Job_Priest: getitem 5747,1; break; // Mitra [1] case Job_Blacksmith: getitem 5749,1; break; // Driver Band [1] case Job_Assassin: getitem 5755,1; break; // Silent Executor [1] case Job_Crusader: getitem 5757,1; break; // Dip Schmidt Helm [1] case Job_Sage: getitem 5756,1; break; // Wind Whisper [1] case Job_Bard: getitem 5751,1; break; // Maestro Song's Hat [1] case Job_Dancer: getitem 5758,1; break; // Dying Swan [1] case Job_Monk: getitem 5754,1; break; // Blazing Soul [1] case Job_Alchemist: getitem 5752,1; break; // Midas Whisper[1] case Job_Rogue: getitem 5750,1; // Shadow Handicraft [1] getitem 6121,1; // Makeover Brush getitem 6122,1; break; // Paint Brush } } else if ([email protected]&EAJL_2) { // Second Class (And not Third Class) switch(BaseJob) { // Second Class case Job_Knight: getitem 1163,1; break; // Claymore [0] case Job_Priest: getitem 1522,1; break; // Stunner [0] case Job_Wizard: getitem 1617,1; break; // Survivor's Rod [0] case Job_Blacksmith: getitem 1360,1; break; // Two-Handed-Axe [1] case Job_Hunter: getitem 1718,1; break; // Hunter Bow [0] case Job_Assassin: getitem 1254,1; break; // Jamadhar [0] case Job_Crusader: getitem 1410,1; break; // Lance [0] case Job_Monk: getitem 1807,1; break; // Fist [0] case Job_Sage: getitem 1550,1; break; // Book [3] case Job_Rogue: getitem 1222,1; break; // Damascus [1] case Job_Alchemist: getitem 1126,1; break; // Saber [2] case Job_Bard: getitem 1907,1; break; // Guitar [0] case Job_Dancer: getitem 1960,1; break; // Whip [1] case Job_Super_Novice: getitem 1208,1; break; // Main Gauche [4] case Job_Star_Gladiator: getitem 1550,1; break; // Book [3] case Job_Soul_Linker: getitem 1617,1; break; // Survivor's Rod [0] } } else { // Neither Second or Third Cls // => First Cls or not covered by the switch switch(BaseClass) { // First Class case Job_Swordman: getitem 1108,1; break; // Blade [4] case Job_Mage: getitem 1602,1; break; // Rod [4] case Job_Archer: getitem 1705,1; break; // Composite Bow [4] case Job_Acolyte: getitem 1505,1; break; // Mace [4] case Job_Merchant: getitem 1302,1; break; // Axe [4] case Job_Thief: getitem 1208,1; break; // Main Gauche [4] case Job_Gunslinger: getitem 13101,1; break; // Six Shooter [2] case Job_Ninja: getitem 13010,1; break; // Asura [2] } } return; } OnInit: // Initialisation, do not edit these .NPCName$ = "[Job Master]"; .ZCost = 25000; // Zeny cost per job change. Change to 0 to disable. // Settings .ThirdClass = false; // Enable third classes? .RebirthClass = true; // Enable rebirth classes? .SecondExpanded = false; // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? .BabyNovice = false; // Enable Baby novice classes? Disable it if you like player must have parent to get job baby. .BabyClass = false; // Enable Baby classes? .BabyThird = false; // Enable Baby third classes? .BabyExpanded = false; // Enable Baby Expanded classes: Ex. Baby Ninja, Baby Taekwon, etc. .BabySummoner = false; // Enable Baby Summoner? .LastJob = true; // Enforce linear class changes? .SkillPointCheck = true; // Force player to use up all skill points? .Platinum = true; // Get platinum skills automatically? .GetJobEquip = false; // Get job equipment (mostly weapons) on job change? // Level Requirements setarray .Req_First[0],1,10; // Minimum base level, job level to turn into 1st class setarray .Req_Second[0],1,40; // Minimum base level, job level to turn into 2nd class setarray .Req_Rebirth[0],99,50; // Minimum base level, job level to rebirth setarray .Req_Third[0],99,50; // Minimum base level, job level to change to third class setarray .Req_Exp_NJ_GS[0],99,70; // Minimum base level, job level to turn into Expanded Ninja and Gunslinger setarray .Req_Exp_SNOVI[0],99,99; // Minimum base level, job level to turn into Expanded Super Novice .SNovice = 45; // Minimum base level to turn into Super Novice // Setting adjustments by PACKETVER if( PACKETVER < 20161207 ) { if( .BabyExpanded ) debugmes "jobmaster: BabyExpanded is disabled due to outdated PACKETVER."; if( .BabySummoner ) debugmes "jobmaster: BabySummoner is disabled due to outdated PACKETVER."; .BabyExpanded = false; .BabySummoner = false; } end; }
  6. It's pretty basic, but I've got a pagination function (based on Chris' found here: Click) that I use for my unlockable warper NPC. You should be able to use it in the same way. This is the syntax for use: @menuoption = callfunc("F_MPages",implode(@MENU_T$,":")); @menuoption will return the array location. @MENU_T$ is the array containing all of the menu items. Change [email protected]_max to the number of options you'd like on each page. function script F_MPages { [email protected] = 0; [email protected]_max = 20; explode([email protected]_array$,getarg(0),":"); // Re-Saving string into Array [email protected] = getarraysize([email protected]_array$); if([email protected] == 1){debugmes "[email protected] = "[email protected];} if(getarraysize([email protected]_array$) < [email protected]_max){ [email protected]_count = 1; if([email protected] == 1){debugmes "Defaulting to 1 page";} } else { [email protected]_count = 1; while([email protected] > [email protected]_max){ [email protected]_count = [email protected]_count+1; [email protected] = [email protected] - [email protected]_max; } @pg_count = ([email protected]/[email protected]_max); // Calculating max pages based on [email protected]_max if([email protected] == 1){debugmes "Setting "[email protected]_count+" pages";} } set [email protected]_pg,1; if([email protected] == 1){ debugmes "[email protected]_max = "[email protected]_max; debugmes "[email protected]_pg = "[email protected]_pg; debugmes "Array size = "+getarraysize([email protected]_array$); } MAIN: if([email protected] == 1){debugmes "Current Page ["[email protected]_pg+"]";} [email protected]$ = ""; for([email protected][email protected]; [email protected] < ([email protected][email protected]_max); [email protected]++){ [email protected]$ = [email protected][email protected]_array$[[email protected]]+":"; } if([email protected]_pg == [email protected]_count){ [email protected]$ = [email protected]$+"[^FF0000Cancel^000000]"; } else if([email protected]_pg < [email protected]_count){ [email protected]$ = [email protected]$+"[^008722Next Page^000000]"; } [email protected] = select([email protected]$); if([email protected] == 1){debugmes "[email protected] = "[email protected];} if([email protected] > [email protected]_max){ if([email protected]_pg == [email protected]_count) { callfunc "close3"; } else if([email protected]_pg < [email protected]_count) { [email protected]_pg = [email protected]_pg+1; [email protected] = [email protected][email protected]_max; goto MAIN; } } if([email protected]_pg == 1){ [email protected] = [email protected]; } else { [email protected] = ([email protected])+(([email protected]_pg-1)*[email protected]_max); } if([email protected] == 1){debugmes "return = "[email protected];} return [email protected]; //close; }
  7. { [email protected] = rand(1,100); if([email protected] < 20) percentheal -100,0; if([email protected] >= 20) getitem 501,1; },{},{} This currently has a 20% chance to kill the player, and 80% chance to reward them with an item. Change the 20 to whatever percent you'd like the cutoff to be for death vs item. Change the item from 501 to whatever you want the item to be.
  8. Edit .customPrice to 1 so the script knows to use the custom prices rather than the default values. Then edit the .MONTHLYPRICE[0] arrays from to whatever you want them to cost.
  9. You can't store script commands in a string, and the only way to call data from a DB is to store it as an integer or a string. To get a script to perform "getitem" you need to explicitly type "getitem" into your script. If it's something that you use a lot of times, perhaps create a function instead of calling from the DB.
  10. Try this //======================================================== // Monthly rotation shop //======================================================== // Written by PottScilgrim //======================================================== // Main NPC: // - Switches the month and creates an array // - Sets the shop contents as the array // Options: // - Modify ".customPrice" to 1 if you want to use custom prices for items // Edit the .MONTHLYPRICE arrays with your desired prices //======================================================== prontera,154,179,3 script Monthly Shop#1 10180,{ mes .name$; mes "Now opening the monthly shop"; close2; callshop "S_MONTHLYSHOP",1; end; OnClock0001: OnInit: .customPrice = 0; // Modify this to 1 if you want to use custom buy prices for items .name$ = "[^FF0000 Monthly Shop ^000000]"; $monthint = gettime(DT_MONTH); switch($monthint){ case 1: // January setarray .MONTHLYSHOP[0],512,909,984; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 2: // February setarray .MONTHLYSHOP[0],985,1010,1201; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 3: // March setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 4: // April setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 5: // May setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 6: // June setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 7: // July setarray .MONTHLYSHOP[0],985,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 8: // August setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 9: // September setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 10: // October setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 11: // November setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; case 12: // December setarray .MONTHLYSHOP[0],512,512,512; if(.customPrice) { setarray .MONTHLYPRICE[0],10,10,10; } else { setarray .MONTHLYPRICE[0],getiteminfo(.MONTHLYSHOP[0],0),getiteminfo(.MONTHLYSHOP[1],0),getiteminfo(.MONTHLYSHOP[2],0); } break; } npcshopdelitem "S_MONTHLYSHOP",501; npcshopadditem "S_MONTHLYSHOP", .MONTHLYSHOP[0],.MONTHLYPRICE[0], .MONTHLYSHOP[1],.MONTHLYPRICE[1], .MONTHLYSHOP[2],.MONTHLYPRICE[2]; end; } //======================================================== // Shop NPC. Don't touch this. //======================================================== - shop S_MONTHLYSHOP -1,501:-1;
  11. z_agit,16,108,6 script Claw Machine 563,{ [email protected]$ = "[" + strnpcinfo(1) + "]"; mes [email protected]$; mes "Hello, for 75 War Badge you have a chance to obtain one of these items :"; for ([email protected] = 0; [email protected] < getarraysize(.items); [email protected]++) { mes "^008000~ " + getitemname(.items[[email protected]]) + "^000000"; } next; switch(select("Gamble!:Leave")) { case 1: if (Zeny < .zenyCost) { mes [email protected]$; mes "I'm afraid you don't have enough to gamble."; close; } Zeny -= .zenyCost; [email protected] = rand(1,100); for ([email protected] = 0 ; [email protected] < getarraysize(.items) ; [email protected]++) { if ([email protected] <= .percents[[email protected]]) { getitem .items[[email protected]],1 ; dispbottom "Congrats! You won 1 "+getitemname(.items[[email protected]])+" !" ; [email protected] = 1; } } if ([email protected]) dispbottom "You lost !"; mes [email protected]$; mes "There you go!"; break; case 2: break; } close; OnInit: .zenyCost = 1000000; // Change to what you want the zeny cost to be setarray .items,7773,671; setarray .percents,50,20; end; } You just want the zeny cost to be different? Try this. Modify the integer after .zenyCost in the OnInit section and it will change.
  12. Big yikes. That’s what I get for quick scripting! I’ll fix it soon.
  13. This should do it. Modify settings on the "OnInit:" section to make permanent changes, otherwise GMs over gm lvl 60 can modify the settings live, but these aren't permanent changes and will only last till the script is reloaded again. prontera,155,186,4 script Skillpoint Trader#pront 4W_M_01,{ .name$ = "[^FF0000 Skillpoint Trader ^000000]"; if(getgmlevel() > .minGM){ mes .name$; mes "Hi GM "+strcharinfo(0)+"!"; switch(select("~ Change Settings:~ Show player menu:~ ^FF0000Cancel^000000")){ case 1: while(1){ clear; mes .name$; mes "Zeny per point: ^57b017"+callfunc("F_InsertComma",.zeny)+"^000000"; mes "Trans classes only: "+(.onlytrans ? "^57b017Enabled^000000":"^8b8b8bDisabled^000000"); mes "Level required: "+(.minlvl ? "^57b017"+.minlvl+"^000000":"^8b8b8bDisabled^000000"); mes "This changes will only last until the next restart/reloadscript. Recommend changing in the script for permanent changes."; switch(select("~ Set Zeny:~ Set Trans Restriction:~ Set Lvl Restriction:~ ^FF0000Cancel^000000")){ case 1: input .zeny; break; case 2: if(.onlytrans == 1){.onlytrans=0;}else{.onlytrans=1;} break; case 3: clear; mes .name$; mes "Input level required to sell points. 0 to disable"; input .minlvl; break; default: close; } } case 2: clear; break; default: close; } } mes .name$; mes "Hi "+strcharinfo(0)+", I can buy your spare skill points for zeny!"; mes "----"; mes "Current Exchange Rate:"; mes "1pt = ^d19a24"+callfunc("F_InsertComma",.zeny)+"^000000z"; switch(select("~ Sell Skill Points:~ ^FF0000Cancel^000000")){ case 1: break; default: clear; mes .name$; emotion ET_BEST; mes "Ok, see you next time!"; close; } if(BaseLevel < .minlvl){ clear; mes .name$; mes "You are too low level to use this feature, please speak to me once you've hit level "+.minlvl; close; } if(.onlytrans){ if(Class >= 4008 && Class <= 4022){ goto L_SELL; } else if(Class >= 4054 && Class <= 4087){ goto L_SELL; } else { clear; mes .name$; mes "Only Transcendence classes can use this feature!"; close; } } L_SELL: clear; mes .name$; mes "You have "+SkillPoint+" skill points available!"; switch(select("~ Sell One:~ Sell Multiple:~ Sell All:~ ^FF0000Cancel^000000")){ case 1: [email protected] = 1; break; case 2: mes "Please input the amount of skill points you would like to sell."; input [email protected]; if([email protected] > SkillPoint) { [email protected] = SkillPoint; } else if([email protected] < 0){ [email protected] = 1; } break; case 3: [email protected] = SkillPoint; break; default: clear; mes .name$; emotion ET_BEST; mes "Ok, see you next time!"; close; } clear; mes .name$; mes "You want to sell ^57b017"[email protected]+"^000000 pts for"; mes "^d19a24"+callfunc("F_InsertComma",(.zeny*[email protected]))+"^000000z?"; switch(select("~ Yes:~ ^FF0000Cancel^000000")){ case 1: SkillPoint = SkillPoint - [email protected]; Zeny = Zeny + (.zeny*[email protected]); clear; mes .name$; mes "I've just credited ^d19a24"+callfunc("F_InsertComma",(.zeny*[email protected]))+"^000000z into your account!"; close; default: clear; mes .name$; emotion ET_BEST; mes "Ok, see you next time!"; close; } OnInit: .zeny = 100000; // change to however many zeny you want per skill point .onlytrans = 1; // change to 0 to allow any class to trade skill points .minlvl = 0; // change to your max level to only allow max level chars to trade points. 0 to disable. .minGM = 60; // change to the minimum GM level required to access the GM settings. end; }
  14. Try using instance_mapname(“job_thief1”).
  15. Try this: prontera,154,179,3 script Oca#cards 4W_M_01,{ //GroupID do usuário set [email protected]_user, 1; // Quantidade Oridecon Enriquecidos entregue set [email protected]_oridecon, 1; // Quantidade cartas obrigatórias set [email protected]_item, 10; // Site no qual será indicado ao jogador para se tornar um Usuário VIP. [email protected]$ = "https://google.com.br"; if( getgroupid() >= [email protected]_user) { mes "Deseja trocar carta por Oridecon Enriquecidos?"; switch( select("Sim", "Não")){ case 1: mes "Ok, irei verificar os requisitos."; next; getinventorylist; for( [email protected]=0; [email protected] < @inventorylist_count; [email protected]++){ if(getiteminfo(@inventorylist_id[[email protected]],2) == 6 && @inventorylist_id[[email protected]] >= 4001 && @inventorylist_id[[email protected]] <= 4453 ){ dispbottom "Item Count: ["+getitemname(@inventorylist_id[[email protected]])+"] - "+countitem(@inventorylist_id[[email protected]]); if(countitem(@inventorylist_id[[email protected]]) > 1){ if((countitem(@inventorylist_id[[email protected]])[email protected]) >= 9){ [email protected] = ([email protected]); } else { [email protected] = countitem(@inventorylist_id[[email protected]]); } dispbottom "[email protected] = "[email protected]; for([email protected]=0; [email protected] < [email protected]; [email protected]++){ [email protected][[email protected]] = @inventorylist_id[[email protected]]; dispbottom "[email protected]["[email protected]+"] = "[email protected][[email protected]]; [email protected]+=1; } } else { [email protected][[email protected]] = @inventorylist_id[[email protected]]; dispbottom "[email protected]["[email protected]+"] = "[email protected][[email protected]]; [email protected]+=1; } if([email protected] == 10){ for([email protected]=0; [email protected] < 10; [email protected]++){ if([email protected][[email protected]] != [email protected][[email protected]+1]){ [email protected] = [email protected][[email protected]]; mes "- ^bf7c0f"+getitemname([email protected])+"^000000 x"+countinarray([email protected][0], [email protected]); } } switch(select("~ Trade:~ ^FF0000Cancel^000000")){ case 1: for([email protected]=0; [email protected] < 10; [email protected]++){ delitem [email protected][[email protected]],1; } clear; mes "Aqui está seu item."; getitem 7620,1; close3; case 2: close3; } } } } mes "..."; mes "verifique os requisitos"; close3; case 2: mes "até mais"; close3; } } else { mes "Somente VIP pode usar meus serviços. Para se tornar um usuário VIP, acesse nosso site:"; mes "^0000FF" + [email protected]$ + "^000000"; close3; } }
×
×
  • Create New...

Important Information

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