Jump to content
  • 0

###### Invasion that checks day or night


xienne15

Question


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   11
  • Joined:  01/09/12
  • Last Seen:  

Info:
The invasion will occur when the script detects that the server is night time, and when day time arrives, the invasion will end killing all the monster in a map(prontera)

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

Just apply these commands to an invasion script.

 

isnight()isday()These functions will return 1 or 0 depending on whether the server is in night mode or day mode. 'isnight' returns 1 if it's night and 0 if it isn't, 'isday' the other way around. They can be used interchangeably, pick the one you like more:    // These two are equivalent:    if (isday()) mes "I only prowl in the night.";    if (isnight()!=1) mes "I only prowl in the night.";
Edited by michaelsoftman
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   9
  • Joined:  06/25/12
  • Last Seen:  

oh wow, also applies at item scripts right?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   11
  • Joined:  01/09/12
  • Last Seen:  

michaelsoftman, on 02 Aug 2013 - 10:45, said:

Just apply these commands to an invasion script.

isnight()
isday()

These functions will return 1 or 0 depending on whether the server is in night 
mode or day mode. 'isnight' returns 1 if it's night and 0 if it isn't, 'isday' 
the other way around. They can be used interchangeably, pick the one you like 
more:

    // These two are equivalent:
    if (isday()) mes "I only prowl in the night.";
    if (isnight()!=1) mes "I only prowl in the night.";
Thanks but actually i was requesting for a script that is when the night time comes the map will be invaded by zombies(1002),

and when day comes, every monster in that map will die. Nothing special or other features should be included, Just the simple invasion without any prizes or such.

@night

announce "The night has come, The mist entered the city";

then the script will summon ghouls/zombies,

once they are killed they will respawn.

@day

announce "The sun has come, the mist retreated";

all monsters in map will be removed.

Edited by xienne15
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  


OnMinute00:

if( isday() ){

// startevent.. at day time.

}

end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   11
  • Joined:  01/09/12
  • Last Seen:  

Thanks!

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