Jump to content
MakeWebGames

lucky3809

Members
  • Posts

    1,115
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by lucky3809

  1. I had 3 pages equip_weapon,armour,and unequip that used the same very code, problem was when I went into staff_item and increased and decreased it had only worked while equipping the weapon and armor, but when I had unequipped them it would only add back the decrease amount of stats and not take back the increase stats... I've tried everything but seems like it's only allowing the decrease stat option to work and not the increase... For instance I set a weapon at 22 strength and have it increase the other strength stat that already been trained, I unequipped the weapon it's suppose to take the 22 back off the already trained stat which is not working, but when I decrease it 22 and unequipped the weapon it adds 22 like it suppose to back on the trained stats already. The problem is it is not taking the increase off the already train stat when the weapon has been unequipped.
  2. Ok I was making a mod and was posting it on here for free but cant get the unequip page to work. This is the coding part I've added only the top works when weapon has decrease stats the else part below for increased stats is not working at all: if($r['effect1_on']) { $einfo=unserialize($r['effect1']); if($einfo['dir']=="neg") { if(in_array($einfo['stat'], array('strength', 'agility', 'guard', 'labour', 'IQ'))) { $stats=$einfo['stat']; $upd=$einfo['inc_amount']; $db->query("UPDATE `userstats` SET $stats=$stats+$upd WHERE userid=$userid"); } } else { $stats=$einfo['stat']; $upd=$einfo['inc_amount']; $db->query("UPDATE `userstats` SET $stats=$stats-$upd WHERE userid=$userid"); } }   Do I have one of these "}" out of place or what is making it not function the end part after else? I appreciate any help I can get :)
  3. Yeah i do need to redo the queries working on them now, just noticed the problem
  4. This modification is in the process of being re modified, will post it when I am done, stay tune... As for the old code never did work while unequipping, and would not work how ever many times you tried to get it to work elements were out of place. There were more to it.
  5. Here is a trick I use for resizing, what it does is set the max width and height, As for the IMG tagging leave off the width and height part this css will work for it the expression part is for IE browsers the two top are for firefox and other browsers...This will help not to expand your tables as similar to the break-word function in css... This does need to go in a div whatever class your using for it to work properly or you can set it as the .img if your not using a div I have it set differently because I have different tables sizes so i use div. max-width: 400px; max-height: 300px; width: expression(this.width > 400 ? "400px" : true); height: expression(this.height > 350 ? "350px" : true);   If your trying to expand it you would use mid-width: mid-height:
  6. Bad idea, because all IP's will be the same because they are filtered through cloudflare and everyone will have Cloudflares IP address. I wouldnt use it for a game, for a regular website would be fine but not for a game that logs IP's and what not.
  7. Here you go Bid count ... Sql: ALTER TABLE `gAuction` add column `BidCount` int(11) NOT NULL ; Open Auction.php Under Index function find: $Data = mysql_query("SELECT g.`ID`,g.`SellerID`,g.`ItemID`,g.`Time`,g.`CurrentBid`,g.`BuyNow`,g.`TimeLeft`,i.`itmid`,i.`itmname` FROM `gAuction` g LEFT JOIN `items` i ON (g.`ItemID` = i.`itmid`)") or die(mysql_error());   Replace With: $Data = mysql_query("SELECT g.`ID`,g.`SellerID`,g.`ItemID`,g.`Time`,g.`CurrentBid`,g.`BuyNow`,g.`BidCount`,g.`TimeLeft`,i.`itmid`,i.`itmname` FROM `gAuction` g LEFT JOIN `items` i ON (g.`ItemID` = i.`itmid`)") or die(mysql_error());   Under Bid function find: echo ('Your bid has been confirmed. <a href = "/Auction.php"><span style = "color:#8B0000">Back to Auction</span></a>');   Above it Add: mysql_query("UPDATE `gAuction` SET `BidCount`=`BidCount`+1 WHERE (`CurrentBid` = ".abs(intval($_POST['bid'])).")");   Under Add function find: mysql_query("INSERT INTO `gAuction` VALUES ('',".$_SESSION['userid'].",".$Data['itmid'].",".abs(intval($_POST['sbid'])).",".abs(intval($_POST['buy'])).",".$time.",unix_timestamp())") or die(mysql_error());   Replace with: mysql_query("INSERT INTO `gAuction` VALUES ('',".$_SESSION['userid'].",".$Data['itmid'].",".abs(intval($_POST['sbid'])).",".abs(intval($_POST['buy'])).",".$time.",unix_timestamp(), '')") or die(mysql_error());   Then if your posting the count on Auction page you add '.$aData['BidCount'].' If your posting on another page you need to make a query similar to the one your replacing under the index function. Sorry about having you add it to gAuctionBids table that was wrong of me lol. I had to upload the code to see what table to put it under.
  8. either you didnt close the div tags or the table. dont know you didnt post the code. but by the looks of it a tag wasnt closed properly.
  9. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/84/7099684/html/marriage.php:2) in /home/content/84/7099684/html/globals.php on line 6   you have a line that is in both php marriage and globals you need to delete one of them, both cant be declared look at line 6 in globals that should tell you or post that line on here and someone can tell you. but seems like your session_start function is being redeclared.
  10. You are probably missing the part for your header.php such as an if statement ... if($ir['married']){ $do_1 = mysql_query("SELECT * FROM users WHERE userid={$ir['married']}"); $r = $db->fetch_row($do_1); goes above this coding part in header...   $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); Edit: Checked your file you posted NOTHING is wrong with it, I got NO errors.
  11. @criminal wars I dont use this mod or really looked at the coding of it but if im right... You need to update the gAuctionBids table and add BidCount int 0 ... Then make a query to update the count under the bid function where players places the bid, so it counts the bids placed... then just add the {$r['BidCount']} where ever you want it to show. Also dont forget to change the insert query and add '' after the last insert. Unless someone has a better way then what i have gaven, this is what i do to get the count lol.
  12. You use css for what your wanting
  13. Here is a site that may help beginers understand some security with php, I would honestly learn security yourself you have a better chance at securing it then someone off the streets or someone off the internet whom you may not even know their work ethics...It pays to learn it yourself, then when a problem exist you can handle the matter without needing to wait to hire someone to do it for you, also there are many other great websites out there just use google and look for them! http://www.ibm.com/developerworks/opensource/library/os-php-secure-apps/index.html
  14. I use nbbc and it works fine, found it to be better then the mccode one. the lib file is the one you update the others stay the same, i only use a few pages from the download not all of them needs to be uploaded.
  15. I use this site for bbcodes, better then the mccode one lol. http://nbbc.sourceforge.net
  16. well I use 300 -500 mb a month but i dont have my game online for users yet though. your plan is 1gb for web hosting and unlimited bandwidth, 1024mb = 1 gb. so im guessing you have enough room for 2000 active users thats if they are online everyday playing. That's just a guess im not good with math lol. You can always upgrade your package at anytime i would start with a low package until your game proceeds to higher incoming traffic lol.
  17. nevermind found where it says cronjobs they had it listed different lol Yeah you have everything you need in the silver package.
  18. Thank you, i dont use mccodes either it was just a request from scott, only took 15 minutes to put together was no biggie lol. abs(intval()); could work, I just didnt do any security on it didnt have the time.
  19. This was requested from this posting Gang Mod V2 What this mod is Leaders of the gang can turn off war so other gangs cant declare on them and they cant declare on other gangs, while having the war option OFF... This has probably been already done, I did not secure this if anything is out of place please feel free to add your own part to this as for I used the original yourgang.php my own gang php is set up differently... Anyhow Here you go Scott and others.. Sql: [mysql]ALTER TABLE `gangs` ADD `waroption` ENUM( 'Off', 'On' ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Off'; [/mysql] Open yourgang.php Find :function gang_staff() Add: case "waropt": gang_staff_war_option(); break;   scroll down to function gang_staff_idx() Find: Change Gang Tag"; Add under it: Toggle War Status   Find: function gang_staff_wardeclare() { global $db,$ir,$c,$userid,$gangdata; if(isset($_POST['subm'])) { $_POST['gang'] = abs((int) $_POST['gang']); $db->query("INSERT INTO gangwars VALUES('',{$ir['gang']},{$_POST['gang']},unix_timestamp())"); $ggq=$db->query("SELECT * FROM gangs WHERE gangID={$_POST['gang']}"); $them=$db->fetch_row($ggq); $event=str_replace("'","''","[url='gangs.php?action=view&ID={$ir[']{$gangdata['gangNAME']}[/url] declared war on [url='gangs.php?action=view&ID={$_POST[']{$them['gangNAME']}[/url]"); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(),'$event') , ('',{$_POST['gang']},unix_timestamp(),'$event')"); print "You have declared war!"; } else { print "<form action='yourgang.php?action=staff&act2=declare' method='post'> Choose who to declare war on. <input type='hidden' name='subm' value='submit' /> Gang: <select name='gang' type='dropdown'>"; $q=$db->query("SELECT * FROM gangs WHERE gangID != {$ir['gang']}"); while($r=$db->fetch_row($q)) { print "<option value='{$r['gangID']}'>{$r['gangNAME']}</option>\n"; } print "</select> <input type='submit' value='Declare' /></form>"; } }   Replace it With: function gang_staff_wardeclare() { global $db,$ir,$c,$userid,$gangdata; if(isset($_POST['subm'])) { $_POST['gang'] = abs((int) $_POST['gang']); $ggq=$db->query("SELECT * FROM gangs WHERE gangID={$_POST['gang']}"); $them=$db->fetch_row($ggq); if($them['waroption'] == "Off"){ print" Sorry this gang has war option Off!"; } else { $db->query("INSERT INTO gangwars VALUES('',{$ir['gang']},{$_POST['gang']},unix_timestamp())"); $event=str_replace("'","''","[url='gangs.php?action=view&ID={$ir[']{$gangdata['gangNAME']}[/url] declared war on [url='gangs.php?action=view&ID={$_POST[']{$them['gangNAME']}[/url]"); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(),'$event') , ('',{$_POST['gang']},unix_timestamp(),'$event')"); print "You have declared war!"; } } else { if($gangdata['waroption'] == "Off"){ die("You have war OFF."); } print "<form action='yourgang.php?action=staff&act2=declare' method='post'> Choose who to declare war on. <input type='hidden' name='subm' value='submit' /> Gang: <select name='gang' type='dropdown'>"; $q=$db->query("SELECT * FROM gangs WHERE gangID != {$ir['gang']}"); while($r=$db->fetch_row($q)) { print "<option value='{$r['gangID']}'>{$r['gangNAME']}</option>\n"; } print "</select> <input type='submit' value='Declare' /></form>"; } }   Find: $h->endpage(); ?> Above Add:   function gang_staff_war_option() { global $db,$ir,$c,$userid,$gangdata; if(isset($_POST['subm'])) { if($gangdata['waroption'] == "On") { $war="Off"; } else { $war="On"; } $db->query("UPDATE gangs SET waroption='$war' WHERE gangID={$gangdata['gangID']}"); print "Success, your war status is $war! "; } else { print "<p class='heading'>War Status</p> <table width='90%' border='0'><tr> <td style='border: solid #ececec 1px;'colspan='2'>"; if($gangdata['waroption'] == "On") { $war="Off"; } else { $war="On"; } print "Are you sure you want to turn war $war? <form action='yourgang.php?action=staff&act2=waropt' method='post'> <input type='hidden' name='subm' value='submit' /> <hr style='border: solid #ececec 1px;'colspan='2'/> <input style='float: right;' type='submit' value='Yes' /></form> </td></table>"; } }   open creategang.php and find: $db->query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'')"); Replace with: $db->query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'',Off)"); And that should be all,enjoy!
  20. Made this will post it under free mods for you ;-)
  21. Just pay for hosting from W3Theory. Free hosting doesnt support mccodes crons, and some have in their tos that they can shut down a free account if they find any game script on their server. Ive used x10 & 000webhost for testing scripts and my accounts were closed, but now I use a paid hosting. And everything is much better then using the free ones. i would say though dont use hosting24.com the hosting sucks and very slow and sometimes you cant login to your cpanel, but that is my experience with them. I would definite go with W3Theory.
  22. I can actually pin point one of IN's images that looks exactly the same off Second Life lol. Too funny. I wouldnt worry too much, like everyone else said they have no ground to stand on, they probably do it to everyone who may have a potential game, they probably feel intimidated by you lol. Also make sure this lawyers of theirs are REAL some people bluff and have others pretend to be their lawyer, Id be looking up them on bbb.org also searching the address for any type of bad reviews.
  23. vertical-align: top;
  24. Hello, I signed up for your game awhile back was given the link from one of your staffs, I never returned due, because the layout color is hard on my eyes and makes it confusing to read, main menu looks like its all over the place lol. Town Center is very confusing, as an example when in dire need of help if you were a victim of a murderer it's like finding a phone that has no numbers and not being able to dial out, thats the feeling i get when i go to the Town Center maybe where you have Royal Family you change it to Royal Staff, and so forth so it doesnt look complicated I dont know rather i clicked on a link or not due the names dont match up to the page or items...One thing also after I had logged in I didnt even know it was a game until I clicked the mailbox option, your login should direct to your main index, or home page with the main menu so players can tell it is a game...
  25. Too simple, try using transparent on your images if you used images for pass and username and what not.... Also a little css touch up wont hurt lol.
×
×
  • Create New...