Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'playeradventurefinished':
- $acc = new Account(null, null, false, true);
- // Fix by Greg
- if ($acc->data['status_extra'] == 0)
- exit_fixed();
- //see if skipped, take mushrooms
- if($args[0] == 1)
- if($acc->data['status_time'] > time() && $acc->data['mush'] <= 0)
- exit_fixed('Error:need more coins');
- else if($args[0] == 2)
- if($acc->data['status_time'] > time() && $acc->data['hg'] <= 0)
- exit_fixed('Error:need more coins');
- // Fix by MDMB hourglass with - number
- if($args[0] == 2){
- if ($acc->data['hg'] < 1){
- exit_fixed('mdmb tu byl');
- }
- }
- // Fix by MDMB missions 0 sec
- if($args[0] == 1){
- if($time < $acc->data['status_time']){
- exit_fixed('mdmb tu byl');
- }
- }
- switch($acc->data['class']) {
- case "1" :
- $w = $acc->data['str'];
- break;
- case "2" :
- $w = $acc->data['dex'];
- break;
- case "3" :
- $w = $acc->data['intel'];
- break;
- case "4" :
- $w = $acc->data['dex'];
- break;
- case "5" :
- $w = $acc->data['str'];
- break;
- case "6" :
- $w = $acc->data['str'];
- break;
- }
- $dmg_min = 2 * $w;
- $dmg_max = intval(strval(2.1 * $w));
- $hp = intval(strval( ($acc->data['wit'] / 10) * 4 * ($acc->data['lvl'] + 1) ));
- $mob_c = rand(1, 2);
- if ($mob_c == 2)
- $mob_c = 3;
- //TODO: generate this somewhere
- // ($lvl, $class, $str, $agi, $int, $wit, $luck, $dmg_min, $dmg_max, $hp, $armor, $id, $exp, $weapon_id, $shield_id = 0)
- $monsterID = ($acc->data['quest_exp'.$acc->data['status_extra']] % 163) + 1;
- $monster = new Monster($acc->data['lvl'], $mob_c, ($acc->data['str'] / 2), ($acc->data['dex'] / 2), ($acc->data['intel'] / 2), ($acc->data['wit'] / 2), ($acc->data['luck'] / 2), $dmg_min, $dmg_max, $hp, 1, -$monsterID, 1, 10);
- //$bg = rand(11,21);
- $extra = $acc->data["status_extra"];
- $bg = $acc->questBackground($acc->data['quest_exp'.$extra]);
- $ret[] = "fightheader.fighters:1/0/0/".$bg."/0/".$acc->getFightHeader().$monster->getFightHeader();
- $simulation = new Simulation($acc, $monster);
- $simulation->simulate();
- $win = $simulation->winnerID == $acc->data['ID'];
- $ret[] = "fight.r:".$simulation->fightLog;
- $ret[] = "winnerid:".$simulation->winnerID;
- $ret[] = "fightresult.battlereward:".$acc->questFinish($win, $monsterID, $args[0]);
- $ret[] = "Success:";
- if (isset($RENEW))
- $acc = new Account(null, null, false, true);
- $ret[] = "ownplayersave.playerSave:".$acc->getPlayerSave();
- if($acc->hasAlbum())
- $ret[] = "achievement(140):".$acc->getAchievements();
- $ret[] = "timestamp:".time();
- if(($fortressBackpackSize = $acc->getFortressBackpackSize()) > 0)
- $ret[] = "fortresschest.item(".$fortressBackpackSize."):".$acc->getFortressBackpackSave();
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement