Rivers Posted January 13, 2020 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 244 Reputation: 57 Joined: 12/04/13 Last Seen: Sunday at 11:53 AM Share Posted January 13, 2020 (edited) I'm trying to get this script to only work/appear on Wednesdays. Can someone please help me out with the OnDay: command? //============================================================ // Entrance NPCs //============================================================ OnDayWed: prontera,164,167,2 script Edited January 13, 2020 by Rivers Quote Link to comment Share on other sites More sharing options...
0 Haruka Mayumi Posted January 13, 2020 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 485 Reputation: 271 Joined: 06/13/17 Last Seen: April 14 Share Posted January 13, 2020 you dont use commands outside a script.. you use it like this - script control -1,{ OnMon1246: enablenpc "npc"; end; OnMon1247: disablenpc "npc"; end; } prontera,153,181,4 script npc 94,{ npctalk "Hello There"; end; OnInit: disablenpc strnpcinfo(0); end; } but i prefer to use the command gettime() for days which is much more flexible since OnDay command only works at the given time.. Sample: prontera,153,181,4 script npc 94,{ npctalk "Hello There"; end; } - script control -1,{ OnInit: OnHour00: if(gettime(DT_DAYOFWEEK)==MONDAY) enablenpc "npc"; else disablenpc "npc"; end; } As you can see here. whenever the server/script loads again. it will check if the npc should show or hide.. not like the OnDay, it only triggers on certain time. 1 Quote Link to comment Share on other sites More sharing options...
0 Rivers Posted January 13, 2020 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 244 Reputation: 57 Joined: 12/04/13 Last Seen: Sunday at 11:53 AM Author Share Posted January 13, 2020 (edited) Oh thank you very much. I'm new to this all still ^^' I will run this and see how it goes. prontera,164,167,2 script Bossnia Staff#1 10006,{ mes "[Riss]"; mes "Hello?"; mes "I found some beautiful places"; mes "while I travelled all over the world."; mes "I am an adventurer."; mes "Haha~"; next; mes "[Riss]"; mes "What? My name is..."; mes "'Bossnia Staff'?? No no..."; mes "Well, my name is not so important."; mes "Sometimes you should be generous."; mes "No time for considering that kind of small stuff"; mes "when you have to concentrate on more important things."; next; mes "[Riss]"; mes "Hum... anyway I want to say... something.."; mes "While I was travelling through some places,"; mes "I found a really fearful place."; next; mes "[Riss]"; mes "Most of the time when you come to a place,"; mes "there is one strong and fearful monster."; mes "Isn't it?"; next; mes "[Riss]"; mes "But... but... in there..."; mes "There are lots of fearful and strong monsters in there..."; mes "That was really frightful."; next; mes "[Riss]"; mes "If I had reacted a bit later... a few seconds..."; mes "I might have been killed."; next; mes "[Riss]"; mes "What?"; mes "You want to go in there?"; mes "Oh~ Boy~ you didn't get me."; mes "In there......."; next; mes "[Riss]"; mes "Uh... you already know?"; mes "Although you know the place, you want to go in..."; mes "Good, I will send you there."; mes "But after you went there, don't hold"; // If the VIP system is enabled, players pay a Reset Stone for 5 entrances (with a choice of warps). // If it's disabled, players pay 5,000z per entrance. if (VIP_SCRIPT) { mes "a grudge against me. It'll cost you 1 Reset Stone for 5 access."; next; mes "[Riss]"; if (bossnia_event > 0) { set .@type,1; mes "Remaining access: "+bossnia_event; } else if (countitem(6320)) { set .@type,2; mes "Do you want to go?"; } else { mes "You don't have a ticket now....."; mes "So come to me again with a Reset Stone later."; close; } next; if(select("Enter:Leave") == 2) close; set .@i, select("First:Second:Third:Fourth"); switch(select("Warp 1:Warp 2:Warp 3:Warp 4")) { case 1: set .@x,31; set .@y,208; break; case 2: set .@x,31; set .@y,31; break; case 3: set .@x,208; set .@y,31; break; case 4: set .@x,208; set .@y,208; break; } if (.@type == 1) set bossnia_event, bossnia_event-1; else { delitem 6320,1; //Premium_Reset_Stone set bossnia_event,4; } specialeffect2 EF_MAXPOWER; warp "bossnia_0"+.@i,.@x,.@y; close; } else { mes "a grudge against me. Also it costs 5,000 zeny."; next; if (Zeny > 4999) { mes "[Riss]"; mes "Would you really like to take the challenge?"; mes "Ok, just choose the course."; next; set .@i, select("First:Second:Third:Fourth"); mes "[Riss]"; mes "Take care, boy~"; mes "Don't hold a grudge against me."; close2; set Zeny, Zeny - 5000; warp "bossnia_0"+.@i,rand(202,204),rand(202,204); end; } else { mes "[Riss]"; mes "You don't have enough money..."; mes "Come back when you have at least 5,000 zeny."; close; } } } - script control -1,{ OnInit: OnHour12: if(gettime(DT_DAYOFWEEK)==WEDNESDAY) enablenpc "npc"; else disablenpc "npc"; end; } So this is the script I've got, it's a basic Bossnia script. I'm trying to get it to appear only on Wednesdays at 1200 hour and disappear 12 hours later until the next Wednesday. When I put the timer command it either doesn't let me click the NPC or it just doesn't do anything. I think I might be putting it in the wrong place. EDIT: I have resolved the issue. Appears I just forgot to change "npc" in the lines. Thanks for the help! Edited January 14, 2020 by Rivers Quote Link to comment Share on other sites More sharing options...
Question
Rivers
I'm trying to get this script to only work/appear on Wednesdays. Can someone please help me out with the OnDay: command?
//============================================================
// Entrance NPCs
//============================================================
OnDayWed:
prontera,164,167,2 script
Edited by RiversLink to comment
Share on other sites
2 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.