
SteveDave
Members-
Posts
55 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by SteveDave
-
Thanks for the help guys, I think I realized what I'm doing wrong finally. Much appreciated! :thumbup:
-
This is definitely a simple fix but for some reason I'm stumped. I made a small mod on my game for players to talk through gang mail, where everyone can view and talk. The problem is that every time a ', ", \ is entered, another backslash (\) is posted behind. I referred back to forum posts and things like that, and I just don't see what I did wrong. 8| function gang_gangmail() { global $db, $ir, $c, $userid, $gangdata, $bbc; if($_POST['gmtext']) { $picture = ($ir['display_pic']); $db->query("UPDATE users SET new_gangmail=new_gangmail+1 WHERE gang={$ir['gang']}"); $db->query("INSERT INTO gangmail VALUES('', {$gangdata['gangID']}, unix_timestamp(), '".$db->escape($_POST['gmtext'])."', '$picture', {$ir['userid']}, '{$ir['username']}', {$ir['user_level']}, {$ir['donatordays']})"); print "Your Gang Mail has been posted. <meta http-equiv='refresh' content='1;url=/yourgang.php?action=readgangmail' />"; } else { print "[b]Gang Mail[/b] <form action='yourgang.php?action=gangmail' method='post'> Text: <textarea name='gmtext' rows='8' cols='60'></textarea> <input type='submit' value='Send' /></form> "; } } Any help would be greatly appreciated! :thumbsup:
-
Good points made, there are definitely other ways to go about this than disabling refresh I have added a basic captcha for now, will probably be changing it to reCaptcha as Drizzle suggested because it's by far the best I have seen. Spudinski, I really don't mind my players using refresh, it's auto-refresh programs or addons that I am concerned about. In my game there are items for refilling brave/energy so people have their auto-refreshers going (doing both crimes and training the gym). Captcha only does so much because most of the time these people are still at their computer, they're just doing other things like watching a movie or whatever else they feel like doing which makes it very unfair for those players who actually sit there for hours at a time playing the game like it's meant to be played. But I have already decided on some changes I will be making to slow this down if not stop it completely. You're right, the game needs to adapt.
-
Hello everyone, in hopes to stop all of the cheating going on in my game, I decided it's about time to disable refreshing. I've looked into this, and seen other games do it, but I haven't found any solid script or help for it yet. I imagine it would be a pretty simple javascript. I'm not too familiar with javascript, I have only used it a few times in my game so far. If someone could help me out with this I'd appreciate it very much. Auto refreshing has become a huge problem in many games, I think this could help a lot of people. If someone wants to throw it together and post it here as a free mod (I don't think it has been added yet) I'd gladly give them $5 for it. Thanks, Steve.
-
Nobody has posted here in a while but I was hoping someone could help me out here. For some reason I can't get ignore to work (separate mod). Here is what I have function compose() { global $db,$ir,$h,$emos_toggle,$c,$userid; if($_POST['towho']) { $ig = mysql_query("SELECT * FROM ignore WHERE userid='{$_POST['towho']}' and blocked='{$ir['userid']}'") or die(mysql_error()); $i = mysql_fetch_assoc($ig); if($i['blocked'] == $ir['userid']) { echo 'This user has added you to their ignore list!'; $h->endpage(); exit; } The error it gives me is: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ignore WHERE userid='2' and blocked='1'' at line 1 Any idea why this is happening? I feel retarded for asking something that should be so simple. I must be missing something :huh:
-
I'd like to see this, I'm busy working on a ton of things but have been wanting to find time to work on a good forum. This could definitely save me the hassle.
-
Didn't work at first, just had to change send.php: if ($_GET['msg']) { mysql_query("INSERT INTO chat(`name`, `msg`, `time`) VALUES ('".$name."', '".$text."', UNIX_TIMESTAMP())"); to if ($_GET['name']) { $db->query("INSERT INTO chat VALUES ('','".$name."', '".$text."', UNIX_TIMESTAMP())"); and add a new field to the chat table called time, VARCHAR255. Other than that, nice basic little chat, with a little editing/new features it could be a nicer little chat. Thanks for sharing :)
-
Thanks for the kind offer but I just finished it, took me a lot longer than it would someone who knew more what they were doing but hey I think I learned a lot by taking 4 hours to do it (I'm a bit of a perfectionist sometimes and not being the best at this didn't help) ;)
-
Would you be able to do it identical to that? (Do you have any work I could possibly see before we make a deal?) I'm going to need this to look pretty identical, I wouldn't want to waste your time. ^^
-
Alright so I'm working on a few mods for my game at the moment but also want to get this template worked into the game, if I could supply the PSD, how much would you charge to code this?: My game pretty well already has the same look, it wouldn't need that much editing at all. I just have a hard time making things look nice :S Haha Edit: I'm looking for cheap work, I just figure someone better than me couple whip this up way quicker than me and I could save some time. If it's not going to be cheap I suppose I'll do it by myself.
-
First off, sorry for making a new thread for this but for some reason it kept logging me out when I tried to post in the original thread. This is a fix for Tonka's Ignore user mail mod for all of those who were having the same problem as me (If you ignored someone, they could still mail you but you couldn't mail them). I just changed a few things around because the fix was pretty obvious, it was just a bit backwards. [mccode v2] Ignore User Mail Go to the original thread (^ Link above) and follow those instructions, but replace: $select = sprintf(("SELECT `blocked` FROM `ignore` WHERE userid = %u AND blocked = %u"), $userid, $_GET['ID']); $q = $db->query($select); $r=$db->fetch_row($q); if($r['blocked']) { echo "This person has choosen to ignore mails from you. [url='mailbox.php']> Back[/url]"; $h->endpage(); exit; } with: $select = sprintf(("SELECT `userid` FROM `ignore` WHERE blocked = %u AND userid = %u"), $userid, $_GET['ID']); $q = $db->query($select); $r=$db->fetch_row($q); if($r['userid']) { echo "This person has choosen to ignore mails from you. [url='mailbox.php']> Back[/url]"; $h->endpage(); exit; } Like I said, just a few words changed. Hope it helps.
-
Is there a new version of this like you said you were making? Also, can you make it so you need a bunch of items to make something and not just two?
-
Thanks for the reply, I finally got the Captcha to work. Stupid mistake haha ^^
-
Hey guys, I just recently had someone come on my game and made over 35,000 accounts (I was gone for about 14 hours). I'm guessing they can't do that with Registration captcha turned on but it doesn't seem to work? I've tried registering about 5 times on my own game using the built in captcha and it tells me it's wrong every time. Does it usually work or is there something wrong with my game? Thanks guys, this is pretty urgent.. This person has done this to me before, I'm guessing they have something against me.
-
Re: Getting hacked (SQL Injection) Is there any fixes for this or has anyone released a secured forum?
-
I have someone on my game using a SQL injection to get other users Login names as well as their passwords, They're doing it just to make my life harder for banning them from the game a few months ago. I'm not sure exactly what they are doing but something about a MD5 hash? I already changed the IP thing in a lot of pages, maybe I missed one? What are all the pages you are supposed to change? Or could this be a different problem? Thanks guys.
-
I made a mod on my game and I used this code to insert items into an inventory: mysql_query("INSERT INTO inventory VALUES ('', $item, $userid, 1)",$c); But doing that doesn't automatically quantify items together, what should I add to make it do so? Thanks :-D
-
Re: Need a little help ($10) Forget my last post, what I was trying to do wasn't what I should have been doing.. At all. I'm raising my payment to $20 for someone to take the included V1 Equip & Unequip files from he Armory mod and convert them to V2 for me. For someone who knows what they're doing I'm sure $20 is worth your time.
-
Re: Need a little help ($10) A few people have messaged me about this but I haven't really gotten anywhere. I'm not sure if I'm allowed to post the whole thing but I'll remove it if I'm not. Here's what I have, and I'm sure it's very noob-ish. <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); $id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1"); if($db->num_rows($id)==0) { print "Invalid item ID"; $h->endpage(); exit; } else { $r=$db->fetch_row($id); } if(!$r['weapon']) { print "This item cannot be equipped to this slot."; $h->endpage(); exit; } if($_GET['type']) { if(!in_array($_GET['type'], array("equip_primary", "equip_secondary"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if($ir[$_GET['type']]) { item_add($userid, $ir[$_GET['type']], 1); } if ($inv['inv_lent']>0) { item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']}, ({$_GET['type']}lent)=({$_GET['type']}lent)+1 WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully."; } else item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully."; } else { print "<h3>Equip Weapon</h3><hr /> <form action='equip_weapon.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Please choose the slot to equip {$r['itmname']} to, if there is already a weapon in that slot, it will be removed back to your inventory. <input type='radio' name='type' value='equip_primary' checked='checked' /> Primary <input type='radio' name='type' value='equip_secondary' /> Secondary <input type='submit' value='Equip Weapon' /></form>"; } $h->endpage(); ?> If you look at the if inv_lent part, what I was trying to do there is make it check to see if it's shown in the inventory table that the item is lent, and if it is, it will update the users table to show it is. I don't even know if this would work but I wrote ({$_GET['type']}lent) hoping it would get either if it was primary or secondary and if it was, it would update my users table row called either equip_primarylent or equip_secondarylent with a +1 showing they are using a lent item. Could someone please take a look at that code and tell me what I'm doing wrong? I don't really get how things are pulled from the database like putting $ir, $r or $inv before something will show that's the table it should be pulling info from. And do I need to select that information so it knows what I'm talking about? Agh I hate not knowing what I'm doing! Haha :mrgreen:
-
I know $10 isn't a lot but this will probably take someone who knows what they're doing 10 minutes. I need help with Cronus's armory mod. He said I could show someone a few of the files so they can help. I need someone to make it so when someone equips an item and it's lent, it updates the users table saying their Primary, Secondary or Armor is lent. (I made the rows for primarylent, secondarylent and armorlent). I'll also need it so when you unequip the item and it's said in your users table that it's lent, it will make it so the item is marked as lent again in the inventory table. I haven't modified my equip weapon, equip armor or unequip files so you could just change those and it will be compatible for me. I think all you really need to know is what I just said, and, that in inventory there is a new row called inv_lent which is marked as 1 when an item is lent. Help would be much appreciated. Thanks.
-
Re: Cronus's Armory Mod Help If someone could help me with this asap I will give you $10, all you need to do is edit the V2 Equips & Unequip to be compatible with the V1 Armory mod Equip & Unequips, I would be very thankful because I just can't seem to figure it out as easy as it may seem. I can give you the pieces of the scripts from the V1 so you can incorporate it into the V2 scripts. Please help, and sorry for the double post. Thanks.
-
Re: Cronus's Armory Mod Help Yeah like I said in my first post, Cronus is really busy anyway to be helping with it which is why I was hoping someone had already converted it to V2 and could help me with the Equip files for an easy $5.
-
Re: Cronus's Armory Mod Help I know it's not much but I'll pay someone $5 to convert the equip / unequip files for me. They're just really confusing me because the Mod is V1 and the equip/unequip files are completely different. Anyone? Would be much appreciated.
-
Hey guys this is for anyone who might have bought Cronus's Armory mod and converted it to V2 which is what I'm currently working on. I believe I pretty much have everything finished except an Equip/Un Equip problem. If you don't know what I'm talking about.. When a gang lends an item to a Member it is marked as a lent item in the database so people can't sell it. When you equip & unequip the item, you are then able to sell it. Has anyone fixed that problem before? I'm not quite sure what the solution would be for this. (By the way, I'm not bothering Cronus with this right now because he's really busy)
-
Re: [mccode] Treasure Map! [$25.00] Would this be easy to mod and use a different picture, and also give a chance of finding an item or gaining stats? Also, when a certain spot is searched can someone tell another player the co-ordinates and find the same prize or is it a one time shot?