Jump to content

Question

Posted

Hi Everyone,

 

This might be old but i tried to find everywhere but failed to get one.

 

I am looking for a script / NPC, where i can click and various items will be dropped on a selected area of the map.

 

Basically i want my players to have a good time picking up various items.

 

I believe it is @makeitem or something else.

 

If you could give me the ready-made script / NPC that would be excellent.

 

Thank you very much in advance!!

 

 

2 answers to this question

Recommended Posts

Posted

Replace the first line with your NPC settings.

Define your area, map and itemlist plus amount of each time under the OnInit Label. You need to add an amount for each item.

mapname,x,y,direction	script	NPCName	id,{
	
	for (set .@i, 0;.@i < getarraysize(.items);set .@i, .@i+1){
		set .@itemid = .items[.@i];
		for (set .@j, 0; .@j < .amount[.@i]; set .@j, .@j+1){
			set .@x, rand(.upperleftx,.lowerrightx);
			set .@y, rand(.lowerrighty,.upperlefty);
			makeitem .@itemid,1,.map,.@x,.@y;
		}
	}
	end;
	OnInit:
		setarray .items[0],0;	//add items that should be dropped here
		setarray .amount, 0;	//how many of each item should drop?
		set .map,"prontera";	//map
		set .upperleftx,0;		//items will be dropped in that area (see below)
		set .upperlefty,0;
		set .lowerrightx,0;
		set .lowerrighty,0;
		//upperleft - - - - - - - - -
		//- - - - - - - - - - - - - - 
		//- - - - - - - - - - - - - - 
		//- - - - - - - - - - - - - - 
		//- - - - - - - - - - - - - - 
		//- - - - - - - - - - - - - - 
		//- - - - - - - - - lowerright
		end;
		
}

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