
chaoswar4u
Banned-
Posts
221 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by chaoswar4u
-
Re: Contacts Error? Can anyone please help me out on this one.?
-
The bug is regarding the bit of code that is used for the organised crimes. When it comes to the end of the crime you seceed or fail thus the cron comes with this message when failing to add events. The error is - Call to undefined function event_add() on line 36 This is the code out the cron $db->query("UPDATE gangs SET gangCHOURS=gangCHOURS-1 WHERE gangCRIME>0"); $q=$db->query("SELECT g.*,oc.* FROM gangs g LEFT JOIN orgcrimes oc ON g.gangCRIME=oc.ocID WHERE g.gangCRIME > 0 AND g.gangCHOURS = 0"); while($r=$db->fetch_row($q)) { $suc=rand(0,1); if($suc) { $log=$r['ocSTARTTEXT'].$r['ocSUCCTEXT']; $muny=(int) (rand($r['ocMINMONEY'],$r['ocMAXMONEY'])); $log=str_replace(array("{muny}","'"),array($muny,"''"),$log); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+$muny,gangCRIME=0 WHERE gangID={$r['gangID']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'success', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($qm)) { event_add($rm['userid'],"Your Gang's Organised Crime Succeeded. Go here to view the details.",$c); } } else { $log=$r['ocSTARTTEXT'].$r['ocFAILTEXT']; $muny=0; $log=str_replace(array("{muny}","'"),array($muny,"''"),$log); $db->query("UPDATE gangs SET gangCRIME=0 WHERE gangID={$r['gangID']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'failure', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($qm)) { event_add($rm['userid'],"Your Gang's Organised Crime Failed. Go here to view the details.",$c); } } } Line 36 being this event_add($rm['userid'],"Your Gang's Organised Crime Succeeded. Go here to view the details.",$c); error also applies to event_add($rm['userid'],"Your Gang's Organised Crime Failed. Go here to view the details.",$c); Anyone out there no how to fix? Thx for any help in advance.
-
Re: Contacts Error? Replaced with your query. It says contact deleted but it still remains in the list????????????????? However no error this time but it just dosent do what it says it should do.
-
The code in question is function remove_friend() { global $db,$ir,$c,$userid; $db->query("DELETE FROM contactlist WHERE cl_ID={$_GET['f']} AND cl_ADDER=$userid"); print "Contact list entry removed! > Back"; } $h->endpage(); ?> The error is when you try to remove a contact. The error is QUERY ERROR: 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 'AND cl_ADDER=1' at line 1 Query was DELETE FROM contactlist WHERE cl_ID= AND cl_ADDER=1 Any help would be great and many thx in advance for any replies.
-
Re: Interest gained cap? Thx for the replies. Got it done now with your help. :-)
-
Re: Interest gained cap? Thx for the reply however is there a way to get this to pay a max interest no matter what peoples bank amount is. As that mods stands when they pass that amount of money in the bank they get nothing. Id like it to be capped out. Alittle like when you do a deposit you pay like 15% fee but it never takes over say 3000$. Id like this to be done for interest. So like 10% interest but max interest gain perday is like 100 Million$. ?????
-
I wish to change my the middle part of my page to an tiled image thus to give its some texture and not just plain colour. As peeps know who use V2 there is a background and then the center bit too. I have changed the main background already. The center bit as I no consists or 3 parts. The first part i can do which is the bit behind the banner which is .center { width:932px; background-color:#DCDCDC; (This changed to background-image:url(back.jpg) does the job) vertical-align:top; text-align:center; The other bits are include "mainmenu.php"; global $ir,$c; $bgcolor = 'DCDCDC'; print ' '; These change the colour yet i dont know how to change this to use a background via a image. I just get constant parse errors etc. Any help on this would be great and thx for any help in advance.
-
I wish to set a cap on the interest gained in anyone day. Thus instead of letting users money rapidly go out of control this method will create a bottle neck and stop game money econamy going mentle.Money will rise however not to the speed of going out of control. Im suspecting this is the code to change - $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0"); I know this is just 1 bank and the other would have to be changed but just looking for some help from someone who knows what there doing. Dont fancy wrecking my cron. Thx in advance for any help. This is my daily cron as it is now. $db->query("DELETE FROM fedjail WHERE fed_days=0"); $db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0"); $db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0"); $db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0"); $db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0"); $db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0"); $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0"); $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0"); $db->query("UPDATE users SET donatormoney=donatormoney+(donatormoney/100*10) where donatormoney>0"); $db->query("UPDATE users set gympass=gympass-1 WHERE gympass>0"); $q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0");
-
Re: Gang war surrender error The error came also as standard in my V2 code. The error if the same as mine is QUERY ERROR: 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 '' at line 1 Query was SELECT * FROM gangwars where warID= The fix is 1 - open yourgang.php 2 - find: list($_POST['war']) = $db->fetch_row($q); 3 - replace: $_POST['war'] = $db->fetch_single($q); Should solve your problem. :-P
-
Since the off ive never got this auto dp crediting working in mccode V2. Now i dont no if this is a problem with the code from the start or its user error on setup. Ive read the setup instruction for paypal 10 time over and ive got it 100% to the instructions provided however is there something missing from these instructions. If anyone has any insight on this id be greatful to here from u. Thx for any help in advance. You can also email at [email protected] if users wish.
-
Re: [mccode] Kicking Gang Members At War Well I run V2 mccode and it worked for me.
-
Re: ***FREE POKER SCRIPT FOR MCCODES V1*** Well im trying to run it on V2 mccode unless thats why i have the problem. It runs everything. Even putting a -999 when buying chips detects cheating. However its when you bet your amount the chips can be put as negative. Im in V2 so any help to get this to work would be great. ALso I get it that when you bet say min bet 4 chips it bets double chips. Unless im missing something here lol. Thx in advance for any help.
-
Re: ***FREE POKER SCRIPT FOR MCCODES V1*** Just to point a few bugs Ive found with this. The potection from the -1 etc amount when buying chips works ok however when in game you have the ability to put like -1111111111111111111111111111111111111111111111111 and if it wins you get the positive amount then you can just sell the chips and max out your bank. Id thought id best warn peeps before they put it on game.
-
I run mccodes V2 and currently from the off have the following problem regarding Organised Crimes. Theres no option for a start to put crimes in via staff panel however the major problem is i tested OC by inputting manual into database. Peeps could then select a organised crime no problem however the crime wouldnt end at 0 and would go into negative mins. Anyone have any fixes for such a problem. Any help would be great and many thx in advance for any replies.
-
Hi all. In the streets mod I have added an step where you gain an item. The item then goes to the user inventory. However the problem is that its not auto merging the QTY's. Thus if you have will potion x50 and got the step in question you would then have Will Potion X50 / Will potion. If you then use the single will potion you will then get Will Potion X49 / Will potion. As you can see the single stays in inventory and the bulk qty goes down. Now if you are to sell this item or send it then the item will merge with other qtys as it should. Its just the code I have entered which isnt doing the auto merging or qty's on its own. I hope that sorta made sence and thx to all in advance for any help that anyone can offer. Thx
-
Re: EXP given in attacks? Thx for the reply's. After much thought of not upseting my members i decided to make the formula change at certain levels. Thus as you go up levels the formula gets harder. A steady increase instead of an instant change seems to have worked in my game. Could be an idea in other games.
-
Hi all. This bug is probs known. I have a suspected game exploit where users are using 2 browsers to duplicate game money and crystals via the transfers option. Is there anyway to stop this. Any help would be greatful and thx in advance for all replies.
-
Re: EXP given in attacks? Thx for the replys people. Least for one thing i am changing the right bit of code. This peace of code $expgain=rand($qe/4,$qe/2); which number is best to be changed to alter EXP given. Im unsure how its calculating this so carnt understand whats happening. For example i run V2 mccodes and the formula is $expgain=rand($qe/2,$qe); Ive added a / and a number to the other $qe which mine hasn't got however if the values are set wrong it begings to give fixed amounts of hp and not be random. WIthout understanding the calculation its all guess work and causes players not to be happy with incorrect changes ?????????????????? :?
-
Im having problems regarding EXP given out when a user attacks. A few of my members I found it to attack each other for EXP however when they are around the same level each its giving them around 30 - 50% exp thus can level quite alot in a day. Now I no in the attacktake.php which has a formula for exp however I carnt get a good effect from it. Now unless I should be changing this from somewhere els I dont no. I just need help in either to bring down EXP when a user attacks and leaves or a way to limit the attacks a user can do per day to another user (e.g 5 attacks per day per 1 user id). Any help would be very greatful Thx all for your time and help if posted in advance.
-
[FAQ] Developing locally on your own local PHP/MySQL/Apache server
chaoswar4u replied to mdshare's topic in Tutorials
Re: Developing locally on your own local PHP/MySQL/Apache server Im currently using WAMP and as of which currently host my game. As under windows to do crons I use a program called VisualCron which isnt that hard to set up and works 100% for me. Never had a cron problem yet. Needless to say I host my game myself using this setup as of which runs at great speed. -
Re: MC2 Codes - Are they worth it? Well my votes with V2 Code.
-
Hi. Im running MCcode V2 and I wish to limit the accounts made by the same IP address. There was a post about such a thing however I think it was for V1 Code as the edits they used didnt work for me unless it was my error. The code in question (Or the code they edited) is $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("Your IP has been banned, there is no way around this.
-
Im using V2 codes. My first problem is im getting an error when trying accept a surrender when in war. The error is QUERY ERROR: 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 '' at line 1 Query was SELECT * FROM gangwars where warID= My second is when you click on the delete topic in forums i get this error Fatal error: Call to a member function query() on a non-object in C:\wamp\www\forums.php on line 703 If anyone one can help me on this would be great. My mail is [email protected] or if you would like more info for you to be able to help with this then post and ill get it on here for u. Thx Apart from these problems is there any quick way to get a link in the gangs staff menu to be able to allow users to delete there clans?
-
On V2 version of codes ive added the staff room.php and edited menu's as needed. The bug in the staff panel u get the following options. Forums > Add Forum > Edit Forum > Delete Forum The add forum function works but the edit and delete links just open a white page. All the staff panel is there etc just a white box where you would expect to load the fields to enter data. Anyone got any ideas?
-
Re: MCCode V2 Problems. Yea well next time explain to us noobs there are more than 1 of them code lines. I was only changing the one. Maybe my fault for not checking the whole .php file. Come on noob mistake. Lol give me a break :-P