Jump to content
  • 0

PK: Drop random item(backpack & equipment)


Question

Posted

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

3 answers to this question

Recommended Posts

Posted

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.
  • Upvote 1

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...