Jump to content

Utility: Build Manager


Emistry

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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
  • Submitted
    07/29/12
  • Category
  • Video
  • Content Author
    Emistry

 

  • Upvote 2
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  806
  • Reputation:   220
  • Joined:  03/13/12
  • Last Seen:  

thanks :-)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   2
  • Joined:  09/11/12
  • Last Seen:  

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:

2eahqtx.jpg

• 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.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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.....

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   2
  • Joined:  09/11/12
  • Last Seen:  

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. /ok

Cheers.

Link to comment
Share on other sites

  • 11 months later...

  • Group:  Members
  • Topic Count:  79
  • Topics Per Day:  0.02
  • Content Count:  327
  • Reputation:   4
  • Joined:  06/22/13
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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...

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

Thanks master that would prevent stat overload

Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   7
  • Joined:  06/23/14
  • Last Seen:  

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$ );
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

the error message already told you the solution.

use of deprecated keyword (use 'case' instead).
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   7
  • Joined:  06/23/14
  • Last Seen:  

Gotcha. Thank You!

Link to comment
Share on other sites

  • 5 years later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   10
  • Joined:  12/03/18
  • Last Seen:  

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?

 

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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 ....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   10
  • Joined:  12/03/18
  • Last Seen:  

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 by Emistry
codebox
Link to comment
Share on other sites

  • 2 years later...

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   3
  • Joined:  12/30/15
  • Last Seen:  

hi @Emistry

thank you for your great work, could you make it support 4th job version for this script?

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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

  • Love 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  1167
  • Reputation:   159
  • Joined:  06/12/12
  • Last Seen:  

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

image.thumb.png.c5d04bb24bd81a5578c0d53d4fa10317.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  232
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

42 minutes ago, hendra814 said:

get error when run sql script, can you help me for this error

image.thumb.png.c5d04bb24bd81a5578c0d53d4fa10317.png

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 by Winterfox
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  1167
  • Reputation:   159
  • Joined:  06/12/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   10
  • Joined:  12/03/18
  • Last Seen:  

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...