Ahoj kdo mi pomůže píše mi to pořád že nemám připojení k internetu nebo že probíha údržba/Hi there to help me write me all the time that I have no internet connection or be in the maintenance
Quote:
Where we reduce the price of weapons?
Sorry for my bad English
.
.
.
if ($option == "toilet" or $option == "dungeon"){
$itemMush = 0;
}
$item = array (
"item_type" => "1",
"item_id" => "1005",
"dmg_min" => "1",
"dmg_max" => "0",
"atr_type_1" => "0",
"atr_type_2" => "0",
"atr_type_3" => "0",
"atr_val_1" => "0",
"atr_val_2" => "0",
"atr_val_3" => "0",
"gold" => rand($lvl * 100, $lvl * 10000), //this is the price of an item. random value between lvl*100 and lvl*10000
"mush" => $itemMush,
"slot" => "0",
"owner_id" => $itemOwner
);
if ($shop == 0) {
$type = rand ( 1, 7 );
while ( $class != 1 && $type == 2 )
$type = rand ( 1, 7 );
$item ['item_type'] = $type;
$random = rand ( 1, $shakes_item_ids [$class - 1] [$type - 1] );
if ($epicRand == 1){
.
.
.
Did you edited PDO? I mean this:Quote:
Quote:
// generate new quests
$quests = array ();
for($i = 0; $i < 3; $i ++) {
// multiplier
$m = mt_rand ( 900, 1100 ) / 1000;
// random length
$l = rand(1, 4);
$quests [] = array (
$db_data ['lvl'] * rand(100, 1000),
getQuestExp ( $db_data ['lvl'] ) * $l * $m,
$l
);
}
Quote:
How to add mushrooms to fall out of quests?
function finishQuest($db_data){
.
.
.
// generate new quests
$quests = array ();
for($i = 0; $i < 3; $i ++) {
// multiplier
$m = mt_rand ( 900, 1100 ) / 1000;
// random length
$l = rand(1, 4);
$quests [] = array (
$db_data ['lvl'] * rand(100, 1000),
getQuestExp ( $db_data ['lvl'] ) * $l * $m,
$l
);
}
$mushRand = rand(1, 25); //4% chance for mushroom
if ($mushRand == 1){
$addMush = 1; //reward 1 mush
} else {
$addMush = 0;
}
// update database
$qry = $db->prepare ( "UPDATE user_data SET
silver = :silver,
exp = :exp,
lvl = :lvl,
mushroom = mushroom + $addMush,
status = 0,
thirst = :awa,
quest_gold_1 = :qg1,
quest_gold_2 = :qg2,
quest_gold_3 = :qg3,
quest_exp_1 = :qe1,
quest_exp_2 = :qe2,
quest_exp_3 = :qe3,
quest_dur_1 = :qd1,
quest_dur_2 = :qd2,
quest_dur_3 = :qd3
WHERE ssid = :ssid" );
$qry->bindParam ( ':ssid', $SSID );
$qry->bindParam ( ':silver', $db_data ['silver'] );
$qry->bindParam ( ':exp', $db_data ['exp'] );
$qry->bindParam ( ':lvl', $db_data ['lvl'] );
$qry->bindParam ( ':awa', $db_data ['thirst'] );
$i = 1;
foreach ( $quests as $q ) {
$qry->bindParam ( ':qg' . $i, $q [0] );
$qry->bindParam ( ':qe' . $i, $q [1] );
$qry->bindParam ( ':qd' . $i, $q [2] );
$i ++;
}
$qry->execute ();
// var_dump($qry -> errorInfo());
}