Christopher Freitas Posted April 15, 2013 Posted April 15, 2013 Good evening, I need help to enable the npc reset 2x a week, I use the script of time on it? I want it to appear on Wednesday at 00:00 and hide in fifth at 00:00 so for the Sunday too. Thankful now Quote
goddameit Posted April 15, 2013 Posted April 15, 2013 refer Label Timers, hideonnpc, hideoffnpc 1 Quote
Christopher Freitas Posted April 20, 2013 Author Posted April 20, 2013 I understand more or less, if I use OnInit: initnpctimer; end; OnWed0000: OnSun0000: announcer "Reset Enabled, enjoy!" That to enable the NPC, and for me to disable it when Wednesday finished? could u help me ? grateful Quote
Patskie Posted April 20, 2013 Posted April 20, 2013 OnWed0000: OnSun0000: hideoffnpc "NPC name"; end; That to enable the NPC, and for me to disable it when Wednesday finished? could u help me ? grateful OnThu0000: hideonnpc "NPC name"; end; 1 Quote
Christopher Freitas Posted April 20, 2013 Author Posted April 20, 2013 (edited) show de error [Error]: Loading NPC file: npc/custom/jobs/reset.txt script error on npc/custom/jobs/reset.txt line 23 parse_callfunc: not enough arguments, expected ',' 18 : end; 19 : OnWed0000: 20 : hideonnpc "Reset Girl"; 21 : end; 22 : announce "Reset Enabled, enjoy!" * 23 : 'O'nThu0000: prontera,109,162,4 script Reset Girl 124,{ OnInit: initnpctimer; end; OnWed0000: hideonnpc "Reset Girl"; end; announce "Reset Enabled, enjoy!" OnThu0000: hideoffnpc "Reset Girl"; end; announce "Reset disabled" OnSun0000: hideonnpc "Reset Girl"; end; announce "Reset Enabled, enjoy!" OnMon0000: hideoffnpc "Reset Girl"; end; announce "Reset disabled" Edited April 20, 2013 by cloko Quote
Patskie Posted April 20, 2013 Posted April 20, 2013 Check announce script. Based on your script you doesn't have a terminating semicolon on announce statements. Quote
Christopher Freitas Posted April 20, 2013 Author Posted April 20, 2013 [Error]: Loading NPC file: npc/custom/jobs/reset.txt script error on npc/custom/jobs/reset.txt line 22 parse_callfunc: not enough arguments, expected ',' 17 : initnpctimer; 18 : end; 19 : OnWed0000: 20 : hideonnpc "Reset Girl"; 21 : end; * 22 : announce "Reset Enabled, enjoy!"';' Quote
Patskie Posted April 20, 2013 Posted April 20, 2013 Like this. announce "Reset Enabled, enjoy!",0; Quote
Christopher Freitas Posted April 20, 2013 Author Posted April 20, 2013 ok the error does not appear more in the emulator, put the npc is no function, and keeps appearing. I changed from day to day, and even then the npc is unusable! Quote
Patskie Posted April 20, 2013 Posted April 20, 2013 I want it to appear on Wednesday at 00:00 This code makes your npc not visible : OnWed0000: hideonnpc "Reset Girl"; end; Should be : hideoffnpc "Reset Girl"; Quote
Christopher Freitas Posted April 21, 2013 Author Posted April 21, 2013 (edited) still not managed to use the npc //===== eAthena Script ======================================= //= Reset NPC for Athena by Script & DB Team //===== By: ================================================== //= eAthena Team //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= Any eAthena Version //===== Description: ========================================= //= Resets skills, stats, or both. //===== Additional Comments: ================================= //= 1.0 First Version //= 1.1 Optimized for the greater good. [Kisuka] //============================================================ prontera,109,162,4 script Reset Girl 124,{ OnInit: initnpctimer; end; OnSat0100: hideonnpc "Reset Girl"; end; announce "Reset Enabled, enjoy!",0; OnThu0000: hideoffnpc "Reset Girl"; end; announce "Reset disabled",0; OnSun0000: hideonnpc "Reset Girl"; end; announce "Reset Enabled enjoy!",0; OnMon0000: hideoffnpc "Reset Girl"; end; announce "Reset disabled",0; mes "[Reset Girl]"; mes "I am a Reset Girl."; mes "Reset Stats: 5,000z"; mes "Reset Skills: 5,000z"; mes "Reset Both: 9,000z"; mes "Please select the service you want:"; next; switch(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Quit")) { case 1: mes "[Reset Girl]"; if (Zeny < 5000) { mes "Sorry, you don't have enough Zeny."; close; } mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!"; set Zeny,zeny-5000; ResetSkill; close; case 2: mes "[Reset Girl]"; if (Zeny < 5000) { mes "Sorry, you don't have enough Zeny."; close; } mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!"; set Zeny,zeny-5000; ResetStatus; close; case 3: mes "[Reset Girl]"; if (Zeny < 9000) { mes "Sorry, you don't have enough Zeny."; close; } mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!"; set Zeny,zeny-9000; ResetSkill; ResetStatus; close; case 4: close; } } I got the hint to be using getTime. is correct if I use it? - script NPC_OnOff -1,{ end; OnClock1900: //Começa Terça(2), Quarta(4) OnClock2100: //Termina terça(2), Quarta(4) OnClock2000: //Começa Sabado(6) OnClock2200: //Termina Sabado(6) OnAgitInit: if((gettime(4)==2) && (gettime(3)>=21 && gettime(3)<23)) goto L_Start; if((gettime(4)==4) && (gettime(3)>=21 && gettime(3)<23)) goto L_Start; if((gettime(4)==6) && (gettime(3)>=16 && gettime(3)<18)) goto L_Start; if((gettime(4)==2) && (gettime(3)==23)) goto L_End; if((gettime(4)==4) && (gettime(3)==23)) goto L_End; if((gettime(4)==6) && (gettime(3)==18)) goto L_End; end; L_End: Announce "O npc foi desativado",0; disablenpc "NPC"; end; L_Start: Announce "O npc foi ativado!",0; enablenpc "NPC"; end; } Resolved, may close Edited April 21, 2013 by cloko Quote
Question
Christopher Freitas
10 answers to this question
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.