Jump to content
  • 0

Hide NPC


Christopher Freitas

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   2
  • Joined:  02/03/12
  • Last Seen:  

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

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   2
  • Joined:  02/03/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   2
  • Joined:  02/03/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Check announce script. Based on your script you doesn't have a terminating semicolon on announce statements.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   2
  • Joined:  02/03/12
  • Last Seen:  


[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!"';'

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Like this.

announce "Reset Enabled, enjoy!",0;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   2
  • Joined:  02/03/12
  • Last Seen:  

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!
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   2
  • Joined:  02/03/12
  • Last Seen:  

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 by cloko
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
Answer this question...

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