0 Members and 1 Guest are viewing this topic.
procedure DropLoot(ID,Killer: byte);var rand,drop: byte; loot: string;begin//WriteConsole(Killer,'You've just looted a item.',$ff5555ff); loot := ''; drop := 0; rand := Random(0,100); case IGB[ID].bname of 'Zombie': begin if rand >= 75 then begin if rand >= 85 then begin if rand >= 90 then begin drop := 16; end else drop := 17; end else drop := 18; end else drop := 19; end else drop := 20; end else drop := 21; end else drop := 22; end else drop := 23; end; end; case drop of 1: loot := 'Desert Eagle'; 2: loot := 'HK MP5'; 3: loot := 'AK 74'; 4: loot := 'Steyr AUG'; 5: loot := 'Spas 12'; 6: loot := 'Ruger77'; 7: loot := 'M79'; 8: loot := 'Barrett M82A1'; 9: loot := 'Minimi'; 10: loot := 'Minigun'; 11: loot := 'USSOCOM'; 12: loot := 'Combat Knife'; 13: loot := 'Chainsaw'; 14: loot := 'LAW'; 15: loot := 'Stationary Gun'; 16: loot := 'Medical Kit'; 17: loot := 'Grenade Kit'; 18: loot := 'Flamer Kit'; 19: loot := 'Vest Kit'; 20: loot := 'Predator Kit'; 21: loot := 'Berserk Kit'; 22: loot := 'Cluster Kit'; end; if drop > 0 then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),drop); WriteConsole(Killer,'Looted -:- ' + loot ,$ff5555ff); end; end;
function Choose(Input: array of variant): variant;var i,len: integer;beginlen := getarraylength(input);i := random(0,len);if i < 0 then i := 0;if i > len-1 then i := len-1;result := input[i];end;procedure DropLoot(ID,Killer: byte);var drop: byte; loot: string;begindrop := 255;if getplayerstat(ID,'human')=false then begin case getplayerstat(ID,'name') of 'Zombie': drop := choose([1,16,17]); 'Elite Zombie': drop := choose([18,19,22,5]); // just copypaste and edit whats in the choose to get different drops end; if drop = 255 then drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]); end else drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]);;case drop of 1: loot := 'Desert Eagle'; 2: loot := 'HK MP5'; 3: loot := 'AK 74'; 4: loot := 'Steyr AUG'; 5: loot := 'Spas 12'; 6: loot := 'Ruger77'; 7: loot := 'M79'; 8: loot := 'Barrett M82A1'; 9: loot := 'Minimi'; 10: loot := 'Minigun'; 11: loot := 'USSOCOM'; 12: loot := 'Combat Knife'; 13: loot := 'Chainsaw'; 14: loot := 'LAW'; 15: loot := 'Stationary Gun'; 16: loot := 'Medical Kit'; 17: loot := 'Grenade Kit'; 18: loot := 'Flamer Kit'; 19: loot := 'Vest Kit'; 20: loot := 'Predator Kit'; 21: loot := 'Berserk Kit'; 22: loot := 'Cluster Kit'; end;if (drop >= 1) AND (drop <= 22) then begin spawnobject(getplayerstat(ID,'x'),getplayerstat(ID,'y')-11,drop); writeconsole(Killer,'Looted -:- ' + loot ,$ff5555ff); end;end;
function Choose(Input: array of variant): variant;var i,len: integer;beginlen := getarraylength(input);i := random(0,len);if i < 0 then i := 0;if i > len-1 then i := len-1;result := input[i];end;procedure DropLoot(ID,Killer: byte);var drop: byte; loot: string;begindrop := 255;if getplayerstat(ID,'human')=false then begin case getplayerstat(ID,'name') of 'Zombie': drop := choose([22,21,20,19,18,16,17]) // just copypaste and edit whats in the choose to get different drops end; if drop = 255 then drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]); end else drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]);;case drop of 1: loot := 'Desert Eagle'; 2: loot := 'HK MP5'; 3: loot := 'AK 74'; 4: loot := 'Steyr AUG'; 5: loot := 'Spas 12'; 6: loot := 'Ruger77'; 7: loot := 'M79'; 8: loot := 'Barrett M82A1'; 9: loot := 'Minimi'; 10: loot := 'Minigun'; 11: loot := 'USSOCOM'; 12: loot := 'Combat Knife'; 13: loot := 'Chainsaw'; 14: loot := 'LAW'; 15: loot := 'Stationary Gun'; 16: loot := 'Medical Kit'; 17: loot := 'Grenade Kit'; 18: loot := 'Flamer Kit'; 19: loot := 'Vest Kit'; 20: loot := 'Predator Kit'; 21: loot := 'Berserk Kit'; 22: loot := 'Cluster Kit'; end;if (drop >= 1) AND (drop <= 22) then begin spawnobject(getplayerstat(ID,'x'),getplayerstat(ID,'y')-11,drop); writeconsole(Killer,'Looted -:- ' + loot ,$ff5555ff); end;end;
onplayerkill(killer,victim: byte);begindroploot(victim,killer);end;
procedure OnPlayerKill(Killer, Victim: byte;Weapon: byte);beginDropLoot(Victim, Killer);end;
procedure OnPlayerKill(Killer, Victim: byte;Weapon: byte);beginDropLoot(Victim, Killer);end;function Choose(Input: array of variant): variant;var i,len: integer;beginlen := getarraylength(input);i := random(0,len);if i < 0 then i := 0;if i > len-1 then i := len-1;result := input[i];end;procedure DropLoot(ID,Killer: byte);var drop: byte; loot: string;begindrop := 255;if getplayerstat(ID,'human')=false then begin case getplayerstat(ID,'name') of 'Zombie': drop := choose([22,21,20,19,18,16,17]) // just copypaste and edit whats in the choose to get different drops end; if drop = 255 then drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]); end else drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]);;case drop of 1: loot := 'Desert Eagle'; 2: loot := 'HK MP5'; 3: loot := 'AK 74'; 4: loot := 'Steyr AUG'; 5: loot := 'Spas 12'; 6: loot := 'Ruger77'; 7: loot := 'M79'; 8: loot := 'Barrett M82A1'; 9: loot := 'Minimi'; 10: loot := 'Minigun'; 11: loot := 'USSOCOM'; 12: loot := 'Combat Knife'; 13: loot := 'Chainsaw'; 14: loot := 'LAW'; 15: loot := 'Stationary Gun'; 16: loot := 'Medical Kit'; 17: loot := 'Grenade Kit'; 18: loot := 'Flamer Kit'; 19: loot := 'Vest Kit'; 20: loot := 'Predator Kit'; 21: loot := 'Berserk Kit'; 22: loot := 'Cluster Kit'; end;if (drop >= 1) AND (drop <= 22) then begin spawnobject(getplayerstat(ID,'x'),getplayerstat(ID,'y')-11,drop); writeconsole(Killer,'Looted -:- ' + loot ,$ff5555ff); end;end;
function Choose(Input: array of variant): variant;var i,len: integer;beginlen := getarraylength(input);i := random(0,len);if i < 0 then i := 0;if i > len-1 then i := len-1;result := input[i];end;procedure DropLoot(ID,Killer: byte);var drop: byte; loot: string;begindrop := 255;if getplayerstat(ID,'human')=false then begin case getplayerstat(ID,'name') of 'Zombie': drop := choose([22,21,20,19,18,16,17]) // just copypaste and edit whats in the choose to get different drops end; if drop = 255 then drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]); end else drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]);;case drop of 1: loot := 'Desert Eagle'; 2: loot := 'HK MP5'; 3: loot := 'AK 74'; 4: loot := 'Steyr AUG'; 5: loot := 'Spas 12'; 6: loot := 'Ruger77'; 7: loot := 'M79'; 8: loot := 'Barrett M82A1'; 9: loot := 'Minimi'; 10: loot := 'Minigun'; 11: loot := 'USSOCOM'; 12: loot := 'Combat Knife'; 13: loot := 'Chainsaw'; 14: loot := 'LAW'; 15: loot := 'Stationary Gun'; 16: loot := 'Medical Kit'; 17: loot := 'Grenade Kit'; 18: loot := 'Flamer Kit'; 19: loot := 'Vest Kit'; 20: loot := 'Predator Kit'; 21: loot := 'Berserk Kit'; 22: loot := 'Cluster Kit'; end;if (drop >= 1) AND (drop <= 22) then begin spawnobject(getplayerstat(ID,'x'),getplayerstat(ID,'y')-11,drop); writeconsole(Killer,'Looted -:- ' + loot ,$ff5555ff); end;end;procedure OnPlayerKill(Killer, Victim: byte;Weapon: byte);beginDropLoot(Victim, Killer);end;
I don't understand do you mean that there is a /faceplam commmand ?and this command should drop a random item ?