Jump to content
  • 0
Sign in to follow this  
unknown

Can anyone make a script like this

Question

I want an npc that will give me an item by killing an mvp monster on a specific map like bossinia map.

 

example

 

if i killed 5 MVP the npc will give me 1 poring coins

if i killed 10 MVP the npc will give me 2 poring coins

 

1-5 killed MVP - 1 poring coin

6-10 Killed MVP - 2 poring coins

11-15 Killed MVP - 3 Poring coins

16-20 Killed MVP - 4 poring coins

and so on..

and so forth....

 

 

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Do you want it to be a physical NPC (a player can click on it) or do you want it to be automatic (when a player kills a multiple of 5 MVPs on a certain map, automatically gain the items)?

 

Here is a script that will do the latter :x...

 

/*=========================================================Untitledby Zephy===========================================================Description:No description available.===========================================================Compatibility:Optimised for Hercules emulators.===========================================================Changelog:1.0 - Initial release.===========================================================Additional Notes:	- If you want the kills to be reset when 	  the player dies, uncomment line 44 and 52.	 	- Currently the kill counter variable (@mvpkill)	  is a temporary variable, meaning that if the	  player logs out, their score will reset. If	  you want them to keep the score even when they	  log out, remove the '@' in @mvpkill.=========================================================*/-	script	MvP Counter	-1,{OnNPCKillEvent:	for (.@i = 0; .@i < getarraysize(.map$); .@i++)	{		if (getmonsterinfo(killedrid, MOB_MVPEXP) && strcharinfo(3) == .map$[.@i]) // Checks if user has killed an MvP on a specified map		{			@mvpkill++; //Increments variable to count MvP kills		}				if (@mvpkill % 5 == 0) // Checks if @mvpkill if a multiple of 5		{			@amount++; // Increment variable for prize amount (increment by 1 per 5 kills)			getitem .prize, @amount; // Gives player the prize		}	}end;/*OnPcDieEvent:	if (@mvpkill)	{		@mvpkill = 0;			}end;*///ConfigurationOnInit:	.prize = 0; // Prize ID	setarray .map$[0], "bossnia_01", "bossnia_02"; // Maps that you want this script active on	end;}
Edited by Zephy

Share this post


Link to post
Share on other sites
  • 0

can you mix it with mvp wave event in bossnia map because i miss that mvp wave event, thats the first time i play that event and i really like it killing so many mvp

Share this post


Link to post
Share on other sites
  • 0

can you fixed the script below which is mvp wave event automatically every 1hr. there is 5 round, every round there is 25 mvp monster to be killed. if the player is die, he will warp to a certain map where there is a npc. he need to claim the prize if he killed an mvp atleaset 1 which the prize is 1 poring coin. after that he will warp back to his current position before he joined the mvp wave event. if he still keep alive in the first round, he will still play for the second round, soon and so forth.

 

//By Skorm v1.5prontera,102,102,5	script	MvP Warper	100,{	if(countitem(.item)<.amount) {		mes "I'm sorry you need at least "+.amount+" "+getitemname(.item)+"(s).";		close;	}	for(set .@b,1; .@b < getarraysize(.maps$); set .@b,.@b + 1) {		set .@menu$, .@menu$  + "Room["+(.@b-1)+"]- "+((getmapusers(""+.maps$[.@b]+""))?"^CD0000Closed^000000("+getmapusers(.maps$[.@b])+")":"^007700Open^000000("+getmapusers(.maps$[.@b])+")")+":";	}		if(select(.@menu$)) {		if(getmapusers(.maps$[@menu])){ mes "This room is currently occupied."; close; }		set @menu,@menu;		killmonsterall .maps$[@menu];		if(countitem(.item)>=.pamount){			if(select("Warp:PartyWarp requires- "+getitemname(.item)+"x"+.pamount)-1) {				delitem .item,.pamount;				set @id,getcharid(1);				warpparty .maps$[@menu],0,0,@id;			} else { delitem .item,.amount; warp .maps$[@menu],0,0; }		} else { delitem .item,.amount; warp .maps$[@menu],0,0; }		sleep2 3000;				Onround:			setd ".mob"+@menu, .mamount;			areamonster .maps$[@menu],34,67,67,34,"--ja--",-3,.mamount,"MvP Warper::OnroundDeath";			end;					Onround2:			for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;			setd ".mob"+.@t, .mamount;			areamonster .maps$[.@t],34,67,67,34,"--ja--",-3,.mamount,"MvP Warper::OnroundDeath2";			end;					Onround3:			for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;			setd ".mob"+.@t, .mamount;			areamonster .maps$[.@t],34,67,67,34,"--ja--",-3,.mamount,"MvP Warper::OnroundDeath3";			end;					Onround4:			for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;			setd ".mob"+.@t, .mamount;			areamonster .maps$[.@t],34,67,67,34,"--ja--",-3,.mamount,"MvP Warper::OnroundDeath4";			end;					Onround5:			for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;			setd ".mob"+.@t, .mamount;			areamonster .maps$[.@t],34,67,67,34,"--ja--",-3,.mamount,"MvP Warper::OnroundDeath5";			end;					OnroundDeath:			for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;			setd ".mob"+.@t,getd(".mob"+.@t) - 1;			setd ".kmob"+.@t,getd(".kmob"+.@t) + 1;			if(getmapusers(.maps$[.@t])){				set .tmp, getd(".mob"+.@t);				if(.tmp == 25) mapannounce .maps$[.@t],"Mvper: 25 MvPs remaining!",0;				if(.tmp == 5) mapannounce .maps$[.@t],"Mvper: 5 MvPs remaining!",0;				if(.tmp == 0){ mapannounce .maps$[.@t],"Round 1 complete! Round 2 has started!",0; goto Onround2; }			}			end;					OnroundDeath2:			//set $@mob,$@mob - 1;			for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;			setd ".mob"+.@t,getd(".mob"+.@t) - 1;			setd ".kmob"+.@t,getd(".kmob"+.@t) + 1;			if(getmapusers(.maps$[.@t])){				set .tmp, getd(".mob"+.@t);				if(.tmp == 25) mapannounce .maps$[.@t],"Mvper: 25 MvPs remaining!",0;				if(.tmp == 5) mapannounce .maps$[.@t],"Mvper: 5 MvPs remaining!",0;				if(.tmp == 0){ mapannounce .maps$[.@t],"Round 2 complete! Round 3 has started!",0; goto Onround3; }			}			end;					OnroundDeath3:			for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;			setd ".mob"+.@t,getd(".mob"+.@t) - 1;			setd ".kmob"+.@t,getd(".kmob"+.@t) + 1;			if(getmapusers(.maps$[.@t])){				set .tmp, getd(".mob"+.@t);				if(.tmp == 25) mapannounce .maps$[.@t],"Mvper: 25 MvPs remaining!",0;				if(.tmp == 5) mapannounce .maps$[.@t],"Mvper: 5 MvPs remaining!",0;				if(.tmp == 0){ mapannounce .maps$[.@t],"Round 3 complete! Round 4 has started!",0; goto Onround4; }			}			end;					OnroundDeath4:			for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;			setd ".mob"+.@t,getd(".mob"+.@t) - 1;			setd ".kmob"+.@t,getd(".kmob"+.@t) + 1;			if(getmapusers(.maps$[.@t])){				set .tmp, getd(".mob"+.@t);				if(.tmp == 25) mapannounce .maps$[.@t],"Mvper: 25 MvPs remaining!",0;				if(.tmp == 5) mapannounce .maps$[.@t],"Mvper: 5 MvPs remaining!",0;				if(.tmp == 0){ mapannounce .maps$[.@t],"Round 4 complete! Round 5 has started!",0; goto Onround5; }			}			end;					OnroundDeath5:			for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;			setd ".mob"+.@t,getd(".mob"+.@t) - 1;			setd ".kmob"+.@t,getd(".kmob"+.@t) + 1;			if(getmapusers(.maps$[.@t])){				set .tmp, getd(".mob"+.@t);				if(.tmp == 25) mapannounce .maps$[.@t],"Mvper: 25 MvPs remaining!",0;				if(.tmp == 5) mapannounce .maps$[.@t],"Mvper: 5 MvPs remaining!",0;				if(.tmp == 0){ mapannounce .maps$[.@t],"You Win!",0; mapwarp .maps$[.@t],"prontera",156,212; end; }			}			end;	}	close;		OnInit:		set .item, 501; //Item required to warp.		set .amount, 1; //Amount required for single person warp.		set .pamount, 10; //Amount required for party warp.		set .mamount, 1; //Amount of mvps spawned.		setarray .rewards[0],			//	ID ,	Amount, Range Low,	Range High,				501,	10    ,	0        ,	5         ,				502,	20    ,	6        ,	10        ,				503,	30    ,	11       ,	12        ;		setarray .maps$[1], "guild_vs2", "guild_vs2-1", "guild_vs2-2"; //Array of maps used.		end;			OnPCDieEvent:		for(set .@t,1;.@t<=getarraysize(.maps$);set .@t,.@t+1) if(strcharinfo(3)==.maps$[.@t]) break;		for(set .@a,0;.@a<=getarraysize(.maps$);set .@a,.@a+1) {			if(strcharinfo(3)==.maps$[.a]) {				announce strcharinfo(3)+" has Just become available.",bc_all;				for(set .@b,0;.@b<getarraysize(.rewards);set .@b,.@b+4) {					if(getd(".kmob"+.@t)>=.rewards[.@b+2]&&getd(".kmob"+.@t)<=.rewards[.@b+3]) {						getitem .rewards[.@b], .rewards[.@b+1];					}				}				warp "prontera",156,212;				end;			}		}		end;		OnPCLogoutEvent:		for(set .@a,0;.@a<=getarraysize(.maps$);set .@a,.@a+1) {			if(strcharinfo(3)==.maps$[.a]) {				announce strcharinfo(3)+" has Just become available.",bc_all;				warp "prontera",156,212;				end;			}		}}

 

thanks for helping

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.