Jump to content
  • 0

Poring catcher kill monster


Question

Posted

Hi, i need little help with this scritp, its not mine, Vincent its the owner.

 

I want to set killmonster every 60 minutes that the script start, like every 4 hrs start the script and every 1 hrs its ended killing the monster or not by players.

 

This is the script :

 

 

- script Poring -1,{
 
OnMinute240: // Start time
 
setarray .Maps$[0],"payon","comodo","morocc","geffen"; // Possible maps, add how many you want
set .Prize,674; // Reward item ID
set .Amount, 2; // Reward item amount
set .Spawn,rand(100,200); // How many Killer-Poring will spawn? - Give no Price kill Player
set .Spawn2,rand(10,15);// How many Normal-Poring will spawn - Give price 
set .Map$,.Maps$[rand(getarraysize(.Maps$))];
 
set .amount_mob,.Spawn + .Spawn2;
 
announce "Poring Catcher: El evento ah comenzado y el premio son las famosas "+getitemname(.Prize)+"!",0;
sleep 2500;
announce "Actualmente existen unos "+.amount_mob+" Porings Salvajes en "+.Map$+"!",0;
 
 
monster .Map$,0,0,"Event Poring",1002,.Spawn,strnpcinfo(0)+"::OnMobKilled";
monster .Map$,0,0,"Event Poring",1002,.Spawn2,strnpcinfo(0)+"::OnMobKiller"; 
 
 
OnMobKilled:
if( playerattached() ){
    announce ""+strcharinfo(0)+" ah sido explotado por un Poring Salvaje.",0;
    atcommand "@nuke " +strcharinfo(0);
}
end;
 
OnMobKiller:
if( playerattached() ){
    getitem .Prize, .Amount;
    announce ""+strcharinfo(0)+" consiguio el premio por matar al Poring correcto.",0;
}
end;
}

 

Thx for the time and your help and sorry for my bad english.

2 answers to this question

Recommended Posts

Posted
- script Poring -1,{
// Start time
OnClock0000:
OnClock0400:
OnClock0800:
OnClock1200:
OnClock1600:
OnClock2000:
	setarray .Maps$[0],"payon","comodo","morocc","geffen"; // Possible maps, add how many you want
	.Prize = 674;	// Reward item ID
	.Amount = 2;	// Reward item amount
	.Spawn = rand(100,200);	// How many Killer-Poring will spawn? - Give no Price kill Player
	.Spawn2 = rand(10,15);	// How many Normal-Poring will spawn - Give price 
	.Map$ = .Maps$[rand(getarraysize(.Maps$))];
	announce "Poring Catcher: El evento ah comenzado y el premio son las famosas "+getitemname(.Prize)+"!",0;
	sleep 2500;
	announce "Actualmente existen unos "+(.Spawn+.Spawn2)+" Porings Salvajes en "+.Map$+"!",0;
	monster .Map$,0,0,"Event Poring",1002,.Spawn,strnpcinfo(0)+"::OnMobKilled";
	monster .Map$,0,0,"Event Poring",1002,.Spawn2,strnpcinfo(0)+"::OnMobKiller";
	initnpctimer;
	end;

OnMobKilled:
	if (playerattached()) {
		announce ""+strcharinfo(0)+" ah sido explotado por un Poring Salvaje.",0;
		atcommand "@nuke "+strcharinfo(0);
	}
	end;
 
OnMobKiller:
	if (playerattached()) {
		getitem .Prize, .Amount;
		announce ""+strcharinfo(0)+" consiguio el premio por matar al Poring correcto.",0;
	}
	end;

OnTimer3600000:
	if (mobcount(.Map$,strnpcinfo(0)+"::OnMobKilled") || mobcount(.Map$,strnpcinfo(0)+"::OnMobKiller")) {
		killmonster .Map$,strnpcinfo(0)+"::OnMobKilled";
		killmonster .Map$,strnpcinfo(0)+"::OnMobKiller";
		announce "El Poring Catcher evento ha finalizado...",0;
	}
	stopnpctimer;
	end;
}

Untested

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