/ / ===== EAthena Script ======================================= / / = NPC Vars Editor / / ===== By: ========================================= ========= / / = Zephyrus / / ===== Current Version: ===================================== / / 10,399 = 1.0 / / ===== Compatible With: ===================================== / / = EAthena SVN Stable / / ===== Description: ========================================= / / = View and Modify or numeric variables / / = Text in the game. / / ===== Additional Comments: ================================= / / = 1.0 Initial Version / / ================================================ ============ / / ================================================ ============ / / = NPC Numerical Control Variables / / ================================================ ============ - Script NPCVarsN -1 { end; OnWhisperGlobal: if (getgmlevel () <1) end / / Not Accept Players or Cops set @ name $, @ whispervar0 $; if (getstrlen (@ whispervar1 $)> 0) set @ name $, @ whispervar1 $; if (getstrlen (@ name $) <4 | | getstrlen (@ name $)> 24) { dispbottom "[The name entered is incorrect]"; end; } set @ RID, getcharid (3, @ name $); if (@ RID <1) { dispbottom "[The character does not exist or is not connected]"; end; } / / Found the Character L_Consulta: mes "^ 0000FF [NPC Vars Info] ^ 000000"; mes "You requested information Variables." mes "Character: ^ 0000FF" + @ name $ + "^ 000000"; mes "want to see what variable (numeric only)?"; next; Variable input @ $; L_Verificar: set $ @ GMID, playerattached () / / The ID of GM to return to after the consultation process Variable set $ @ $, @ Variable $; if (attachrid (@ RID)> 0) { set $ @ Value, getd ($ @ Variable $) / / Gets the value if (attachrid ($ @ GMID)) { set @ result, $ @ Value; mes "^ 0000FF [NPC Vars Info] ^ 000000"; mes "The value of" + @ Variable $ + "is" + @ result + "." mes "you want to do with this?" next; menu "Check another variable" L_Consulta, "Change the current value", L_Cambiar, "Finish consultations", -; mes "^ 0000FF [NPC Vars Info] ^ 000000"; mes "Use the tool when needed"; close; End else} / / The GM was disconnected Else {} / / Was disconnected if (attachrid ($ @ GMID)) { mes "^ 0000FF [NPC Vars Info] ^ 000000"; mes "Sorry, the player was disconnected." mes "If you see someone else whispearme again"; close; End else} / / The GM was disconnected } end; L_Cambiar: if (@ Variable $ == "# CASHPOINTS" | | $ variable == @ "# KAFRAPOINTS") { mes "^ 0000FF [NPC Vars Info] ^ 000000"; mes "These variables are locked for safety!"; mes "Avoid problems with the administration." close; } mes "^ 0000FF [NPC Vars Info] ^ 000000"; mes "You want to put a value to the variable ^ 0000FF" + @ Variable $ + "^ 000000 for player ^ 0000FF" + @ name $ + "^ 000000"; month "(Current Value: ^ 0000FF" + @ result + "^ 000000)"; next; @ input value, / / ??Numeric only allows set $ @ GMID, playerattached () / / The ID of GM to return to after the consultation process Variable set $ @ $, @ Variable $; set $ @ OldValor, @ Result; set $ @ Value, @ value; if (attachrid (@ RID)> 0) { Variable SetD $ @ $, $ @ Value; / / update the value logmes "Variable" + $ @ Variable $ + "of" + strcharinfo (0) + "shift" + $ @ OldValor + "to" + $ @ value + "to" + $ @ GMID + "." if (attachrid ($ @ GMID)) { mes "^ 0000FF [NPC Vars Info] ^ 000000"; mes "The value has been changed to" + @ value + "." mes "You want to do now?" next; menu "Check change" L_Verificar, "Back to change," L_Cambiar, 'Check other variable "L_Consulta," Finish consultations ", -; mes "^ 0000FF [NPC Vars Info] ^ 000000"; mes "Use the tool when needed"; close; End else} / / The GM was disconnected Else {} / / Was disconnected if (attachrid ($ @ GMID)) { mes "^ 0000FF [NPC Vars Info] ^ 000000"; mes "Sorry, the player was disconnected." mes "If you see someone else whispearme again"; close; End else} / / The GM was disconnected } }