array (size=6) 'Stat' => string 'item_absorbcold' (length=15) 'ID' => string '149' (length=3) 'descfunc' => string '1' (length=1) 'descval' => string '1' (length=1) 'descstrpos' => string 'ModStr5n' (length=8) 'String' => string 'Cold Absorb' (length=11) 'item_absorbcold_percent' => array (size=6) 'Stat' => string 'item_absorbcold_percent' (length=23) 'ID' => string '148' (length=3) 'descfunc' => string '2' (length=1) 'descval' => string '2' (length=1) 'descstrpos' => string 'ModStr5m' (length=8) 'String' => string 'Cold Absorb' (length=11) 'item_absorb_cold_perlevel' => array (size=6) 'Stat' => string 'item_absorb_cold_perlevel' (length=25) 'ID' => string '234' (length=3) 'descfunc' => string '6' (length=1) 'descval' => string '1' (length=1) 'descstrpos' => string 'ModStre9p' (length=9) 'String' => string 'Absorbs Cold Damage' (length=19) 'item_absorbfire' => array (size=6) 'Stat' => string 'item_absorbfire' (length=15) 'ID' => string '143' (length=3) 'descfunc' => string '1' (length=1) 'descval' => string '1' (length=1) 'descstrpos' => string 'ModStr5h' (length=8) 'String' => string 'Fire Absorb' (length=11) * * */ public $str = ''; // takes value, param. // value == Value to show on this stat //descfunc 14 public $skilltabsDesc; public $skilltabsDescClean; public $skilltabs = [ //ama '0' => 'StrSklTabItem3', '1' => 'StrSklTabItem2', '2' => 'StrSklTabItem1', // sor '3' => 'StrSklTabItem15', '4' => 'StrSklTabItem14', '5' => 'StrSklTabItem13', //nec '6' => 'StrSklTabItem8', '7' => 'StrSklTabItem7', '8' => 'StrSklTabItem9', //pal '9' => 'StrSklTabItem6', '10' => 'StrSklTabItem5', '11' => 'StrSklTabItem4', //bar '12' => 'StrSklTabItem11', '13' => 'StrSklTabItem12', '14' => 'StrSklTabItem10', //dru '15' => 'StrSklTabItem16', '16' => 'StrSklTabItem17', '17' => 'StrSklTabItem18', // ass '18' => 'StrSklTabItem19', '19' => 'StrSklTabItem20', '20' => 'StrSklTabItem21' ]; public function getDesc($value, $params = []) { if (empty($params)) return false; $v = '' . $value . ""; $s1 = $params['string1']; $s2 = $params['string2']; $par = $params['par']; $min = $params['min']; $max = $params['max']; foreach ($this->skilltabs as $s) { $sql = "SELECT `String` FROM `strings` WHERE `Key`='$s'"; $this->skilltabsDesc[] = PDO_FetchRow($sql); } foreach ($this->skilltabsDesc as $s) { $this->skilltabsDescClean[] = str_replace('+%d', '', $s); } //ddump($this->skilltabsDescClean); if ($params['descval'] == 1 || $params['descval'] == '') { if ($params['descfunc'] == 1) { $this->str = "+$v $s1"; } if ($params['descfunc'] == 2) { $this->str = "$v% $s1"; } if ($params['descfunc'] == 3) { $this->str = "$v $s1"; } if ($params['descfunc'] == 4) { $this->str = "+$v% $s1"; } if ($params['descfunc'] == 5) { $this->str = ($v * 100 / 128) . " $s1"; } if ($params['descfunc'] == 6) { $this->str = "+$v $s1 $s2"; } if ($params['descfunc'] == 7) { $this->str = "$v% $s1 $s2"; } if ($params['descfunc'] == 8) { $this->str = "+$v% $s1 $s2"; } if ($params['descfunc'] == 9) { $this->str = "$v $s1 $s2"; } if ($params['descfunc'] == 10) { $this->str = ($v * 100 / 128) . " $s1 $s2"; } if ($params['descfunc'] == 11) { $this->str = "Repairs 1 Durability In " . (100 / $value) . " seconds"; } if ($params['descfunc'] == 12) { $this->str = "+$v $s1"; } if ($params['descfunc'] == 13) { $this->str = "+$v to [class] Skill Levels"; } if ($params['descfunc'] == 14) { $sql = "SELECT class FROM `charstats` WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR `StrSkillTab2`='{$this->skilltabs[$par]}' OR `StrSkillTab3`='{$this->skilltabs[$par]}'"; $x = PDO_FetchOne($sql); $this->str = "+$min - $max{$this->skilltabsDescClean[$par]['String']} Skill Levels ([$x] Only)"; } if ($params['descfunc'] == 15) { $this->str = "[chance]% to case [slvl] [skill] on [event]"; } if ($params['descfunc'] == 16) { $this->str = "Level [sLvl] [skill] Aura When Equipped "; } if ($params['descfunc'] == 17) { $this->str = "$v $s1 (Increases near [time])"; } if ($params['descfunc'] == 18) { $this->str = "$v% $s1 (Increases near [time])"; } if ($params['descfunc'] == 19) { $this->str = ""; } if ($params['descfunc'] == 20) { $this->str = ($v * -1) . "% $s1"; } if ($params['descfunc'] == 21) { $this->str = ($v * -1) . " $s1"; } if ($params['descfunc'] == 22) { $this->str = "$v% $s1 [MonType]"; } if ($params['descfunc'] == 23) { $this->str = "$v% $s1 [Monster]"; } if ($params['descfunc'] == 24) { $this->str = "+$v to Skill Charges Or Something"; } if ($params['descfunc'] == 25) { $this->str = ""; } if ($params['descfunc'] == 26) { $this->str = ""; } if ($params['descfunc'] == 27) { $this->str = "+$v to [skill] ([class] Only)"; } if ($params['descfunc'] == 28) { $this->str = "+$v to [skill] "; } } else if ($params['descval'] == 0) { if ($params['descfunc'] == 1) { $this->str = "$s1"; } if ($params['descfunc'] == 2) { $this->str = "$s1"; } if ($params['descfunc'] == 3) { $this->str = "$s1"; } if ($params['descfunc'] == 4) { $this->str = "$s1"; } if ($params['descfunc'] == 5) { $this->str = "$s1"; } if ($params['descfunc'] == 6) { $this->str = "$s1 $s2"; } if ($params['descfunc'] == 7) { $this->str = "$s1 $s2"; } if ($params['descfunc'] == 8) { $this->str = "$s1 $s2"; } if ($params['descfunc'] == 9) { $this->str = "$s1 $s2"; } if ($params['descfunc'] == 10) { $this->str = "$s1 $s2"; } if ($params['descfunc'] == 11) { $this->str = "Repairs 1 Durability In X seconds"; } if ($params['descfunc'] == 12) { $this->str = "$s1"; } if ($params['descfunc'] == 13) { $this->str = "to [class] Skill Levels"; } if ($params['descfunc'] == 14) { $this->str = "to [skilltab] Skill Levels ([class] Only)"; } if ($params['descfunc'] == 15) { $this->str = "[chance]to case [slvl] [skill] on [event]"; } if ($params['descfunc'] == 16) { $this->str = "Level [sLvl] [skill] Aura When Equipped "; } if ($params['descfunc'] == 17) { $this->str = "$s1 (Increases near [time])"; } if ($params['descfunc'] == 18) { $this->str = "$s1 (Increases near [time])"; } if ($params['descfunc'] == 19) { $this->str = ""; } if ($params['descfunc'] == 20) { $this->str = "$s1"; } if ($params['descfunc'] == 21) { $this->str = "$s1"; } if ($params['descfunc'] == 22) { $this->str = "$s1 [MonType]"; } if ($params['descfunc'] == 23) { $this->str = "$s1 [Monster]"; } if ($params['descfunc'] == 24) { $this->str = "to Skill Charges Or Something"; } if ($params['descfunc'] == 25) { $this->str = ""; } if ($params['descfunc'] == 26) { $this->str = ""; } if ($params['descfunc'] == 27) { $this->str = "to [skill] ([class] Only)"; } if ($params['descfunc'] == 28) { $this->str = "to [skill] "; } } else if ($params['descval'] == 2) { if ($params['descfunc'] == 1) { $this->str = "$s1 +$v"; } if ($params['descfunc'] == 2) { $this->str = "$s1 $v%"; } if ($params['descfunc'] == 3) { $this->str = "$s1 $v"; } if ($params['descfunc'] == 4) { $this->str = "$s1 +$v%"; } if ($params['descfunc'] == 5) { $this->str = "$s1" . ($v * 100 / 128); } if ($params['descfunc'] == 6) { $this->str = "$s1 $s2 +%v"; } if ($params['descfunc'] == 7) { $this->str = "$s1 $s2 $v% "; } if ($params['descfunc'] == 8) { $this->str = "$s1 $s2 +$v% "; } if ($params['descfunc'] == 9) { $this->str = "$s1 $s2 $v"; } if ($params['descfunc'] == 10) { $this->str = "$s1 $s2" . ($v * 100 / 128); } if ($params['descfunc'] == 11) { $this->str = "Repairs 1 Durability In X seconds"; } if ($params['descfunc'] == 12) { $this->str = "$s1 +$v "; } if ($params['descfunc'] == 13) { $this->str = "to [class] Skill Levels +$v"; } if ($params['descfunc'] == 14) { $this->str = "to [skilltab] Skill Levels ([class] Only) +$v "; } if ($params['descfunc'] == 15) { $this->str = "[chance]% to case [slvl] [skill] on [event]"; } if ($params['descfunc'] == 16) { $this->str = "Level [sLvl] [skill] Aura When Equipped "; } if ($params['descfunc'] == 17) { $this->str = "s1 (Increases near [time]) $v $"; } if ($params['descfunc'] == 18) { $this->str = "$s1 (Increases near [time]) $v% "; } if ($params['descfunc'] == 19) { $this->str = ""; } if ($params['descfunc'] == 20) { $this->str = "% $s1" . ($v * -1); } if ($params['descfunc'] == 21) { $this->str = "$s1" . ($v * -1); } if ($params['descfunc'] == 22) { $this->str = "$s1 [MonType] $v% "; } if ($params['descfunc'] == 23) { $this->str = "s1 [Monster] $v% $"; } if ($params['descfunc'] == 24) { $this->str = "to Skill Charges Or Something +$v "; } if ($params['descfunc'] == 25) { $this->str = ""; } if ($params['descfunc'] == 26) { $this->str = ""; } if ($params['descfunc'] == 27) { $this->str = "+$v to [skill] ([class] Only)"; } if ($params['descfunc'] == 28) { $this->str = "+$v to [skill] "; } } return $this->str; } }