Jump to content
  • 0

Question

Hi,

 

I'm trying to block an item in a map but some players just put this item in the cart and they can enter in the map, take the item from the cart and use.

Well, if I add a script that checks each second if the player has this item, the script would detect who has the item and teleport them to prontera.

I tried to do it based on the AFK script.

 

 

 

- script checkitem -1,{
 
 
OnInit:
    .timetocheck = 1;        //Seconds after which idle is checked.
end;
 
 
OnPCLoadMapEvent::
    addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckAFK";
    end;
                                                               
OnCheckAFK:
if(countitem(607) > 0 || countitem(608) > 0) { 
mes "[^FF0000 Guard ^000000]"; 
mes "Sorry this item is not allowed in here!,"; 
close2; 
warp "prontera",150,150; 
}
end;
}
    addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckAFK";
}
 
// Mapflag
pvp_n_6-5 mapflag loadevent
 

 

 

 

Anyone could help me?

 

Other topic: http://herc.ws/board/topic/9089-map-zone-db/

Edited by Yoh Asakura

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
OnPCLoadMapEvent:    if (strcharinfo(3) == "pvp_n_6-5") {        addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem";    }    end;OnCheckItem:    for (.@i = 0; .@i < getarraysize(.item_list); .@i++) {        if (countitem(.item_list[.@i]) && strcharinfo(3) == "pvp_n_6-5") {            mes "[^FF0000 Guard ^000000]";            mes "Sorry "+getitemname(.item_list[.@i])+" is not allowed in here!,";            close2;            warp "prontera",150,150;            end;        }    }    if (strcharinfo(3) == "pvp_n_6-5") {        addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem";    }    end;
Edited by Litro

Share this post


Link to post
Share on other sites
  • 0

dude just stick with the map zone thing, they will be able to bring it, (even use it depending on your settings) but it won't have any effect

Share this post


Link to post
Share on other sites
  • 0

try this if you want to..

-	script	checkitem	-1,{	end;OnPCLoadMapEvent:	addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem";	end;OnCheckItem:	for (.@i = 0; .@i < getarraysize(.item_list); .@i++) {		if (countitem(.item_list[.@i])) {			mes "[^FF0000 Guard ^000000]"; 			mes "Sorry "+getitemname(.item_list[.@i])+" is not allowed in here!,"; 			close2; 			warp "prontera",150,150;			end;		}	}	addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem";	end;OnInit:	setarray .item_list, 607, 608;	// add item you want to check here	.timetocheck = 1;	//Seconds after which idle is checked.	end;}// Mapflagpvp_n_6-5	mapflag	loadevent
Edited by Litro

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

×
×
  • Create New...

Important Information

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