Is there a better loot system to use? Or should I just make my own?
Commche's code is starting to ****** me off. Like the thing where he makes duplicate weapon cases to satisfy d20(2) rolls... instead of using random. Here's an example
iRoll = d20(2);
switch(iRoll)
{
// Axes
case 0: {sType = "sdgaxe"; iRoll = d3();
if (iRoll==1)sIName = "Greataxe";
if (iRoll==2)sIName = "Two Handed Axe";
if (iRoll==3)sIName = "Decapitator";}
case 1: {sType = "sdgaxe"; iRoll = d3();
if (iRoll==1)sIName = "Greataxe";
if (iRoll==2)sIName = "Two Handed Axe";
if (iRoll==3)sIName = "Decapitator";}
case 2: {sType = "sdgaxe"; iRoll = d3();
if (iRoll==1)sIName = "Greataxe";
if (iRoll==2)sIName = "Two Handed Axe";
if (iRoll==3)sIName = "Decapitator";}
break; break;
case 3: {sType = "sdwaxe"; iRoll = d3();
if (iRoll==1)sIName = "Dwarven War Axe";
if (iRoll==2)sIName = "War Axe";
if (iRoll==3)sIName = "Headsplitter";}
break;
case 4: {sType = "sdbaxe"; iRoll = d3();
if (iRoll==1)sIName = "Battleaxe";
if (iRoll==2)sIName = "Beserker Axe";
if (iRoll==3)sIName = "Siege Axe";}
break;
case 5: {sType = "sdhaxe"; iRoll = d3();
if (iRoll==1)sIName = "Handaxe";
if (iRoll==2)sIName = "Cleaver";
if (iRoll==3)sIName = "Tomohawk";}
break;
// Bladed
case 6: {sType = "sd_bastard"; iRoll = d3();
if (iRoll==1)sIName = "Bastard Sword";
if (iRoll==2)sIName = "Mercinary Blade";
if (iRoll==3)sIName = "Black Blade";}
break;
case 7: {sType = "sdlsword"; iRoll = d3();
if (iRoll==1)sIName = "Longsword";
if (iRoll==2)sIName = "Knight's Sword";
if (iRoll==3)sIName = "Honor Blade";}
break;
case 8: {sType = "sdlsword"; iRoll = d3();
if (iRoll==1)sIName = "Longsword";
if (iRoll==2)sIName = "Knight's Sword";
if (iRoll==3)sIName = "Honor Blade";}
break;
case 9: {sType = "sdssword"; iRoll = d3();
if (iRoll==1)sIName = "Short Sword";
if (iRoll==2)sIName = "Half Blade";
if (iRoll==3)sIName = "Halfling Sword";}
break;
case 10: {sType = "sdgsword"; iRoll = d3();
if (iRoll==1)sIName = "Greatsword";
if (iRoll==2)sIName = "Massive Blade";
if (iRoll==3)sIName = "Champion's Steel";}
break;
case 11: {sType = "sdkatana"; iRoll = d3();
if (iRoll==1)sIName = "Katana";
if (iRoll==2)sIName = "Samurai Sword";
if (iRoll==3)sIName = "Assassin Blade";}
break;
case 12: {sType = "sdscim"; iRoll = d3();
if (iRoll==1)sIName = "Scimitar";
if (iRoll==2)sIName = "Arabian Sword";
if (iRoll==3)sIName = "Sand Blade";}
break;
case 13: {sType = "sdrapier"; iRoll = d3();
if (iRoll==1)sIName = "Rapier";
if (iRoll==2)sIName = "Swashbuckler";
if (iRoll==3)sIName = "Death Pin";}
break;
case 14: {sType = "sddagger"; iRoll = d3();
if (iRoll==1)sIName = "Dagger";
if (iRoll==2)sIName = "Sticker";
if (iRoll==3)sIName = "Switchblade";}
break;
// Exotic
case 15: {sType = "sdstaff3"; iRoll = d3();
iWType = 2;
if (iRoll==1)sIName = "Warlock Bone";
if (iRoll==2)sIName = "Shaman Totem";
if (iRoll==3)sIName = "Cane of Scorcery";}
break;
case 16: {sType = "sdkama"; iRoll = d3();
if (iRoll==1)sIName = "Kama";
if (iRoll==2)sIName = "Monk Claw";
if (iRoll==3)sIName = "Ripper";}
break;
case 17: {sType = "sdkukri"; iRoll = d3();
if (iRoll==1)sIName = "Kukri";
if (iRoll==2)sIName = "Machetti";
if (iRoll==3)sIName = "Scorpion Tail";}
break;
case 18: {sType = "sdlbow"; iRoll = d3();
iWType = 1;
if (iRoll==1)sIName = "Siege Bow";
if (iRoll==2)sIName = "Elven War Bow";
if (iRoll==3)sIName = "Battle Bow";}
break;
// Blunt
case 19: {sType = "sdclub"; iRoll = d3();
if (iRoll==1)sIName = "Club";
if (iRoll==2)sIName = "Baton";
if (iRoll==3)sIName = "Truncheon";}
break;
case 20: {sType = "sdhflail"; iRoll = d3();
if (iRoll==1)sIName = "Heavy Flail";
if (iRoll==2)sIName = "Deathswinger";
if (iRoll==3)sIName = "Skull Masher";}
break;
case 21: {sType = "sdlflail"; iRoll = d3();
if (iRoll==1)sIName = "Flail";
if (iRoll==2)sIName = "Light Flail";
if (iRoll==3)sIName = "Head ******";}
break;
case 22: {sType = "sdstaff1"; iRoll = d3();
iWType = 2;
if (iRoll==1)sIName = "Magestaff";
if (iRoll==2)sIName = "Arcane Staff";
if (iRoll==3)sIName = "Magus Pole";}
break;
case 23: {sType = "sdwhamm"; iRoll = d3();
if (iRoll==1)sIName = "Warhammer";
if (iRoll==2)sIName = "Thunderhead";
if (iRoll==3)sIName = "Earthshaker";}
break;
case 24: {sType = "sdmace"; iRoll = d3();
if (iRoll==1)sIName = "Mace";
if (iRoll==2)sIName = "Wrathpole";
if (iRoll==3)sIName = "Justice Bringer";}
break;
case 25: {sType = "sdmstar"; iRoll = d3();
if (iRoll==1)sIName = "Morning Star";
if (iRoll==2)sIName = "Neck Crusher";
if (iRoll==3)sIName = "Bloodcopter";}
break;
//Double Sided
case 26: {sType = "sddbsword"; iRoll = d3();
if (iRoll==1)sIName = "Doubleblade";
if (iRoll==2)sIName = "Doomblade";
if (iRoll==3)sIName = "Body Processor";}
break;
case 27: {sType = "sddsmace"; iRoll = d3();
if (iRoll==1)sIName = "Double Mace";
if (iRoll==2)sIName = "Damage Pole";
if (iRoll==3)sIName = "Twin Basher";}
break;
case 28: {sType = "sddsaxe"; iRoll = d3();
if (iRoll==1)sIName = "Double Axe";
if (iRoll==2)sIName = "Crowd Cutter";
if (iRoll==3)sIName = "Haymaker";}
break;
case 29: {sType = "sdqstaff"; iRoll = d3();
if (iRoll==1)sIName = "Quaterstaff";
if (iRoll==2)sIName = "Pole";
if (iRoll==3)sIName = "Oak Rod";}
break;
// Polearms
case 30: {sType = "sdhalberd"; iRoll = d3();
if (iRoll==1)sIName = "Halberd";
if (iRoll==2)sIName = "Death Reach";
if (iRoll==3)sIName = "Wind Cutter";}
break;
case 31: {sType = "sdscythe"; iRoll = d3();
if (iRoll==1)sIName = "Reaper";
if (iRoll==2)sIName = "Soul Reaver";
if (iRoll==3)sIName = "Flesh Harvester";}
break;
case 32: {sType = "sdspear"; iRoll = d3();
if (iRoll==1)sIName = "Spear";
if (iRoll==2)sIName = "Amazon Finger";
if (iRoll==3)sIName = "Body Skewer";}
break;
// Whip
case 33: {sType = "sdwhip"; iRoll = d3();
if (iRoll==1)sIName = "Whip";
if (iRoll==2)sIName = "Bullwhip";
if (iRoll==3)sIName = "Deathrope";}
break;
// Ranged
case 34: {sType = "sdsbow"; iRoll = d3();
iWType = 1;
if (iRoll==1)sIName = "Halfling War Bow";
if (iRoll==2)sIName = "Shortbow";
if (iRoll==3)sIName = "Bloodstring";}
break;
case 35: {sType = "sdlcbow"; iRoll = d3();
iWType = 1;
if (iRoll==1)sIName = "Light Crossbow";
if (iRoll==2)sIName = "Bolt Pistol";
if (iRoll==3)sIName = "Auto Bow";}
break;
case 36: {sType = "sdhcbow"; iRoll = d3();
iWType = 1;
if (iRoll==1)sIName = "Battle Crossbow";
if (iRoll==2)sIName = "Bolt Rifle";
if (iRoll==3)sIName = "Steelstring Sniper";}
break;
// Mage
case 37: {sType = "sdlhamm"; iRoll = d3();
if (iRoll==1)sIName = "Light Hammer";
if (iRoll==2)sIName = "Wood Hammer";
if (iRoll==3)sIName = "Hole Puncher";}
break;
case 38: {sType = "sdstaff2"; iRoll = d3();
iWType = 2;
if (iRoll==1)sIName = "Mystic Cane";
if (iRoll==2)sIName = "Staff of Conjuring";
if (iRoll==3)sIName = "Ivory Staff";}
break;
case 39: {sType = "sdsickle"; iRoll = d3();
if (iRoll==1)sIName = "Sickle";
if (iRoll==2)sIName = "Blood Crest";
if (iRoll==3)sIName = "Death Ring";}
break;
case 40: {sType = "sdmgloves"; iRoll = d3();
iWType = 3;
if (iRoll==1)sIName = "Death Claws";
if (iRoll==2)sIName = "Exploding Fists";
if (iRoll==3)sIName = "Battle Gloves";}
break;
}
Is there any reason to use dice instead of Random?