Yoh Asakura
New member
- Messages
- 261
- Points
- 0
- Emulator
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.
Anyone could help me?
Other topic: http://herc.ws/board/topic/9089-map-zone-db/
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
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/
Last edited by a moderator: