Emistry Posted July 29, 2012 Posted July 29, 2012 View File Build Manager A NPC that allow your Characters to Switch Build from time to time. Players are able to save his current status build , so that he/she can switch back to the saved build whenever he/she want. Players no need to keep memorize their status build upon changed. Configuration : // maximum build player can store (0 = disable) .max_build = 3; // check player weight limit before switching stat (0 = disable) .check_weight_limit = 1; Submitter Emistry Submitted 07/29/12 Category Utilities Video Content Author Emistry 2 Quote
Note Posted September 30, 2012 Posted September 30, 2012 Hello Emistry, Would you be able to pull this off my friend? @Babylonian: It's not possible to save hotkeys, and saving equipment with my script would be inefficient (it'd require an SQL table and the 'equip' command, not too difficult to implement). Emistry has a script that saves skills as well: http://rathena.org/b...0-doppelganger/ For a delete option, add another menu option/case: set .@Build, Get_Menu(.@BuildCount); if (getd("Build_"+.@Build+"$")=="") { message strcharinfo(0),"No build info found."; close; } setd "Build_"+.@Build+"$",""; setd "Build_"+.@Build+"n$",""; message strcharinfo(0),"Build "+.@Build+" deleted."; close; I thought Emistry's version was only rAthena compatible. Keep in mind I am testing on a trunk version of the latest eAthena emu. (I prefer pre-renewal) By the way, after playing around with the script, I came up with one exploitable bug: 1. If the player saves his build, afterward rebirths as level 1/1, uses the NPC's services and is granted extra status points instantly. (There is no check basically.) The new status points of a player should be calculated. It would perhaps be nice if you can throw together a SQL version that includes the following features: • Status Saving based on specific level/point calculations. (To prevent mentioned bug: # 1.) • Skills Saving. (Merely due to players wanting to also save skills for pvm/mvp/pvp/woe switching porpuses.) • Hotkeys Saving (Optional.) • Must be level 99, and only Transcendent/Rebirthed classes can use the sevice. I am certain it would be appreciated by loads of other veterans out there. Edit: I've come to the conclusion that rAthena is actually packed with way more bug-fixes than eAthena, and the fact that I can turn off 'Renewal Features' is awesome. By all means, in this case forget the fact that I am testing on eAthena, I will be switching sources tonight. If by any chance you do put together this SQL version of the Build Manager, you ought to make sure it is rA compatible rather than eA. Cheers. Quote
Emistry Posted September 30, 2012 Author Posted September 30, 2012 it's possible, my Doppelganger script & peopleperson's Split Personality script have proven to you guys that skills can be saved and change / switch anytime according tot he script.. my Build Manager & Euphy Build Manager have proven to you guys status can be save and switch at anytime according to the script.. so, most of it is possible except the hotkey parts...even though i can think of it how the hotkey is saved, but not instant updated on your clients if your switched or etc... anyway.....will think of it if i want to update my Build Manager scripts..... 1 Quote
Note Posted October 1, 2012 Posted October 1, 2012 it's possible, my Doppelganger script & peopleperson's Split Personality script have proven to you guys that skills can be saved and change / switch anytime according tot he script.. my Build Manager & Euphy Build Manager have proven to you guys status can be save and switch at anytime according to the script.. so, most of it is possible except the hotkey parts...even though i can think of it how the hotkey is saved, but not instant updated on your clients if your switched or etc... anyway.....will think of it if i want to update my Build Manager scripts..... Great to hear. It is safe to assume you are busy. Take your time, and all the best. Cheers. Quote
eboni001 Posted September 19, 2013 Posted September 19, 2013 File Name: Build Manager File Submitter: Emistry File Submitted: 29 Jul 2012 File Category: Utilities Content Author: Emistry A NPC that allow your Characters to Switch Build from time to time. Players are able to save his current status build , so that he/she can switch back to the saved build whenever he/she want. Players no need to keep memorize their status build upon changed. This NPC also provide other Services for Status / Skills Reset. Configuration : // Mode of NPC // 1 = Save & Switch // 2 = Reset Status // 4 = Reset Skills // 7 = All of Above [ 1+2+4 = 7 ] set .BMMode,7; // How Many Slots available to Save Status Builds. set .MaxSlots,3; // Enable Stats Slot Rename + Max Name Length ( 0 = Disable ) setarray .Length,4,26; // Min. ~ Max. Words. Visit Emistry Topic for more Scripts... Hey sir emistry, i changed my server max stat and i want to reset all builds saved into build manager, how can i do it? Quote
Emistry Posted September 20, 2013 Author Posted September 20, 2013 try these.. shutdown server..and load these SQL DELETE FROM `global_reg_value` WHERE `str` LIKE 'STATS_%'; DELETE FROM `global_reg_value` WHERE `str` LIKE 'STR_%'; DELETE FROM `global_reg_value` WHERE `str` LIKE 'AGI_%'; DELETE FROM `global_reg_value` WHERE `str` LIKE 'VIT_%'; DELETE FROM `global_reg_value` WHERE `str` LIKE 'INT_%'; DELETE FROM `global_reg_value` WHERE `str` LIKE 'DEX_%'; DELETE FROM `global_reg_value` WHERE `str` LIKE 'LUK_%'; make sure you backup 1st before do anything... Quote
Fresh prince Posted January 12, 2014 Posted January 12, 2014 Thank you for this sir, if im a trans max level and saved a build in the build mgr npc, Then i rebirth(max level) and comback and load it, would it let me do it? Or the stats might stack? Is there a check for this? Thanks Quote
Emistry Posted January 13, 2014 Author Posted January 13, 2014 Thank you for this sir, if im a trans max level and saved a build in the build mgr npc, Then i rebirth(max level) and comback and load it, would it let me do it? Or the stats might stack? Is there a check for this? Thanks nope ... i didnt add that ... you can add it below the npc header if( BaseLevel < 99 ){ mes "Only Base Level 99 can use."; close; } something like this. Quote
Fresh prince Posted January 13, 2014 Posted January 13, 2014 Thanks master that would prevent stat overload Quote
Snaehild Posted June 27, 2014 Posted June 27, 2014 Any idea about this error? [Warning]: script error in file 'npc/custom/BuildManager.txt' line 9 column 2 parse_syntax: use of deprecated keyword (use 'case' instead). 6: switch( select( ( .BMMode & 1 )?"^FF0000Save & Switch Builds^000000":"", 7: ( .BMMode & 2 )?"^0000FFReset Status^000 000":"", 8: ( .BMMode & 4 )?"^0000FFReset Skills^000 000":"")){ * 9: Case 1: ~~~~~~~~^ 10: for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 ) 11: set .@Menu$,.@Menu$ + (( getd( "Slot_"+.@i+"$" ) == "" )?"^FF0000Empty Slot^000000":getd( "Slot_"+.@i+"$" ) )+":"; 12: set .@Slot,select( .@Menu$ ); [Error]: script error in file 'npc/custom/BuildManager.txt' line 9 column 2 parse_line: expect command, missing function name or calling undeclared func tion 6: switch( select( ( .BMMode & 1 )?"^FF0000Save & Switch Builds^000000":"", 7: ( .BMMode & 2 )?"^0000FFReset Status^000 000":"", 8: ( .BMMode & 4 )?"^0000FFReset Skills^000 000":"")){ * 9: Case 1: ~~~~~~~~^ 10: for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 ) 11: set .@Menu$,.@Menu$ + (( getd( "Slot_"+.@i+"$" ) == "" )?"^FF0000Empty Slot^000000":getd( "Slot_"+.@i+"$" ) )+":"; 12: set .@Slot,select( .@Menu$ ); Quote
Emistry Posted June 27, 2014 Author Posted June 27, 2014 the error message already told you the solution. use of deprecated keyword (use 'case' instead). Quote
PsyOps Posted August 14, 2019 Posted August 14, 2019 Is it possible to add an atcommand for this? I've tried to add one but i can't seem to make it work? Any thoughts on this? Quote
Emistry Posted August 24, 2019 Author Posted August 24, 2019 On 8/14/2019 at 10:06 AM, Dev G Inc said: Is it possible to add an atcommand for this? I've tried to add one but i can't seem to make it work? Any thoughts on this? use bindatcmd .... Quote
PsyOps Posted August 27, 2019 Posted August 27, 2019 (edited) On 8/25/2019 at 6:17 AM, Emistry said: use bindatcmd .... I tried adding a bindatcommand at the bottom. It calls the NPC and shows a menu but the menu does not contain anything. prontera,169,186,6 script Reset Manager 120,{ function ManageBuild; OnBuildManager: mes "Select Your Services"; next; switch( select( ( .BMMode & 1 )?"^FF0000Save & Switch Builds - 10000z^000000":"", ( .BMMode & 2 )?"^0000FFReset Status - 5000z^000000":"", ( .BMMode & 4 )?"^0000FFReset Skills - 5000z^000000":"")){ Case 1: for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 ) set .@Menu$,.@Menu$ + (( getd( "Slot_"+.@i+"$" ) == "" )?"^FF0000Empty Slot^000000":getd( "Slot_"+.@i+"$" ) )+":"; set .@Slot,select( .@Menu$ ); do{ next; mes "Build : ^FF0000"+(( getd( "Slot_"+.@Slot+"$" ) == "" )?"Slot "+.@Slot:getd( "Slot_"+.@Slot+"$" ) )+"^000000"; mes "STR - ^0000FF"+getd( "STR_"+.@Slot )+"^000000 INT - ^0000FF"+getd( "INT_"+.@Slot )+"^000000"; mes "AGI - ^0000FF"+getd( "AGI_"+.@Slot )+"^000000 DEX - ^0000FF"+getd( "DEX_"+.@Slot )+"^000000"; mes "VIT - ^0000FF"+getd( "VIT_"+.@Slot )+"^000000 LUK - ^0000FF"+getd( "LUK_"+.@Slot )+"^000000"; mes " "; mes "Remaining Points : ^0000FF"+getd( "STATS_"+.@Slot )+"^000000"; set .@Option,select(( getd( "Slot_"+.@Slot+"$" ) == "" )?"":"^0000FFSwitch", ( getd( "Slot_"+.@Slot+"$" ) == "" )?"Save":"", ( getd( "Slot_"+.@Slot+"$" ) == "" )?"":"^FF0000Clear" ); ManageBuild( .@Slot,.@Option); }while( .@Option != 1 ); break; Case 2: Zeny -= 5000; ResetStatus; mes "Status has been Reseted."; break; Case 3: Zeny -= 5000; ResetSkill; mes "Skills has been Reseted."; break; } close; function ManageBuild { switch( getarg(1) ){ Case 1: // Switch Build Zeny -= 10000; message strcharinfo(0),"Build has been ^FF0000Switched^000000."; ResetStatus; set StatusPoint,getd( "STATS_"+getarg(0) ); statusup2 bStr,getd( "STR_"+getarg(0) ) - 1; statusup2 bAgi,getd( "AGI_"+getarg(0) ) - 1; statusup2 bVit,getd( "VIT_"+getarg(0) ) - 1; statusup2 bInt,getd( "INT_"+getarg(0) ) - 1; statusup2 bDex,getd( "DEX_"+getarg(0) ) - 1; statusup2 bLuk,getd( "LUK_"+getarg(0) ) - 1; break; Case 2: // Save Build setd( "STR_"+getarg(0) ),readparam(bStr); setd( "AGI_"+getarg(0) ),readparam(bAgi); setd( "VIT_"+getarg(0) ),readparam(bVIT); setd( "INT_"+getarg(0) ),readparam(bInt); setd( "DEX_"+getarg(0) ),readparam(bDex); setd( "LUK_"+getarg(0) ),readparam(bLuk); setd( "STATS_"+getarg(0) ),StatusPoint; if( .Length[0] < .Length[1] && .Length[0] ){ mes "Input a ^FF0000Name^000000 for this Slot."; mes "Name Length : "+.Length[0]+" ~ "+.Length[1]+" Chars"; do{ input getd( "Slot_"+getarg(0)+"$" ); }while( getstrlen( getd( "Slot_"+getarg(0)+"$" ) ) < .Length[0] || getstrlen( getd( "Slot_"+getarg(0)+"$" ) ) > .Length[1] ); }else{ setd( "Slot_"+getarg(0)+"$" ),"Build "+getarg(0); } message strcharinfo(0),"Build has been ^FF0000Saved^000000."; break; Case 3: // Remove Build Zeny -= 10000; message strcharinfo(0),"Build has been ^FF0000Cleared^000000."; setd( "STR_"+getarg(0) ),0; setd( "AGI_"+getarg(0) ),0; setd( "VIT_"+getarg(0) ),0; setd( "INT_"+getarg(0) ),0; setd( "DEX_"+getarg(0) ),0; setd( "LUK_"+getarg(0) ),0; setd( "STATS_"+getarg(0) ),0; setd( "Slot_"+getarg(0)+"$" ),""; break; } return; } OnInit: // Mode of NPC // 1 = Save & Switch // 2 = Reset Status // 4 = Reset Skills // 7 = All of Above [ 1+2+4 = 7 ] set .BMMode,7; // How Many Slots available to Save Status Builds. set .MaxSlots,3; // Enable Stats Slot Rename + Max Name Length ( 0 = Disable ) setarray .Length,4,26; // Min. ~ Max. Words. bindatcmd "buildmanager",strnpcinfo(0)+"::OnBuildManager"; end; } new_1-2,182,178,4 duplicate(Reset Manager) Reset Manager#alb 757 Edited September 15, 2019 by Emistry codebox Quote
rayhanalka Posted January 9, 2022 Posted January 9, 2022 hi @Emistry thank you for your great work, could you make it support 4th job version for this script? Quote
Emistry Posted August 27, 2023 Author Posted August 27, 2023 On 1/9/2022 at 6:29 PM, rayhanalka said: hi @Emistry thank you for your great work, could you make it support 4th job version for this script? currently supported, may use version 4.0 On 8/25/2019 at 6:17 AM, Emistry said: use bindatcmd .... On 8/14/2019 at 10:06 AM, PsyOps said: Is it possible to add an atcommand for this? I've tried to add one but i can't seem to make it work? Any thoughts on this? version 4.0 support bindatcmd 1 Quote
hendra814 Posted September 1, 2023 Posted September 1, 2023 On 8/28/2023 at 6:33 AM, Emistry said: currently supported, may use version 4.0 version 4.0 support bindatcmd get error when run sql script, can you help me for this error Quote
Winterfox Posted September 1, 2023 Posted September 1, 2023 (edited) 42 minutes ago, hendra814 said: get error when run sql script, can you help me for this error I am not sure what result Emistry wants to achieve since dropping the table and only creating it if it doesn't exist afterward is a bit contradictory, but you could change DELETE to DROP like this: DROP TABLE IF EXISTS `ero_buildmanager`; Edited September 1, 2023 by Winterfox 1 Quote
hendra814 Posted September 1, 2023 Posted September 1, 2023 3 hours ago, Winterfox said: I am not sure what result Emistry wants to achieve since dropping the table and only creating it if it doesn't exist afterward is a bit contradictory, but you could change DELETE to DROP like this: DROP TABLE IF EXISTS `ero_buildmanager`; thanks working after change it. Quote
PsyOps Posted September 4, 2023 Posted September 4, 2023 On 8/28/2023 at 7:33 AM, Emistry said: currently supported, may use version 4.0 version 4.0 support bindatcmd Thanks Emistry will check/try it Quote
Mister Noob Posted August 12, 2024 Posted August 12, 2024 Hello @Emistry the script is messing with skill points and skill tree when saving and switching builds? Or is it only on my emulator? I'm using latest rAthena btw Quote
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.