Emistry

Build Manager v2

Sep 20th, 2011
514
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. prontera,155,171,5 script Build Manager 439,{
  2. // Mode of NPC
  3. // 1 = Switch & Save Status Build
  4. // 2 = Reset Status
  5. // 4 = Reset Skills
  6. // 7 = All of Above [ 1+2+4 = 7 ]
  7. set .BMMode,7;
  8.  
  9. // How Many Slots available to Save Status Builds.
  10. set .MaxSlots,5;
  11.  
  12. // Enable Stats Slot Rename
  13. set .StatRename,1;
  14.  
  15. setarray .BMCosts[1],
  16. 1000000, // Switch Builds Cost
  17. 1000000, // Save Build Cost
  18. 1000000, // Reset Status Cost
  19. 1000000; // Reset Skills Cost
  20.  
  21. while(1){
  22. switch( select( ( .BMMode & 1 )?"^0000FFSwitch Status^000000":"",
  23. ( .BMMode & 1 )?"^0000FFSave Status^000000":"",
  24. ( .BMMode & 2 )?"^0000FFReset Status^000000":"",
  25. ( .BMMode & 4 )?"^0000FFReset Skills^000000":"")){
  26. Case 1:
  27. if( Zeny < .BMCosts[ @menu ] ){
  28. mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
  29. next;
  30. break;
  31. }
  32. mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
  33. message strcharinfo(0),"Input 0 to Cancel";
  34. mes "^FF0000Slot[X]^000000-[^0000FFSTR|AGI|VIT|INT|DEX|LUK^000000]";
  35. mes "^0000FF_____________________________^000000";
  36. for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 ){
  37. mes "^FF0000"+.@i+".^0000FF"+getd( "Slot_"+.@i+"$" )+"^000000 [^0000FF"+getd("STR_"+.@i)+"|"+getd("AGI_"+.@i)+"|"+getd("VIT_"+.@i)+"|"+getd("INT_"+.@i)+"|"+getd("DEX_"+.@i)+"|"+getd("LUK_"+.@i)+"^000000]";
  38. }
  39. mes "^0000FF_____________________________^000000";
  40. input .@a,0,.MaxSlots;
  41. if( .@a != 0 ){
  42. callfunc("SwitchBuild",.@a);
  43. message strcharinfo(0),"Done";
  44. set Zeny,Zeny - .BMCosts[ @menu ];
  45. }
  46. next;
  47. break;
  48. Case 2:
  49. if( Zeny < .BMCosts[ @menu ] ){
  50. mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
  51. next;
  52. break;
  53. }
  54. mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
  55. mes "^0000FF_____________________________^000000";
  56. mes "^FF0000@^000000 STR - "+readparam(bStr)+" ^FF0000@^000000 AGI - "+readparam(bAgi)+" ^FF0000@^000000 VIT - "+readparam(bVit)+"";
  57. mes "^FF0000@^000000 INT - "+readparam(bInt)+" ^FF0000@^000000 DEX - "+readparam(bDex)+" ^FF0000@^000000 LUK - "+readparam(bLuk)+"";
  58. mes "^0000FF_____________________________^000000";
  59. message strcharinfo(0),"Input 0 to Cancel";
  60. mes "^FF0000Slot[X]^000000-[^0000FFSTR|AGI|VIT|INT|DEX|LUK^000000]";
  61. mes "^0000FF_____________________________^000000";
  62. for( set .@i,1; .@i <= .MaxSlots; set .@i,.@i + 1 ){
  63. mes "^FF0000"+.@i+".^0000FF"+getd( "Slot_"+.@i+"$" )+"^000000 [^0000FF"+getd("STR_"+.@i)+"|"+getd("AGI_"+.@i)+"|"+getd("VIT_"+.@i)+"|"+getd("INT_"+.@i)+"|"+getd("DEX_"+.@i)+"|"+getd("LUK_"+.@i)+"^000000]";
  64. }
  65. mes "^0000FF_____________________________^000000";
  66. input .@a,0,.MaxSlots;
  67. if( .@a != 0 ){
  68. callfunc("SaveBuild",.@a,.StatRename);
  69. set Zeny,Zeny - .BMCosts[ @menu ];
  70. }
  71. next;
  72. break;
  73. Case 3:
  74. if( Zeny < .BMCosts[ @menu ] ){
  75. mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
  76. next;
  77. break;
  78. }
  79. mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
  80. ResetStatus;
  81. set Zeny,Zeny - .BMCosts[ @menu ];
  82. mes "Your Status has been Reset. You have gained back your ^FF0000riginal Status Points^000000";
  83. next;
  84. break;
  85. Case 4:
  86. if( Zeny < .BMCosts[ @menu ] ){
  87. mes "You required ^FF0000"+.BMCosts[ @menu ]+" Zeny^000000 to use this services.";
  88. next;
  89. break;
  90. }
  91. mes "^0000FFCost^000000 : ^FF0000"+.BMCosts[ @menu ]+"^000000 Zeny";
  92. ResetSkill;
  93. set Zeny,Zeny - .BMCosts[ @menu ];
  94. mes "Your Skills has been Reset. You have gained back your ^FF0000riginal Skill Points^000000";
  95. next;
  96. break;
  97. }
  98. }
  99. }
  100.  
  101. function script SaveBuild {
  102. setd "STR_"+getarg(0),readparam(bStr);
  103. setd "AGI_"+getarg(0),readparam(bAgi);
  104. setd "VIT_"+getarg(0),readparam(bVIT);
  105. setd "INT_"+getarg(0),readparam(bInt);
  106. setd "DEX_"+getarg(0),readparam(bDex);
  107. setd "LUK_"+getarg(0),readparam(bLuk);
  108. if( getarg(1) ){
  109. do{
  110. message strcharinfo(0),"Input the Name for this Slot. [ Max. 12 Chars ]";
  111. input getd( "Slot_"+getarg(0)+"$" );
  112. }while( getstrlen( getd( "Slot_"+getarg(0)+"$" ) ) > 12 );
  113. }else{
  114. set getd( "Slot_"+getarg(0)+"$" ),"Stats "+getarg(0);
  115. }
  116. return;
  117. }
  118.  
  119. function script SwitchBuild {
  120. ResetStatus;
  121. statusup2 bStr,getd( "STR_"+getarg(0) )-1;
  122. statusup2 bAgi,getd( "AGI_"+getarg(0) )-1;
  123. statusup2 bVit,getd( "VIT_"+getarg(0) )-1;
  124. statusup2 bInt,getd( "INT_"+getarg(0) )-1;
  125. statusup2 bDex,getd( "DEX_"+getarg(0) )-1;
  126. statusup2 bLuk,getd( "LUK_"+getarg(0) )-1;
  127. set StatusPoint,0;
  128. return;
  129. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment