Jump to content
  • 0

Treasure chest respawn time


kitty14

Question


  • Group:  Members
  • Topic Count:  103
  • Topics Per Day:  0.03
  • Content Count:  323
  • Reputation:   4
  • Joined:  12/09/13
  • Last Seen:  

Hello rathena developers , just want a little help and info . how to change respawn time of treasure chest I wanted it once a week.. I did check this :

 

______________________________________________________________________________

 

https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/re/guild/agit_main.txt
They already spawn at 00:01 every day (24 hours).

// Treasure Room Spawn Template
//============================================================
- script Gld_Trea_Spawn::Gld_Trea_Spawn -1,{
end;
OnClock0001:

If you wanted the spawns once a week, you'd specify a weekday using gettime(4), ex.:

if (gettime(4) != 3) end; // Don't spawn unless it's Wednesday.

And of course do the same for WOE SE.

 

 

______________________________________________________________________________

 

but I'm kinda confuse what to do?
should i just paste it like this?

// Treasure Room Spawn Template
//============================================================
- script Gld_Trea_Spawn::Gld_Trea_Spawn -1,{
end;
OnClock0001:
if (gettime(4) != 3) end; 

is this right?  And just want additional knowledge what does the numbers

"(gettime(4) != 3)"?

 

 

or if this if possible the treasure will only re spawn 2/day and will return to 0 if its a the castle woe, and the chest will respawn the following day.
ex:

monday WOE none and tuesday ~ sunday = 12 treasure chest then if by monday will return to 0..
Tuesday WOE none and wed ~ mon = 12 treasure only . or  2/day.


thank you.. /no1

 

Edited by kitty14
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  12/06/14
  • Last Seen:  

gettime(4) grabs the server's current day of the week, 3 being wednesday (sun = 0 ~ sat = 6), so that line would be 'if current day not wednesday, end script'

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  103
  • Topics Per Day:  0.03
  • Content Count:  323
  • Reputation:   4
  • Joined:  12/09/13
  • Last Seen:  

anyone?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  103
  • Topics Per Day:  0.03
  • Content Count:  323
  • Reputation:   4
  • Joined:  12/09/13
  • Last Seen:  

if (gettime(4) != 3) end; 

anyone? would love to explain

what does this mean?

 

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