seany123 Posted April 24, 2009 Share Posted April 24, 2009 I have a page which basically does queries depending on different values of the player... i wanted to include this into the page so i could use $maxexpgain in the queries. included file... <?php if($player->maxlevel + 1) == "2" ( $maxexpgain = 988; ) else if($player->maxlevel + 1) == "3" ( $maxexpgain = 1482; ) else if($player->maxlevel + 1) == "4" ( $maxexpgain = 1976; ) else if($player->maxlevel + 1) == "5" ( $maxexpgain = 2471; ) else if($player->maxlevel + 1) == "6" ( $maxexpgain = 2965; ) else if($player->maxlevel + 1) == "7" ( $maxexpgain = 3459; ) else if($player->maxlevel + 1) == "8" ( $maxexpgain = 3953; ) else if($player->maxlevel + 1) == "9" ( $maxexpgain = 4447; ) else if($player->maxlevel + 1) == "10" ( $maxexpgain = 4941; ) else if($player->maxlevel + 1) == "11" ( $maxexpgain = 5435; ) else if($player->maxlevel + 1) == "12" ( $maxexpgain = 5929; ) else if($player->maxlevel + 1) == "13" ( $maxexpgain = 6424; ) else if($player->maxlevel + 1) == "14" ( $maxexpgain = 6918; ) else if($player->maxlevel + 1) == "15" ( $maxexpgain = 7412; ) else if($player->maxlevel + 1) == "16" ( $maxexpgain = 7906; ) else if($player->maxlevel + 1) == "17" ( $maxexpgain = 8400; ) else if($player->maxlevel + 1) == "18" ( $maxexpgain = 8894; ) else if($player->maxlevel + 1) == "19" ( $maxexpgain = 9388; ) else if($player->maxlevel + 1) == "20" ( $maxexpgain = 9882; ) else if($player->maxlevel + 1) == "21" ( $maxexpgain = 10376; ) else if($player->maxlevel + 1) == "22" ( $maxexpgain = 10871; ) else if($player->maxlevel + 1) == "23" ( $maxexpgain = 11365; ) else if($player->maxlevel + 1) == "24" ( $maxexpgain = 11859; ) else if($player->maxlevel + 1) == "25" ( $maxexpgain = 12353; ) else if($player->maxlevel + 1) == "26" ( $maxexpgain = 12847; ) else if($player->maxlevel + 1) == "27" ( $maxexpgain = 13341; ) else if($player->maxlevel + 1) == "28" ( $maxexpgain = 13835; ) else if($player->maxlevel + 1) == "29" ( $maxexpgain = 14329; ) else if($player->maxlevel + 1) == "30" ( $maxexpgain = 14824; ) else if($player->maxlevel + 1) == "31" ( $maxexpgain = 15318; ) else if($player->maxlevel + 1) == "32" ( $maxexpgain = 15812; ) else if($player->maxlevel + 1) == "33" ( $maxexpgain = 16306; ) else if($player->maxlevel + 1) == "34" ( $maxexpgain = 16800; ) else if($player->maxlevel + 1) == "35" ( $maxexpgain = 17294; ) else if($player->maxlevel + 1) == "36" ( $maxexpgain = 17788; ) else if($player->maxlevel + 1) == "37" ( $maxexpgain = 18282; ) else if($player->maxlevel + 1) == "38" ( $maxexpgain = 18776; ) else if($player->maxlevel + 1) == "39" ( $maxexpgain = 19271; ) else if($player->maxlevel + 1) == "40" ( $maxexpgain = 19765; ) else if($player->maxlevel + 1) == "40" ( $maxexpgain = 19765; ) else if($player->maxlevel + 1) == "41" ( $maxexpgain = 20259; ) else if($player->maxlevel + 1) == "42" ( $maxexpgain = 20753; ) else if($player->maxlevel + 1) == "43" ( $maxexpgain = 21247; ) else if($player->maxlevel + 1) == "44" ( $maxexpgain = 21741; ) else if($player->maxlevel + 1) == "45" ( $maxexpgain = 22235; ) else if($player->maxlevel + 1) == "46" ( $maxexpgain = 22729; ) else if($player->maxlevel + 1) == "47" ( $maxexpgain = 23224; ) else if($player->maxlevel + 1) == "48" ( $maxexpgain = 23718; ) else if($player->maxlevel + 1) == "49" ( $maxexpgain = 24212; ) else if($player->maxlevel + 1) == "50" ( $maxexpgain = 24706; ) else if($player->maxlevel + 1) == "51" ( $maxexpgain = 25200; ) else if($player->maxlevel + 1) == "52" ( $maxexpgain = 25694; ) else if($player->maxlevel + 1) == "53" ( $maxexpgain = 26188; ) else if($player->maxlevel + 1) == "54" ( $maxexpgain = 26682; ) else if($player->maxlevel + 1) == "55" ( $maxexpgain = 27176; ) else if($player->maxlevel + 1) == "56" ( $maxexpgain = 27671; ) else if($player->maxlevel + 1) == "57" ( $maxexpgain = 28165; ) else if($player->maxlevel + 1) == "58" ( $maxexpgain = 28659; ) else if($player->maxlevel + 1) == "59" ( $maxexpgain = 29153; ) else if($player->maxlevel + 1) == "60" ( $maxexpgain = 29647; ) else if($player->maxlevel + 1) == "61" ( $maxexpgain = 30141; ) else if($player->maxlevel + 1) == "62" ( $maxexpgain = 30635; ) else if($player->maxlevel + 1) == "63" ( $maxexpgain = 31129; ) else if($player->maxlevel + 1) == "64" ( $maxexpgain = 31624; ) else if($player->maxlevel + 1) == "65" ( $maxexpgain = 32118; ) else if($player->maxlevel + 1) == "66" ( $maxexpgain = 32612; ) else if($player->maxlevel + 1) == "67" ( $maxexpgain = 33106; ) else if($player->maxlevel + 1) == "68" ( $maxexpgain = 33600; ) else if($player->maxlevel + 1) == "69" ( $maxexpgain = 34094; ) else if($player->maxlevel + 1) == "70" ( $maxexpgain = 34588; ) else if($player->maxlevel + 1) == "71" ( $maxexpgain = 35082; ) else if($player->maxlevel + 1) == "72" ( $maxexpgain = 35576; ) else if($player->maxlevel + 1) == "73" ( $maxexpgain = 36071; ) else if($player->maxlevel + 1) == "74" ( $maxexpgain = 36565; ) else if($player->maxlevel + 1) == "75" ( $maxexpgain = 37059; ) else if($player->maxlevel + 1) == "76" ( $maxexpgain = 37553; ) else if($player->maxlevel + 1) == "77" ( $maxexpgain = 38047; ) else if($player->maxlevel + 1) == "78" ( $maxexpgain = 38541; ) else if($player->maxlevel + 1) == "79" ( $maxexpgain = 39035; ) else if($player->maxlevel + 1) == "80" ( $maxexpgain = 39529; ) else if($player->maxlevel + 1) == "81" ( $maxexpgain = 40024; ) else if($player->maxlevel + 1) == "82" ( $maxexpgain = 40518; ) else if($player->maxlevel + 1) == "83" ( $maxexpgain = 41012; ) else if($player->maxlevel + 1) == "84" ( $maxexpgain = 41506; ) else if($player->maxlevel + 1) == "85" ( $maxexpgain = 42000; ) else if($player->maxlevel + 1) == "86" ( $maxexpgain = 42494; ) else if($player->maxlevel + 1) == "87" ( $maxexpgain = 42988; ) else if($player->maxlevel + 1) == "88" ( $maxexpgain = 43482; ) else if($player->maxlevel + 1) == "89" ( $maxexpgain = 43976; ) else if($player->maxlevel + 1) == "90" ( $maxexpgain = 44471; ) else if($player->maxlevel + 1) == "91" ( $maxexpgain = 44965; ) else if($player->maxlevel + 1) == "92" ( $maxexpgain = 45459; ) else if($player->maxlevel + 1) == "93" ( $maxexpgain = 45953; ) else if($player->maxlevel + 1) == "94" ( $maxexpgain = 46447; ) else if($player->maxlevel + 1) == "95" ( $maxexpgain = 46941; ) else if($player->maxlevel + 1) == "96" ( $maxexpgain = 47435; ) else if($player->maxlevel + 1) == "97" ( $maxexpgain = 47929; ) else if($player->maxlevel + 1) == "98" ( $maxexpgain = 48424; ) else if($player->maxlevel + 1) == "99" ( $maxexpgain = 48918; ) else if($player->maxlevel + 1) == "100" ( $maxexpgain = 49412; ) else if($player->maxlevel + 1) == "101" ( $maxexpgain = 49906; ) else if($player->maxlevel + 1) == "102" ( $maxexpgain = 50400; ) else if($player->maxlevel + 1) == "103" ( $maxexpgain = 50894; ) else if($player->maxlevel + 1) == "104" ( $maxexpgain = 51388; ) else if($player->maxlevel + 1) == "105" ( $maxexpgain = 51882; ) else if($player->maxlevel + 1) == "106" ( $maxexpgain = 52376; ) else if($player->maxlevel + 1) == "107" ( $maxexpgain = 52871; ) else if($player->maxlevel + 1) == "108" ( $maxexpgain = 53365; ) else if($player->maxlevel + 1) == "109" ( $maxexpgain = 53859; ) else if($player->maxlevel + 1) == "110" ( $maxexpgain = 54353; ) else if($player->maxlevel + 1) == "111" ( $maxexpgain = 54847; ) else if($player->maxlevel + 1) == "112" ( $maxexpgain = 55341; ) else if($player->maxlevel + 1) == "113" ( $maxexpgain = 55835; ) else if($player->maxlevel + 1) == "114" ( $maxexpgain = 56329; ) else if($player->maxlevel + 1) == "115" ( $maxexpgain = 56824; ) else if($player->maxlevel + 1) == "116" ( $maxexpgain = 57318; ) else if($player->maxlevel + 1) == "117" ( $maxexpgain = 57812; ) else if($player->maxlevel + 1) == "118" ( $maxexpgain = 58306; ) else if($player->maxlevel + 1) == "119" ( $maxexpgain = 58800; ) else if($player->maxlevel + 1) == "120" ( $maxexpgain = 59294; ) else if($player->maxlevel + 1) == "121" ( $maxexpgain = 59788; ) else if($player->maxlevel + 1) == "122" ( $maxexpgain = 60282; ) else if($player->maxlevel + 1) == "123" ( $maxexpgain = 60776; ) else if($player->maxlevel + 1) == "124" ( $maxexpgain = 61271; ) else if($player->maxlevel + 1) == "125" ( $maxexpgain = 61765; ) else if($player->maxlevel + 1) == "126" ( $maxexpgain = 62259; ) else if($player->maxlevel + 1) == "127" ( $maxexpgain = 62753; ) else if($player->maxlevel + 1) == "128" ( $maxexpgain = 63247; ) else if($player->maxlevel + 1) == "129" ( $maxexpgain = 63741; ) else if($player->maxlevel + 1) == "130" ( $maxexpgain = 64235; ) else if($player->maxlevel + 1) == "131" ( $maxexpgain = 64729; ) else if($player->maxlevel + 1) == "132" ( $maxexpgain = 65224; ) else if($player->maxlevel + 1) == "133" ( $maxexpgain = 65718; ) else if($player->maxlevel + 1) == "134" ( $maxexpgain = 66212; ) else if($player->maxlevel + 1) == "135" ( $maxexpgain = 66706; ) else if($player->maxlevel + 1) == "136" ( $maxexpgain = 67200; ) else if($player->maxlevel + 1) == "137" ( $maxexpgain = 67694; ) else if($player->maxlevel + 1) == "138" ( $maxexpgain = 68188; ) else if($player->maxlevel + 1) == "139" ( $maxexpgain = 68682; ) else if($player->maxlevel + 1) == "140" ( $maxexpgain = 69176; ) else if($player->maxlevel + 1) == "141" ( $maxexpgain = 69671; ) else if($player->maxlevel + 1) == "142" ( $maxexpgain = 70165; ) else if($player->maxlevel + 1) == "143" ( $maxexpgain = 70659; ) else if($player->maxlevel + 1) == "144" ( $maxexpgain = 71153; ) else if($player->maxlevel + 1) == "145" ( $maxexpgain = 71647; ) else if($player->maxlevel + 1) == "146" ( $maxexpgain = 72151; ) else if($player->maxlevel + 1) == "147" ( $maxexpgain = 72635; ) else if($player->maxlevel + 1) == "148" ( $maxexpgain = 73129; ) else if($player->maxlevel + 1) == "149" ( $maxexpgain = 73624; ) else if($player->maxlevel + 1) == "150" ( $maxexpgain = 74118; ) else if($player->maxlevel + 1) == "151" ( $maxexpgain = 74612; ) else if($player->maxlevel + 1) == "152" ( $maxexpgain = 75106; ) else if($player->maxlevel + 1) == "153" ( $maxexpgain = 75600; ) else if($player->maxlevel + 1) == "154" ( $maxexpgain = 76094; ) else if($player->maxlevel + 1) == "155" ( $maxexpgain = 76588; ) else if($player->maxlevel + 1) == "156" ( $maxexpgain = 77082; ) else if($player->maxlevel + 1) == "157" ( $maxexpgain = 77576; ) else if($player->maxlevel + 1) == "158" ( $maxexpgain = 78071; ) else if($player->maxlevel + 1) == "159" ( $maxexpgain = 78565; ) else if($player->maxlevel + 1) == "160" ( $maxexpgain = 79059; ) else if($player->maxlevel + 1) == "161" ( $maxexpgain = 79553; ) else if($player->maxlevel + 1) == "162" ( $maxexpgain = 80047; ) else if($player->maxlevel + 1) == "163" ( $maxexpgain = 80541; ) else if($player->maxlevel + 1) == "164" ( $maxexpgain = 81035; ) else if($player->maxlevel + 1) == "165" ( $maxexpgain = 81529; ) else if($player->maxlevel + 1) == "166" ( $maxexpgain = 82024; ) else if($player->maxlevel + 1) == "167" ( $maxexpgain = 82518; ) else if($player->maxlevel + 1) == "168" ( $maxexpgain = 83012; ) else if($player->maxlevel + 1) == "169" ( $maxexpgain = 83506; ) else if($player->maxlevel + 1) == "170" ( $maxexpgain = 84000; ) else if($player->maxlevel + 1) == "171" ( $maxexpgain = 84494; ) else if($player->maxlevel + 1) == "172" ( $maxexpgain = 84988; ) else if($player->maxlevel + 1) == "173" ( $maxexpgain = 85482; ) else if($player->maxlevel + 1) == "174" ( $maxexpgain = 85976; ) else if($player->maxlevel + 1) == "175" ( $maxexpgain = 86471; ) else if($player->maxlevel + 1) == "176" ( $maxexpgain = 86965; ) else if($player->maxlevel + 1) == "177" ( $maxexpgain = 87459; ) else if($player->maxlevel + 1) == "178" ( $maxexpgain = 87953; ) else if($player->maxlevel + 1) == "179" ( $maxexpgain = 88447; ) else if($player->maxlevel + 1) == "180" ( $maxexpgain = 88941; ) else if($player->maxlevel + 1) == "181" ( $maxexpgain = 89435; ) else if($player->maxlevel + 1) == "182" ( $maxexpgain = 89929; ) else if($player->maxlevel + 1) == "183" ( $maxexpgain = 90424; ) else if($player->maxlevel + 1) == "184" ( $maxexpgain = 90918; ) else if($player->maxlevel + 1) == "185" ( $maxexpgain = 91412; ) else if($player->maxlevel + 1) == "186" ( $maxexpgain = 91906; ) else if($player->maxlevel + 1) == "187" ( $maxexpgain = 92400; ) else if($player->maxlevel + 1) == "188" ( $maxexpgain = 92894; ) else if($player->maxlevel + 1) == "189" ( $maxexpgain = 93388; ) else if($player->maxlevel + 1) == "190" ( $maxexpgain = 93882; ) else if($player->maxlevel + 1) == "191" ( $maxexpgain = 94376; ) else if($player->maxlevel + 1) == "192" ( $maxexpgain = 94871; ) else if($player->maxlevel + 1) == "193" ( $maxexpgain = 95365; ) else if($player->maxlevel + 1) == "194" ( $maxexpgain = 95859; ) else if($player->maxlevel + 1) == "195" ( $maxexpgain = 96353; ) else if($player->maxlevel + 1) == "196" ( $maxexpgain = 96847; ) else if($player->maxlevel + 1) == "197" ( $maxexpgain = 97341; ) else if($player->maxlevel + 1) == "198" ( $maxexpgain = 97835; ) else if($player->maxlevel + 1) == "199" ( $maxexpgain = 98329; ) else if($player->maxlevel + 1) == "200" ( $maxexpgain = 98824; ) else if($player->maxlevel + 1) == "201" ( $maxexpgain = 99318; ) else if($player->maxlevel + 1) == "202" ( $maxexpgain = 99812; ) else if($player->maxlevel + 1) == "203" ( $maxexpgain = 100306; ) else if($player->maxlevel + 1) == "204" ( $maxexpgain = 100800; ) else if($player->maxlevel + 1) == "205" ( $maxexpgain = 101294; ) else if($player->maxlevel + 1) == "206" ( $maxexpgain = 101788; ) else if($player->maxlevel + 1) == "207" ( $maxexpgain = 102282; ) else if($player->maxlevel + 1) == "208" ( $maxexpgain = 102776; ) else if($player->maxlevel + 1) == "209" ( $maxexpgain = 103271; ) else if($player->maxlevel + 1) == "210" ( $maxexpgain = 103765; ) else if($player->maxlevel + 1) == "211" ( $maxexpgain = 104259; ) else if($player->maxlevel + 1) == "212" ( $maxexpgain = 104753; ) else if($player->maxlevel + 1) == "213" ( $maxexpgain = 105247; ) else if($player->maxlevel + 1) == "214" ( $maxexpgain = 105741; ) else if($player->maxlevel + 1) == "215" ( $maxexpgain = 106235; ) else if($player->maxlevel + 1) == "216" ( $maxexpgain = 106729; ) else if($player->maxlevel + 1) == "217" ( $maxexpgain = 107224; ) else if($player->maxlevel + 1) == "218" ( $maxexpgain = 107718; ) else if($player->maxlevel + 1) == "219" ( $maxexpgain = 108212; ) else if($player->maxlevel + 1) == "220" ( $maxexpgain = 108706; ) else if($player->maxlevel + 1) == "221" ( $maxexpgain = 109200; ) else if($player->maxlevel + 1) == "222" ( $maxexpgain = 109694; ) else if($player->maxlevel + 1) == "223" ( $maxexpgain = 110118; ) else if($player->maxlevel + 1) == "224" ( $maxexpgain = 110682; ) else if($player->maxlevel + 1) == "225" ( $maxexpgain = 111176; ) else if($player->maxlevel + 1) == "226" ( $maxexpgain = 111671; ) else if($player->maxlevel + 1) == "227" ( $maxexpgain = 112165; ) else if($player->maxlevel + 1) == "228" ( $maxexpgain = 112659; ) else if($player->maxlevel + 1) == "229" ( $maxexpgain = 113153; ) else if($player->maxlevel + 1) == "230" ( $maxexpgain = 113647; ) else if($player->maxlevel + 1) == "231" ( $maxexpgain = 114141; ) else if($player->maxlevel + 1) == "232" ( $maxexpgain = 114635; ) else if($player->maxlevel + 1) == "233" ( $maxexpgain = 115129; ) else if($player->maxlevel + 1) == "234" ( $maxexpgain = 115624; ) else if($player->maxlevel + 1) == "235" ( $maxexpgain = 116118; ) else if($player->maxlevel + 1) == "236" ( $maxexpgain = 116612; ) else if($player->maxlevel + 1) == "237" ( $maxexpgain = 117106; ) else if($player->maxlevel + 1) == "238" ( $maxexpgain = 117600; ) else if($player->maxlevel + 1) == "239" ( $maxexpgain = 118094; ) else if($player->maxlevel + 1) == "240" ( $maxexpgain = 118588; ) else if($player->maxlevel + 1) == "241" ( $maxexpgain = 119082; ) else if($player->maxlevel + 1) == "242" ( $maxexpgain = 119576; ) else if($player->maxlevel + 1) == "243" ( $maxexpgain = 120071; ) else if($player->maxlevel + 1) == "244" ( $maxexpgain = 120565; ) else if($player->maxlevel + 1) == "245" ( $maxexpgain = 121059; ) else if($player->maxlevel + 1) == "246" ( $maxexpgain = 121553; ) else if($player->maxlevel + 1) == "247" ( $maxexpgain = 122047; ) else if($player->maxlevel + 1) == "248" ( $maxexpgain = 122541; ) else if($player->maxlevel + 1) == "249" ( $maxexpgain = 123035; ) else if($player->maxlevel + 1) == "250" ( $maxexpgain = 123529; ) else if($player->maxlevel + 1) == "251" ( $maxexpgain = 124024; ) else if($player->maxlevel + 1) == "252" ( $maxexpgain = 124518; ) else if($player->maxlevel + 1) == "253" ( $maxexpgain = 125012; ) else if($player->maxlevel + 1) == "254" ( $maxexpgain = 125506; ) else if($player->maxlevel + 1) == "255" ( $maxexpgain = 126000; ) else if($player->maxlevel + 1) == "256" ( $maxexpgain = 126494; ) else if($player->maxlevel + 1) == "257" ( $maxexpgain = 126988; ) else if($player->maxlevel + 1) == "258" ( $maxexpgain = 127482; ) else if($player->maxlevel + 1) == "259" ( $maxexpgain = 127976; ) else if($player->maxlevel + 1) == "260" ( $maxexpgain = 128471; ) else if($player->maxlevel + 1) == "261" ( $maxexpgain = 128965; ) else if($player->maxlevel + 1) == "262" ( $maxexpgain = 129459; ) else if($player->maxlevel + 1) == "263" ( $maxexpgain = 129953; ) else if($player->maxlevel + 1) == "264" ( $maxexpgain = 130447; ) else if($player->maxlevel + 1) == "265" ( $maxexpgain = 130941; ) else if($player->maxlevel + 1) == "266" ( $maxexpgain = 131435; ) else if($player->maxlevel + 1) == "267" ( $maxexpgain = 131929; ) else if($player->maxlevel + 1) == "268" ( $maxexpgain = 132424; ) else if($player->maxlevel + 1) == "269" ( $maxexpgain = 132918; ) else if($player->maxlevel + 1) == "270" ( $maxexpgain = 133412; ) else if($player->maxlevel + 1) == "271" ( $maxexpgain = 133906; ) else if($player->maxlevel + 1) == "272" ( $maxexpgain = 134400; ) else if($player->maxlevel + 1) == "273" ( $maxexpgain = 134894; ) else if($player->maxlevel + 1) == "274" ( $maxexpgain = 135388; ) else if($player->maxlevel + 1) == "275" ( $maxexpgain = 135882; ) else if($player->maxlevel + 1) == "276" ( $maxexpgain = 136376; ) else if($player->maxlevel + 1) == "277" ( $maxexpgain = 136871; ) else if($player->maxlevel + 1) == "278" ( $maxexpgain = 137365; ) else if($player->maxlevel + 1) == "279" ( $maxexpgain = 137859; ) else if($player->maxlevel + 1) == "280" ( $maxexpgain = 138353; ) else if($player->maxlevel + 1) == "281" ( $maxexpgain = 138847; ) else if($player->maxlevel + 1) == "282" ( $maxexpgain = 139341; ) else if($player->maxlevel + 1) == "283" ( $maxexpgain = 139835; ) else if($player->maxlevel + 1) == "284" ( $maxexpgain = 140329; ) else if($player->maxlevel + 1) == "285" ( $maxexpgain = 140824; ) else if($player->maxlevel + 1) == "286" ( $maxexpgain = 141318; ) else if($player->maxlevel + 1) == "287" ( $maxexpgain = 141812; ) else if($player->maxlevel + 1) == "288" ( $maxexpgain = 142306; ) else if($player->maxlevel + 1) == "289" ( $maxexpgain = 142800; ) else if($player->maxlevel + 1) == "290" ( $maxexpgain = 143294; ) else if($player->maxlevel + 1) == "291" ( $maxexpgain = 143788; ) else if($player->maxlevel + 1) == "292" ( $maxexpgain = 144282; ) else if($player->maxlevel + 1) == "293" ( $maxexpgain = 144776; ) else if($player->maxlevel + 1) == "294" ( $maxexpgain = 145271; ) else if($player->maxlevel + 1) == "295" ( $maxexpgain = 145765; ) else if($player->maxlevel + 1) == "296" ( $maxexpgain = 146259; ) else if($player->maxlevel + 1) == "297" ( $maxexpgain = 146753; ) else if($player->maxlevel + 1) == "298" ( $maxexpgain = 147247; ) else if($player->maxlevel + 1) == "299" ( $maxexpgain = 147741; ) else if($player->maxlevel + 1) == "300" ( $maxexpgain = 163059; ) else if($player->maxlevel + 1) == "301" ( $maxexpgain = 163899; ) else if($player->maxlevel + 1) == "302" ( $maxexpgain = 164743; ) else if($player->maxlevel + 1) == "303" ( $maxexpgain = 165588; ) else if($player->maxlevel + 1) == "304" ( $maxexpgain = 166435; ) else if($player->maxlevel + 1) == "305" ( $maxexpgain = 167284; ) else if($player->maxlevel + 1) == "306" ( $maxexpgain = 168134; ) else if($player->maxlevel + 1) == "307" ( $maxexpgain = 168987; ) else if($player->maxlevel + 1) == "308" ( $maxexpgain = 169842; ) else if($player->maxlevel + 1) == "309" ( $maxexpgain = 170698; ) else if($player->maxlevel + 1) == "310" ( $maxexpgain = 171557; ) else if($player->maxlevel + 1) == "311" ( $maxexpgain = 172419; ) else if($player->maxlevel + 1) == "312" ( $maxexpgain = 173281; ) else if($player->maxlevel + 1) == "313" ( $maxexpgain = 174146; ) else if($player->maxlevel + 1) == "314" ( $maxexpgain = 175013; ) else if($player->maxlevel + 1) == "315" ( $maxexpgain = 175881; ) else if($player->maxlevel + 1) == "316" ( $maxexpgain = 176752; ) else if($player->maxlevel + 1) == "317" ( $maxexpgain = 177624; ) else if($player->maxlevel + 1) == "318" ( $maxexpgain = 178499; ) else if($player->maxlevel + 1) == "319" ( $maxexpgain = 179376; ) else if($player->maxlevel + 1) == "320" ( $maxexpgain = 180255; ) else if($player->maxlevel + 1) == "321" ( $maxexpgain = 181135; ) else if($player->maxlevel + 1) == "322" ( $maxexpgain = 182017; ) else if($player->maxlevel + 1) == "323" ( $maxexpgain = 182902; ) else if($player->maxlevel + 1) == "324" ( $maxexpgain = 183788; ) else if($player->maxlevel + 1) == "325" ( $maxexpgain = 184676; ) else if($player->maxlevel + 1) == "326" ( $maxexpgain = 185556; ) else if($player->maxlevel + 1) == "327" ( $maxexpgain = 186459; ) else if($player->maxlevel + 1) == "328" ( $maxexpgain = 187354; ) else if($player->maxlevel + 1) == "329" ( $maxexpgain = 188250; ) else if($player->maxlevel + 1) == "330" ( $maxexpgain = 189148; ) else if($player->maxlevel + 1) == "331" ( $maxexpgain = 190049; ) else if($player->maxlevel + 1) == "332" ( $maxexpgain = 190951; ) else if($player->maxlevel + 1) == "333" ( $maxexpgain = 191855; ) else if($player->maxlevel + 1) == "334" ( $maxexpgain = 192761; ) else if($player->maxlevel + 1) == "335" ( $maxexpgain = 193669; ) else if($player->maxlevel + 1) == "336" ( $maxexpgain = 194580; ) else if($player->maxlevel + 1) == "337" ( $maxexpgain = 195492; ) else if($player->maxlevel + 1) == "338" ( $maxexpgain = 196406; ) else if($player->maxlevel + 1) == "339" ( $maxexpgain = 197322; ) else if($player->maxlevel + 1) == "340" ( $maxexpgain = 198240; ) else if($player->maxlevel + 1) == "341" ( $maxexpgain = 199160; ) else if($player->maxlevel + 1) == "342" ( $maxexpgain = 201006; ) else if($player->maxlevel + 1) == "343" ( $maxexpgain = 201006; ) else if($player->maxlevel + 1) == "344" ( $maxexpgain = 201931; ) else if($player->maxlevel + 1) == "345" ( $maxexpgain = 202860; ) else if($player->maxlevel + 1) == "346" ( $maxexpgain = 203790; ) else if($player->maxlevel + 1) == "347" ( $maxexpgain = 204722; ) else if($player->maxlevel + 1) == "348" ( $maxexpgain = 205656; ) else if($player->maxlevel + 1) == "349" ( $maxexpgain = 206592; ) else if($player->maxlevel + 1) == "350" ( $maxexpgain = 259412; ) else if($player->maxlevel + 1) == "351" ( $maxexpgain = 260499; ) else if($player->maxlevel + 1) == "352" ( $maxexpgain = 261589; ) else if($player->maxlevel + 1) == "353" ( $maxexpgain = 262683; ) else if($player->maxlevel + 1) == "354" ( $maxexpgain = 263776; ) else if($player->maxlevel + 1) == "355" ( $maxexpgain = 264872; ) else if($player->maxlevel + 1) == "356" ( $maxexpgain = 265970; ) else if($player->maxlevel + 1) == "357" ( $maxexpgain = 267070; ) else if($player->maxlevel + 1) == "358" ( $maxexpgain = 268171; ) else if($player->maxlevel + 1) == "359" ( $maxexpgain = 269275; ) else if($player->maxlevel + 1) == "360" ( $maxexpgain = 270381; ) else if($player->maxlevel + 1) == "361" ( $maxexpgain = 271488; ) else if($player->maxlevel + 1) == "362" ( $maxexpgain = 272599; ) else if($player->maxlevel + 1) == "363" ( $maxexpgain = 273711; ) else if($player->maxlevel + 1) == "364" ( $maxexpgain = 274825; ) else if($player->maxlevel + 1) == "365" ( $maxexpgain = 275940; ) else if($player->maxlevel + 1) == "366" ( $maxexpgain = 277058; ) else if($player->maxlevel + 1) == "367" ( $maxexpgain = 278177; ) else if($player->maxlevel + 1) == "368" ( $maxexpgain = 279299; ) else if($player->maxlevel + 1) == "369" ( $maxexpgain = 280422; ) else if($player->maxlevel + 1) == "370" ( $maxexpgain = 281549; ) else if($player->maxlevel + 1) == "371" ( $maxexpgain = 282676; ) else if($player->maxlevel + 1) == "372" ( $maxexpgain = 283806; ) else if($player->maxlevel + 1) == "373" ( $maxexpgain = 284937; ) else if($player->maxlevel + 1) == "374" ( $maxexpgain = 286070; ) else if($player->maxlevel + 1) == "375" ( $maxexpgain = 287206; ) else if($player->maxlevel + 1) == "376" ( $maxexpgain = 288343; ) else if($player->maxlevel + 1) == "377" ( $maxexpgain = 289482; ) else if($player->maxlevel + 1) == "378" ( $maxexpgain = 290623; ) else if($player->maxlevel + 1) == "379" ( $maxexpgain = 291768; ) else if($player->maxlevel + 1) == "380" ( $maxexpgain = 292913; ) else if($player->maxlevel + 1) == "381" ( $maxexpgain = 294061; ) else if($player->maxlevel + 1) == "382" ( $maxexpgain = 295210; ) else if($player->maxlevel + 1) == "383" ( $maxexpgain = 296361; ) else if($player->maxlevel + 1) == "384" ( $maxexpgain = 297514; ) else if($player->maxlevel + 1) == "385" ( $maxexpgain = 298669; ) else if($player->maxlevel + 1) == "386" ( $maxexpgain = 299826; ) else if($player->maxlevel + 1) == "387" ( $maxexpgain = 300987; ) else if($player->maxlevel + 1) == "388" ( $maxexpgain = 302148; ) else if($player->maxlevel + 1) == "389" ( $maxexpgain = 303311; ) else if($player->maxlevel + 1) == "390" ( $maxexpgain = 304475; ) else if($player->maxlevel + 1) == "391" ( $maxexpgain = 305642; ) else if($player->maxlevel + 1) == "392" ( $maxexpgain = 306811; ) else if($player->maxlevel + 1) == "393" ( $maxexpgain = 307982; ) else if($player->maxlevel + 1) == "394" ( $maxexpgain = 309155; ) else if($player->maxlevel + 1) == "395" ( $maxexpgain = 310330; ) else if($player->maxlevel + 1) == "396" ( $maxexpgain = 311508; ) else if($player->maxlevel + 1) == "397" ( $maxexpgain = 312687; ) else if($player->maxlevel + 1) == "398" ( $maxexpgain = 313868; ) else if($player->maxlevel + 1) == "399" ( $maxexpgain = 315050; ) else if($player->maxlevel + 1) == "400" ( $maxexpgain = 375529; ) else if($player->maxlevel + 1) == "401" ( $maxexpgain = 376864; ) else if($player->maxlevel + 1) == "402" ( $maxexpgain = 378201; ) else if($player->maxlevel + 1) == "403" ( $maxexpgain = 379540; ) else if($player->maxlevel + 1) == "404" ( $maxexpgain = 380883; ) else if($player->maxlevel + 1) == "405" ( $maxexpgain = 382225; ) else if($player->maxlevel + 1) == "406" ( $maxexpgain = 383570; ) else if($player->maxlevel + 1) == "407" ( $maxexpgain = 384917; ) else if($player->maxlevel + 1) == "408" ( $maxexpgain = 386266; ) else if($player->maxlevel + 1) == "409" ( $maxexpgain = 387616; ) else if($player->maxlevel + 1) == "410" ( $maxexpgain = 388969; ) else if($player->maxlevel + 1) == "411" ( $maxexpgain = 390324; ) else if($player->maxlevel + 1) == "412" ( $maxexpgain = 391680; ) else if($player->maxlevel + 1) == "413" ( $maxexpgain = 393041; ) else if($player->maxlevel + 1) == "414" ( $maxexpgain = 394401; ) else if($player->maxlevel + 1) == "415" ( $maxexpgain = 395764; ) else if($player->maxlevel + 1) == "416" ( $maxexpgain = 397128; ) else if($player->maxlevel + 1) == "417" ( $maxexpgain = 398495; ) else if($player->maxlevel + 1) == "418" ( $maxexpgain = 399863; ) else if($player->maxlevel + 1) == "419" ( $maxexpgain = 401234; ) else if($player->maxlevel + 1) == "420" ( $maxexpgain = 402606; ) else if($player->maxlevel + 1) == "421" ( $maxexpgain = 403983; ) else if($player->maxlevel + 1) == "422" ( $maxexpgain = 405359; ) else if($player->maxlevel + 1) == "423" ( $maxexpgain = 406737; ) else if($player->maxlevel + 1) == "424" ( $maxexpgain = 408118; ) else if($player->maxlevel + 1) == "425" ( $maxexpgain = 409500; ) else if($player->maxlevel + 1) == "426" ( $maxexpgain = 410884; ) else if($player->maxlevel + 1) == "427" ( $maxexpgain = 412271; ) else if($player->maxlevel + 1) == "428" ( $maxexpgain = 413659; ) else if($player->maxlevel + 1) == "429" ( $maxexpgain = 415049; ) else if($player->maxlevel + 1) == "430" ( $maxexpgain = 416443; ) else if($player->maxlevel + 1) == "431" ( $maxexpgain = 417837; ) else if($player->maxlevel + 1) == "432" ( $maxexpgain = 419233; ) else if($player->maxlevel + 1) == "433" ( $maxexpgain = 420632; ) else if($player->maxlevel + 1) == "434" ( $maxexpgain = 422032; ) else if($player->maxlevel + 1) == "435" ( $maxexpgain = 423434; ) else if($player->maxlevel + 1) == "436" ( $maxexpgain = 424838; ) else if($player->maxlevel + 1) == "437" ( $maxexpgain = 426244; ) else if($player->maxlevel + 1) == "438" ( $maxexpgain = 427654; ) else if($player->maxlevel + 1) == "439" ( $maxexpgain = 429064; ) else if($player->maxlevel + 1) == "440" ( $maxexpgain = 430476; ) else if($player->maxlevel + 1) == "441" ( $maxexpgain = 431890; ) else if($player->maxlevel + 1) == "442" ( $maxexpgain = 433306; ) else if($player->maxlevel + 1) == "443" ( $maxexpgain = 434726; ) else if($player->maxlevel + 1) == "444" ( $maxexpgain = 436143; ) else if($player->maxlevel + 1) == "445" ( $maxexpgain = 437565; ) else if($player->maxlevel + 1) == "446" ( $maxexpgain = 438989; ) else if($player->maxlevel + 1) == "447" ( $maxexpgain = 440417; ) else if($player->maxlevel + 1) == "448" ( $maxexpgain = 441845; ) else if($player->maxlevel + 1) == "449" ( $maxexpgain = 443274; ) else if($player->maxlevel + 1) == "450" ( $maxexpgain = 444706; ) else if($player->maxlevel + 1) == "451" ( $maxexpgain = 446140; ) else if($player->maxlevel + 1) == "452" ( $maxexpgain = 447575; ) else if($player->maxlevel + 1) == "453" ( $maxexpgain = 449013; ) else if($player->maxlevel + 1) == "454" ( $maxexpgain = 450453; ) else if($player->maxlevel + 1) == "455" ( $maxexpgain = 451896; ) else if($player->maxlevel + 1) == "456" ( $maxexpgain = 453340; ) else if($player->maxlevel + 1) == "457" ( $maxexpgain = 454785; ) else if($player->maxlevel + 1) == "458" ( $maxexpgain = 456233; ) else if($player->maxlevel + 1) == "459" ( $maxexpgain = 457682; ) else if($player->maxlevel + 1) == "460" ( $maxexpgain = 459134; ) else if($player->maxlevel + 1) == "461" ( $maxexpgain = 460587; ) else if($player->maxlevel + 1) == "462" ( $maxexpgain = 462043; ) else if($player->maxlevel + 1) == "463" ( $maxexpgain = 463500; ) else if($player->maxlevel + 1) == "464" ( $maxexpgain = 464963; ) else if($player->maxlevel + 1) == "465" ( $maxexpgain = 466423; ) else if($player->maxlevel + 1) == "466" ( $maxexpgain = 467886; ) else if($player->maxlevel + 1) == "467" ( $maxexpgain = 469352; ) else if($player->maxlevel + 1) == "468" ( $maxexpgain = 470819; ) else if($player->maxlevel + 1) == "469" ( $maxexpgain = 472288; ) else if($player->maxlevel + 1) == "470" ( $maxexpgain = 473759; ) else if($player->maxlevel + 1) == "471" ( $maxexpgain = 475233; ) else if($player->maxlevel + 1) == "472" ( $maxexpgain = 476710; ) else if($player->maxlevel + 1) == "473" ( $maxexpgain = 478187; ) else if($player->maxlevel + 1) == "474" ( $maxexpgain = 479666; ) else if($player->maxlevel + 1) == "475" ( $maxexpgain = 586765; ) else if($player->maxlevel + 1) == "476" ( $maxexpgain = 705600; ) else if($player->maxlevel + 1) == "477" ( $maxexpgain = 824929; ) else if($player->maxlevel + 1) == "478" ( $maxexpgain = 944752; ) else if($player->maxlevel + 1) == "479" ( $maxexpgain = 1065069; ) else if($player->maxlevel + 1) == "480" ( $maxexpgain = 1185880; ) else if($player->maxlevel + 1) == "481" ( $maxexpgain = 1307191; ) else if($player->maxlevel + 1) == "482" ( $maxexpgain = 1428990; ) else if($player->maxlevel + 1) == "483" ( $maxexpgain = 1551284; ) else if($player->maxlevel + 1) == "484" ( $maxexpgain = 1674071; ) else if($player->maxlevel + 1) == "485" ( $maxexpgain = 1797353; ) else if($player->maxlevel + 1) == "486" ( $maxexpgain = 1921128; ) else if($player->maxlevel + 1) == "487" ( $maxexpgain = 2045398; ) else if($player->maxlevel + 1) == "488" ( $maxexpgain = 2170161; ) else if($player->maxlevel + 1) == "489" ( $maxexpgain = 2295428; ) else if($player->maxlevel + 1) == "490" ( $maxexpgain = 2421180; ) else if($player->maxlevel + 1) == "491" ( $maxexpgain = 2547426; ) else if($player->maxlevel + 1) == "492" ( $maxexpgain = 2674166; ) else if($player->maxlevel + 1) == "493" ( $maxexpgain = 2801400; ) else if($player->maxlevel + 1) == "494" ( $maxexpgain = 2929128; ) else if($player->maxlevel + 1) == "495" ( $maxexpgain = 3057350; ) else if($player->maxlevel + 1) == "496" ( $maxexpgain = 3186066; ) else if($player->maxlevel + 1) == "497" ( $maxexpgain = 3315276; ) else if($player->maxlevel + 1) == "498" ( $maxexpgain = 3444994; ) else if($player->maxlevel + 1) == "499" ( $maxexpgain = 7150385; ) else if($player->maxlevel + 1) == "500" ( $maxexpgain = 0; ) ?> Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/ Share on other sites More sharing options...
seany123 Posted April 24, 2009 Author Share Posted April 24, 2009 and this is the file which the above is included in... <?php /*******************************************/ /* Development / Maintanence */ /* by Seany123 */ /* for */ /* Mafiakiller */ /*******************************************/ //crime1.php include("lib.php"); $player = check_user($secret_key, $db); include("templates/private_header.php"); include("maxexpgain.php"); $moneygain = "10"; $expgain = "25"; $prisontime = "10"; $nerveloss = "1"; ?> <table width="650" border="1" cellpadding="0" cellspacing="0" bordercolor="#FF0000" bgcolor="#000000"> <tr> <td align="center" bordercolor="#FF0000" class="style49"><em><strong>Crime</strong></em></td> </tr> </table> <p> <? if ($player->nerve == 0) { echo "you dont have enough nerve!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } ?> <?php if ($player->prison >= 1){ echo "you cannot commit crimes when in prison"; } ///////////////////////////////////////// AWAKE 10%////////////////////////////////////////// else if ($player->nerve >=1 && $player->awake < $player->maxawake * 0.10){ //sucess / fail. $random1 = rand(1,1000); //Prison. $random2 = rand(1,100); //sucess if($random1 <= 100){ if ($player->exp + $expgain < $player->maxexp) { $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=? , `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp) - $player->maxexpaxexp) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if ($random1 >= 101 && $random2 >= 60){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail & Prison else if($random2 >= 101 && $random2 <= 59){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1,$player->id )); echo "Fail and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a>"; } } /////////////////////////////////////////////////// AWAKE 20% //////////////////////////////////////////////////// else if ($player->nerve >=1 && $player->awake >= $player->maxawake * 0.20 && $player->awake < $player->maxawake * 0.30) { //Sucess / Fail. $random1 = rand(1,1000); //Prison. $random2 = rand(1,100); //Sucess if ($player->prison >= 1){ echo "your in prison"; } else If($random1 <= 200){ if ($player->exp + $expgain < $player->maxexp){ $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=?, `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if($random1 >= 201 && $random2 >= 55){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail and Prison else if($random2 >= 201 && $random2 <= 54){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1, $player->id )); echo "Failed and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a> "; } } //////////////////////////////////// AWAKE 30% ///////////////////////////////////// else if ($player->nerve >=1 && $player->awake >= $player->maxawake * 0.30 && $player->awake < $player->maxawake * 0.40) { //Sucess / Fail. $random1 = rand(1,1000); //Prison. $random2 = rand(1,100); //Sucess if ($player->prison >= 1){ echo "your in prison"; } else If($random1 <= 300){ if ($player->exp + $expgain < $player->maxexp){ $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=?, `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if($random1 >= 301 && $random2 >= 50){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail and Prison else if($random2 >= 301 && $random2 <= 49){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1,$player->id )); echo "Failed and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a> "; } } /////////////////////////////////// AWAKE 40% ///////////////////////////////////// else if ($player->nerve >=1 && $player->awake >= $player->maxawake * 0.40 && $player->awake < $player->maxawake * 0.50) { //Sucess / Fail. $random1 = rand(1,1000); //Prison. $random2 = rand(1,100); //Sucess if ($player->prison >= 1){ echo "your in prison"; } else If($random1 <= 400){ if ($player->exp + $expgain < $player->maxexp){ $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=?, `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if($random1 >= 401 && $random2 >= 45){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail and Prison else if($random2 >= 401 && $random2 <= 44){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1,$player->id )); echo "Failed and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a> "; } } /////////////////////////////////// AWAKE 50% ///////////////////////////////////// else if ($player->nerve >=1 && $player->awake >= $player->maxawake * 0.50 && $player->awake < $player->maxawake * 0.60) { //Sucess / Fail. $random1 = rand(1,1000); //Prison. $random2 = rand(1,100); //Sucess if ($player->prison >= 1){ echo "your in prison"; } else If($random1 <= 500){ if ($player->exp + $expgain < $player->maxexp){ $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=?, `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if($random1 >= 501 && $random2 >= 40){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail and Prison else if($random2 >= 501 && $random2 <= 39){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1,$player->id )); echo "Failed and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a> "; } } ////////////////////////////////// AWAKE 60% ///////////////////////////////////// else if ($player->nerve >=1 && $player->awake >= $player->maxawake * 0.60 && $player->awake < $player->maxawake * 0.70) { //Sucess / Fail. $random1 = rand(1,1000); //Prison. $random2 = rand(1,100); //Sucess if ($player->prison >= 1){ echo "your in prison"; } else If($random1 <= 600){ if ($player->exp + $expgain < $player->maxexp){ $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=?, `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if($random1 >= 601 && $random2 >= 35){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail and Prison else if($random2 >= 601 && $random2 <= 34){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1,$player->id )); echo "Failed and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a> "; } } ////////////////////////////////// AWAKE 70% ///////////////////////////////////// else if ($player->nerve >=1 && $player->awake >= $player->maxawake * 0.70 && $player->awake < $player->maxawake * 0.80) { //Sucess / Fail. $random1 = rand(1,1000); //Prison. $random2 = rand(1,100); //Sucess if ($player->prison >= 1){ echo "your in prison"; } else If($random1 <= 700){ if ($player->exp + $expgain < $player->maxexp){ $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=?, `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if($random1 >= 701 && $random2 >= 30){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail and Prison else if($random2 >= 701 && $random2 <= 29){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1,$player->id )); echo "Failed and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a> "; } } ////////////////////////////////// AWAKE 80% ///////////////////////////////////// else if ($player->nerve >=1 && $player->awake >= $player->maxawake * 0.80 && $player->awake < $player->maxawake * 0.90) { //Sucess or fail. $random1 = rand(1,1000); //Prison $random2 = rand(1,100); //Sucess if ($player->prison >= 1){ echo "your in prison"; } else If($random1 <= 800){ if ($player->exp + $expgain < $player->maxexp){ $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=?, `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if($random1 >= 801 && $random2 >= 25){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail and Prison else if($random2 >= 801 && $random2 <= 24){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1,$player->id )); echo "Failed and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a> "; } } ////////////////////////////////// AWAKE 90% ///////////////////////////////////// else if ($player->nerve >=1 && $player->awake >= $player->maxawake * 0.90 && $player->awake < $player->maxawake * 1) { //Sucess / Fail. $random1 = rand(1,1000); //Prison. $random2 = rand(1,100); //Sucess if ($player->prison >= 1){ echo "your in prison"; } else If($random1 <= 900){ if ($player->exp + $expgain < $player->maxexp){ $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=?, `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if($random1 >= 901 && $random2 >= 20){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail and Prison else if($random2 >= 901 && $random2 <= 19){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1,$player->id )); echo "Failed and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a> "; } } ////////////////////////////////// AWAKE 100% ///////////////////////////////////// else if ($player->nerve >=1 && $player->awake >= $player->maxawake * 1) { //Sucess / Fail. $random1 = rand(1,1000); //Prison. $random2 = rand(1,100); //Sucess if ($player->prison >= 1){ echo "your in prison"; } else If($random1 <= 999){ if ($player->exp + $expgain < $player->maxexp){ $query = $db->execute("update `players` set `money`=?, `exp`=?, `nerve`=?, `crimes_sucess`=?, `crimes_money`=? where `id`=?", array($player->money + $moneygain, $player->exp + $expgain, $player->nerve - $nerveloss, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->id )); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } else //player has gained a level! { $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); echo "Success<br>"; echo"You Gained $$moneygain and $expgain Exp!!<br>"; echo "You gained a level!<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } } //Fail else if($random1 >= 1000 && $random2 >= 10){ $query = $db->execute("update `players` set `nerve`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->crimes_failed + 1, $player->id )); echo "Failed<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/crime1.php\">[Retry]</a> "; echo"<a href=\"http://www.mafiakiller.co.cc/crime.php\">[back]</a>"; } //Fail and Prison else if($random2 >= 1000 && $random2 <= 9){ $query = $db->execute("update `players` set `nerve`=?, `prison`=?, `crimes_failed`=? where `id`=?", array($player->nerve - $nerveloss, $player->prison + $prisontime, $player->crimes_failed + 1,$player->id )); echo "Failed and Prison<br>"; echo"<a href=\"http://www.mafiakiller.co.cc/prison.php\">[Prison]</a> "; } } ?> <style type="text/css"> <!-- .style49 { color: #FFFFFF; background: #000000; } .style45 { font-weight: bold; font-style: italic; color: #000000; } body, td, th { color: #FFFFFF; font-family: Arial; } body { background-color: #000000; } --> </style> <?php include("templates/private_footer.php"); ?> my problem is that now ive added $maxexpgain to the update player level query.. it doesnt any of the queries anymore. so to sum it up... firstly is this line okay? $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818438 Share on other sites More sharing options...
Zhadus Posted April 24, 2009 Share Posted April 24, 2009 Your code makes me cry. I'm going to simplify that first part because it makes me cry so much. <?php $value = ($player->maxlevel + 1); if ($value < 500) $maxexpgain = (494*$value) + (floor($value/5)); else $maxexpgain = 0; ?> I just simplified about 2000 lines of code to 6. Please read some tutorials. The formula I used is accurate to about level 100, may need to adjust beyond that if you want the EXP to be exact. Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818465 Share on other sites More sharing options...
seany123 Posted April 24, 2009 Author Share Posted April 24, 2009 Your code makes me cry. I'm going to simplify that first part because it makes me cry so much. <?php $value = ($player->maxlevel + 1); if ($value < 500) $maxexpgain = (494*$value) + (floor($value/5)); else $maxexpgain = 0; ?> I just simplified about 2000 lines of code to 6. Please read some tutorials. The formula I used is accurate to about level 100, may need to adjust beyond that if you want the EXP to be exact. so that actually does the same thing (i did it the way i did because its the only way i really know how.. and i knew it should work.) it still doesnt fix my actual problem... Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818471 Share on other sites More sharing options...
Zhadus Posted April 24, 2009 Share Posted April 24, 2009 True, but people are not going to read through 2000+ lines of code to assist you with the problem. Simplify everything, and if you don't find the answer that way, someone else may. Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818473 Share on other sites More sharing options...
seany123 Posted April 24, 2009 Author Share Posted April 24, 2009 ive ran the code through a debugger and it didnt give any errors. im sure i must of wrote this wrong.. $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=? where `id`=?",array(1, ($player->maxexp + $maxexpgain) - $player->maxexp, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->id)); I cant see how that formula does the same thing... what i was trying to do is make it so each level the player gains... gives X maxexp Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818474 Share on other sites More sharing options...
fantomel Posted April 24, 2009 Share Posted April 24, 2009 I have a page which basically does queries depending on different values of the player... i wanted to include this into the page so i could use $maxexpgain in the queries. included file... <?php if($player->maxlevel + 1) == "2" ( $maxexpgain = 988; ) else if($player->maxlevel + 1) == "3" ( $maxexpgain = 1482; ) else if($player->maxlevel + 1) == "4" ( $maxexpgain = 1976; ) else if($player->maxlevel + 1) == "5" ( $maxexpgain = 2471; ) else if($player->maxlevel + 1) == "6" ( $maxexpgain = 2965; ) else if($player->maxlevel + 1) == "7" ( $maxexpgain = 3459; ) else if($player->maxlevel + 1) == "8" ( $maxexpgain = 3953; ) else if($player->maxlevel + 1) == "9" ( $maxexpgain = 4447; ) else if($player->maxlevel + 1) == "10" ( $maxexpgain = 4941; ) else if($player->maxlevel + 1) == "11" ( $maxexpgain = 5435; ) else if($player->maxlevel + 1) == "12" ( $maxexpgain = 5929; ) else if($player->maxlevel + 1) == "13" ( $maxexpgain = 6424; ) else if($player->maxlevel + 1) == "14" ( $maxexpgain = 6918; ) else if($player->maxlevel + 1) == "15" ( $maxexpgain = 7412; ) else if($player->maxlevel + 1) == "16" ( $maxexpgain = 7906; ) else if($player->maxlevel + 1) == "17" ( $maxexpgain = 8400; ) else if($player->maxlevel + 1) == "18" ( $maxexpgain = 8894; ) else if($player->maxlevel + 1) == "19" ( $maxexpgain = 9388; ) else if($player->maxlevel + 1) == "20" ( $maxexpgain = 9882; ) else if($player->maxlevel + 1) == "21" ( $maxexpgain = 10376; ) else if($player->maxlevel + 1) == "22" ( $maxexpgain = 10871; ) else if($player->maxlevel + 1) == "23" ( $maxexpgain = 11365; ) else if($player->maxlevel + 1) == "24" ( $maxexpgain = 11859; ) else if($player->maxlevel + 1) == "25" ( $maxexpgain = 12353; ) else if($player->maxlevel + 1) == "26" ( $maxexpgain = 12847; ) else if($player->maxlevel + 1) == "27" ( $maxexpgain = 13341; ) else if($player->maxlevel + 1) == "28" ( $maxexpgain = 13835; ) else if($player->maxlevel + 1) == "29" ( $maxexpgain = 14329; ) else if($player->maxlevel + 1) == "30" ( $maxexpgain = 14824; ) else if($player->maxlevel + 1) == "31" ( $maxexpgain = 15318; ) else if($player->maxlevel + 1) == "32" ( $maxexpgain = 15812; ) else if($player->maxlevel + 1) == "33" ( $maxexpgain = 16306; ) else if($player->maxlevel + 1) == "34" ( $maxexpgain = 16800; ) else if($player->maxlevel + 1) == "35" ( $maxexpgain = 17294; ) else if($player->maxlevel + 1) == "36" ( $maxexpgain = 17788; ) else if($player->maxlevel + 1) == "37" ( $maxexpgain = 18282; ) else if($player->maxlevel + 1) == "38" ( $maxexpgain = 18776; ) else if($player->maxlevel + 1) == "39" ( $maxexpgain = 19271; ) else if($player->maxlevel + 1) == "40" ( $maxexpgain = 19765; ) else if($player->maxlevel + 1) == "40" ( $maxexpgain = 19765; ) else if($player->maxlevel + 1) == "41" ( $maxexpgain = 20259; ) else if($player->maxlevel + 1) == "42" ( $maxexpgain = 20753; ) else if($player->maxlevel + 1) == "43" ( $maxexpgain = 21247; ) else if($player->maxlevel + 1) == "44" ( $maxexpgain = 21741; ) else if($player->maxlevel + 1) == "45" ( $maxexpgain = 22235; ) else if($player->maxlevel + 1) == "46" ( $maxexpgain = 22729; ) else if($player->maxlevel + 1) == "47" ( $maxexpgain = 23224; ) else if($player->maxlevel + 1) == "48" ( $maxexpgain = 23718; ) else if($player->maxlevel + 1) == "49" ( $maxexpgain = 24212; ) else if($player->maxlevel + 1) == "50" ( $maxexpgain = 24706; ) else if($player->maxlevel + 1) == "51" ( $maxexpgain = 25200; ) else if($player->maxlevel + 1) == "52" ( $maxexpgain = 25694; ) else if($player->maxlevel + 1) == "53" ( $maxexpgain = 26188; ) else if($player->maxlevel + 1) == "54" ( $maxexpgain = 26682; ) else if($player->maxlevel + 1) == "55" ( $maxexpgain = 27176; ) else if($player->maxlevel + 1) == "56" ( $maxexpgain = 27671; ) else if($player->maxlevel + 1) == "57" ( $maxexpgain = 28165; ) else if($player->maxlevel + 1) == "58" ( $maxexpgain = 28659; ) else if($player->maxlevel + 1) == "59" ( $maxexpgain = 29153; ) else if($player->maxlevel + 1) == "60" ( $maxexpgain = 29647; ) else if($player->maxlevel + 1) == "61" ( $maxexpgain = 30141; ) else if($player->maxlevel + 1) == "62" ( $maxexpgain = 30635; ) else if($player->maxlevel + 1) == "63" ( $maxexpgain = 31129; ) else if($player->maxlevel + 1) == "64" ( $maxexpgain = 31624; ) else if($player->maxlevel + 1) == "65" ( $maxexpgain = 32118; ) else if($player->maxlevel + 1) == "66" ( $maxexpgain = 32612; ) else if($player->maxlevel + 1) == "67" ( $maxexpgain = 33106; ) else if($player->maxlevel + 1) == "68" ( $maxexpgain = 33600; ) else if($player->maxlevel + 1) == "69" ( $maxexpgain = 34094; ) else if($player->maxlevel + 1) == "70" ( $maxexpgain = 34588; ) else if($player->maxlevel + 1) == "71" ( $maxexpgain = 35082; ) else if($player->maxlevel + 1) == "72" ( $maxexpgain = 35576; ) else if($player->maxlevel + 1) == "73" ( $maxexpgain = 36071; ) else if($player->maxlevel + 1) == "74" ( $maxexpgain = 36565; ) else if($player->maxlevel + 1) == "75" ( $maxexpgain = 37059; ) else if($player->maxlevel + 1) == "76" ( $maxexpgain = 37553; ) else if($player->maxlevel + 1) == "77" ( $maxexpgain = 38047; ) else if($player->maxlevel + 1) == "78" ( $maxexpgain = 38541; ) else if($player->maxlevel + 1) == "79" ( $maxexpgain = 39035; ) else if($player->maxlevel + 1) == "80" ( $maxexpgain = 39529; ) else if($player->maxlevel + 1) == "81" ( $maxexpgain = 40024; ) else if($player->maxlevel + 1) == "82" ( $maxexpgain = 40518; ) else if($player->maxlevel + 1) == "83" ( $maxexpgain = 41012; ) else if($player->maxlevel + 1) == "84" ( $maxexpgain = 41506; ) else if($player->maxlevel + 1) == "85" ( $maxexpgain = 42000; ) else if($player->maxlevel + 1) == "86" ( $maxexpgain = 42494; ) else if($player->maxlevel + 1) == "87" ( $maxexpgain = 42988; ) else if($player->maxlevel + 1) == "88" ( $maxexpgain = 43482; ) else if($player->maxlevel + 1) == "89" ( $maxexpgain = 43976; ) else if($player->maxlevel + 1) == "90" ( $maxexpgain = 44471; ) else if($player->maxlevel + 1) == "91" ( $maxexpgain = 44965; ) else if($player->maxlevel + 1) == "92" ( $maxexpgain = 45459; ) else if($player->maxlevel + 1) == "93" ( $maxexpgain = 45953; ) else if($player->maxlevel + 1) == "94" ( $maxexpgain = 46447; ) else if($player->maxlevel + 1) == "95" ( $maxexpgain = 46941; ) else if($player->maxlevel + 1) == "96" ( $maxexpgain = 47435; ) else if($player->maxlevel + 1) == "97" ( $maxexpgain = 47929; ) else if($player->maxlevel + 1) == "98" ( $maxexpgain = 48424; ) else if($player->maxlevel + 1) == "99" ( $maxexpgain = 48918; ) else if($player->maxlevel + 1) == "100" ( $maxexpgain = 49412; ) else if($player->maxlevel + 1) == "101" ( $maxexpgain = 49906; ) else if($player->maxlevel + 1) == "102" ( $maxexpgain = 50400; ) else if($player->maxlevel + 1) == "103" ( $maxexpgain = 50894; ) else if($player->maxlevel + 1) == "104" ( $maxexpgain = 51388; ) else if($player->maxlevel + 1) == "105" ( $maxexpgain = 51882; ) else if($player->maxlevel + 1) == "106" ( $maxexpgain = 52376; ) else if($player->maxlevel + 1) == "107" ( $maxexpgain = 52871; ) else if($player->maxlevel + 1) == "108" ( $maxexpgain = 53365; ) else if($player->maxlevel + 1) == "109" ( $maxexpgain = 53859; ) else if($player->maxlevel + 1) == "110" ( $maxexpgain = 54353; ) else if($player->maxlevel + 1) == "111" ( $maxexpgain = 54847; ) else if($player->maxlevel + 1) == "112" ( $maxexpgain = 55341; ) else if($player->maxlevel + 1) == "113" ( $maxexpgain = 55835; ) else if($player->maxlevel + 1) == "114" ( $maxexpgain = 56329; ) else if($player->maxlevel + 1) == "115" ( $maxexpgain = 56824; ) else if($player->maxlevel + 1) == "116" ( $maxexpgain = 57318; ) else if($player->maxlevel + 1) == "117" ( $maxexpgain = 57812; ) else if($player->maxlevel + 1) == "118" ( $maxexpgain = 58306; ) else if($player->maxlevel + 1) == "119" ( $maxexpgain = 58800; ) else if($player->maxlevel + 1) == "120" ( $maxexpgain = 59294; ) else if($player->maxlevel + 1) == "121" ( $maxexpgain = 59788; ) else if($player->maxlevel + 1) == "122" ( $maxexpgain = 60282; ) else if($player->maxlevel + 1) == "123" ( $maxexpgain = 60776; ) else if($player->maxlevel + 1) == "124" ( $maxexpgain = 61271; ) else if($player->maxlevel + 1) == "125" ( $maxexpgain = 61765; ) else if($player->maxlevel + 1) == "126" ( $maxexpgain = 62259; ) else if($player->maxlevel + 1) == "127" ( $maxexpgain = 62753; ) else if($player->maxlevel + 1) == "128" ( $maxexpgain = 63247; ) else if($player->maxlevel + 1) == "129" ( $maxexpgain = 63741; ) else if($player->maxlevel + 1) == "130" ( $maxexpgain = 64235; ) else if($player->maxlevel + 1) == "131" ( $maxexpgain = 64729; ) else if($player->maxlevel + 1) == "132" ( $maxexpgain = 65224; ) else if($player->maxlevel + 1) == "133" ( $maxexpgain = 65718; ) else if($player->maxlevel + 1) == "134" ( $maxexpgain = 66212; ) else if($player->maxlevel + 1) == "135" ( $maxexpgain = 66706; ) else if($player->maxlevel + 1) == "136" ( $maxexpgain = 67200; ) else if($player->maxlevel + 1) == "137" ( $maxexpgain = 67694; ) else if($player->maxlevel + 1) == "138" ( $maxexpgain = 68188; ) else if($player->maxlevel + 1) == "139" ( $maxexpgain = 68682; ) else if($player->maxlevel + 1) == "140" ( $maxexpgain = 69176; ) else if($player->maxlevel + 1) == "141" ( $maxexpgain = 69671; ) else if($player->maxlevel + 1) == "142" ( $maxexpgain = 70165; ) else if($player->maxlevel + 1) == "143" ( $maxexpgain = 70659; ) else if($player->maxlevel + 1) == "144" ( $maxexpgain = 71153; ) else if($player->maxlevel + 1) == "145" ( $maxexpgain = 71647; ) else if($player->maxlevel + 1) == "146" ( $maxexpgain = 72151; ) else if($player->maxlevel + 1) == "147" ( $maxexpgain = 72635; ) else if($player->maxlevel + 1) == "148" ( $maxexpgain = 73129; ) else if($player->maxlevel + 1) == "149" ( $maxexpgain = 73624; ) else if($player->maxlevel + 1) == "150" ( $maxexpgain = 74118; ) else if($player->maxlevel + 1) == "151" ( $maxexpgain = 74612; ) else if($player->maxlevel + 1) == "152" ( $maxexpgain = 75106; ) else if($player->maxlevel + 1) == "153" ( $maxexpgain = 75600; ) else if($player->maxlevel + 1) == "154" ( $maxexpgain = 76094; ) else if($player->maxlevel + 1) == "155" ( $maxexpgain = 76588; ) else if($player->maxlevel + 1) == "156" ( $maxexpgain = 77082; ) else if($player->maxlevel + 1) == "157" ( $maxexpgain = 77576; ) else if($player->maxlevel + 1) == "158" ( $maxexpgain = 78071; ) else if($player->maxlevel + 1) == "159" ( $maxexpgain = 78565; ) else if($player->maxlevel + 1) == "160" ( $maxexpgain = 79059; ) else if($player->maxlevel + 1) == "161" ( $maxexpgain = 79553; ) else if($player->maxlevel + 1) == "162" ( $maxexpgain = 80047; ) else if($player->maxlevel + 1) == "163" ( $maxexpgain = 80541; ) else if($player->maxlevel + 1) == "164" ( $maxexpgain = 81035; ) else if($player->maxlevel + 1) == "165" ( $maxexpgain = 81529; ) else if($player->maxlevel + 1) == "166" ( $maxexpgain = 82024; ) else if($player->maxlevel + 1) == "167" ( $maxexpgain = 82518; ) else if($player->maxlevel + 1) == "168" ( $maxexpgain = 83012; ) else if($player->maxlevel + 1) == "169" ( $maxexpgain = 83506; ) else if($player->maxlevel + 1) == "170" ( $maxexpgain = 84000; ) else if($player->maxlevel + 1) == "171" ( $maxexpgain = 84494; ) else if($player->maxlevel + 1) == "172" ( $maxexpgain = 84988; ) else if($player->maxlevel + 1) == "173" ( $maxexpgain = 85482; ) else if($player->maxlevel + 1) == "174" ( $maxexpgain = 85976; ) else if($player->maxlevel + 1) == "175" ( $maxexpgain = 86471; ) else if($player->maxlevel + 1) == "176" ( $maxexpgain = 86965; ) else if($player->maxlevel + 1) == "177" ( $maxexpgain = 87459; ) else if($player->maxlevel + 1) == "178" ( $maxexpgain = 87953; ) else if($player->maxlevel + 1) == "179" ( $maxexpgain = 88447; ) else if($player->maxlevel + 1) == "180" ( $maxexpgain = 88941; ) else if($player->maxlevel + 1) == "181" ( $maxexpgain = 89435; ) else if($player->maxlevel + 1) == "182" ( $maxexpgain = 89929; ) else if($player->maxlevel + 1) == "183" ( $maxexpgain = 90424; ) else if($player->maxlevel + 1) == "184" ( $maxexpgain = 90918; ) else if($player->maxlevel + 1) == "185" ( $maxexpgain = 91412; ) else if($player->maxlevel + 1) == "186" ( $maxexpgain = 91906; ) else if($player->maxlevel + 1) == "187" ( $maxexpgain = 92400; ) else if($player->maxlevel + 1) == "188" ( $maxexpgain = 92894; ) else if($player->maxlevel + 1) == "189" ( $maxexpgain = 93388; ) else if($player->maxlevel + 1) == "190" ( $maxexpgain = 93882; ) else if($player->maxlevel + 1) == "191" ( $maxexpgain = 94376; ) else if($player->maxlevel + 1) == "192" ( $maxexpgain = 94871; ) else if($player->maxlevel + 1) == "193" ( $maxexpgain = 95365; ) else if($player->maxlevel + 1) == "194" ( $maxexpgain = 95859; ) else if($player->maxlevel + 1) == "195" ( $maxexpgain = 96353; ) else if($player->maxlevel + 1) == "196" ( $maxexpgain = 96847; ) else if($player->maxlevel + 1) == "197" ( $maxexpgain = 97341; ) else if($player->maxlevel + 1) == "198" ( $maxexpgain = 97835; ) else if($player->maxlevel + 1) == "199" ( $maxexpgain = 98329; ) else if($player->maxlevel + 1) == "200" ( $maxexpgain = 98824; ) else if($player->maxlevel + 1) == "201" ( $maxexpgain = 99318; ) else if($player->maxlevel + 1) == "202" ( $maxexpgain = 99812; ) else if($player->maxlevel + 1) == "203" ( $maxexpgain = 100306; ) else if($player->maxlevel + 1) == "204" ( $maxexpgain = 100800; ) else if($player->maxlevel + 1) == "205" ( $maxexpgain = 101294; ) else if($player->maxlevel + 1) == "206" ( $maxexpgain = 101788; ) else if($player->maxlevel + 1) == "207" ( $maxexpgain = 102282; ) else if($player->maxlevel + 1) == "208" ( $maxexpgain = 102776; ) else if($player->maxlevel + 1) == "209" ( $maxexpgain = 103271; ) else if($player->maxlevel + 1) == "210" ( $maxexpgain = 103765; ) else if($player->maxlevel + 1) == "211" ( $maxexpgain = 104259; ) else if($player->maxlevel + 1) == "212" ( $maxexpgain = 104753; ) else if($player->maxlevel + 1) == "213" ( $maxexpgain = 105247; ) else if($player->maxlevel + 1) == "214" ( $maxexpgain = 105741; ) else if($player->maxlevel + 1) == "215" ( $maxexpgain = 106235; ) else if($player->maxlevel + 1) == "216" ( $maxexpgain = 106729; ) else if($player->maxlevel + 1) == "217" ( $maxexpgain = 107224; ) else if($player->maxlevel + 1) == "218" ( $maxexpgain = 107718; ) else if($player->maxlevel + 1) == "219" ( $maxexpgain = 108212; ) else if($player->maxlevel + 1) == "220" ( $maxexpgain = 108706; ) else if($player->maxlevel + 1) == "221" ( $maxexpgain = 109200; ) else if($player->maxlevel + 1) == "222" ( $maxexpgain = 109694; ) else if($player->maxlevel + 1) == "223" ( $maxexpgain = 110118; ) else if($player->maxlevel + 1) == "224" ( $maxexpgain = 110682; ) else if($player->maxlevel + 1) == "225" ( $maxexpgain = 111176; ) else if($player->maxlevel + 1) == "226" ( $maxexpgain = 111671; ) else if($player->maxlevel + 1) == "227" ( $maxexpgain = 112165; ) else if($player->maxlevel + 1) == "228" ( $maxexpgain = 112659; ) else if($player->maxlevel + 1) == "229" ( $maxexpgain = 113153; ) else if($player->maxlevel + 1) == "230" ( $maxexpgain = 113647; ) else if($player->maxlevel + 1) == "231" ( $maxexpgain = 114141; ) else if($player->maxlevel + 1) == "232" ( $maxexpgain = 114635; ) else if($player->maxlevel + 1) == "233" ( $maxexpgain = 115129; ) else if($player->maxlevel + 1) == "234" ( $maxexpgain = 115624; ) else if($player->maxlevel + 1) == "235" ( $maxexpgain = 116118; ) else if($player->maxlevel + 1) == "236" ( $maxexpgain = 116612; ) else if($player->maxlevel + 1) == "237" ( $maxexpgain = 117106; ) else if($player->maxlevel + 1) == "238" ( $maxexpgain = 117600; ) else if($player->maxlevel + 1) == "239" ( $maxexpgain = 118094; ) else if($player->maxlevel + 1) == "240" ( $maxexpgain = 118588; ) else if($player->maxlevel + 1) == "241" ( $maxexpgain = 119082; ) else if($player->maxlevel + 1) == "242" ( $maxexpgain = 119576; ) else if($player->maxlevel + 1) == "243" ( $maxexpgain = 120071; ) else if($player->maxlevel + 1) == "244" ( $maxexpgain = 120565; ) else if($player->maxlevel + 1) == "245" ( $maxexpgain = 121059; ) else if($player->maxlevel + 1) == "246" ( $maxexpgain = 121553; ) else if($player->maxlevel + 1) == "247" ( $maxexpgain = 122047; ) else if($player->maxlevel + 1) == "248" ( $maxexpgain = 122541; ) else if($player->maxlevel + 1) == "249" ( $maxexpgain = 123035; ) else if($player->maxlevel + 1) == "250" ( $maxexpgain = 123529; ) else if($player->maxlevel + 1) == "251" ( $maxexpgain = 124024; ) else if($player->maxlevel + 1) == "252" ( $maxexpgain = 124518; ) else if($player->maxlevel + 1) == "253" ( $maxexpgain = 125012; ) else if($player->maxlevel + 1) == "254" ( $maxexpgain = 125506; ) else if($player->maxlevel + 1) == "255" ( $maxexpgain = 126000; ) else if($player->maxlevel + 1) == "256" ( $maxexpgain = 126494; ) else if($player->maxlevel + 1) == "257" ( $maxexpgain = 126988; ) else if($player->maxlevel + 1) == "258" ( $maxexpgain = 127482; ) else if($player->maxlevel + 1) == "259" ( $maxexpgain = 127976; ) else if($player->maxlevel + 1) == "260" ( $maxexpgain = 128471; ) else if($player->maxlevel + 1) == "261" ( $maxexpgain = 128965; ) else if($player->maxlevel + 1) == "262" ( $maxexpgain = 129459; ) else if($player->maxlevel + 1) == "263" ( $maxexpgain = 129953; ) else if($player->maxlevel + 1) == "264" ( $maxexpgain = 130447; ) else if($player->maxlevel + 1) == "265" ( $maxexpgain = 130941; ) else if($player->maxlevel + 1) == "266" ( $maxexpgain = 131435; ) else if($player->maxlevel + 1) == "267" ( $maxexpgain = 131929; ) else if($player->maxlevel + 1) == "268" ( $maxexpgain = 132424; ) else if($player->maxlevel + 1) == "269" ( $maxexpgain = 132918; ) else if($player->maxlevel + 1) == "270" ( $maxexpgain = 133412; ) else if($player->maxlevel + 1) == "271" ( $maxexpgain = 133906; ) else if($player->maxlevel + 1) == "272" ( $maxexpgain = 134400; ) else if($player->maxlevel + 1) == "273" ( $maxexpgain = 134894; ) else if($player->maxlevel + 1) == "274" ( $maxexpgain = 135388; ) else if($player->maxlevel + 1) == "275" ( $maxexpgain = 135882; ) else if($player->maxlevel + 1) == "276" ( $maxexpgain = 136376; ) else if($player->maxlevel + 1) == "277" ( $maxexpgain = 136871; ) else if($player->maxlevel + 1) == "278" ( $maxexpgain = 137365; ) else if($player->maxlevel + 1) == "279" ( $maxexpgain = 137859; ) else if($player->maxlevel + 1) == "280" ( $maxexpgain = 138353; ) else if($player->maxlevel + 1) == "281" ( $maxexpgain = 138847; ) else if($player->maxlevel + 1) == "282" ( $maxexpgain = 139341; ) else if($player->maxlevel + 1) == "283" ( $maxexpgain = 139835; ) else if($player->maxlevel + 1) == "284" ( $maxexpgain = 140329; ) else if($player->maxlevel + 1) == "285" ( $maxexpgain = 140824; ) else if($player->maxlevel + 1) == "286" ( $maxexpgain = 141318; ) else if($player->maxlevel + 1) == "287" ( $maxexpgain = 141812; ) else if($player->maxlevel + 1) == "288" ( $maxexpgain = 142306; ) else if($player->maxlevel + 1) == "289" ( $maxexpgain = 142800; ) else if($player->maxlevel + 1) == "290" ( $maxexpgain = 143294; ) else if($player->maxlevel + 1) == "291" ( $maxexpgain = 143788; ) else if($player->maxlevel + 1) == "292" ( $maxexpgain = 144282; ) else if($player->maxlevel + 1) == "293" ( $maxexpgain = 144776; ) else if($player->maxlevel + 1) == "294" ( $maxexpgain = 145271; ) else if($player->maxlevel + 1) == "295" ( $maxexpgain = 145765; ) else if($player->maxlevel + 1) == "296" ( $maxexpgain = 146259; ) else if($player->maxlevel + 1) == "297" ( $maxexpgain = 146753; ) else if($player->maxlevel + 1) == "298" ( $maxexpgain = 147247; ) else if($player->maxlevel + 1) == "299" ( $maxexpgain = 147741; ) else if($player->maxlevel + 1) == "300" ( $maxexpgain = 163059; ) else if($player->maxlevel + 1) == "301" ( $maxexpgain = 163899; ) else if($player->maxlevel + 1) == "302" ( $maxexpgain = 164743; ) else if($player->maxlevel + 1) == "303" ( $maxexpgain = 165588; ) else if($player->maxlevel + 1) == "304" ( $maxexpgain = 166435; ) else if($player->maxlevel + 1) == "305" ( $maxexpgain = 167284; ) else if($player->maxlevel + 1) == "306" ( $maxexpgain = 168134; ) else if($player->maxlevel + 1) == "307" ( $maxexpgain = 168987; ) else if($player->maxlevel + 1) == "308" ( $maxexpgain = 169842; ) else if($player->maxlevel + 1) == "309" ( $maxexpgain = 170698; ) else if($player->maxlevel + 1) == "310" ( $maxexpgain = 171557; ) else if($player->maxlevel + 1) == "311" ( $maxexpgain = 172419; ) else if($player->maxlevel + 1) == "312" ( $maxexpgain = 173281; ) else if($player->maxlevel + 1) == "313" ( $maxexpgain = 174146; ) else if($player->maxlevel + 1) == "314" ( $maxexpgain = 175013; ) else if($player->maxlevel + 1) == "315" ( $maxexpgain = 175881; ) else if($player->maxlevel + 1) == "316" ( $maxexpgain = 176752; ) else if($player->maxlevel + 1) == "317" ( $maxexpgain = 177624; ) else if($player->maxlevel + 1) == "318" ( $maxexpgain = 178499; ) else if($player->maxlevel + 1) == "319" ( $maxexpgain = 179376; ) else if($player->maxlevel + 1) == "320" ( $maxexpgain = 180255; ) else if($player->maxlevel + 1) == "321" ( $maxexpgain = 181135; ) else if($player->maxlevel + 1) == "322" ( $maxexpgain = 182017; ) else if($player->maxlevel + 1) == "323" ( $maxexpgain = 182902; ) else if($player->maxlevel + 1) == "324" ( $maxexpgain = 183788; ) else if($player->maxlevel + 1) == "325" ( $maxexpgain = 184676; ) else if($player->maxlevel + 1) == "326" ( $maxexpgain = 185556; ) else if($player->maxlevel + 1) == "327" ( $maxexpgain = 186459; ) else if($player->maxlevel + 1) == "328" ( $maxexpgain = 187354; ) else if($player->maxlevel + 1) == "329" ( $maxexpgain = 188250; ) else if($player->maxlevel + 1) == "330" ( $maxexpgain = 189148; ) else if($player->maxlevel + 1) == "331" ( $maxexpgain = 190049; ) else if($player->maxlevel + 1) == "332" ( $maxexpgain = 190951; ) else if($player->maxlevel + 1) == "333" ( $maxexpgain = 191855; ) else if($player->maxlevel + 1) == "334" ( $maxexpgain = 192761; ) else if($player->maxlevel + 1) == "335" ( $maxexpgain = 193669; ) else if($player->maxlevel + 1) == "336" ( $maxexpgain = 194580; ) else if($player->maxlevel + 1) == "337" ( $maxexpgain = 195492; ) else if($player->maxlevel + 1) == "338" ( $maxexpgain = 196406; ) else if($player->maxlevel + 1) == "339" ( $maxexpgain = 197322; ) else if($player->maxlevel + 1) == "340" ( $maxexpgain = 198240; ) else if($player->maxlevel + 1) == "341" ( $maxexpgain = 199160; ) else if($player->maxlevel + 1) == "342" ( $maxexpgain = 201006; ) else if($player->maxlevel + 1) == "343" ( $maxexpgain = 201006; ) else if($player->maxlevel + 1) == "344" ( $maxexpgain = 201931; ) else if($player->maxlevel + 1) == "345" ( $maxexpgain = 202860; ) else if($player->maxlevel + 1) == "346" ( $maxexpgain = 203790; ) else if($player->maxlevel + 1) == "347" ( $maxexpgain = 204722; ) else if($player->maxlevel + 1) == "348" ( $maxexpgain = 205656; ) else if($player->maxlevel + 1) == "349" ( $maxexpgain = 206592; ) else if($player->maxlevel + 1) == "350" ( $maxexpgain = 259412; ) else if($player->maxlevel + 1) == "351" ( $maxexpgain = 260499; ) else if($player->maxlevel + 1) == "352" ( $maxexpgain = 261589; ) else if($player->maxlevel + 1) == "353" ( $maxexpgain = 262683; ) else if($player->maxlevel + 1) == "354" ( $maxexpgain = 263776; ) else if($player->maxlevel + 1) == "355" ( $maxexpgain = 264872; ) else if($player->maxlevel + 1) == "356" ( $maxexpgain = 265970; ) else if($player->maxlevel + 1) == "357" ( $maxexpgain = 267070; ) else if($player->maxlevel + 1) == "358" ( $maxexpgain = 268171; ) else if($player->maxlevel + 1) == "359" ( $maxexpgain = 269275; ) else if($player->maxlevel + 1) == "360" ( $maxexpgain = 270381; ) else if($player->maxlevel + 1) == "361" ( $maxexpgain = 271488; ) else if($player->maxlevel + 1) == "362" ( $maxexpgain = 272599; ) else if($player->maxlevel + 1) == "363" ( $maxexpgain = 273711; ) else if($player->maxlevel + 1) == "364" ( $maxexpgain = 274825; ) else if($player->maxlevel + 1) == "365" ( $maxexpgain = 275940; ) else if($player->maxlevel + 1) == "366" ( $maxexpgain = 277058; ) else if($player->maxlevel + 1) == "367" ( $maxexpgain = 278177; ) else if($player->maxlevel + 1) == "368" ( $maxexpgain = 279299; ) else if($player->maxlevel + 1) == "369" ( $maxexpgain = 280422; ) else if($player->maxlevel + 1) == "370" ( $maxexpgain = 281549; ) else if($player->maxlevel + 1) == "371" ( $maxexpgain = 282676; ) else if($player->maxlevel + 1) == "372" ( $maxexpgain = 283806; ) else if($player->maxlevel + 1) == "373" ( $maxexpgain = 284937; ) else if($player->maxlevel + 1) == "374" ( $maxexpgain = 286070; ) else if($player->maxlevel + 1) == "375" ( $maxexpgain = 287206; ) else if($player->maxlevel + 1) == "376" ( $maxexpgain = 288343; ) else if($player->maxlevel + 1) == "377" ( $maxexpgain = 289482; ) else if($player->maxlevel + 1) == "378" ( $maxexpgain = 290623; ) else if($player->maxlevel + 1) == "379" ( $maxexpgain = 291768; ) else if($player->maxlevel + 1) == "380" ( $maxexpgain = 292913; ) else if($player->maxlevel + 1) == "381" ( $maxexpgain = 294061; ) else if($player->maxlevel + 1) == "382" ( $maxexpgain = 295210; ) else if($player->maxlevel + 1) == "383" ( $maxexpgain = 296361; ) else if($player->maxlevel + 1) == "384" ( $maxexpgain = 297514; ) else if($player->maxlevel + 1) == "385" ( $maxexpgain = 298669; ) else if($player->maxlevel + 1) == "386" ( $maxexpgain = 299826; ) else if($player->maxlevel + 1) == "387" ( $maxexpgain = 300987; ) else if($player->maxlevel + 1) == "388" ( $maxexpgain = 302148; ) else if($player->maxlevel + 1) == "389" ( $maxexpgain = 303311; ) else if($player->maxlevel + 1) == "390" ( $maxexpgain = 304475; ) else if($player->maxlevel + 1) == "391" ( $maxexpgain = 305642; ) else if($player->maxlevel + 1) == "392" ( $maxexpgain = 306811; ) else if($player->maxlevel + 1) == "393" ( $maxexpgain = 307982; ) else if($player->maxlevel + 1) == "394" ( $maxexpgain = 309155; ) else if($player->maxlevel + 1) == "395" ( $maxexpgain = 310330; ) else if($player->maxlevel + 1) == "396" ( $maxexpgain = 311508; ) else if($player->maxlevel + 1) == "397" ( $maxexpgain = 312687; ) else if($player->maxlevel + 1) == "398" ( $maxexpgain = 313868; ) else if($player->maxlevel + 1) == "399" ( $maxexpgain = 315050; ) else if($player->maxlevel + 1) == "400" ( $maxexpgain = 375529; ) else if($player->maxlevel + 1) == "401" ( $maxexpgain = 376864; ) else if($player->maxlevel + 1) == "402" ( $maxexpgain = 378201; ) else if($player->maxlevel + 1) == "403" ( $maxexpgain = 379540; ) else if($player->maxlevel + 1) == "404" ( $maxexpgain = 380883; ) else if($player->maxlevel + 1) == "405" ( $maxexpgain = 382225; ) else if($player->maxlevel + 1) == "406" ( $maxexpgain = 383570; ) else if($player->maxlevel + 1) == "407" ( $maxexpgain = 384917; ) else if($player->maxlevel + 1) == "408" ( $maxexpgain = 386266; ) else if($player->maxlevel + 1) == "409" ( $maxexpgain = 387616; ) else if($player->maxlevel + 1) == "410" ( $maxexpgain = 388969; ) else if($player->maxlevel + 1) == "411" ( $maxexpgain = 390324; ) else if($player->maxlevel + 1) == "412" ( $maxexpgain = 391680; ) else if($player->maxlevel + 1) == "413" ( $maxexpgain = 393041; ) else if($player->maxlevel + 1) == "414" ( $maxexpgain = 394401; ) else if($player->maxlevel + 1) == "415" ( $maxexpgain = 395764; ) else if($player->maxlevel + 1) == "416" ( $maxexpgain = 397128; ) else if($player->maxlevel + 1) == "417" ( $maxexpgain = 398495; ) else if($player->maxlevel + 1) == "418" ( $maxexpgain = 399863; ) else if($player->maxlevel + 1) == "419" ( $maxexpgain = 401234; ) else if($player->maxlevel + 1) == "420" ( $maxexpgain = 402606; ) else if($player->maxlevel + 1) == "421" ( $maxexpgain = 403983; ) else if($player->maxlevel + 1) == "422" ( $maxexpgain = 405359; ) else if($player->maxlevel + 1) == "423" ( $maxexpgain = 406737; ) else if($player->maxlevel + 1) == "424" ( $maxexpgain = 408118; ) else if($player->maxlevel + 1) == "425" ( $maxexpgain = 409500; ) else if($player->maxlevel + 1) == "426" ( $maxexpgain = 410884; ) else if($player->maxlevel + 1) == "427" ( $maxexpgain = 412271; ) else if($player->maxlevel + 1) == "428" ( $maxexpgain = 413659; ) else if($player->maxlevel + 1) == "429" ( $maxexpgain = 415049; ) else if($player->maxlevel + 1) == "430" ( $maxexpgain = 416443; ) else if($player->maxlevel + 1) == "431" ( $maxexpgain = 417837; ) else if($player->maxlevel + 1) == "432" ( $maxexpgain = 419233; ) else if($player->maxlevel + 1) == "433" ( $maxexpgain = 420632; ) else if($player->maxlevel + 1) == "434" ( $maxexpgain = 422032; ) else if($player->maxlevel + 1) == "435" ( $maxexpgain = 423434; ) else if($player->maxlevel + 1) == "436" ( $maxexpgain = 424838; ) else if($player->maxlevel + 1) == "437" ( $maxexpgain = 426244; ) else if($player->maxlevel + 1) == "438" ( $maxexpgain = 427654; ) else if($player->maxlevel + 1) == "439" ( $maxexpgain = 429064; ) else if($player->maxlevel + 1) == "440" ( $maxexpgain = 430476; ) else if($player->maxlevel + 1) == "441" ( $maxexpgain = 431890; ) else if($player->maxlevel + 1) == "442" ( $maxexpgain = 433306; ) else if($player->maxlevel + 1) == "443" ( $maxexpgain = 434726; ) else if($player->maxlevel + 1) == "444" ( $maxexpgain = 436143; ) else if($player->maxlevel + 1) == "445" ( $maxexpgain = 437565; ) else if($player->maxlevel + 1) == "446" ( $maxexpgain = 438989; ) else if($player->maxlevel + 1) == "447" ( $maxexpgain = 440417; ) else if($player->maxlevel + 1) == "448" ( $maxexpgain = 441845; ) else if($player->maxlevel + 1) == "449" ( $maxexpgain = 443274; ) else if($player->maxlevel + 1) == "450" ( $maxexpgain = 444706; ) else if($player->maxlevel + 1) == "451" ( $maxexpgain = 446140; ) else if($player->maxlevel + 1) == "452" ( $maxexpgain = 447575; ) else if($player->maxlevel + 1) == "453" ( $maxexpgain = 449013; ) else if($player->maxlevel + 1) == "454" ( $maxexpgain = 450453; ) else if($player->maxlevel + 1) == "455" ( $maxexpgain = 451896; ) else if($player->maxlevel + 1) == "456" ( $maxexpgain = 453340; ) else if($player->maxlevel + 1) == "457" ( $maxexpgain = 454785; ) else if($player->maxlevel + 1) == "458" ( $maxexpgain = 456233; ) else if($player->maxlevel + 1) == "459" ( $maxexpgain = 457682; ) else if($player->maxlevel + 1) == "460" ( $maxexpgain = 459134; ) else if($player->maxlevel + 1) == "461" ( $maxexpgain = 460587; ) else if($player->maxlevel + 1) == "462" ( $maxexpgain = 462043; ) else if($player->maxlevel + 1) == "463" ( $maxexpgain = 463500; ) else if($player->maxlevel + 1) == "464" ( $maxexpgain = 464963; ) else if($player->maxlevel + 1) == "465" ( $maxexpgain = 466423; ) else if($player->maxlevel + 1) == "466" ( $maxexpgain = 467886; ) else if($player->maxlevel + 1) == "467" ( $maxexpgain = 469352; ) else if($player->maxlevel + 1) == "468" ( $maxexpgain = 470819; ) else if($player->maxlevel + 1) == "469" ( $maxexpgain = 472288; ) else if($player->maxlevel + 1) == "470" ( $maxexpgain = 473759; ) else if($player->maxlevel + 1) == "471" ( $maxexpgain = 475233; ) else if($player->maxlevel + 1) == "472" ( $maxexpgain = 476710; ) else if($player->maxlevel + 1) == "473" ( $maxexpgain = 478187; ) else if($player->maxlevel + 1) == "474" ( $maxexpgain = 479666; ) else if($player->maxlevel + 1) == "475" ( $maxexpgain = 586765; ) else if($player->maxlevel + 1) == "476" ( $maxexpgain = 705600; ) else if($player->maxlevel + 1) == "477" ( $maxexpgain = 824929; ) else if($player->maxlevel + 1) == "478" ( $maxexpgain = 944752; ) else if($player->maxlevel + 1) == "479" ( $maxexpgain = 1065069; ) else if($player->maxlevel + 1) == "480" ( $maxexpgain = 1185880; ) else if($player->maxlevel + 1) == "481" ( $maxexpgain = 1307191; ) else if($player->maxlevel + 1) == "482" ( $maxexpgain = 1428990; ) else if($player->maxlevel + 1) == "483" ( $maxexpgain = 1551284; ) else if($player->maxlevel + 1) == "484" ( $maxexpgain = 1674071; ) else if($player->maxlevel + 1) == "485" ( $maxexpgain = 1797353; ) else if($player->maxlevel + 1) == "486" ( $maxexpgain = 1921128; ) else if($player->maxlevel + 1) == "487" ( $maxexpgain = 2045398; ) else if($player->maxlevel + 1) == "488" ( $maxexpgain = 2170161; ) else if($player->maxlevel + 1) == "489" ( $maxexpgain = 2295428; ) else if($player->maxlevel + 1) == "490" ( $maxexpgain = 2421180; ) else if($player->maxlevel + 1) == "491" ( $maxexpgain = 2547426; ) else if($player->maxlevel + 1) == "492" ( $maxexpgain = 2674166; ) else if($player->maxlevel + 1) == "493" ( $maxexpgain = 2801400; ) else if($player->maxlevel + 1) == "494" ( $maxexpgain = 2929128; ) else if($player->maxlevel + 1) == "495" ( $maxexpgain = 3057350; ) else if($player->maxlevel + 1) == "496" ( $maxexpgain = 3186066; ) else if($player->maxlevel + 1) == "497" ( $maxexpgain = 3315276; ) else if($player->maxlevel + 1) == "498" ( $maxexpgain = 3444994; ) else if($player->maxlevel + 1) == "499" ( $maxexpgain = 7150385; ) else if($player->maxlevel + 1) == "500" ( $maxexpgain = 0; ) ?> let me give you an advice next time when you don't know to do something like this you should do a post in application design(i think) and ask there how people would approach the problem. Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818477 Share on other sites More sharing options...
seany123 Posted April 24, 2009 Author Share Posted April 24, 2009 I have a page which basically does queries depending on different values of the player... i wanted to include this into the page so i could use $maxexpgain in the queries. included file... <?php if($player->maxlevel + 1) == "2" ( $maxexpgain = 988; ) else if($player->maxlevel + 1) == "3" ( $maxexpgain = 1482; ) else if($player->maxlevel + 1) == "4" ( $maxexpgain = 1976; ) else if($player->maxlevel + 1) == "5" ( $maxexpgain = 2471; ) else if($player->maxlevel + 1) == "6" ( $maxexpgain = 2965; ) else if($player->maxlevel + 1) == "7" ( $maxexpgain = 3459; ) else if($player->maxlevel + 1) == "8" ( $maxexpgain = 3953; ) else if($player->maxlevel + 1) == "9" ( $maxexpgain = 4447; ) else if($player->maxlevel + 1) == "10" ( $maxexpgain = 4941; ) else if($player->maxlevel + 1) == "11" ( $maxexpgain = 5435; ) else if($player->maxlevel + 1) == "12" ( $maxexpgain = 5929; ) else if($player->maxlevel + 1) == "13" ( $maxexpgain = 6424; ) else if($player->maxlevel + 1) == "14" ( $maxexpgain = 6918; ) else if($player->maxlevel + 1) == "15" ( $maxexpgain = 7412; ) else if($player->maxlevel + 1) == "16" ( $maxexpgain = 7906; ) else if($player->maxlevel + 1) == "17" ( $maxexpgain = 8400; ) else if($player->maxlevel + 1) == "18" ( $maxexpgain = 8894; ) else if($player->maxlevel + 1) == "19" ( $maxexpgain = 9388; ) else if($player->maxlevel + 1) == "20" ( $maxexpgain = 9882; ) else if($player->maxlevel + 1) == "21" ( $maxexpgain = 10376; ) else if($player->maxlevel + 1) == "22" ( $maxexpgain = 10871; ) else if($player->maxlevel + 1) == "23" ( $maxexpgain = 11365; ) else if($player->maxlevel + 1) == "24" ( $maxexpgain = 11859; ) else if($player->maxlevel + 1) == "25" ( $maxexpgain = 12353; ) else if($player->maxlevel + 1) == "26" ( $maxexpgain = 12847; ) else if($player->maxlevel + 1) == "27" ( $maxexpgain = 13341; ) else if($player->maxlevel + 1) == "28" ( $maxexpgain = 13835; ) else if($player->maxlevel + 1) == "29" ( $maxexpgain = 14329; ) else if($player->maxlevel + 1) == "30" ( $maxexpgain = 14824; ) else if($player->maxlevel + 1) == "31" ( $maxexpgain = 15318; ) else if($player->maxlevel + 1) == "32" ( $maxexpgain = 15812; ) else if($player->maxlevel + 1) == "33" ( $maxexpgain = 16306; ) else if($player->maxlevel + 1) == "34" ( $maxexpgain = 16800; ) else if($player->maxlevel + 1) == "35" ( $maxexpgain = 17294; ) else if($player->maxlevel + 1) == "36" ( $maxexpgain = 17788; ) else if($player->maxlevel + 1) == "37" ( $maxexpgain = 18282; ) else if($player->maxlevel + 1) == "38" ( $maxexpgain = 18776; ) else if($player->maxlevel + 1) == "39" ( $maxexpgain = 19271; ) else if($player->maxlevel + 1) == "40" ( $maxexpgain = 19765; ) else if($player->maxlevel + 1) == "40" ( $maxexpgain = 19765; ) else if($player->maxlevel + 1) == "41" ( $maxexpgain = 20259; ) else if($player->maxlevel + 1) == "42" ( $maxexpgain = 20753; ) else if($player->maxlevel + 1) == "43" ( $maxexpgain = 21247; ) else if($player->maxlevel + 1) == "44" ( $maxexpgain = 21741; ) else if($player->maxlevel + 1) == "45" ( $maxexpgain = 22235; ) else if($player->maxlevel + 1) == "46" ( $maxexpgain = 22729; ) else if($player->maxlevel + 1) == "47" ( $maxexpgain = 23224; ) else if($player->maxlevel + 1) == "48" ( $maxexpgain = 23718; ) else if($player->maxlevel + 1) == "49" ( $maxexpgain = 24212; ) else if($player->maxlevel + 1) == "50" ( $maxexpgain = 24706; ) else if($player->maxlevel + 1) == "51" ( $maxexpgain = 25200; ) else if($player->maxlevel + 1) == "52" ( $maxexpgain = 25694; ) else if($player->maxlevel + 1) == "53" ( $maxexpgain = 26188; ) else if($player->maxlevel + 1) == "54" ( $maxexpgain = 26682; ) else if($player->maxlevel + 1) == "55" ( $maxexpgain = 27176; ) else if($player->maxlevel + 1) == "56" ( $maxexpgain = 27671; ) else if($player->maxlevel + 1) == "57" ( $maxexpgain = 28165; ) else if($player->maxlevel + 1) == "58" ( $maxexpgain = 28659; ) else if($player->maxlevel + 1) == "59" ( $maxexpgain = 29153; ) else if($player->maxlevel + 1) == "60" ( $maxexpgain = 29647; ) else if($player->maxlevel + 1) == "61" ( $maxexpgain = 30141; ) else if($player->maxlevel + 1) == "62" ( $maxexpgain = 30635; ) else if($player->maxlevel + 1) == "63" ( $maxexpgain = 31129; ) else if($player->maxlevel + 1) == "64" ( $maxexpgain = 31624; ) else if($player->maxlevel + 1) == "65" ( $maxexpgain = 32118; ) else if($player->maxlevel + 1) == "66" ( $maxexpgain = 32612; ) else if($player->maxlevel + 1) == "67" ( $maxexpgain = 33106; ) else if($player->maxlevel + 1) == "68" ( $maxexpgain = 33600; ) else if($player->maxlevel + 1) == "69" ( $maxexpgain = 34094; ) else if($player->maxlevel + 1) == "70" ( $maxexpgain = 34588; ) else if($player->maxlevel + 1) == "71" ( $maxexpgain = 35082; ) else if($player->maxlevel + 1) == "72" ( $maxexpgain = 35576; ) else if($player->maxlevel + 1) == "73" ( $maxexpgain = 36071; ) else if($player->maxlevel + 1) == "74" ( $maxexpgain = 36565; ) else if($player->maxlevel + 1) == "75" ( $maxexpgain = 37059; ) else if($player->maxlevel + 1) == "76" ( $maxexpgain = 37553; ) else if($player->maxlevel + 1) == "77" ( $maxexpgain = 38047; ) else if($player->maxlevel + 1) == "78" ( $maxexpgain = 38541; ) else if($player->maxlevel + 1) == "79" ( $maxexpgain = 39035; ) else if($player->maxlevel + 1) == "80" ( $maxexpgain = 39529; ) else if($player->maxlevel + 1) == "81" ( $maxexpgain = 40024; ) else if($player->maxlevel + 1) == "82" ( $maxexpgain = 40518; ) else if($player->maxlevel + 1) == "83" ( $maxexpgain = 41012; ) else if($player->maxlevel + 1) == "84" ( $maxexpgain = 41506; ) else if($player->maxlevel + 1) == "85" ( $maxexpgain = 42000; ) else if($player->maxlevel + 1) == "86" ( $maxexpgain = 42494; ) else if($player->maxlevel + 1) == "87" ( $maxexpgain = 42988; ) else if($player->maxlevel + 1) == "88" ( $maxexpgain = 43482; ) else if($player->maxlevel + 1) == "89" ( $maxexpgain = 43976; ) else if($player->maxlevel + 1) == "90" ( $maxexpgain = 44471; ) else if($player->maxlevel + 1) == "91" ( $maxexpgain = 44965; ) else if($player->maxlevel + 1) == "92" ( $maxexpgain = 45459; ) else if($player->maxlevel + 1) == "93" ( $maxexpgain = 45953; ) else if($player->maxlevel + 1) == "94" ( $maxexpgain = 46447; ) else if($player->maxlevel + 1) == "95" ( $maxexpgain = 46941; ) else if($player->maxlevel + 1) == "96" ( $maxexpgain = 47435; ) else if($player->maxlevel + 1) == "97" ( $maxexpgain = 47929; ) else if($player->maxlevel + 1) == "98" ( $maxexpgain = 48424; ) else if($player->maxlevel + 1) == "99" ( $maxexpgain = 48918; ) else if($player->maxlevel + 1) == "100" ( $maxexpgain = 49412; ) else if($player->maxlevel + 1) == "101" ( $maxexpgain = 49906; ) else if($player->maxlevel + 1) == "102" ( $maxexpgain = 50400; ) else if($player->maxlevel + 1) == "103" ( $maxexpgain = 50894; ) else if($player->maxlevel + 1) == "104" ( $maxexpgain = 51388; ) else if($player->maxlevel + 1) == "105" ( $maxexpgain = 51882; ) else if($player->maxlevel + 1) == "106" ( $maxexpgain = 52376; ) else if($player->maxlevel + 1) == "107" ( $maxexpgain = 52871; ) else if($player->maxlevel + 1) == "108" ( $maxexpgain = 53365; ) else if($player->maxlevel + 1) == "109" ( $maxexpgain = 53859; ) else if($player->maxlevel + 1) == "110" ( $maxexpgain = 54353; ) else if($player->maxlevel + 1) == "111" ( $maxexpgain = 54847; ) else if($player->maxlevel + 1) == "112" ( $maxexpgain = 55341; ) else if($player->maxlevel + 1) == "113" ( $maxexpgain = 55835; ) else if($player->maxlevel + 1) == "114" ( $maxexpgain = 56329; ) else if($player->maxlevel + 1) == "115" ( $maxexpgain = 56824; ) else if($player->maxlevel + 1) == "116" ( $maxexpgain = 57318; ) else if($player->maxlevel + 1) == "117" ( $maxexpgain = 57812; ) else if($player->maxlevel + 1) == "118" ( $maxexpgain = 58306; ) else if($player->maxlevel + 1) == "119" ( $maxexpgain = 58800; ) else if($player->maxlevel + 1) == "120" ( $maxexpgain = 59294; ) else if($player->maxlevel + 1) == "121" ( $maxexpgain = 59788; ) else if($player->maxlevel + 1) == "122" ( $maxexpgain = 60282; ) else if($player->maxlevel + 1) == "123" ( $maxexpgain = 60776; ) else if($player->maxlevel + 1) == "124" ( $maxexpgain = 61271; ) else if($player->maxlevel + 1) == "125" ( $maxexpgain = 61765; ) else if($player->maxlevel + 1) == "126" ( $maxexpgain = 62259; ) else if($player->maxlevel + 1) == "127" ( $maxexpgain = 62753; ) else if($player->maxlevel + 1) == "128" ( $maxexpgain = 63247; ) else if($player->maxlevel + 1) == "129" ( $maxexpgain = 63741; ) else if($player->maxlevel + 1) == "130" ( $maxexpgain = 64235; ) else if($player->maxlevel + 1) == "131" ( $maxexpgain = 64729; ) else if($player->maxlevel + 1) == "132" ( $maxexpgain = 65224; ) else if($player->maxlevel + 1) == "133" ( $maxexpgain = 65718; ) else if($player->maxlevel + 1) == "134" ( $maxexpgain = 66212; ) else if($player->maxlevel + 1) == "135" ( $maxexpgain = 66706; ) else if($player->maxlevel + 1) == "136" ( $maxexpgain = 67200; ) else if($player->maxlevel + 1) == "137" ( $maxexpgain = 67694; ) else if($player->maxlevel + 1) == "138" ( $maxexpgain = 68188; ) else if($player->maxlevel + 1) == "139" ( $maxexpgain = 68682; ) else if($player->maxlevel + 1) == "140" ( $maxexpgain = 69176; ) else if($player->maxlevel + 1) == "141" ( $maxexpgain = 69671; ) else if($player->maxlevel + 1) == "142" ( $maxexpgain = 70165; ) else if($player->maxlevel + 1) == "143" ( $maxexpgain = 70659; ) else if($player->maxlevel + 1) == "144" ( $maxexpgain = 71153; ) else if($player->maxlevel + 1) == "145" ( $maxexpgain = 71647; ) else if($player->maxlevel + 1) == "146" ( $maxexpgain = 72151; ) else if($player->maxlevel + 1) == "147" ( $maxexpgain = 72635; ) else if($player->maxlevel + 1) == "148" ( $maxexpgain = 73129; ) else if($player->maxlevel + 1) == "149" ( $maxexpgain = 73624; ) else if($player->maxlevel + 1) == "150" ( $maxexpgain = 74118; ) else if($player->maxlevel + 1) == "151" ( $maxexpgain = 74612; ) else if($player->maxlevel + 1) == "152" ( $maxexpgain = 75106; ) else if($player->maxlevel + 1) == "153" ( $maxexpgain = 75600; ) else if($player->maxlevel + 1) == "154" ( $maxexpgain = 76094; ) else if($player->maxlevel + 1) == "155" ( $maxexpgain = 76588; ) else if($player->maxlevel + 1) == "156" ( $maxexpgain = 77082; ) else if($player->maxlevel + 1) == "157" ( $maxexpgain = 77576; ) else if($player->maxlevel + 1) == "158" ( $maxexpgain = 78071; ) else if($player->maxlevel + 1) == "159" ( $maxexpgain = 78565; ) else if($player->maxlevel + 1) == "160" ( $maxexpgain = 79059; ) else if($player->maxlevel + 1) == "161" ( $maxexpgain = 79553; ) else if($player->maxlevel + 1) == "162" ( $maxexpgain = 80047; ) else if($player->maxlevel + 1) == "163" ( $maxexpgain = 80541; ) else if($player->maxlevel + 1) == "164" ( $maxexpgain = 81035; ) else if($player->maxlevel + 1) == "165" ( $maxexpgain = 81529; ) else if($player->maxlevel + 1) == "166" ( $maxexpgain = 82024; ) else if($player->maxlevel + 1) == "167" ( $maxexpgain = 82518; ) else if($player->maxlevel + 1) == "168" ( $maxexpgain = 83012; ) else if($player->maxlevel + 1) == "169" ( $maxexpgain = 83506; ) else if($player->maxlevel + 1) == "170" ( $maxexpgain = 84000; ) else if($player->maxlevel + 1) == "171" ( $maxexpgain = 84494; ) else if($player->maxlevel + 1) == "172" ( $maxexpgain = 84988; ) else if($player->maxlevel + 1) == "173" ( $maxexpgain = 85482; ) else if($player->maxlevel + 1) == "174" ( $maxexpgain = 85976; ) else if($player->maxlevel + 1) == "175" ( $maxexpgain = 86471; ) else if($player->maxlevel + 1) == "176" ( $maxexpgain = 86965; ) else if($player->maxlevel + 1) == "177" ( $maxexpgain = 87459; ) else if($player->maxlevel + 1) == "178" ( $maxexpgain = 87953; ) else if($player->maxlevel + 1) == "179" ( $maxexpgain = 88447; ) else if($player->maxlevel + 1) == "180" ( $maxexpgain = 88941; ) else if($player->maxlevel + 1) == "181" ( $maxexpgain = 89435; ) else if($player->maxlevel + 1) == "182" ( $maxexpgain = 89929; ) else if($player->maxlevel + 1) == "183" ( $maxexpgain = 90424; ) else if($player->maxlevel + 1) == "184" ( $maxexpgain = 90918; ) else if($player->maxlevel + 1) == "185" ( $maxexpgain = 91412; ) else if($player->maxlevel + 1) == "186" ( $maxexpgain = 91906; ) else if($player->maxlevel + 1) == "187" ( $maxexpgain = 92400; ) else if($player->maxlevel + 1) == "188" ( $maxexpgain = 92894; ) else if($player->maxlevel + 1) == "189" ( $maxexpgain = 93388; ) else if($player->maxlevel + 1) == "190" ( $maxexpgain = 93882; ) else if($player->maxlevel + 1) == "191" ( $maxexpgain = 94376; ) else if($player->maxlevel + 1) == "192" ( $maxexpgain = 94871; ) else if($player->maxlevel + 1) == "193" ( $maxexpgain = 95365; ) else if($player->maxlevel + 1) == "194" ( $maxexpgain = 95859; ) else if($player->maxlevel + 1) == "195" ( $maxexpgain = 96353; ) else if($player->maxlevel + 1) == "196" ( $maxexpgain = 96847; ) else if($player->maxlevel + 1) == "197" ( $maxexpgain = 97341; ) else if($player->maxlevel + 1) == "198" ( $maxexpgain = 97835; ) else if($player->maxlevel + 1) == "199" ( $maxexpgain = 98329; ) else if($player->maxlevel + 1) == "200" ( $maxexpgain = 98824; ) else if($player->maxlevel + 1) == "201" ( $maxexpgain = 99318; ) else if($player->maxlevel + 1) == "202" ( $maxexpgain = 99812; ) else if($player->maxlevel + 1) == "203" ( $maxexpgain = 100306; ) else if($player->maxlevel + 1) == "204" ( $maxexpgain = 100800; ) else if($player->maxlevel + 1) == "205" ( $maxexpgain = 101294; ) else if($player->maxlevel + 1) == "206" ( $maxexpgain = 101788; ) else if($player->maxlevel + 1) == "207" ( $maxexpgain = 102282; ) else if($player->maxlevel + 1) == "208" ( $maxexpgain = 102776; ) else if($player->maxlevel + 1) == "209" ( $maxexpgain = 103271; ) else if($player->maxlevel + 1) == "210" ( $maxexpgain = 103765; ) else if($player->maxlevel + 1) == "211" ( $maxexpgain = 104259; ) else if($player->maxlevel + 1) == "212" ( $maxexpgain = 104753; ) else if($player->maxlevel + 1) == "213" ( $maxexpgain = 105247; ) else if($player->maxlevel + 1) == "214" ( $maxexpgain = 105741; ) else if($player->maxlevel + 1) == "215" ( $maxexpgain = 106235; ) else if($player->maxlevel + 1) == "216" ( $maxexpgain = 106729; ) else if($player->maxlevel + 1) == "217" ( $maxexpgain = 107224; ) else if($player->maxlevel + 1) == "218" ( $maxexpgain = 107718; ) else if($player->maxlevel + 1) == "219" ( $maxexpgain = 108212; ) else if($player->maxlevel + 1) == "220" ( $maxexpgain = 108706; ) else if($player->maxlevel + 1) == "221" ( $maxexpgain = 109200; ) else if($player->maxlevel + 1) == "222" ( $maxexpgain = 109694; ) else if($player->maxlevel + 1) == "223" ( $maxexpgain = 110118; ) else if($player->maxlevel + 1) == "224" ( $maxexpgain = 110682; ) else if($player->maxlevel + 1) == "225" ( $maxexpgain = 111176; ) else if($player->maxlevel + 1) == "226" ( $maxexpgain = 111671; ) else if($player->maxlevel + 1) == "227" ( $maxexpgain = 112165; ) else if($player->maxlevel + 1) == "228" ( $maxexpgain = 112659; ) else if($player->maxlevel + 1) == "229" ( $maxexpgain = 113153; ) else if($player->maxlevel + 1) == "230" ( $maxexpgain = 113647; ) else if($player->maxlevel + 1) == "231" ( $maxexpgain = 114141; ) else if($player->maxlevel + 1) == "232" ( $maxexpgain = 114635; ) else if($player->maxlevel + 1) == "233" ( $maxexpgain = 115129; ) else if($player->maxlevel + 1) == "234" ( $maxexpgain = 115624; ) else if($player->maxlevel + 1) == "235" ( $maxexpgain = 116118; ) else if($player->maxlevel + 1) == "236" ( $maxexpgain = 116612; ) else if($player->maxlevel + 1) == "237" ( $maxexpgain = 117106; ) else if($player->maxlevel + 1) == "238" ( $maxexpgain = 117600; ) else if($player->maxlevel + 1) == "239" ( $maxexpgain = 118094; ) else if($player->maxlevel + 1) == "240" ( $maxexpgain = 118588; ) else if($player->maxlevel + 1) == "241" ( $maxexpgain = 119082; ) else if($player->maxlevel + 1) == "242" ( $maxexpgain = 119576; ) else if($player->maxlevel + 1) == "243" ( $maxexpgain = 120071; ) else if($player->maxlevel + 1) == "244" ( $maxexpgain = 120565; ) else if($player->maxlevel + 1) == "245" ( $maxexpgain = 121059; ) else if($player->maxlevel + 1) == "246" ( $maxexpgain = 121553; ) else if($player->maxlevel + 1) == "247" ( $maxexpgain = 122047; ) else if($player->maxlevel + 1) == "248" ( $maxexpgain = 122541; ) else if($player->maxlevel + 1) == "249" ( $maxexpgain = 123035; ) else if($player->maxlevel + 1) == "250" ( $maxexpgain = 123529; ) else if($player->maxlevel + 1) == "251" ( $maxexpgain = 124024; ) else if($player->maxlevel + 1) == "252" ( $maxexpgain = 124518; ) else if($player->maxlevel + 1) == "253" ( $maxexpgain = 125012; ) else if($player->maxlevel + 1) == "254" ( $maxexpgain = 125506; ) else if($player->maxlevel + 1) == "255" ( $maxexpgain = 126000; ) else if($player->maxlevel + 1) == "256" ( $maxexpgain = 126494; ) else if($player->maxlevel + 1) == "257" ( $maxexpgain = 126988; ) else if($player->maxlevel + 1) == "258" ( $maxexpgain = 127482; ) else if($player->maxlevel + 1) == "259" ( $maxexpgain = 127976; ) else if($player->maxlevel + 1) == "260" ( $maxexpgain = 128471; ) else if($player->maxlevel + 1) == "261" ( $maxexpgain = 128965; ) else if($player->maxlevel + 1) == "262" ( $maxexpgain = 129459; ) else if($player->maxlevel + 1) == "263" ( $maxexpgain = 129953; ) else if($player->maxlevel + 1) == "264" ( $maxexpgain = 130447; ) else if($player->maxlevel + 1) == "265" ( $maxexpgain = 130941; ) else if($player->maxlevel + 1) == "266" ( $maxexpgain = 131435; ) else if($player->maxlevel + 1) == "267" ( $maxexpgain = 131929; ) else if($player->maxlevel + 1) == "268" ( $maxexpgain = 132424; ) else if($player->maxlevel + 1) == "269" ( $maxexpgain = 132918; ) else if($player->maxlevel + 1) == "270" ( $maxexpgain = 133412; ) else if($player->maxlevel + 1) == "271" ( $maxexpgain = 133906; ) else if($player->maxlevel + 1) == "272" ( $maxexpgain = 134400; ) else if($player->maxlevel + 1) == "273" ( $maxexpgain = 134894; ) else if($player->maxlevel + 1) == "274" ( $maxexpgain = 135388; ) else if($player->maxlevel + 1) == "275" ( $maxexpgain = 135882; ) else if($player->maxlevel + 1) == "276" ( $maxexpgain = 136376; ) else if($player->maxlevel + 1) == "277" ( $maxexpgain = 136871; ) else if($player->maxlevel + 1) == "278" ( $maxexpgain = 137365; ) else if($player->maxlevel + 1) == "279" ( $maxexpgain = 137859; ) else if($player->maxlevel + 1) == "280" ( $maxexpgain = 138353; ) else if($player->maxlevel + 1) == "281" ( $maxexpgain = 138847; ) else if($player->maxlevel + 1) == "282" ( $maxexpgain = 139341; ) else if($player->maxlevel + 1) == "283" ( $maxexpgain = 139835; ) else if($player->maxlevel + 1) == "284" ( $maxexpgain = 140329; ) else if($player->maxlevel + 1) == "285" ( $maxexpgain = 140824; ) else if($player->maxlevel + 1) == "286" ( $maxexpgain = 141318; ) else if($player->maxlevel + 1) == "287" ( $maxexpgain = 141812; ) else if($player->maxlevel + 1) == "288" ( $maxexpgain = 142306; ) else if($player->maxlevel + 1) == "289" ( $maxexpgain = 142800; ) else if($player->maxlevel + 1) == "290" ( $maxexpgain = 143294; ) else if($player->maxlevel + 1) == "291" ( $maxexpgain = 143788; ) else if($player->maxlevel + 1) == "292" ( $maxexpgain = 144282; ) else if($player->maxlevel + 1) == "293" ( $maxexpgain = 144776; ) else if($player->maxlevel + 1) == "294" ( $maxexpgain = 145271; ) else if($player->maxlevel + 1) == "295" ( $maxexpgain = 145765; ) else if($player->maxlevel + 1) == "296" ( $maxexpgain = 146259; ) else if($player->maxlevel + 1) == "297" ( $maxexpgain = 146753; ) else if($player->maxlevel + 1) == "298" ( $maxexpgain = 147247; ) else if($player->maxlevel + 1) == "299" ( $maxexpgain = 147741; ) else if($player->maxlevel + 1) == "300" ( $maxexpgain = 163059; ) else if($player->maxlevel + 1) == "301" ( $maxexpgain = 163899; ) else if($player->maxlevel + 1) == "302" ( $maxexpgain = 164743; ) else if($player->maxlevel + 1) == "303" ( $maxexpgain = 165588; ) else if($player->maxlevel + 1) == "304" ( $maxexpgain = 166435; ) else if($player->maxlevel + 1) == "305" ( $maxexpgain = 167284; ) else if($player->maxlevel + 1) == "306" ( $maxexpgain = 168134; ) else if($player->maxlevel + 1) == "307" ( $maxexpgain = 168987; ) else if($player->maxlevel + 1) == "308" ( $maxexpgain = 169842; ) else if($player->maxlevel + 1) == "309" ( $maxexpgain = 170698; ) else if($player->maxlevel + 1) == "310" ( $maxexpgain = 171557; ) else if($player->maxlevel + 1) == "311" ( $maxexpgain = 172419; ) else if($player->maxlevel + 1) == "312" ( $maxexpgain = 173281; ) else if($player->maxlevel + 1) == "313" ( $maxexpgain = 174146; ) else if($player->maxlevel + 1) == "314" ( $maxexpgain = 175013; ) else if($player->maxlevel + 1) == "315" ( $maxexpgain = 175881; ) else if($player->maxlevel + 1) == "316" ( $maxexpgain = 176752; ) else if($player->maxlevel + 1) == "317" ( $maxexpgain = 177624; ) else if($player->maxlevel + 1) == "318" ( $maxexpgain = 178499; ) else if($player->maxlevel + 1) == "319" ( $maxexpgain = 179376; ) else if($player->maxlevel + 1) == "320" ( $maxexpgain = 180255; ) else if($player->maxlevel + 1) == "321" ( $maxexpgain = 181135; ) else if($player->maxlevel + 1) == "322" ( $maxexpgain = 182017; ) else if($player->maxlevel + 1) == "323" ( $maxexpgain = 182902; ) else if($player->maxlevel + 1) == "324" ( $maxexpgain = 183788; ) else if($player->maxlevel + 1) == "325" ( $maxexpgain = 184676; ) else if($player->maxlevel + 1) == "326" ( $maxexpgain = 185556; ) else if($player->maxlevel + 1) == "327" ( $maxexpgain = 186459; ) else if($player->maxlevel + 1) == "328" ( $maxexpgain = 187354; ) else if($player->maxlevel + 1) == "329" ( $maxexpgain = 188250; ) else if($player->maxlevel + 1) == "330" ( $maxexpgain = 189148; ) else if($player->maxlevel + 1) == "331" ( $maxexpgain = 190049; ) else if($player->maxlevel + 1) == "332" ( $maxexpgain = 190951; ) else if($player->maxlevel + 1) == "333" ( $maxexpgain = 191855; ) else if($player->maxlevel + 1) == "334" ( $maxexpgain = 192761; ) else if($player->maxlevel + 1) == "335" ( $maxexpgain = 193669; ) else if($player->maxlevel + 1) == "336" ( $maxexpgain = 194580; ) else if($player->maxlevel + 1) == "337" ( $maxexpgain = 195492; ) else if($player->maxlevel + 1) == "338" ( $maxexpgain = 196406; ) else if($player->maxlevel + 1) == "339" ( $maxexpgain = 197322; ) else if($player->maxlevel + 1) == "340" ( $maxexpgain = 198240; ) else if($player->maxlevel + 1) == "341" ( $maxexpgain = 199160; ) else if($player->maxlevel + 1) == "342" ( $maxexpgain = 201006; ) else if($player->maxlevel + 1) == "343" ( $maxexpgain = 201006; ) else if($player->maxlevel + 1) == "344" ( $maxexpgain = 201931; ) else if($player->maxlevel + 1) == "345" ( $maxexpgain = 202860; ) else if($player->maxlevel + 1) == "346" ( $maxexpgain = 203790; ) else if($player->maxlevel + 1) == "347" ( $maxexpgain = 204722; ) else if($player->maxlevel + 1) == "348" ( $maxexpgain = 205656; ) else if($player->maxlevel + 1) == "349" ( $maxexpgain = 206592; ) else if($player->maxlevel + 1) == "350" ( $maxexpgain = 259412; ) else if($player->maxlevel + 1) == "351" ( $maxexpgain = 260499; ) else if($player->maxlevel + 1) == "352" ( $maxexpgain = 261589; ) else if($player->maxlevel + 1) == "353" ( $maxexpgain = 262683; ) else if($player->maxlevel + 1) == "354" ( $maxexpgain = 263776; ) else if($player->maxlevel + 1) == "355" ( $maxexpgain = 264872; ) else if($player->maxlevel + 1) == "356" ( $maxexpgain = 265970; ) else if($player->maxlevel + 1) == "357" ( $maxexpgain = 267070; ) else if($player->maxlevel + 1) == "358" ( $maxexpgain = 268171; ) else if($player->maxlevel + 1) == "359" ( $maxexpgain = 269275; ) else if($player->maxlevel + 1) == "360" ( $maxexpgain = 270381; ) else if($player->maxlevel + 1) == "361" ( $maxexpgain = 271488; ) else if($player->maxlevel + 1) == "362" ( $maxexpgain = 272599; ) else if($player->maxlevel + 1) == "363" ( $maxexpgain = 273711; ) else if($player->maxlevel + 1) == "364" ( $maxexpgain = 274825; ) else if($player->maxlevel + 1) == "365" ( $maxexpgain = 275940; ) else if($player->maxlevel + 1) == "366" ( $maxexpgain = 277058; ) else if($player->maxlevel + 1) == "367" ( $maxexpgain = 278177; ) else if($player->maxlevel + 1) == "368" ( $maxexpgain = 279299; ) else if($player->maxlevel + 1) == "369" ( $maxexpgain = 280422; ) else if($player->maxlevel + 1) == "370" ( $maxexpgain = 281549; ) else if($player->maxlevel + 1) == "371" ( $maxexpgain = 282676; ) else if($player->maxlevel + 1) == "372" ( $maxexpgain = 283806; ) else if($player->maxlevel + 1) == "373" ( $maxexpgain = 284937; ) else if($player->maxlevel + 1) == "374" ( $maxexpgain = 286070; ) else if($player->maxlevel + 1) == "375" ( $maxexpgain = 287206; ) else if($player->maxlevel + 1) == "376" ( $maxexpgain = 288343; ) else if($player->maxlevel + 1) == "377" ( $maxexpgain = 289482; ) else if($player->maxlevel + 1) == "378" ( $maxexpgain = 290623; ) else if($player->maxlevel + 1) == "379" ( $maxexpgain = 291768; ) else if($player->maxlevel + 1) == "380" ( $maxexpgain = 292913; ) else if($player->maxlevel + 1) == "381" ( $maxexpgain = 294061; ) else if($player->maxlevel + 1) == "382" ( $maxexpgain = 295210; ) else if($player->maxlevel + 1) == "383" ( $maxexpgain = 296361; ) else if($player->maxlevel + 1) == "384" ( $maxexpgain = 297514; ) else if($player->maxlevel + 1) == "385" ( $maxexpgain = 298669; ) else if($player->maxlevel + 1) == "386" ( $maxexpgain = 299826; ) else if($player->maxlevel + 1) == "387" ( $maxexpgain = 300987; ) else if($player->maxlevel + 1) == "388" ( $maxexpgain = 302148; ) else if($player->maxlevel + 1) == "389" ( $maxexpgain = 303311; ) else if($player->maxlevel + 1) == "390" ( $maxexpgain = 304475; ) else if($player->maxlevel + 1) == "391" ( $maxexpgain = 305642; ) else if($player->maxlevel + 1) == "392" ( $maxexpgain = 306811; ) else if($player->maxlevel + 1) == "393" ( $maxexpgain = 307982; ) else if($player->maxlevel + 1) == "394" ( $maxexpgain = 309155; ) else if($player->maxlevel + 1) == "395" ( $maxexpgain = 310330; ) else if($player->maxlevel + 1) == "396" ( $maxexpgain = 311508; ) else if($player->maxlevel + 1) == "397" ( $maxexpgain = 312687; ) else if($player->maxlevel + 1) == "398" ( $maxexpgain = 313868; ) else if($player->maxlevel + 1) == "399" ( $maxexpgain = 315050; ) else if($player->maxlevel + 1) == "400" ( $maxexpgain = 375529; ) else if($player->maxlevel + 1) == "401" ( $maxexpgain = 376864; ) else if($player->maxlevel + 1) == "402" ( $maxexpgain = 378201; ) else if($player->maxlevel + 1) == "403" ( $maxexpgain = 379540; ) else if($player->maxlevel + 1) == "404" ( $maxexpgain = 380883; ) else if($player->maxlevel + 1) == "405" ( $maxexpgain = 382225; ) else if($player->maxlevel + 1) == "406" ( $maxexpgain = 383570; ) else if($player->maxlevel + 1) == "407" ( $maxexpgain = 384917; ) else if($player->maxlevel + 1) == "408" ( $maxexpgain = 386266; ) else if($player->maxlevel + 1) == "409" ( $maxexpgain = 387616; ) else if($player->maxlevel + 1) == "410" ( $maxexpgain = 388969; ) else if($player->maxlevel + 1) == "411" ( $maxexpgain = 390324; ) else if($player->maxlevel + 1) == "412" ( $maxexpgain = 391680; ) else if($player->maxlevel + 1) == "413" ( $maxexpgain = 393041; ) else if($player->maxlevel + 1) == "414" ( $maxexpgain = 394401; ) else if($player->maxlevel + 1) == "415" ( $maxexpgain = 395764; ) else if($player->maxlevel + 1) == "416" ( $maxexpgain = 397128; ) else if($player->maxlevel + 1) == "417" ( $maxexpgain = 398495; ) else if($player->maxlevel + 1) == "418" ( $maxexpgain = 399863; ) else if($player->maxlevel + 1) == "419" ( $maxexpgain = 401234; ) else if($player->maxlevel + 1) == "420" ( $maxexpgain = 402606; ) else if($player->maxlevel + 1) == "421" ( $maxexpgain = 403983; ) else if($player->maxlevel + 1) == "422" ( $maxexpgain = 405359; ) else if($player->maxlevel + 1) == "423" ( $maxexpgain = 406737; ) else if($player->maxlevel + 1) == "424" ( $maxexpgain = 408118; ) else if($player->maxlevel + 1) == "425" ( $maxexpgain = 409500; ) else if($player->maxlevel + 1) == "426" ( $maxexpgain = 410884; ) else if($player->maxlevel + 1) == "427" ( $maxexpgain = 412271; ) else if($player->maxlevel + 1) == "428" ( $maxexpgain = 413659; ) else if($player->maxlevel + 1) == "429" ( $maxexpgain = 415049; ) else if($player->maxlevel + 1) == "430" ( $maxexpgain = 416443; ) else if($player->maxlevel + 1) == "431" ( $maxexpgain = 417837; ) else if($player->maxlevel + 1) == "432" ( $maxexpgain = 419233; ) else if($player->maxlevel + 1) == "433" ( $maxexpgain = 420632; ) else if($player->maxlevel + 1) == "434" ( $maxexpgain = 422032; ) else if($player->maxlevel + 1) == "435" ( $maxexpgain = 423434; ) else if($player->maxlevel + 1) == "436" ( $maxexpgain = 424838; ) else if($player->maxlevel + 1) == "437" ( $maxexpgain = 426244; ) else if($player->maxlevel + 1) == "438" ( $maxexpgain = 427654; ) else if($player->maxlevel + 1) == "439" ( $maxexpgain = 429064; ) else if($player->maxlevel + 1) == "440" ( $maxexpgain = 430476; ) else if($player->maxlevel + 1) == "441" ( $maxexpgain = 431890; ) else if($player->maxlevel + 1) == "442" ( $maxexpgain = 433306; ) else if($player->maxlevel + 1) == "443" ( $maxexpgain = 434726; ) else if($player->maxlevel + 1) == "444" ( $maxexpgain = 436143; ) else if($player->maxlevel + 1) == "445" ( $maxexpgain = 437565; ) else if($player->maxlevel + 1) == "446" ( $maxexpgain = 438989; ) else if($player->maxlevel + 1) == "447" ( $maxexpgain = 440417; ) else if($player->maxlevel + 1) == "448" ( $maxexpgain = 441845; ) else if($player->maxlevel + 1) == "449" ( $maxexpgain = 443274; ) else if($player->maxlevel + 1) == "450" ( $maxexpgain = 444706; ) else if($player->maxlevel + 1) == "451" ( $maxexpgain = 446140; ) else if($player->maxlevel + 1) == "452" ( $maxexpgain = 447575; ) else if($player->maxlevel + 1) == "453" ( $maxexpgain = 449013; ) else if($player->maxlevel + 1) == "454" ( $maxexpgain = 450453; ) else if($player->maxlevel + 1) == "455" ( $maxexpgain = 451896; ) else if($player->maxlevel + 1) == "456" ( $maxexpgain = 453340; ) else if($player->maxlevel + 1) == "457" ( $maxexpgain = 454785; ) else if($player->maxlevel + 1) == "458" ( $maxexpgain = 456233; ) else if($player->maxlevel + 1) == "459" ( $maxexpgain = 457682; ) else if($player->maxlevel + 1) == "460" ( $maxexpgain = 459134; ) else if($player->maxlevel + 1) == "461" ( $maxexpgain = 460587; ) else if($player->maxlevel + 1) == "462" ( $maxexpgain = 462043; ) else if($player->maxlevel + 1) == "463" ( $maxexpgain = 463500; ) else if($player->maxlevel + 1) == "464" ( $maxexpgain = 464963; ) else if($player->maxlevel + 1) == "465" ( $maxexpgain = 466423; ) else if($player->maxlevel + 1) == "466" ( $maxexpgain = 467886; ) else if($player->maxlevel + 1) == "467" ( $maxexpgain = 469352; ) else if($player->maxlevel + 1) == "468" ( $maxexpgain = 470819; ) else if($player->maxlevel + 1) == "469" ( $maxexpgain = 472288; ) else if($player->maxlevel + 1) == "470" ( $maxexpgain = 473759; ) else if($player->maxlevel + 1) == "471" ( $maxexpgain = 475233; ) else if($player->maxlevel + 1) == "472" ( $maxexpgain = 476710; ) else if($player->maxlevel + 1) == "473" ( $maxexpgain = 478187; ) else if($player->maxlevel + 1) == "474" ( $maxexpgain = 479666; ) else if($player->maxlevel + 1) == "475" ( $maxexpgain = 586765; ) else if($player->maxlevel + 1) == "476" ( $maxexpgain = 705600; ) else if($player->maxlevel + 1) == "477" ( $maxexpgain = 824929; ) else if($player->maxlevel + 1) == "478" ( $maxexpgain = 944752; ) else if($player->maxlevel + 1) == "479" ( $maxexpgain = 1065069; ) else if($player->maxlevel + 1) == "480" ( $maxexpgain = 1185880; ) else if($player->maxlevel + 1) == "481" ( $maxexpgain = 1307191; ) else if($player->maxlevel + 1) == "482" ( $maxexpgain = 1428990; ) else if($player->maxlevel + 1) == "483" ( $maxexpgain = 1551284; ) else if($player->maxlevel + 1) == "484" ( $maxexpgain = 1674071; ) else if($player->maxlevel + 1) == "485" ( $maxexpgain = 1797353; ) else if($player->maxlevel + 1) == "486" ( $maxexpgain = 1921128; ) else if($player->maxlevel + 1) == "487" ( $maxexpgain = 2045398; ) else if($player->maxlevel + 1) == "488" ( $maxexpgain = 2170161; ) else if($player->maxlevel + 1) == "489" ( $maxexpgain = 2295428; ) else if($player->maxlevel + 1) == "490" ( $maxexpgain = 2421180; ) else if($player->maxlevel + 1) == "491" ( $maxexpgain = 2547426; ) else if($player->maxlevel + 1) == "492" ( $maxexpgain = 2674166; ) else if($player->maxlevel + 1) == "493" ( $maxexpgain = 2801400; ) else if($player->maxlevel + 1) == "494" ( $maxexpgain = 2929128; ) else if($player->maxlevel + 1) == "495" ( $maxexpgain = 3057350; ) else if($player->maxlevel + 1) == "496" ( $maxexpgain = 3186066; ) else if($player->maxlevel + 1) == "497" ( $maxexpgain = 3315276; ) else if($player->maxlevel + 1) == "498" ( $maxexpgain = 3444994; ) else if($player->maxlevel + 1) == "499" ( $maxexpgain = 7150385; ) else if($player->maxlevel + 1) == "500" ( $maxexpgain = 0; ) ?> let me give you an advice next time when you don't know to do something like this you should do a post in application design(i think) and ask there how people would approach the problem. the way i did it should perfectly working way... it may not be very practible but still. (i didnt think the way it was written would matter too much as its just a include file.) even though im extremely greatful for the help so far... it still hasnt fixed my current error. Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818480 Share on other sites More sharing options...
mikesta707 Posted April 24, 2009 Share Posted April 24, 2009 you have an error with your query right? Well it isnt a normal query is it, it is using some method of some object. can you show us the definition of this object? or at least its db_query method? Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818484 Share on other sites More sharing options...
jonsjava Posted April 24, 2009 Share Posted April 24, 2009 instead of that huuuuuuuuuuuuuuuge file that has "if...else if....else if...." use this: $maxexpgain = ($player->maxlevel + 1) * 494; Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818485 Share on other sites More sharing options...
seany123 Posted April 24, 2009 Author Share Posted April 24, 2009 you have an error with your query right? Well it isnt a normal query is it, it is using some method of some object. can you show us the definition of this object? or at least its db_query method? I dont understand exactly what you mean by that but this page was working fine... with this query.. $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=?, `awake`=? where `id`=?",array(1, ($player->level+1) * 70 - 20, 0, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->awake - $awakeloss, $player->id)); its when i replaced ($player->level+1) * 70 - 20 with $maxexpgain that it now doesnt work. instead of that huuuuuuuuuuuuuuuge file that has "if...else if....else if...." use this: $maxexpgain = ($player->maxlevel + 1) * 494; i would have done that but for example else if($player->maxlevel + 1) == "498" ( $maxexpgain = 3444994; ) else if($player->maxlevel + 1) == "499" ( $maxexpgain = 7150385; ) 494 * 499 doesn't = 7150385. however i could use your method and just have a few if and else's so thankyou for that. Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818494 Share on other sites More sharing options...
mikesta707 Posted April 24, 2009 Share Posted April 24, 2009 you have an error with your query right? Well it isnt a normal query is it, it is using some method of some object. can you show us the definition of this object? or at least its db_query method? I dont understand exactly what you mean by that but this page was working fine... with this query.. $query = $db->execute("Update `players` set `level`= `level`+?, `maxexp` =?, `exp` =?, `money` = `money` + ?, `hp`=?, `maxhp`=?,`maxenergy`=`maxenergy`+?, `energy`=?, `crimes_sucess`=?, `crimes_money`=?, `maxnerve`=?, `awake`=? where `id`=?",array(1, ($player->level+1) * 70 - 20, 0, $player->money + $moneygain, $player->maxhp + 10, $player->maxhp + 10, $player->maxenergy + 1, $player->energy = $player->maxenergy, $player->crimes_sucess + 1, $player->crimes_money + $moneygain, $player->maxnerve + 1, $player->awake - $awakeloss, $player->id)); its when i replaced ($player->level+1) * 70 - 20 with $maxexpgain that it now doesnt work. that isnt a normal mysql query... it uses an object called db with a method called execute to do the query. But whatever you clearly dont realize this, or i'm misunderstanding the code. Is it returning an error? Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818496 Share on other sites More sharing options...
seany123 Posted April 24, 2009 Author Share Posted April 24, 2009 no, no errors are being displayed... and my private_header.php etc are still echoing Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818499 Share on other sites More sharing options...
Zhadus Posted April 24, 2009 Share Posted April 24, 2009 As I said, simplify and re-read your code, first off: ($player->maxexp + $maxexpgain) - $player->maxexp Couldn't this be replaced with just $maxexpgain? You have made things overly complicated, and your error lies within the mess of code. Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818509 Share on other sites More sharing options...
seany123 Posted April 24, 2009 Author Share Posted April 24, 2009 As I said, simplify and re-read your code, first off: ($player->maxexp + $maxexpgain) - $player->maxexp Couldn't this be replaced with just $maxexpgain? You have made things overly complicated, and your error lies within the mess of code. Yes i thought so to, i have tried that and the same thing happened. Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818543 Share on other sites More sharing options...
seany123 Posted April 24, 2009 Author Share Posted April 24, 2009 okay i fiddled about with it abit and now ive got an error. Input Array does not match ?: Update `players` set `level`= `level`+1, `maxexp` =0, `exp` =9094072608, `money` = `money` + 199645, `hp`=199645, `maxhp`=202,`maxenergy`=`maxenergy`+'201', `energy`=402, `crimes_sucess`=475160, `crimes_money`=101, `maxnerve`='1' where `id`= Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818557 Share on other sites More sharing options...
seany123 Posted April 24, 2009 Author Share Posted April 24, 2009 it means there must be something wrong with this... okay i just realised the error there... but using this... <?php $value = ($player->maxlevel + 1); if ($value < 500) $maxexpgain = (494*$value) + (floor($value/5)); else $maxexpgain = 0; ?> for some reason $maxexpgain = 0 and my level is 435 Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818567 Share on other sites More sharing options...
mikesta707 Posted April 24, 2009 Share Posted April 24, 2009 is that query set to output a mysql error? as in is there something like mysql_query("whatever") or die("error".mysql_error()); if there is a mysql problem, and you dont have your code outputting the error, you wont see any errors popping up. the error you mentioned above seems to me like you are missing an argument, or your array doesnt have enough information Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818572 Share on other sites More sharing options...
Zhadus Posted April 24, 2009 Share Posted April 24, 2009 it means there must be something wrong with this... okay i just realised the error there... but using this... <?php $value = ($player->maxlevel + 1); if ($value < 500) $maxexpgain = (494*$value) + (floor($value/5)); else $maxexpgain = 0; ?> for some reason $maxexpgain = 0 and my level is 435 If you output $value at that point, what does that return as? It could have to do with the error too. Quote Link to comment https://forums.phpfreaks.com/topic/155530-help-needed/#findComment-818600 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.