Jump to content
  • 0

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


Question

Posted

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)

5 answers to this question

Recommended Posts

Posted (edited)

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
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...