delete certain items when entering the map.

karazu

New member
Messages
1,115
Points
0
Hello is it possible to delete some items when entering/warping in this specific map?

like when I have a Red Potion and Blue Potion in my Inventory or Cart  and then I will enter in that map those items are  automatically deleted?






 

 
Supports multiple items and multiple maps configuration ( check the OnInit part ) :

Code:
-	script	Sample	-1,{	OnPCLoadMapEvent:		getmapxy .@map$, .@xx, .@yy, 0;		for ( .@x = 0; .@x < getarraysize(.Maps$); .@x++ ) {			for ( .@y = 0; .@y < .size; .@y++ ) {				if ( .@map$ == .Maps$[.@x] && countitem(.item_id[.@y]) ) {					dispbottom "Item " +getitemname(.item_id[.@y])+ " (" +countitem(.item_id[.@y])+ ") was deleted on your inventory";					delitem .item_id[.@y], countitem(.item_id[.@y]);				}			}		}		end;	OnInit:		setarray .Maps$[0],"prontera","payon","geffen";		setarray .item_id[0],501,502;		.size = getarraysize(.item_id);		for ( .@i = 0; .@i < getarraysize(.Maps$); .@i++ )			 setmapflag .Maps$[.@i], mf_loadevent;		end;}
 
Last edited by a moderator:
Why ur so great? Hahahah.. Any way, can u make me a simple warper like it will check if u have this specific item, if u click it, the npc will let you choose where part of the map u want to he teleported? For example north south east west of prontera

 
It would be great if you post all your request at your topic description so that people who will help you out will not re-write their initial script.
default_tongue.png


 
i used this script of Sir 

Patskie, delete item on inventory works fine,

but delete item in cart wont work
default_biggrin.png


 
Last edited by a moderator:
Back
Top