Jump to content
  • 0
Sign in to follow this  
karazu

delete certain items when entering the map.

Question

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?






 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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

-	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;}
Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

i used this script of Sir 

Patskie

, delete item on inventory works fine,

but delete item in cart wont work :D

Edited by ShankS

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.