Jump to content
MakeWebGames

Floydian

Members
  • Posts

    900
  • Joined

  • Last visited

    Never

Everything posted by Floydian

  1. Re: Hacker   My point wasn't to "sell services", but rather a simple comparision. I.e., if I wouldn't do a job for $100, then it must be a hard job to do. Make sense? ;)   I can't really comment on all the hacking going on. If I did, I would sound like I'm being harsh. I.e., it might go something like this ---- There are two sorts of folks that routinely fall victim to hacking. Naturally I am talking about people that run games based on mccodes. Now the two types of mccodes game owners that fall victim to hacking on a regular basis are the ones that can't code and want other people to write up solutions for them pro bono. And then there's the folks that either can't code or are poor programmers that don't have the funds necessary to pay someone to secure their site. There is no "catch all" solution that prevents hacking. Remember, the Pentagon is hacked on a daily basis. So obviously, you simply can't prevent it all. Password protection? How about a brute force attack. Sessions, how about session fixation attacks. Oh, you're on a shared server, then your temp files containing tons of information like session ids are voulnerable to any of the 1000's of folks sharing your shared host. Ah, so you've figured out how to prevent all of those. Have you gone through every script and every file on your game and have you understood completely what the code there is doing? If you haven't, then you haven't even begun to secure your game. mccodes was and still is full of security wholes. Dabom just didn't know squat about secure programming methods. Just consider the fact that dbs2 requires magic quotes, or it dies. lol that's beyond laughable.   So, folks use a hellaciously insecure platform and are amazed when they find out they get hacked over and over again. Folks pick up free scripts and are amazed that the person that made the free script wasn't too concerned about the quality of the code.   There really isn't anything one can say to help here because the only viable solution for folks that lack the necessary programming skils and/or the funds to pay for the services of someone that does have those skills is to tell them to try and plug a boat with more holes than swiss cheese with a rubber stopper.   But if I said that, folks would think I'm being harsh. And in reality, I sympathize with the hobbyists that run games in their time off from school, or whatever the case may be, who have trouble with the azzholes that go around trying to see if the same old hacks that worked on the last mccodes game works on the next one. I sympathize with the fact that hobbyists aren't going to be able to afford a professional solution to their problems and aren't likely to posses the necessary skills to solve it themselves. The best advice I can offer the hobbyists out there, is learn how to run a MySQL query. If you can do something like this: update users set user_level = 2 where userid = 1 Then you never have to worry about being dethroned from your staffly dais and not being able to regain your former position.   Learn how to use do something like: update users set password = "gobbledygook" where userid = someone to perma ban Useful when you are locked out of your staff panel and you just want to lock someone out of the game by preventing them from being able to log in. If you had databased sessions, you could even log them out using   delete from sessions where userid = someone to log out   And if you're royally pissed, log them all out   truncate sessions lmao   And if you're feeling generous, update users set money = money + 9999999999   Learn your MySQL. If you can't be bothered to learn anything else, learn how to run a few queries. All the power is held in the query. Period.
  2. Floydian

    Human Math

    Re: Human Math You're welcome ;) And thanks for the good words!
  3. Re: Need Help     LMFAO!!!! Well said ;)
  4. Re: alert box Alert boxes are notorious for annoying users... Using one on your logged in page is a good way to ensure folks don't come back to your game. I recommend using them very sparingly. Like for instance, you have a site that accepts payments by credit card and you want to make absolutely sure that they don't submit a form twice, you can use a confirm pop up to notify the user that they should not submit the form again after clicking okay. Even then, the use of javascript pop ups are not recommended.   One of the few legitimate uses of alert boxes is for debugging javascript. And even then, it's not the best way to debug a script, but often times it turns out to be the fastest way to get at the info needed to debug a script.   So, do yourself a favor and try not to use alert boxes.
  5. Floydian

    New Website

    Re: New Website Well, I personally couldn't answer your question, even knowing that the site is for your learning and "own use", without knowing what you want to learn and what "own use" would entail. There's a whole world of things to learn, whatcha want to learn?
  6. Re: learning mysql_real_escape_string just need to verify. A couple things: @intval(250), Why are you using so many error suppression operators? Read about error suppression here, if you don't know what that is -> http://us3.php.net/manual/en/language.operators.errorcontrol.php Seems unnecessary to me to use it before intval().   Why use intval at all on an integer constant? Since "250" is hard coded, it can never change, and it's already an integer. That shouldn't need any formatting. sprintf() is all about formatting a string and there's nothing to format with the "250" so plug it right into the string as is. I.e. -> $blah = sprintf('update users set money = money + %d', @intval(250) ); That is redundant in at least two ways. $blah = sprintf('update users set money = money + %d', 250 ); That is better... $blah = 'update users set money = money + 250'; And that is the best in that situation. You don't even need a sprintf function because nothing is being formatted. It's all hard coded.     ------------- As for the question of whether or not to use %d instead of %u and vice versa it completely depends on the code at hand.   I normally use %d. Reason being, my code almost always checks for negative numbers before I get ready to do a query. For instance, if a user types in -20000000 into a form which is intended for use in sending money from one user to another, instead of converting that number to +20000000 or 20000000 without warning to the user, it is better to relay a message to the user letting them know their "input" was out of the allowable range. You can't do that if you're using %u as the only means of dealing with negative numbers. And since I've filtered them out already by the time a query runs, I almost always use %d. I know some folks like to punish users that type in negatives by converting them to positive hoping that the user that probably attempted to find a loop hole in your program will screw themselves. However, being that we're above such useless tactics, we forgo the "punishment" approach and go for all out user friendliness instead. (That is how the big companies do things) Try sending a negative amount of cash through pay pal and see what happens. I guarantee you that they don't just convert it to positive in the hopes that it screws you up.   In reference to the "punishment" A*N*A*L-ysis above, that's not directed to anyone in particular, but I think the whole idea of converting negs to positives silently is at least to a small extent motivated by the "punishment" mentality and probably also by lack of understanding in how the better way to do things works.   Note: the bad word filter doesn't like A*N*A*L, so A*N*A*L-ysis is adversly affected by the filter and thus I had to compensate. ;)
  7. Floydian

    New Website

    Re: New Website hm I sense a project that is doomed to failure. How can you be successful with a site that someone else had to tell you to make?
  8. Re: Hacker adding phpbb3 to an existing game would be difficult. just take the password that needs to be stored in the phpbb users table. it uses a different hash than mccodes and since I wouldn't have a list of passwords for all your users (since presumably you have them stored as a hash only), I wouldn't be able to automatically set up your existing users with accounts. You could automatically log them into the forum, but they wouldn't ever be able to login to the forum by itself, and they wouldn't be able to change their password on the forum (since they wouldn't know it). Thus, you're only viable option would be to force existing users to sign up to the forum and then link their accounts to the game account. Not a pretty picture. So, I don't think I'd be taking on that job without sufficient pay (more than $100 USD for sure).
  9. Re: [Request] Secondary Weapon For V2 Ah yes, paralem, that makes sense. I tend to think in terms of expandability. For instance, making it so that you could have any number of item types as secondary weapons instead of tying code to one particular item type. In that scenario, it would make sense to added a secondary_weapon field to items table. Any item/item_type with a secondary_weapon flag would be an equipable item_type. That would allow a bit more flexibility. But going for using the item_type itself works too. Good job ;)
  10. Re: [Request] Secondary Weapon For V2 I could be wrong, but if you add a new column to items for secondary weapons, wouldn't attack need to be modified to look for that new column? Like I said, I could be wrong... I suppose if you add in a flag to the items table for primary/secondary and use the weapons column for the weapons strength, you could sidestep that.
  11. Floydian

    Human Math

    Re: Human Math Update The previous example did not accept negative numbers. The new one accepts negative numbers in the addition and multiplication methods. I've also added in a subtraction module, and it also accepts negative numbers. All three modules accept decimal numbers and negative numbers, or any combination of those.   <?php set_time_limit(0); class precisionMath { function isNegative($value) { if (strpos($value, '-') === 0) { return true; } else { return false; } } function stripNegative($value) { return substr($value, 1); } function add($v1,$v2) { if ($this->isNegative($v1)) { $v1 = $this->stripNegative($v1); $v1_neg = true; } else { $v1_neg = false; } if ($this->isNegative($v2)) { $v2 = $this->stripNegative($v2); $v2_neg = true; } else { $v2_neg = false; } if (!$v1_neg and !$v2_neg) { return $this->addMechanics($v1,$v2); } elseif($v1_neg and !$v2_neg) { if ($v1 == $v2) { return 0; } elseif ($v1 > $v2) { $result = $this->minus_mechanics($v1, $v2); return '-' . $result; } else { return $this->minus_mechanics($v2, $v1); } } elseif(!$v1_neg and $v2_neg) { if ($v1 == $v2) { return 0; } elseif ($v1 > $v2) { return $this->minus_mechanics($v1, $v2); } else { $result = $this->minus_mechanics($v2, $v1); return '-' . $result; } } else { return '-' . $this->addMechanics($v1,$v2); } } function addMechanics($v1,$v2) { $p1 = strpos($v1, '.'); $p2 = strpos($v2, '.'); if ($p1 !== false) { $x1 = substr($v1, $p1 + 1); $v1 = substr($v1, 0, $p1); } else { $x1 = 0; } if ($p2 !== false) { $x2 = substr($v2, $p2 + 1); $v2 = substr($v2, 0, $p2); } else { $x2 = 0; } if ($x1 or $x2) { $x1 = str_split($x1); $x2 = str_split($x2); $xc1 = count($x1); $xc2 = count($x2); if ($xc1 >= $xc2) { for ($x = 1; $x <= $xc1 - $xc2; $x++) { $x2[] = '0'; } $bd = $x1; $cd = $x2; } else { for ($x = 1; $x <= $xc2 - $xc1; $x++) { $x1[] = '0'; } $bd = $x2; $cd = $x1; } $bd = array_reverse($bd); $cd = array_reverse($cd); $last = ''; foreach ($bd as $key => $value) { if (!isset($cd[$key])) { break; } else { $bd[$key] += $cd[$key]; if ($bd[$key] >= 10) { $bd[$key] -= 10; if (isset($bd[$key + 1])) { $bd[$key + 1]++; } else { $last = 1; } } } } } // End of decimal portion. $v1 = str_split($v1); $v2 = str_split($v2); if (count($v1) >= count($v2)) { $b = $v1; $c = $v2; } else { $b = $v2; $c = $v1; } $b = array_reverse($b); $c = array_reverse($c); if (isset($last) and $last == 1) { $b[0]++; } $last = ''; foreach ($b as $key => $value) { if (!isset($c[$key])) { break; } else { $b[$key] += $c[$key]; if ($b[$key] >= 10) { $b[$key] -= 10; if (isset($b[$key + 1])) { $b[$key + 1]++; } else { $last = 1; } } } } if (isset($bd)) { return $last . implode(array_reverse($b)) . '.' . implode(array_reverse($bd)); } else { return $last . implode(array_reverse($b)); } } function minus($v1,$v2) { if ($this->isNegative($v1)) { $v1 = $this->stripNegative($v1); $v1_neg = true; } else { $v1_neg = false; } if ($this->isNegative($v2)) { $v2 = $this->stripNegative($v2); $v2_neg = true; } else { $v2_neg = false; } if (!$v1_neg and !$v2_neg and $v1 >= $v2) { return $this->minus_mechanics($v1,$v2); } elseif (!$v1_neg and !$v2_neg and $v1 < $v2) { return '-' . $this->minus_mechanics($v2,$v1); } elseif($v1_neg and !$v2_neg) { return '-' . $this->addMechanics($v1, $v2); } elseif(!$v1_neg and $v2_neg) { return $this->addMechanics($v1, $v2); } else { if ($v1 >= $v2) { return '-' . $this->minus_mechanics($v1,$v2); } else { return $this->minus_mechanics($v2,$v1); } } } function minus_mechanics($b,$c) { $p1 = strpos($b, '.'); $p2 = strpos($c, '.'); if ($p1 !== false) { $bd = substr($b, $p1 + 1); $b = substr($b, 0, $p1); } else { $bd = 0; } if ($p2 !== false) { $cd = substr($c, $p2 + 1); $c = substr($c, 0, $p2); } else { $cd = 0; } if ($bd or $cd) { $bd = str_split($bd); $cd = str_split($cd); $xc1 = count($bd); $xc2 = count($cd); if ($xc1 >= $xc2) { for ($x = 1; $x <= $xc1 - $xc2; $x++) { $cd[] = '0'; } } else { for ($x = 1; $x <= $xc2 - $xc1; $x++) { $bd[] = '0'; } } $bd = array_reverse($bd); $cd = array_reverse($cd); $last = ''; foreach ($bd as $key => $value) { // echo '<pre>' . print_r($bd, 1) . '</pre> '; if (!isset($cd[$key])) { break; } else { $bd[$key] -= $cd[$key]; if ($bd[$key]< 0) { $bd[$key] += 10; if (isset($bd[$key + 1])) { $bd[$key + 1]--; } else { $last = 1; } } } } } // End of decimal portion. $b = str_split($b); $c = str_split($c); $b = array_reverse($b); $c = array_reverse($c); if (isset($last) and $last == 1) { $b[0]--; } $last = ''; foreach ($b as $key => $value) { if (!isset($c[$key])) { break; } else { if ($b[$key] < $c[$key]) { $temp_key = $key; do { if (!isset($b[$temp_key + 1])) { $temp_key = false; } elseif ($b[$temp_key + 1] == 0) { $b[$temp_key + 1] = 9; $temp_key++; } else { $b[$temp_key + 1]--; $temp_key = false; $b[$key] += 10; } } while ($temp_key); } $b[$key] = $b[$key] - $c[$key]; // $b[$key] = abs($b[$key] - $c[$key]); } } $b = implode(array_reverse($b)); do { $length = strlen($b); if ($length == 1) { $zeros = false; } else { $zeros = substr($b, 0, 1); if ($zeros == 0) { $b = substr($b, 1); } } } while ($zeros === '0'); if (isset($bd)) { return $b . '.' . implode(array_reverse($bd)); } else { return $b; } } function mult($v1, $v2) { if ($this->isNegative($v1)) { $v1 = $this->stripNegative($v1); $v1_neg = true; } else { $v1_neg = false; } if ($this->isNegative($v2)) { $v2 = $this->stripNegative($v2); $v2_neg = true; } else { $v2_neg = false; } $result = $this->mult_mechanics($v1, $v2); if (!$v1_neg and !$v2_neg or $v1_neg and $v2_neg) { return $result; } else { return '-' . $result; } } function mult_mechanics($v1,$v2) { $p1 = strpos($v1, '.'); $p2 = strpos($v2, '.'); $v1_len = strlen($v1); $v2_len = strlen($v2); if ($p1 !== false) { $p1 = $v1_len - $p1 - 1; $v1_len--; $v1 = str_replace('.', '', $v1); } else { $p1 = 0; } if ($p2 !== false) { $p2 = $v2_len - $p2 - 1; $v2_len--; $v2 = str_replace('.', '', $v2); } else { $p2 = 0; } if (strlen($v1) >= strlen($v2)) { $b = $v1; $c = $v2; } else { $b = $v2; $c = $v1; } $c = array_reverse(str_split($c)); $sum = '0'; foreach ($c as $key => $value) { $subtotal = '0'; for ($x = 1; $x <= $value; $x++) { $subtotal = $this->addMechanics($subtotal, $b); } $padding = str_repeat('0', $key); $subtotal .= $padding; $sum = $this->addMechanics($sum, $subtotal); } if ($p1 or $p2) { $sum_len = strlen($sum); $p = $this->addMechanics($p1, $p2); $start = substr($sum, 0, $sum_len - $p); $end = substr($sum, $sum_len - $p); $sum = $start . '.' . $end; } return $sum; } } $math = new precisionMath(); $r1 = $math->add('1324751973451345817344593459173457139457934759455714395719345719745917450', '13451749571934751982375172351743571349571935471947591734591734571439571947597459184'); $r2 = $math->add('9874514.1435162451345790234759017345917345971394571934759173459714395719345791475901745', '7830947513454.1834534875074938579304579347698273469723496720937560927569275627681034858345803485'); $r3 = $math->minus_mechanics('1245735846732546254625472753451346234626526243523451345134623462346234623462643357325472546256257254723255257352', '12457358467325462546254727535732547254625625725472275257256'); $r4 = $math->minus_mechanics('1245735846732546254625472753451346234626526243523451345134623462346234623462643357325472546256257254723255257352.1124362546245724572434523456256254625462456254362562562565732457', '12457358467325462546254727535732547254625625725472275257256.94775234523423462543625462546245623456234562345624562456254625623456254625462546245624566246256256'); $r5 = $math->mult('1324751973451345817344593459173457139457934759455714395719345719745917450', '13451749571934751982375172351743571349571935471947591734591734571439571947597459184'); $r6 = $math->mult('9874514.1435162451345790234759017345917345971394571934759173459714395719345791475901745', '7830947513454.1834534875074938579304579347698273469723496720937560927569275627681034858345803485'); echo <<<EOT Addition with no decimals: $r1 Addition with decimals: $r2 Subtraction with no decimals: $r3 Subtraction with decimals: $r4 Multiplication with no decimals: $r5 Multiplication with decimals: $r6 EOT;
  12. Re: [Request] Secondary Weapon For V2 You'll need to modify the attack script in order to be able to use that secondary weapon. I personally don't touch mccodes attack script because I have looked at it in the past and I couldn't make sense of it. Otherwise I'd offer to install the Horizons style equipment mod for ya. lol ;)
  13. Re: Help with Donate page to credit an item instead of upping stats Try this:   $itemid = 122; $db->query("INSERT INTO inventory VALUES('',$itemid,$userid,1));   Note that I took out: ", $c" Vs 1 uses mysql_query('query string', $c); But vs2 just takes the query string when using the $db class. Looks like someone converted this script from vs1 and missed on little thing. If it was you, and for future reference, you don't need to convert mysql_query to $db->query. It normally works without changing that.
  14. Re: (Request) Gang wars - attacking - respect My equation is a catch all. It doesn't matter if their level is higher or lower. If their level is higher, you get +0.05 multiplied by the distance from your level to theirs, if their level is lower, you get -0.05 multiplied by the ^^^^^^^^^^^^^^^^^^^^ And if their level is equal to yours, the quation returns 1. No if's, else, and else ifs needed there. Just add the result to their respect. If their level is way lower than yours (you being the attacker) say, 50 levels lower, you'd actually lose 1.5 respect. I.e., your existing respect + respect gain or say 1234 (existing respect) + -1.5 1234 + -1.5 resulting in 1232.5
  15. Re: (Request) Gang wars - attacking - respect $respect = $defender_lvl + $attacker_lvl *.05 If the defender is level 36, and the attacker is level 20, you get 56 * 0.05 or 2.8 Which, clearly, isn't the 1.8 asked for.   Please note that in that scenario, he's stated he was the level 20 attacker. The equation you want is: 1 + ( ($them_level - $us_level) * 0.05) Which, with them at 36, and us at 20, translates into 1 + ( (36 - 20) * 0.05) 1+ ( 16 * 0.05) 1+ 0.8 1.8 ----- Respect gained With them at 20 and us at 36: 1 + ( (20 - 36) * 0.05) 1+ ( -16 * 0.05) 1+ -0.8 0.2 ----- Respect gained
  16. Re: Why? select * from users that is not optimized select username from users that is   If we only needed the username column, we don't want to use *.
  17. Floydian

    Human Math

    So, I was talking to someone about the problems with using large numbers and I though, hmmm, why not write a script that does basic math the way a person does. We can (hopefully :P ) do addition, multiplication, subtraction, and division with 100% precision to an extent far far greater than PHP math does (if we had enough time, I'd say our precision is infinite). Well, I've made an addition module and a multiplication module. Feel free to try out the code, and if you think it will be useful to you, you may use it. You may modify the code, you can sell it, you can do whatever you want with it.   <?php set_time_limit(0); class precisionMath { function add($v1,$v2) { $p1 = strpos($v1, '.'); $p2 = strpos($v2, '.'); if ($p1 !== false) { $x1 = substr($v1, $p1 + 1); $v1 = substr($v1, 0, $p1); } else { $x1 = 0; } if ($p2 !== false) { $x2 = substr($v2, $p2 + 1); $v2 = substr($v2, 0, $p2); } else { $x2 = 0; } if ($x1 or $x2) { $x1 = str_split($x1); $x2 = str_split($x2); $xc1 = count($x1); $xc2 = count($x2); if ($xc1 >= $xc2) { for ($x = 1; $x <= $xc1 - $xc2; $x++) { $x2[] = '0'; } $bd = $x1; $cd = $x2; } else { for ($x = 1; $x <= $xc2 - $xc1; $x++) { $x1[] = '0'; } $bd = $x2; $cd = $x1; } $bd = array_reverse($bd); $cd = array_reverse($cd); $last = ''; foreach ($bd as $key => $value) { if (!isset($cd[$key])) { break; } else { $bd[$key] += $cd[$key]; if ($bd[$key] >= 10) { $bd[$key] -= 10; if (isset($bd[$key + 1])) { $bd[$key + 1]++; } else { $last = 1; } } } } } // End of decimal portion. $v1 = str_split($v1); $v2 = str_split($v2); if (count($v1) >= count($v2)) { $b = $v1; $c = $v2; } else { $b = $v2; $c = $v1; } $b = array_reverse($b); $c = array_reverse($c); if (isset($last) and $last == 1) { $b[0]++; } $last = ''; foreach ($b as $key => $value) { if (!isset($c[$key])) { break; } else { $b[$key] += $c[$key]; if ($b[$key] >= 10) { $b[$key] -= 10; if (isset($b[$key + 1])) { $b[$key + 1]++; } else { $last = 1; } } } } if (isset($bd)) { return $last . implode(array_reverse($b)) . '.' . implode(array_reverse($bd)); } else { return $last . implode(array_reverse($b)); } } function mult($v1,$v2) { $p1 = strpos($v1, '.'); $p2 = strpos($v2, '.'); $v1_len = strlen($v1); $v2_len = strlen($v2); if ($p1 !== false) { $p1 = $v1_len - $p1 - 1; $v1_len--; $v1 = str_replace('.', '', $v1); } else { $p1 = 0; } if ($p2 !== false) { $p2 = $v2_len - $p2 - 1; $v2_len--; $v2 = str_replace('.', '', $v2); } else { $p2 = 0; } if (strlen($v1) >= strlen($v2)) { $b = $v1; $c = $v2; } else { $b = $v2; $c = $v1; } $c = array_reverse(str_split($c)); $sum = '0'; foreach ($c as $key => $value) { $subtotal = '0'; for ($x = 1; $x <= $value; $x++) { $subtotal = $this->add($subtotal, $b); } $padding = str_repeat('0', $key); $subtotal .= $padding; $sum = $this->add($sum, $subtotal); } if ($p1 or $p2) { $sum_len = strlen($sum); $p = $this->add($p1, $p2); $start = substr($sum, 0, $sum_len - $p); $end = substr($sum, $sum_len - $p); $sum = $start . '.' . $end; } return $sum; } } $math = new precisionMath(); $r1 = $math->add('1324751973451345817344593459173457139457934759455714395719345719745917450', '13451749571934751982375172351743571349571935471947591734591734571439571947597459184'); $r2 = $math->add('9874514.1435162451345790234759017345917345971394571934759173459714395719345791475901745', '7830947513454.1834534875074938579304579347698273469723496720937560927569275627681034858345803485'); $r3 = $math->mult('1324751973451345817344593459173457139457934759455714395719345719745917450', '13451749571934751982375172351743571349571935471947591734591734571439571947597459184'); $r4 = $math->mult('9874514.1435162451345790234759017345917345971394571934759173459714395719345791475901745', '7830947513454.1834534875074938579304579347698273469723496720937560927569275627681034858345803485'); echo <<<EOT Addition with no decimals: $r1 Addition with decimals: $r2 Multiplication with no decimals: $r3 Multiplication with decimals: $r4 EOT;
  18. Re: Help with Donate page to credit an item instead of upping stats It's easier to give support if we know what version of php, mysql, webserver, operating system, and if applicable -- which game engine you're working with. I'm assuming it's mccode (vs1 or vs2), but since this isn't posted in the mccode support forum, I can't take it for granted. ;)
  19. Re: Copyright issues - torncity   That's easy, don't have many players :P
  20. Re: delete user and reuse userID Don't just run this query blindly, but...   truncate users;   That query drops the users table, then recreates a clean users table with the auto increment set at 1. That means the next person to sign up (who will be the first user) will have the "1" userid. Don't forget to reset (or truncate) tables like inventory, userstats, and anything else that stores user specific data.
  21. Re: I'm at a dead end with my mccode modifications please help... winfidel, I'm thinking you might not have understood Extermination's code. It is what you are asking for. I'm not sure anyone here could have done a better more thorough job of giving you the code you need without actually coding the entire explore page for you. ;)
  22. Re: Table Help The question in my mind, is why have a table with one row, and one cell, and then a second table, nested inside the other one, which itself only have one row and one cell? I merely pose the question...
  23. Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS   <?php $count = 1; $map = null; for ($y = 1; $y <= 10; $y++) { $map .= <<<EOT <tr> EOT; for ($x = 1; $x <= 10; $x++) { $count++; if ($count == 10000) { break(2); } $style = null; if ($y == 1 and $x == 1) { $style = <<<EOT border-top: 1px solid black; border-right: 1px dashed black; border-bottom: 1px dashed black; border-left: 1px solid black EOT; } elseif ($y == 1 and $x > 1 and $x < 10) { $style = <<<EOT border-top: 1px solid black; border-right: 1px dashed black; border-bottom: 1px dashed black EOT; } elseif ($y == 1 and $x == 10) { $style = <<<EOT border-top: 1px solid black; border-right: 1px solid black; border-bottom: 1px dashed black EOT; } elseif ($y > 1 and $y < 10 and $x == 1) { $style = <<<EOT border-right: 1px dashed black; border-bottom: 1px dashed black; border-left: 1px solid black EOT; } elseif ($y > 1 and $y < 10 and $x == 10) { $style = <<<EOT border-right: 1px solid black; border-bottom: 1px dashed black EOT; } elseif ($y == 10 and $x == 1) { $style = <<<EOT border-right: 1px dashed black; border-bottom: 1px solid black; border-left: 1px solid black EOT; } elseif ($y == 10 and $x > 1 and $x < 10) { $style = <<<EOT border-right: 1px dashed black; border-bottom: 1px solid black EOT; } elseif ($y == 10 and $x == 10) { $style = <<<EOT border-right: 1px solid black; border-bottom: 1px solid black EOT; } else { $style = <<<EOT border-right: 1px dashed black; border-bottom: 1px dashed black EOT; } $map .= <<<EOT <td style="$style"> <a href="javascript:self.ghetto_selector('main', '{$_REQUEST['id']}', 'true', '0')" class="img_link"> [img=images/trans_square.png] </a> </td> EOT; } // End of x axis loop. $map .= <<<EOT </tr> EOT; } // End of y axis loop.       Naturally, you would need to modify that to suit your setup. I.e., change the image link, and change the way the click event is handled (i.e., I used a transparent image, wrapped in an A tag linked to a javascript deal. (My search is ajax based, otherwise I would have used a regular link) ) Your styles might need to be edited as well.
  24. Re: What is This I Need Help Search for :Inserting decimal integers in your crystal market script. Then delete the code around that portion of it. ;)
  25. Re: MCCODESV2 io have an error What possible reason is there to help someone if they are using an illegal copy of the game? (I'm not saying this person is, remember, I asked them if they did buy it) And if they did, the person that sold them the script, should be supporting it since they paid $300 for it.
×
×
  • Create New...