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
  • 0

Yow can you do this in Skill check? for prohibited skill like hiding cloacking and invinsibility? please make if possible ^_^

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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