anyone has this script? please share it...
im using this script... it auto warped back to hometown if someone has MVP card... but may i limit it maximum 1 max?
- script Limited Items -1,{
function LimitItems;
function CheckItems;
OnInit:
// GM Level to Bypass
set .GMLevel,3;
// Check Every X Seconds
set .Seconds,5;
// Apply on Which Maps and what Zone No.
setarray .DisableMap$, // "<mapname>","<zone number>",
"pvp_n_1-5","0",
"yggdrasil01","1",
"guild_vs2","2";
// "guild_vs4","3",
// "guild_vs5","4";
// Initialize Mapflags
for( set .i,0; .i < getarraysize( .DisableMap$ ); set .i,.i + 2 )
setmapflag .DisableMap$[.i],mf_loadevent;
end;
OnPCLoadMapEvent:
if( getgmlevel() >= .GMLevel ) end;
for( set .@i,0; .@i < getarraysize( .DisableMap$ ); set .@i,.@i + 2 )
while( strcharinfo(3) == .DisableMap$[.@i] ){
if( LimitItems( atoi( .DisableMap$[.@i+1] ) ) ){
message strcharinfo(0),"Limited Items Exceeded.";
mes " ";
mes "^777777-------------------^000000";
mes "Your equipment is not allowed to have any MVP card in it.";
mes "Please ensure all the Items above didnt reach the Limit / Disabled as stated above.";
close2;
warp "SavePoint",0,0;
}
sleep2 ( .Seconds * 1000 );
}
end;
function LimitItems {
switch( getarg(0) ){
// Case <zone>: return CheckItems( <Item>,<Amount>,<Item>,<Amount>,.....,<Item>,<Amount> );
Case 0: return CheckItems( 607,0,608,0,2742,0,2541,0,4241,0,610,0,607,0,608,0,4174,0,4047,0,4054,0,4169,0,4236,0,4359,0,4425,0,4372,0,4147,0,4145,0,4168,0,4386,0,4142,0,4134,0,4137,0,4123,0,4330,0,4441,0,4324,0,4408,0,4128,0,4363,0,4365,0,4430,302,0,4305,0,4407,0,4374,0,4361,0,4352,0 );
Case 1: return CheckItems( 13017,0,1230,0,4236,0,4359,0,4425,0,4372,0,4147,0,4145,0,4168,0,4386,0,4142,0,4134,0,4137,0,4123,0,4330,0,4441,0,4324,0,4408,0,4128,0,4363,0,4365,0,4430,0,4263,0,4403,0,4318,0,4419,0,4376,0,4357,0,4276,0,4146,0,4132,0,4131,0,4143,0,4135,0,4144,0,4148,0,4121,0,4342,0,4367,0,4302,0,4305,0,4407,0,437
// Case 3: return CheckItems( 607,5,608,1,4002,1,5022,1 );
// Case 4: return CheckItems( 607,1,608,15,5022,2,7227,10 );
default:
debugmes "[NPC : "+strnpcinfo(0)+"] - Invalid Zone : "+getarg(0);
break;
}
return;
}
}