Jump to content
MakeWebGames

newttster

Members
  • Posts

    513
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by newttster

  1. Although I may not have a game up and running yet ... I have played/play quite a few of them ... and have looked at many, many more... I have to say that I like the looks of yours. The graphics, text, colour and layout flow nicely. Nothing too garish or in your face. Well Done! :thumbsup:
  2. I'm curious as to why you would want to copy the exact same format for training that another game uses. That is your choice obviously ... but wouldn't it be more interesting to have a gym that is different.
  3. Thanks for your responses. It has helped.
  4. When you look at the inventory ... it has links to sell, send, add to market ... whatever. How would you go about removing the "send" option on certain items. For arguements sake ... let's say that I want to remove that option on five items not all the inventory. Can this be done ... if so ... how ... I have been trying to work this out on my own and so far have failed miserably. Shush ... I know ... no surprise there, right? :P My other question is when you are adding items through the staff panel you can choose to add effects to items. You can have it increase or decrease by either percentage or value. Percentage I get ... the value option I don't. Does that mean that if you choose a value of 10 it would increase say health by 10 as opposed to 10%. If you choose the decrease option ... does that mean then that it would decrease the health of the other player or you? The decrease effect has me confused. ?( Any help in understanding this would be appreciated. Thanks all.
  5. Although I do think the KISS method works well in most cases, this is not one of them. I like a nice clean page that is uncluttered .. this, however, is a little to uncluttered. I think it's not bad for a first attempt though.
  6. Thank you, Illusions. This will be an amazing addition for what I have planned. I'll also be using your idea about removing some of the code to better suit my needs. You da man!!!! You must be psychic!!! Thank you for all of your work.
  7. Sweet. Thanks. I certainly will. :thumbsup:
  8. *laughs* Fair enough. I hope you don't mind but I am going to try and see if I can get it to suit my needs after much hair pulling, screaming and kicking my feet. And months later I might succeed. :whistling:
  9. Illusions ... you must be a mind reader ... I was looking for something like this yesterday and couldn't find it!! Woot!!! Thanks. I have a quick question though ... is there a way of combining multiple items to create one. Say you need 50 of item a combined with 1 of item b to make item c. Can this be done without tons of additional coding? Or do you think that I should keep creating new items till I get the final product that I want?
  10. Djkanna and Spudinksi ... I tried both of your suggestions and they both kept returning errors. What I used instead was round(). It may seem like a really cheesy way of solving it ... but solve it, it did. Thank you both for your suggestions.
  11. Thank you, Paul. I appreciate that. I have been doing just that actually. I have been playing with some of the free mods and using some lines of the code and integrating it into other mods to see if I can get them to work ... so far I've been having good results with that. My problems arise when I try and create my own. My goal right now is to create one that works first and then I will go about securing it. I know it will be a long process, any type of coding/programming always is. I'm stubborn ... so I just cross my fingers and keep on trying. :D
  12. I have gone around and around with this and no matter what I do I cannot figure this out. It just does not display the way it should. Okay ... on my userstats I have stats A - Q. A - G are trained and the rest are derived from the first 7. I have set up my table so that there are no decimals (int 11). Now here is my issue Stat H=the real answer is 27.5 and displays as 28 which if I understand is the way int works. :thumbup: Stat I=the real answer is 21.25 and displays as 21.75 :thumbdown: Stat J=the real answer is 21.25 and displays as 21 :thumbup: Stat K=the real answer is 18.75 and displays as 19 :thumbup: Stat L=the real answer is 18.75 and displays as 18.7500 :thumbdown: When I do a test register, I can not get it to update the table or to show the correct numbers on the loggedin.php or index.php. I am guessing it is because there is math involved. As of yet I have not figured out how to get the math to work on the register page. It does work (more or less as you can see above) on the loggedin and index pages. Any ideas?
  13. Well, Paul ... I certainly did that's for sure. *shrugs* But then as I am just learning ... there is a great deal that I am finding confusing. :P
  14. @ Joshua ... so I have learned. I am definately going to be following a_betrand's advice in regards to security in regards to any type of submission to the db. @ Paul ... I'm not sure but I think he is referring to his point 3) in his post, though I could be wrong.
  15. I think this would be a really great idea, however, there really is no way of monitoring this. Who would do it? When? Etc. As Danny suggested bye from those that you know are trustworthy. No two programmers will write their code in the same way, which alone could cause someone to think that it is not done right, or to their standards. From what I have seen so far ... if there is a problem with a paid modification most will troubleshoot it for you at no extra cost. If they do charge you extra for it .. then post it so that others will know that the person you bought it from is not 100% reliable. There are often free mods available that you can customize to suit your needs ... if not then hire someone to create the mod for you. There are lots of people here who are willing to help you with that for a price. Just keep in mind that you get what you pay for ... the more complicated, the more expensive it will be. There are many threads here that will help you too find someone that is trustworthy and willing to help you. You can always try your hand at it as well (creating your own). If you run into difficulties ... post it ... there are tons of people here that are willing to help you. Trust me ... I know. Thanks to all who are willing to help with their time to us newbs in php.
  16. Okay ... thank you for that a_bertrand. I was not aware that checkboxes, radio buttons etc could be hacked. But then ... I suppose anything given enough time and patience could be. I understand that people will always try and beat the system ... no matter what the system ... so I greatly appreciate your help and suggestions in regards to this. Thank you.
  17. @ a_bertrand ~ Thank you for that information. I will certainly use that in future when trying to create mods. I understand why I would need to secure the text input for the character name ... but why would I need to secure a radio button, unless there is something about radio buttons that I am missing??? @ Equinox ~ I understand what it is you are saying ... what I don't understand is why it is resending the data when I only have one submit button for all the information that needs to be sent to the table on line 69. I am trying to understand what the mistake is that I am making in regards to this so that it doesn't happen again. From the way I am reading my code, I have the user enter the character name they would like, then they would use the radio buttons to choose type, gender and alignment and it all gets submitted with the one submit button at the end. I guess what is hanging me up on this is I don't see where I am sending the data more than once as you suggested Equinox. (pulls hair out) What am I not seeing?
  18. Okay .. I have made some changes to the way I am trying to get this to work. I would like to say thanks to Dayo for his assistance in regards to getting the userid portion of this to work.   <?php include_once "globals.php"; global $db, $ir, $c, $userid, $h; $type=$_POST['type1']; $name=$_POST['charname1']; $gender=$_POST['gender1']; $alignment=$_POST['alignment1']; $lycan_status='unchecked'; $vampire_status='unchecked'; $angel_status='unchecked'; $demon_status='unchecked'; $male_status='unchecked'; $female_status='unchecked'; $good_status='unchecked'; $evil_status='unchecked'; print " <u>[b]<form action='characterone.php' method='post'> Type in your first characters name.</u>[/b] <input type='test' size='10' maxlength='40' name='charname1'> </form>"; if(isset($_POST['submit1'])){ $selected_radio=$_POST['type1']; if($selected_radio=='lycan'){ $lycan_status='checked'; } else if($selected_radio=='vampire'){ $vampire_status='checked'; } else if($selected_radio=='angel'){ $angel_status='checked'; } else if($selected_radio=='demon'){ $demon_status='checked'; } } print "<u>[b]Choose your first characters type.</u>[/b] <form action='characterone.php' method='post'> Lycan<input type='radio' name='type' value='lycan' /> Vampire<input type='radio' name='type' value='vampire' /> Angel<input type='radio' name='type' value='angel' /> Demon<input type='radio' name='type' value='demon' /> </form>"; if(isset($_POST['submit1']));{ $selected_radioa=$_POST['gender1']; if($selected_radioa=='male'){ $male_status='checked'; } else if($selected_radioa=='female'){ $female_status='checked'; } } print "<u>[b]Choose your first characters gender.</u>[/b] <form action='characterone.php' method='post'> Male<input type='radio' name='gender' value='male' /> Female<input type='radio' name='gender' value='female' /> </form>"; if(isset($_POST['submit1']));{ $selected_radiob=$_POST['alignment1']; if($selected_radiob=='good'){ $good_status='checked'; } else if($selected_radiob=='evil'){ $evil_status='checked'; } } print "<u>[b]Choose your first characters alignment.</u>[/b] <form action='characterone.php' method='post'> Good<input type='radio' name='alignment' value='good' /> Evil<input type='radio' name='alignment' value='evil' /> <input type='submit' name='submit1' value='Submit your first character.'> </form> "; $db->query("INSERT INTO charone VALUES('".$ir['userid']."','$name','$type','$gender','$alignment')"); $h->endpage(); ?>   So the problem I am having is that it will not wirte to the table. Equinox explained it this way ...""It's because you're posting the data, and then requiring the data to be posted again, so the first post has now expired."" And he suggested adding this to the code ...""<input type = 'hidden' name = 'submit1' /> "". He told me that I needed to add it to the new forms. I have tried this and so far have not been able to get it to work ... any suggestions where I would put this so that all data is written to the fields. Thanks a bunch, folks.
  19. newttster

    Wtf #3

    Then show them a water bill, electric bill, rent receipt ... anything that shows your address on it. That's all they need is some sort of prrof of residence.
  20. [align=justify]Thank you, NationGamer for the help on the tags.[/align] [align=justify]I understand what you have said about specifying the fields that the data has to go into on the tables. The three tables that I have created are charone, chartwo and charthree and each table has 4 fields ... charname, type, gender and alignment. The field names are in that order on all three tables. I do not have a primary key set though. [/align] [align=justify]When I'm declaring the variables .. do I have to state the table name with it. IE. $name={charone['charname']} or is declaring as $name='charname' sufficient when within a function. [/align]
  21. I am trying to design my very first mod in php for my game. What it will do is allow a player to choose 3 characters to work with. Each has their own name, type, gender and alignment. Each character is developed independantly from the other. This is what I have so far ... unfortunately I keep getting an error. Parse error: syntax error, unexpected T_STRING in /home/content/84/7099684/html/choices.php on line 64 Any help would be appreciated. Once I get it working I will be putting this in the free mod section. Thanks.   <?php include "globals.php"; print " [b]Welcome to the world of ****, {$ir['username']}.[/b] The first thing that you will be doing is choosing your 3 characters, their names, gender, and whether they will be good or evil. [b]There are 4 character types to choose from.[/b] [b]Lycan[/b] - Humanoid like creatures that were once human. These beings were bitten by other infected lycans thus transforming them. [b]Vampire[/b] - Beings that were once human that have been turned into the undead. They now survive on the blood of other beings. [b]Angels[/b] - Beings that have chosen to leave Nirvana in order to defend mankind. [b]Demons[/b] - Beings originally created to do Dante's work that have since evolved to become a force in their own right and serve only themselves now. [b]Choose your characters.[/b]"; switch($_GET['action']) { case 'characterone': character_one(); break; case 'charactertwo': character_two(); break; case 'characterthree': character_three(); break; } { print "<a href='choices.php?action=characterone')Your first character.</a>"; } { print "<a href='choices.php?action=charactertwo')Your second character.</a>"; } { print "<a href='choices.php?action=characterthree')Your third character.</a>"; } function character_one() { global $db,$ir,$userid,$h; //$name='charname'; //$type='type'; //$gender='gender'; //$alignment='alignemnt'; { print " <form action='choices.php?action=characterone' method='post'> <option value='Lycan'>Lycan</option> <option value='Vampire'>Vampire</option> <option value='Angel'>Angel</option> <option value='Demon'>Demon</option> </select> } { <option value='Male'>Male</option> <option value='Female'>Female</option> </select> } { <option value='Good'>Good</option> <option value='Evil'>Evil</option> </select> } Name this character:<input type='text' name='charname' size='20'/> <input type='submit' value='Submit Character One'/> </form>; $db->query("INSERT INTO charone VALUES ('$name','$type','$gender','$alignment')"); } function character_two() { global $db,$ir,$userid,$h; $name='charname'; $type='type'; $gender='gender'; $alignment='alignment'; { print " <form action='choices.php?action=charactertwo' method='post'> <option value='Lycan'>Lycan</option> <option value='Vampire'>Vampire</option> <option value='Angel'>Angel</option> <option value='Demon'>Demon</option> </select> } { print " <form action='choices.php?action=charactertwo' method='post'> <option value='Male'>Male</option> <option value='Female'>Female</option> </select> } { print " <form action='choices.php?action=charactertwo' method='post'> <option value='Good'>Good</option> <option value='Evil'>Evil</option> </select> } Name this character:<input type='text' name='charname' size='20'/> <input type='submit' value='Submit Character Two'/> </form>; $db->query("INSERT INTO chartwo VALUES('$name','$type','$gender','$alignment')"); } function character_three() { global $db,$ir,$userid,$h; $name='charname'; $type='type'; $gender='gender'; $alignment='alignment'; } { print " <form action='choices.php?action=characterthree' method='post'> <option value='Lycan'>Lycan</option> <option value='Vampire'>Vampire</option> <option value='Angel'>Angel</option> <option value='Demon'>Demon</option> </select> } { print " <form action='choices.php?action=characterthree' method='post'> <option value='Male'>Male</option> <option value='Female'>Female</option> </select> } { print " <form action='choices.php?action=characterthree' method='post'> <option value='Good'>Good</option> <option value='Evil'>Evil</option> </select> } Name this character:<input type='text' name='charname' size='20'/> <input type='submit' value='Submit Character Three'/> </form>; $db->query("INSERT INTO charthree VALUES('$name','$type','$gender','$alignment')"); } $h->endpage(); ?>
  22. I want to thank everyone for your help with this ... I finally got it to work. I'm not sure why this made a difference ... but it did. On lines 34 and 38 I removed the ~>~ after the first quote mark and now it is working great. Thanks for all of your suggestions and ideas.
  23. I've looked and was not able to find this information. When it comes to tables and coding with php ... 1. Is there such a thing as too many tables? 2. Would too many tables slow down the way your game runs? 3. Would having all your information on one table be bad form or function? For example ... why is 'userstats' not included in the 'users' table. The reason I'm asking is because years ago while in college and learning VB we were taught that you either keep all information on one table or or you keep each bit of information seperate.
  24. Yes it does. As I add each new mod ... I check to make sure that I'm not getting any error messages. Could it be that I might have to add something to another file?
  25. <?php include "globals.php"; print "<center><font size='4' face='Arial, Helvetica, sans-serif'>Marriage</font><hr width=75%>"; switch($_GET['action']) { case 'propose': propose_marriage(); break; case 'note': send_note(); break; case 'divorce': divorce_marriage(); break; case 'confirm': divorce_confirm(); break; case 'accept': accept_proposal(); break; case 'decline': decline_proposal(); break; default: marriage_index(); break; } function marriage_index() { global $ir,$c,$userid, $db; print "<center> Welcome to the marriage office! What would you like to do today? "; if (!$ir['marriage']) { print "> [url='marriage.php?action=propose']Propose marriage[/url] "; } else { print "> [url='marriage.php?action=divorce']Divorce partner[/url] //> [url='marriage.php?action=roses']Send Bouquet of Roses ($10,000)[/url] > [url='marriage.php?action=note']Send a love note[/url] "; } print " <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } function propose_marriage() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); if(!$_POST['ID']) { print " <form action='marriage.php?action=propose' method='post'> Please type the ID# of the user you wish to propose to below. ID: <input type='text' name='ID' value='{$_GET['ID']}' maxlength='10' length='10' size='10' width='10' /> <input type='submit' value='Propose' /> </form> <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } else if($ir['marriage']) { print " You are already married. <hr width=75%>> [url='trade.php']Back[/url]<hr width=75%>"; } else if($_POST['ID'] == $userid) { print " You cannot propose to yourself! <hr width=75%>> [url='marriage.php']Back[/url]<hr width=75%>"; } else { $db->query("INSERT INTO proposals VALUES ('', '$userid', '{$_POST['ID']}')", $c); $q=$db->query("SELECT * FROM proposals WHERE prFROM=$userid"); $r=$db->fetch_row($q); event_add($_POST['ID'], "{$ir['username']} would like to marry you: [url='marriage.php?action=accept&ID={$r[']Accept[/url] [url='marriage.php?action=decline&ID={$r[']Decline[/url]", $c,'general'); print " Proposal sent! <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } } function accept_proposal() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $q=$db->query("SELECT * FROM proposals WHERE prID={$_GET['ID']}"); $r=$db->fetch_row($q); if(!$_GET['ID']) { print " Invalid proposal ID! <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } else if($r['prUSER'] != $userid) { print " You cannot accept this proposal! <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } else { $q=$db->query("SELECT * FROM proposals WHERE prUSER=$userid"); $r=$db->fetch_row($q); event_add($r['prFROM'], "{$ir['username']} has accepted your proposal!", $c); $db->query("UPDATE users SET marriage={$r['prFROM']} WHERE userid=$userid"); $db->query("UPDATE users SET marriage=$userid WHERE userid={$r['prFROM']}"); $db->query("DELETE FROM proposals WHERE prID={$_GET['ID']}"); print " Proposal accepted! <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } } function decline_proposal() { global $db,$ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $q=$db->query("SELECT * FROM proposals WHERE prID={$_GET['ID']}"); $r=$db->fetch_row($q); if(!$_GET['ID']) { print " Invalid proposal ID! <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } else if($r['prUSER'] != $userid) { print " You cannot decline this proposal! <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } else { $q=$db->query("SELECT * FROM proposals WHERE prID={$_GET['ID']}"); $r=$db->fetch_row($q); event_add($r['prFROM'], "{$ir['username']} has declined your proposal.", $c); $db->query("DELETE FROM proposals WHERE prID={$_GET['ID']}"); print " Proposal declined! <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } } function divorce_marriage() { global $db,$ir,$c,$userid,$h; if ($ir['marriage']) { print " Are you sure you wish to divorce your partner? <hr width=75%><table width=75%><tr><td width=50% align='center'>> [url='marriage.php']No[/url]</td><td width=50% align='center'>> [url='marriage.php?action=confirm']Yes[/url]</td></tr></table><hr width=75%>"; } else { print " You are not married! <hr width=75%>> [url='marriage.php']Back[/url]<hr width=75%>"; } } function divorce_confirm() { global $db,$ir,$c,$userid,$h; if ($ir['marriage']) { print " You divorced your partner! <hr width=75%>> [url='marriage.php']Back[/url]<hr width=75%>"; $db->query("UPDATE users SET marriage=0 WHERE userid={$ir['marriage']}"); $db->query("UPDATE users SET marriage=0 WHERE userid=$userid"); } else { print " You are not married! <hr width=75%>> [url='marriage.php']Back[/url]<hr width=75%>"; } } function send_note() { global $db,$ir,$c,$userid,$h; if (!$_POST['note']) { print " <form action='marriage.php?action=note' method='post'> Please type a love note to send to your partner. Note: <textarea rows='5' cols='34%' name='note'></textarea> <input type='submit' value='Send' /> </form> <hr width=75%>> [url='explore.php']Back[/url]<hr width=75%>"; } else { $note=str_replace(array("\n"),array(" "),strip_tags($_POST['note'])); $db->query("INSERT INTO mail VALUES ('',0,$userid,{$ir['marriage']},unix_timestamp(),'Love Note','$note')",$c) or die($db->error()); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid={$ir['marriage']}"); print " Your love note was sent to your partner! <hr width=75%>> [url='marriage.php']Back[/url]<hr width=75%>"; } } $h->endpage(); ?>   And this is the error message I get:"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" I tried the require_once that ILovecp suggested and I still recieved the same error message.
×
×
  • Create New...