forked from johnl0l/AdobeRO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild Manager v1.8.txt
76 lines (73 loc) · 3.23 KB
/
Build Manager v1.8.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//===== rAthena Script =======================================
//= Build Manager +
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.8
//===== Description: =========================================
//= Stores stat builds into a single character variable.
//============================================================
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)
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 (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; }
}