narien123 Posted April 3, 2015 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 39 Reputation: 0 Joined: 03/06/15 Last Seen: July 27, 2015 Share Posted April 3, 2015 (edited) prontera,152,192,6 script Build Manager 930,{ function Get_Menu; function Save_Build; function Load_Build; set .@BuildCount,4; // Number of builds to use set .@Save,5000; // Zeny required to save a build set .@Load,10000; // Zeny required to load a build set .@Rename,1000; // Zeny required to rename a build set .@MaxLevel,99; // Maximum base level (to prevent stat overflow) set .@stpoint ,>300; // Stats point cant be more then 300 ( i added this ) if (BaseLevel < .@MaxLevel) { message strcharinfo(0),"You must be level "+.@MaxLevel+" to use this."; end; } switch(select("Save Build...:Load Build...:Rename Build...:Close")) { case 1: if (.@Save) message strcharinfo(0),"It costs "+.@Save+" Zeny to save a build."; set .@Build, Get_Menu(.@BuildCount); if (Zeny<.@Save) { message strcharinfo(0),"Not enough Zeny."; close; } if (.@stpoint >300) { message strcharinfo(0),"Statpoint cant be more then 300."; close; } if (getd("Build_"+.@Build+"$")!="") { message strcharinfo(0),"Overwrite previous build #"+.@Build+"?"; if(select("Save new build:Cancel")==2) close; } Save_Build(.@Build); message strcharinfo(0),"Type a name for your build."; input getd("Build_"+.@Build+"n$"); message strcharinfo(0),"Build #"+.@Build+" ("+getd("Build_"+.@Build+"n$")+") saved."; set Zeny, Zeny-.@Save; close; case 2: if (.@Load) message strcharinfo(0),"It costs "+.@Load+" Zeny to load a build."; set .@Build, Get_Menu(.@BuildCount); if (getd("Build_"+.@Build+"$")=="") { message strcharinfo(0),"No build info found."; close; } if (Zeny<.@Load) { message strcharinfo(0),"Not enough Zeny."; close; } Load_Build(getd("Build_"+.@Build+"$")); message strcharinfo(0),"Build #"+.@Build+" loaded."; set Zeny, Zeny-.@Load; close; case 3: if (.@Rename) message strcharinfo(0),"It costs "+.@Rename+" Zeny to rename a build."; set .@Build, Get_Menu(.@BuildCount); if (getd("Build_"+.@Build+"$")=="") { message strcharinfo(0),"No build info found."; close; } if (Zeny<.@Rename) { message strcharinfo(0),"Not enough Zeny."; close; } message strcharinfo(0),"Type a new name for Build #"+.@Build+" ("+getd("Build_"+.@Build+"n$")+")."; input getd("Build_"+.@Build+"n$"); message strcharinfo(0),"Build #"+.@Build+" renamed."; set Zeny, Zeny-.@Rename; close; case 4: close; } function Get_Menu { set .@menu$,""; for(set .@i,1; .@i<=getarg(0); set .@i,.@i+1) set .@menu$, .@menu$+"Slot "+.@i+" ("+((getd("Build_"+.@i+"n$")=="")?"^777777empty":"^0055FF"+getd("Build_"+.@i+"n$"))+"^000000):"; return select(.@menu$); } function Save_Build { set .@s$,""; for(set .@i,13; .@i<19; set .@i,.@i+1) set .@s$,.@s$+readparam(.@i)+"|"; setd "Build_"+getarg(0)+"$", .@s$+StatusPoint; return; } function Load_Build { ResetStatus; explode(.@s$,getarg(0),"|"); for(set .@i,0; .@i<6; set .@i,.@i+1) statusup2 (.@i+13), atoi(.@s$[.@i])-1; set StatusPoint, atoi(.@s$[6]); return; } } Edited April 3, 2015 by narien123 codebox Quote Link to comment Share on other sites More sharing options...
Whathell Posted April 4, 2015 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 116 Reputation: 4 Joined: 01/11/12 Last Seen: April 16, 2023 Share Posted April 4, 2015 Yes, it really wont work the way you are expecting. Let me tell you what you added. set .@stpoint, 300; (actually you added >300) -- What it does: this line here gives the .@stpoint a value of 300 every time you use it in other parts of your script. Use: easy script set up. Editing this part will reflect in the whole script. Use like: set .@Save,5000; // Zeny required to save a build ---- setting if (Zeny<.@Save) { message strcharinfo(0),"Not enough Zeny."; close; } ----- use in script if (Zeny<5000) { message strcharinfo(0),"Not enough Zeny."; close; } ------ this is how the script is read based on the setting For the script to work the way you want, you might need a limit on your sql table where the build is saved that will return an error. Or maybe a per stat check before saving builds. You can go ask for that in scripting request maybe. Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted April 3, 2015 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Share Posted April 3, 2015 what is the problem? Quote Link to comment Share on other sites More sharing options...
narien123 Posted April 3, 2015 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 39 Reputation: 0 Joined: 03/06/15 Last Seen: July 27, 2015 Author Share Posted April 3, 2015 (edited) set .@stpoint ,>300; // Stats point cant be more then 300 ( i added this )and this if (.@stpoint >300) { message strcharinfo(0),"Statpoint cant be more then 300."; close; } but the script dont work what is the problem? set .@stpoint ,>300; // Stats point cant be more then 300 ( i added this )and this if (.@stpoint >300) { message strcharinfo(0),"Statpoint cant be more then 300."; close; } but the script dont work Edited April 3, 2015 by narien123 Quote Link to comment Share on other sites More sharing options...
narien123 Posted April 5, 2015 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 39 Reputation: 0 Joined: 03/06/15 Last Seen: July 27, 2015 Author Share Posted April 5, 2015 Yes, it really wont work the way you are expecting. Let me tell you what you added. set .@stpoint, 300; (actually you added >300) -- What it does: this line here gives the .@stpoint a value of 300 every time you use it in other parts of your script. Use: easy script set up. Editing this part will reflect in the whole script. Use like: set .@Save,5000; // Zeny required to save a build ---- setting if (Zeny<.@Save) { message strcharinfo(0),"Not enough Zeny."; close; } ----- use in script if (Zeny<5000) { message strcharinfo(0),"Not enough Zeny."; close; } ------ this is how the script is read based on the setting For the script to work the way you want, you might need a limit on your sql table where the build is saved that will return an error. Or maybe a per stat check before saving builds. You can go ask for that in scripting request maybe. Thx for this information .. and i get ti fix it .. Quote Link to comment Share on other sites More sharing options...
Question
narien123
prontera,152,192,6 script Build Manager 930,{
function Get_Menu; function Save_Build; function Load_Build;
set .@BuildCount,4; // Number of builds to use
set .@Save,5000; // Zeny required to save a build
set .@Load,10000; // Zeny required to load a build
set .@Rename,1000; // Zeny required to rename a build
set .@MaxLevel,99; // Maximum base level (to prevent stat overflow)
set .@stpoint ,>300; // Stats point cant be more then 300 ( i added this )
if (BaseLevel < .@MaxLevel) { message strcharinfo(0),"You must be level "+.@MaxLevel+" to use this."; end; }
switch(select("Save Build...:Load Build...:Rename Build...:Close")) {
case 1:
if (.@Save) message strcharinfo(0),"It costs "+.@Save+" Zeny to save a build.";
set .@Build, Get_Menu(.@BuildCount);
if (Zeny<.@Save) { message strcharinfo(0),"Not enough Zeny."; close; }
if (.@stpoint >300) { message strcharinfo(0),"Statpoint cant be more then 300."; close; }
if (getd("Build_"+.@Build+"$")!="") {
message strcharinfo(0),"Overwrite previous build #"+.@Build+"?";
if(select("Save new build:Cancel")==2) close; }
Save_Build(.@Build);
message strcharinfo(0),"Type a name for your build.";
input getd("Build_"+.@Build+"n$");
message strcharinfo(0),"Build #"+.@Build+" ("+getd("Build_"+.@Build+"n$")+") saved.";
set Zeny, Zeny-.@Save;
close;
case 2:
if (.@Load) message strcharinfo(0),"It costs "+.@Load+" Zeny to load a build.";
set .@Build, Get_Menu(.@BuildCount);
if (getd("Build_"+.@Build+"$")=="") {
message strcharinfo(0),"No build info found."; close; }
if (Zeny<.@Load) { message strcharinfo(0),"Not enough Zeny."; close; }
Load_Build(getd("Build_"+.@Build+"$"));
message strcharinfo(0),"Build #"+.@Build+" loaded.";
set Zeny, Zeny-.@Load;
close;
case 3:
if (.@Rename) message strcharinfo(0),"It costs "+.@Rename+" Zeny to rename a build.";
set .@Build, Get_Menu(.@BuildCount);
if (getd("Build_"+.@Build+"$")=="") {
message strcharinfo(0),"No build info found."; close; }
if (Zeny<.@Rename) { message strcharinfo(0),"Not enough Zeny."; close; }
message strcharinfo(0),"Type a new name for Build #"+.@Build+" ("+getd("Build_"+.@Build+"n$")+").";
input getd("Build_"+.@Build+"n$");
message strcharinfo(0),"Build #"+.@Build+" renamed.";
set Zeny, Zeny-.@Rename;
close;
case 4:
close; }
function Get_Menu {
set .@menu$,"";
for(set .@i,1; .@i<=getarg(0); set .@i,.@i+1)
set .@menu$, .@menu$+"Slot "+.@i+" ("+((getd("Build_"+.@i+"n$")=="")?"^777777empty":"^0055FF"+getd("Build_"+.@i+"n$"))+"^000000):";
return select(.@menu$); }
function Save_Build {
set .@s$,"";
for(set .@i,13; .@i<19; set .@i,.@i+1)
set .@s$,.@s$+readparam(.@i)+"|";
setd "Build_"+getarg(0)+"$", .@s$+StatusPoint;
return; }
function Load_Build {
ResetStatus;
explode(.@s$,getarg(0),"|");
for(set .@i,0; .@i<6; set .@i,.@i+1)
statusup2 (.@i+13), atoi(.@s$[.@i])-1;
set StatusPoint, atoi(.@s$[6]);
return; }
}
codebox
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.