First Posted Mod
and this has Doubled my donator since i used it as a donators item.
first open Inventory.php and find
if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) {
print " [[url='itemuse.php?ID={$i[']Use[/url]]";
}
Add Below
if($i['itmname'] == 'Randomizer') {
print " [[url='itemuse.php?ID={$i[']Use[/url]]";
}
Open Itemuse.php find
if(!$r['effect1_on'] && !$r['effect2_on'] && !$r['effect3_on'])
{
die("Sorry, this item cannot be used as it has no effect.");
}
replace with
if($r['itmname'] == 'Randomizer')
{
$chance = rand(1,6);
if ($chance == 1) {
$gained=rand(3000000,50000000);
print "You Got From The Randomizer [b]\$$gained[/b].
";
$db->query("UPDATE users SET money=money+$gained WHERE userid=$userid");
}
if ($chance == 2) {
$gained=rand(100,5000);
print "You Got From The Randomizer [b]$gained Crystals[/b].
";
$db->query("UPDATE users SET crystals=crystals+$gained WHERE userid=$userid");
}
if ($chance == 3) {
$gained=rand(1,15);
print "You Got From The Randomizer [b]$gained Azure Gem(s)[/b].
";
$db->query("UPDATE users SET AzureGems=AzureGems+$gained WHERE userid=$userid");
}
if ($chance == 4) {
$gained=rand(1,5);
print "You Got From The Randomizer [b]$gained Will Potion(s)[/b].
";
$db->query("INSERT INTO inventory VALUES('',2,$userid,$gained)");
}
if ($chance == 5) {
$gained=rand(100,1000);
print "You Got From The Randomizer [b]$gained Turns[/b].
";
$db->query("UPDATE users SET turns=turns+$gained WHERE userid=$userid");
}
if ($chance == 6) {
$gained=rand(1,10);
print "You Got From The Randomizer [b]$gained Level Up(s)[/b].
";
$db->query("INSERT INTO inventory VALUES('',147,$userid,$gained)");
}
}
else
{
if(!$r['effect1_on'] && !$r['effect2_on'] && !$r['effect3_on'])
{
die("Sorry, this item cannot be used as it has no effect.");
}
}
You can change the code to suit you.
Enjoy.