merlini Posted February 17, 2013 Posted February 17, 2013 - script PVPdropitem -1,{ OnPCDieEvent: setarray @PVPdropitem$[0],"Ws_town"; setarray @dropitem[0],2301; getmapxy(.@mapname$,.@mapx,.@mapy,0,strcharinfo(0)); for(set .@p,0; .@p<getarraysize(@PVPdropitem$); set .@p,.@p+1){ if( .@mapname$ == @PVPdropitem$[.@p] ){ end; } } makeitem @dropitem[rand(getarraysize(@dropitem))],1,.@mapname$,.@mapx,.@mapy; end; }I'm trying to make it so when player dies by Player, their equipment is dropped or random item from backpack. Quote
Emistry Posted February 17, 2013 Posted February 17, 2013 since it only happen during PK...why not try add this mapflag ? trunk/conf/mapflag/nightmare.txt //===== Description: ========================================= //= Players drop items/equipment on death. //= pvp_nightmaredrop id,type,percent //= id: Drop a specific item ID or "random" //= type: "inventory", "equip", or "all" //= percent: Rate of item drop. 1 Quote
Capuche Posted February 17, 2013 Posted February 17, 2013 (edited) when player dies by Player pvp_nightmaredrop also works when kill by monster ( but a small edit in pc.c...) Edited February 17, 2013 by Capuche Quote
merlini Posted February 18, 2013 Author Posted February 18, 2013 well, thats alot more easier/better Quote
Question
merlini
OnPCDieEvent:
setarray @PVPdropitem$[0],"Ws_town";
setarray @dropitem[0],2301;
getmapxy(.@mapname$,.@mapx,.@mapy,0,strcharinfo(0));
for(set .@p,0; .@p<getarraysize(@PVPdropitem$); set .@p,.@p+1){
if( .@mapname$ == @PVPdropitem$[.@p] ){ end; }
}
makeitem @dropitem[rand(getarraysize(@dropitem))],1,.@mapname$,.@mapx,.@mapy;
end;
}
I'm trying to make it so when player dies by Player, their equipment is dropped or random item from backpack.3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.