Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Set Cost here
- set @fee, 500000;
- function script Menu_BS {
- mes "[Status Sage]";
- mes "What would you like to do with your builds?";
- next;
- switch(select("Load a build (" + @fee + " zeny)":View Build:Save your build:Exit")) {
- Case 1:
- mes "Which build do you want to load?";
- switch(select("+build_name0$:+build_name1$:+build_name2$:+build_name3$:Go back")) {
- Case 1:
- set @id, 0;
- callfunc "Load_S2";
- Case 2:
- set @id, 1;
- callfunc "Load_S2";
- Case 3:
- set @id, 2;
- callfunc "Load_S2";
- Case 4:
- set @id, 3;
- callfunc "Load_S2";
- Case 5:
- callfunc "Menu_BS";
- }
- Case 2:
- mes "[Status Sage]";
- mes "Which build do you want to view?";
- next;
- switch(select("+build_name0$:+build_name1$:+build_name2$:+build_name3$:Go back")) {
- Case 1:
- set @id, 0;
- callfunc "View_S2";
- Case 2:
- set @id, 1;
- callfunc "View_S2";
- Case 3:
- set @id, 2;
- callfunc "View_S2";
- Case 4:
- set @id, 3;
- callfunc "View_S2";
- Case 5:
- callfunc "Menu_BS";
- }
- Case 3:
- mes "[Status Sage]";
- mes "Choose the slot to save in:";
- next;
- switch(select("+build_name0$:+build_name1$:+build_name2$:+build_name3$:Go back")) {
- Case 1:
- set @id, 0;
- callfunc "Save_S2";
- Case 2:
- set @id, 1;
- callfunc "Save_S2";
- Case 3:
- set @id, 2;
- callfunc "Save_S2";
- Case 4:
- set @id, 3;
- callfunc "Save_S2";
- Case 5:
- callfunc "Menu_BS";
- }
- Case 4:
- mes "[Status Sage]";
- mes "Bye!";
- close;
- end;
- }
- }
- //----------------------------------------------------
- // Functions
- //----------------------------------------------------
- function script Save_S2 {
- mes "[Status Sage]";
- mes "Choose a name for your build!";
- input @name$;
- setd "build_name" + @id + "$", @name$;
- setd "build_str" + @id, readparam(bStr);
- setd "build_agi" + @id, readparam(bAgi);
- setd "build_vit" + @id, readparam(bVit);
- setd "build_int" + @id, readparam(bInt);
- setd "build_dex" + @id, readparam(bDex);
- setd "build_luk" + @id, readparam(bLuk);
- set @id, 9;
- mes "Your build is saved!";
- next;
- callfunc "Menu_BS";
- }
- function script View_S2 {
- mes "[Status Sage]";
- mes "Here is your build number " + (@id + 1) + ":";
- mes "NAME: " + getd("build_name"+@id+"$");
- mes "Str " + getd("build_str"+@id);
- mes "Agi " + getd("build_agi"+@id);
- mes "Vit " + getd("build_vit"+@id);
- mes "Int " + getd("build_int"+@id);
- mes "Dex " + getd("build_dex"+@id);
- mes "Luk " + getd("build_luk"+@id);
- next;
- callfunc "Menu_BS";
- }
- function script Load_S2 {
- if (Zeny < @fee) {
- mes "[Status Sage]";
- mes "Sorry, but you don't have enough zeny.";
- close;
- }
- resetstatus;
- set @x, 0;
- callfunc "C_str";
- }
- function script C_str {
- if( @x < (getd("build_str"+@id)-1) ){
- statusup bStr;
- set @x, @x+1;
- callfunc "C_str";
- }
- set @x, 0;
- callfunc "C_agi";
- }
- function script C_agi: {
- if( @x < (getd("build_agi"+@id)-1) ){
- statusup bAgi;
- set @x, @x+1;
- callfunc "C_agi";
- }
- set @x, 0;
- callfunc "C_vit";
- }
- function script C_vit {
- if( @x < (getd("build_vit"+@id)-1) ){
- statusup bVit;
- set @x, @x+1;
- callfunc "C_vit";
- }
- set @x, 0;
- callfunc "C_int";
- }
- function script C_int {
- if( @x < (getd("build_int"+@id)-1) ){
- statusup bInt;
- set @x, @x+1;
- callfunc "C_int";
- }
- set @x, 0;
- callfunc "C_dex";
- }
- function script C_dex {
- if( @x < (getd("build_dex"+@id)-1) ){
- statusup bDex;
- set @x, @x+1;
- callfunc "C_dex";
- }
- set @x, 0;
- callfunc "C_luk";
- }
- function script C_luk {
- if( @x < (getd("build_luk"+@id)-1) ){
- statusup bLuk;
- set @x, @x+1;
- callfunc "C_luk";
- }
- set Zeny, Zeny - @fee;
- mes "[Status Sage]";
- mes "Your build has been succesfully loaded!";
- close;
- }
Add Comment
Please, Sign In to add comment