Jump to content
  • 0
Sign in to follow this  
mleo1

how to make npc dynamic pub? plus questions

Question

I forgot scripting, rebeginner :sob:
Questions

1 I wanna make the npc make a pub/waitingroom that shows count of players on specific map for may pvp warper, I dunno how, How please

lol maybe something like this, testing.

while(1){waitingroomsleepdelwaitingroom}

 


2 Do you always need an 'end' in the end of script? I always see guys use it, but I dont.

 

-	script	test	-1,{		announce "1",0;		end;}
-    script    test    -1,{        announce "1",0;}

 

Same?

3. How to run a script once every week, like 12am sunday. what will i say?

Edited by mleo1

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

 

I'm not sure with this too please correct me if im wrong..

-	script	PvP	-1,{	end;OnInit:	while(1) {	sleep2 5000;	waitingroom "PvP Area [ " + getmapusers("prontera") + " / 100 ] ",0;	end;	}}

you should use sleep not sleep2 because there is no need for RID?,

and theres an end inside the while loop, it will end, it will make static pub prolly

-	script	PvP	-1,{	end;OnInit:	while(1) { 

the end here is good so if you click the npc it will not run the OnINit code again.

 

 

Answering to your second question (as the other ones have alreay been addressed): yes, you can omit the end; sentence if it's the last line of code before the closing curly brace of the NPC since it'll be assumed. Anyways, it's good practice to place it to end your script in any case wherever you'd want to end it, to avoid any possibly unexpected behavior.

thanks, Im getting mindfuck since allmost all scripts in other replies has unnessesary end; im gonna use end if necessary only thanks.

 

 

3.

 

 

OnClock<hour><minute>:
OnMinute<minute>:
OnHour<hour>:
On<weekday><hour><minute>:
OnDay<month><day>:
 
This will execute when the server clock hits the specified date or time. 
Hours and minutes are given in military time. ('0105' will mean 01:05 AM). 
Weekdays are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01 
to 31. Remember the zero. :)

okie thanks, if I searched OnMinute on scriptcommands.txt I should have seen it and not be stucked. Unluckily, I dont remember anything, lol

Share this post


Link to post
Share on other sites
  • 0

I'm not sure with this too please correct me if im wrong..

-	script	PvP	-1,{	end;OnInit:	while(1) {	sleep2 5000;	waitingroom "PvP Area [ " + getmapusers("prontera") + " / 100 ] ",0;	end;	}}

Share this post


Link to post
Share on other sites
  • 0

3.

 

 

OnClock<hour><minute>:
OnMinute<minute>:
OnHour<hour>:
On<weekday><hour><minute>:
OnDay<month><day>:
 
This will execute when the server clock hits the specified date or time. 
Hours and minutes are given in military time. ('0105' will mean 01:05 AM). 
Weekdays are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01 
to 31. Remember the zero. :)

Share this post


Link to post
Share on other sites
  • 0

Answering to your second question (as the other ones have already been addressed): yes, you can omit the end; sentence if it's the last line of code before the closing curly brace of the NPC since it'll be assumed. Anyways, it's good practice to place it to end your script in any case wherever you'd want to end it, to avoid any possibly unexpected behavior.

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.