Jump to content
  • 0

clean killmonster in map


Serboy

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.01
  • Content Count:  6
  • Reputation:   0
  • Joined:  06/16/23
  • Last Seen:  

how to killmonster every hour if or if no player in map   

like on branch room   will killmonster2  every 20mins or hour  if theres no player inside 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

Hello,

this should do what you want.

-	script	mob_cleaner	-1,{
	OnTimer60000:
		for(.@i = 0; .@i < getarraysize(.cleanMaps$); .@i++) 
			if(getmapunits(BL_PC, .cleanMaps$[.@i]) == 0)
				killmonsterall(.cleanMaps$[.@i]);

		setnpctimer 0;
	end;

	OnInit:
		setarray .cleanMaps$[0], "prontera", "payon";
		initnpctimer;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.01
  • Content Count:  6
  • Reputation:   0
  • Joined:  06/16/23
  • Last Seen:  

23 hours ago, Winterfox said:

Hello,

this should do what you want.

-	script	mob_cleaner	-1,{
	OnTimer60000:
		for(.@i = 0; .@i < getarraysize(.cleanMaps$); .@i++) 
			if(getmapunits(BL_PC, .cleanMaps$[.@i]) == 0)
				killmonsterall(.cleanMaps$[.@i]);

		setnpctimer 0;
	end;

	OnInit:
		setarray .cleanMaps$[0], "prontera", "payon";
		initnpctimer;
}

 

ty

Link to comment
Share on other sites

  • 0

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

OnMinute00:
OnMinute20:
OnMinute40:
	if (getmapusers("prontera") == 0) 
		killmonsterall "prontera";
	end;

run every 00th, 20th, 40th minutes

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