Jump to content
MakeWebGames

shaved92bravada

Members
  • Posts

    234
  • Joined

  • Last visited

Everything posted by shaved92bravada

  1. Re: [mccode v2] Player of the week...   if($r['player_week'] > 0) { $r['username'] = "<font color=WHATEVERCOLORHERE>{$r['username']}</font>"; }/code] That should do it.... I know there is prolly an easier way but that would work on say userlist.... usersonline.... would need to change it a lil to work on viewuser to add in the donator image, days etc...
  2. Re: [mccode v2] Player of the week... yeah its already in there, I don't think its that exact one but it makes sure they are active within the last 10 or 14 days something like that. also it checks to make sure they aren't in fed..... The way I look at it is it encourages them to stay active and out of trouble... hopefully. Plus with the item being random that you receive ya never know what you could end up with....
  3. Re: [mccode v2] Simple Login,Register,etc. (Validated.....)   Yes I know you can change it to that but you still have to change the width of it unless you like a really tall and skinny layout.... but you still have to edit all of the images, etc to make it look correct.... but anyway why are we still on this subject lol. Back to the task at hand... if anyone likes it they can use it. If not then don't. I am guaging interest on what everyone wants before/if I release another one.
  4. Re: mccode v2 help I must also add to that Alabama......... " If you are not familiar with php/mysql any at all ( i.e. adding mods, editing source code, etc ) then ya might want to do some reading before attempting to run a game..... " Not putting anyone down, just trying to offer some friendly advice, because to run a half ass decent game its gonna take some knowledge in the above named fields.....
  5. Re: estate.php   X2 that is your problem. I had the exact same problem at one point in time because I was using the shared housing.... I fixed it but then decided to go without shared housing.
  6. Re: [mccode v2] Simple Login,Register,etc. (Validated.....) I used text area's because I liked the way it looked lol. easily changed though. and if someone wants to import this into the header then feel free to do so, like I said its a fixed width template so the images and such are made for that width, and if someones game was that small then it would be kinda hard to play so in order for this to work in game you would have to edit all the images or make new ones. plus change the width of the wrapper, each div section, etc to make it all work correctly. It would be much easier just to use another template, like one that has a fluid header and footer, etc. Now that would be much easier to work with.
  7. Re: [mccode v2] Simple Login,Register,etc. (Validated.....) the more complicated part of importing this will be adjusting the stylesheet to allow for the columns to line up correctly one for the menu, one for the main content and it actually looking good, plus the images are made for the current layout/size so you would need to edit the images or just make new ones..... so yeah it would be more trouble that what it is worth.....
  8. Re: [mccode V2] ~REQUESTED~ Simple Login,Register,etc. (Validated.....) This template would be quite hard to import into the header.php. Don't get me wrong it could be done but it would end up being more trouble than what it is worth. In due time I am going to post some more templates that can easily be imported into the game as well to have a complete matching package.
  9. I have had some requests for a more simplified layout for the login & register so I figured I would go ahead and post this one for everyone. This is a very simple layout and design again made from a free template. I have not only included the login and register.... but I have also included privacy policy. terms of service and contact pages.... So this little package is all setup and ready to go. The only thing you need to do is get killah's contact form mod found Here http://criminalexistence.com/ceforums/i ... ic=16999.0 You do not have to copy the contact.php from there as I have included it in the zip file to match the template. But you will need to get the rest of it especially the SQL 's in order for the contact.php to fully fuction. Also as I said in my other thread Since I used a free template to make this I am gonna go ahead and say this. It is a free template released under the CREATIVE COMMONS PUBLIC LICENSE. Which basically states that you can distribute, publicly display, modify the template but you must leave a reference to the original author. That being said here is what you have been waiting for.... http://www.bravenations.com/templates/newtemp/login.php There is no need to post the other thinks as everything is setup the same as it would be on your game, just click that link then try out the other thinks from there. There are two text files in the package one called privacy.txt and one called tos.txt.... you will need to edit those and place whatever you like in there to make a proper privacy policy and terms of service. http://www.bravenations.com/templates/n ... ewtemp.zip That should be everything needed. let me know if ya like it. Let me know if you have any problems as well. I included my banner.png in the zip but you will need to create your own. Just make it around 660 x 130 and the stylesheet will automatically resize it to that, just make sure it is called banner.png and is in the images folder.
  10. Re: [mccode V2] Player of the week... sry messed up on the part for the day cron   $db->query("UPDATE users SET player_week-1 WHERE player_week > 0");   That should work correct. I had an = in there which set it to -1 instead of just take on off.
  11. Re: Lessons Counting toward game progress? are you wanting your players able to do certain things but have to have completed a one of the courses first?? kind of like having to have a certain item to do a crime like I just made?? if so that gives me an idea and I shall start working on this soon, just need to know what your wanting them to be able to do after completing the lesson.
  12. Re: [mccode V2] Player of the week... you would be correct and also to point out that atleast you asked if you had done it right now just demanded that someone do it for you. +1 to you for asking and trying......
  13. Re: [mccode V2] Player of the week...   Good point..... I am still gonna go with my other idea for the player being the most helpful, just need to figure out how to do it to keep people from cheating ya know.
  14. Re: [mccode V2] Player of the week... I am also going to make one that rewards a the person that helps out the most people say in like a month. That one is going to be a little bit more tricky though. Because it is going to require the player that they helped to "vote" or "rate" this person and the person with the most at the end of the month will get a special prize as well. But I am going to have to do it somehow that people can't just have other people vote for them etc without helping. Not sure exactly on how I want to do that. My goal is to have a game where people are friendly, active, and try and stay out of trouble ya know. lol I know I am probably dreaming but still its worth a shot. Give people incentive and it helps. Bribery as i like to call it. lol
  15. Re: [mccode V2] Player of the week... very nice idea.... I may look into that after I get my newspaper done. My thinking was to make sure people stayed active and that could be another great way to keep people active.
  16. Re: [Mccodes v2] Pass Parcel or Secret Santa [Working Copy]     Its free it doesn't matter when it gets done!!! That is why I don't post alot of things I do........
  17. Re: [mccode V2] Player of the week... thanks for that killah I didn't even think of that..... like I said I threw this together pretty quick so I figured there would be something wrong. Glad ya'll like it though.
  18. Re: [Mccodes v2] Pass Parcel or Secret Santa [Working Copy]   Thats an easy fix.... just go through the script and figure out what its missing and add it yourself.
  19. Re: [mccode V2] Player of the week... well actually I just give them 10 donator days, then they get luck of the draw on the items in which donator packs are included in the list of items, in which i am getting rid of all but like 2 dp's anyway to make the game more fair for everyone. Plus this way everyone has a chance to get a dp or donator days even if they can't afford it ya know.
  20. I am working on a very very advanced newspaper and I was trying to think of something that I could put in there that would catch the players eye and make them want to stay active and hopefully out of trouble. So I came up with Player of the Week!! It requires 2 new fields in the user table ( I'm sure there is an easier way.... ) and it runs off of crons.... How simple is that!!! lol I know I make it sound like WOW when its pretty simple. But hey its an idea I thought of and I take great pride in my work lol.... anyway. How it works is.... The weekly cron runs on Sunday night and randomly picks a player out of the users that were active within a certain amount of days ( forgot what I set it too, I used the timestamp to set it a while ago ) and aren't in fedjail. ( thinking of adding in mailban as well as the warning system I am using ) That way it encourages them to stay active more and to try and stay out of trouble..... Then once they are chosen for player of the week .... of course they hold the title for 7 days BUT thats not all... they are also given a reward. I have it set on mine to give them 10 donator days and a random item . You can chose which item or change $item=rand(1,30); ( 30 being the number of items in your game or the max item id you want it to go to ) 1- 30 on my game are all pretty good rewards so thats what I set it as. Anyway the good stuff SQL's ALTER TABLE `users` ADD `player_week` INT NOT NULL DEFAULT '0'; ALTER TABLE `users` ADD `pw_reward` INT NOT NULL DEFAULT '0'; open cron_day.php ADD THIS $db->query("UPDATE users SET player_week=-1 WHERE player_week > 0"); Then save this as cron_weekly.php <?php include "config.php"; include "global_func.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $q=$db->query("SELECT userid FROM users WHERE laston > unix_timestamp()-86400*10 AND fedjail = 0 AND player_week = 0 ORDER BY rand() limit 1"); while($rr=$db->fetch_row($q)) { $item=rand(1,30); item_add($rr['userid'], $item, 1); $qn=$db->query("SELECT itmname FROM items where itmid='$item'"); $n=$db->fetch_row($qn); event_add($rr['userid'],"You have been chosen as Player of the Week!!!! You have been awarded with 10 Donator Days and an {$n['itmname']}. Hope you enjoy your reward and thank you for being active and staying out of trouble. Thanks from the BraveNations Staff.",$c); $db->query("UPDATE users SET donatordays = donatordays + 10, player_week = 7, pw_reward='$item' WHERE userid='{$rr['userid']}'"); } ?> then in your cron jobs you will need to run this cron 0 20 * * 7 curl http://www.sitename.com/cron_week.php?c ... ONCODEHERE 0 is the minute 20 is the hour of the day 7 is the day of the week which 7 would be sunday that is for those who didn't know.... Now if you want to display the player of the week somewhere this is how I did it. I'm sure others will think of a better way but hey it works great with my newspaper layout I am using. <h2>Player of the Week</h2>'; $q=$db->query("SELECT username, level, gender, daysold, pw_reward FROM users WHERE player_week > 0"); $r=$db->fetch_row($q); $qn=$db->query("SELECT itmname FROM items where itmid='{$r['pw_reward']}'"); $n=$db->fetch_row($qn); $item=($n['itmname']); if($r['display_pic']) { $pic= '[img='.$r['display_pic'].']'; } else { $pic= "[img=/images/defaultpic.jpg]"; } echo ' <p class="left">'.$r['username'].'</p> '.$pic.' Level: '.$r['level'].' Gender: '.$r['gender'].' Days Old: '.$r['daysold'].' Rewarded With: 10 Donator Days & '.$item.' </p> <p class="left"> You too can be chosen for Player of the Week. There is nothing special that you have to do other than stay active, stay out of trouble, and have fun playing the game. Players are chosen randomly out of everyone that is active and not in fed each week and the person chosen will receive a reward when they are chosen. So dont think there is favoritism or anything going on when certain people are chosen, thats just how the coin was tossed so to speak.</p> Like I said that is how I display it on mine you would prolly need to change some stuff around but here is what it looks like in the end. as always post any bugs and I will work on them. Thanks and if you like it let me know and I will keep em coming. p.s. and if ya like my newspaper I might even post it thats undecided yet. All of the articles are able to be edited directly from the the paper itself or from the admin panel, only me ( the owner ) admins, or news staff are able to edit it. The rest of the stuff is just the normal queries like top 10 etc. Also going to have an advertiser login there somewhere so anyone that advertises on my game can login and check the amount of views/clicks their add has gotten and how much longer it will run for.
  21. Re: [mccode V2] Item needed to perform crime. well I guess that is a good sign lol. Not really any posts about bugs or it not working..... if ya like it and are using it let me know how you like it as I got some more ideas in mind for some simple mods.
  22. Re: [mccode V2] Item needed to perform crime. No it wasn't right tyvm for pointing that out. That was the one for a lil "sumfink" else I am work in lol it is correct now though.
  23. Re: [mccode V2] Item needed to perform crime. Thanks let me know if there are any bugs or anything wrong. I did this pretty quickly in an effort to get it done and posted. Like I said I tested it on mine all except for the create crime functions and it all seemed to work pretty well.
  24. I have seen a request for this and I am not sure if its been made or not. So I went ahead and made it anyway. Its pretty simple over all, just thought it would be a nice addition. As always if ya don't like it or the way I did it then ya don't have to use it. If ya like it then you are more than welcome to use it. Everything has been tested except for the create new crime functions. only because I don't need anymore crimes at the moment. I am sure it will work though. If you have any problems feel free to post them here and I will gladly help. I know its not the prettiest of programming but hey I am still learning. The SQL   ALTER TABLE `crimes` ADD `crimeITEM` INT NOT NULL DEFAULT '0';   open criminal.php find print "<tr><td colspan='4' class='c'><center>{$r['cgNAME']}</center></td></tr>"; foreach($crimes as $v) {   add this below   $qn=$db->query("SELECT itmname FROM items where itmid={$v['crimeITEM']}"); $n=$db->fetch_row($qn); $name=$n['itmname'];   Now for the part that shows it find this   <th>Cost</th><th>Do</th>   replace with this   <th>Cost</th><th>Item Needed</th><th>Do</th>   find this   <td>{$v['crimeBRAVE']} Brave</td>   replace with this   <td>{$v['crimeBRAVE']} Brave</td><td>$name</td>   Now open docrime.php find   $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } else {   replace with this   $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); $qi=$db->query("SELECT inv_itemid FROM inventory where inv_itemid={$r['crimeITEM']} AND inv_userid=$userid"); $n=$db->fetch_row($qn); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } else if($n['inv_itemid'] != $r['crimeITEM']) { print "You do not have the required item needed to perform this crime."; } else {   That will take care of not being able to do the crime if you don't have that item. Now for the staff_crimes open staff_crimes.php and replace functions: new_crime_form() , new_crime_submit() , edit_crime_begin() , edit_crime_form() , edit_crime_sub() with whats below. I found it easier just to post it this way rather than each individual edit to the 4 required functions.   function new_crime_form() { global $ir, $c, $db; print "Adding a new crime. <form action='staff_crimes.php?action=newcrimesub' method='post'> Name: <input type='text' name='name' /> Brave Cost: <input type='text' name='brave' /> Item Needed: ".item2_dropdown($c, 'itemneed')." Success % Formula: <input type='text' name='percform' value='((WILL*0.8)/2.5)+(LEVEL/4)' /> Success Money: <input type='text' name='money' /> Success Crystals: <input type='text' name='crys' /> Success Item: ".item2_dropdown($c, 'item')." Group: ".crimegroup_dropdown($c,'group')." Initial Text: <textarea rows=4 cols=40 name='itext' /></textarea> Success Text: <textarea rows=4 cols=40 name='stext' /></textarea> Failure Text: <textarea rows=4 cols=40 name='ftext' /></textarea> Jail Text: <textarea rows=4 cols=40 name='jtext' /></textarea> Jail Time: <input type='text' name='jailtime' /> Jail Reason: <input type='text' name='jailreason' /> Crime XP Given: <input type='text' name='crimexp' /> <input type='submit' value='Create Crime' /></form>"; } function new_crime_submit() { global $ir,$c,$userid, $db; if($_POST['itemon'] != "on") { $_POST['item']=0; } $db->query("INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP, crimeITEM) VALUES( '{$_POST['name']}', '{$_POST['brave']}', '{$_POST['percform']}', '{$_POST['money']}', {$_POST['crys']}, {$_POST['item']}, '{$_POST['group']}', '{$_POST['itext']}', '{$_POST['stext']}', '{$_POST['ftext']}', '{$_POST['jtext']}', {$_POST['jailtime']}, '{$_POST['jailreason']}', {$_POST['crimexp']}, {$_POST['itemneed']})"); print "Crime created!"; stafflog_add("Created crime {$_POST['name']}"); } function edit_crime_begin() { global $ir,$c,$h,$userid,$db; print "<h3>Editing Crime</h3> You can edit any aspect of this crime. <form action='staff_crimes.php?action=editcrimeform' method='post'> Crime: ".crime_dropdown($c,'crime')." <input type='submit' value='Edit Crime' /></form>"; } function edit_crime_form() { global $ir,$c,$h,$userid,$db; $d=$db->query("SELECT * FROM crimes WHERE crimeID={$_POST['crime']}"); $itemi=$db->fetch_row($d); print "<h3>Editing Crime</h3> <form action='staff_crimes.php?action=editcrimesub' method='post'> <input type='hidden' name='crimeID' value='{$_POST['crime']}' /> Name: <input type='text' name='crimeNAME' value='{$itemi['crimeNAME']}' /> Brave Cost: <input type='text' name='crimeBRAVE' value='{$itemi['crimeBRAVE']}' /> Item Needed: ".item2_dropdown($c, 'crimeITEM', $itemi['crimeITEM'])." Success % Formula: <input type='text' name='crimePERCFORM' value='{$itemi['crimePERCFORM']}' /> Success Money: <input type='text' name='crimeSUCCESSMUNY' value='{$itemi['crimeSUCCESSMUNY']}' /> Success Crystals: <input type='text' name='crimeSUCCESSCRYS' value='{$itemi['crimeSUCCESSCRYS']}' /> Success Item: ".item2_dropdown($c, 'crimeSUCCESSITEM', $itemi['crimeSUCCESSITEM'])." Group: ".crimegroup_dropdown($c,'crimeGROUP', $itemi['crimeGROUP'])." Initial Text: <textarea rows=4 cols=40 name='crimeITEXT' />{$itemi['crimeITEXT']}'</textarea> Success Text: <textarea rows=4 cols=40 name='crimeSTEXT' />{$itemi['crimeSTEXT']}</textarea> Failure Text: <textarea rows=4 cols=40 name='crimeFTEXT' />{$itemi['crimeFTEXT']} </textarea> Jail Text: <textarea rows=4 cols=40 name='crimeJTEXT' />{$itemi['crimeJTEXT']} </textarea> Jail Time: <input type='text' name='crimeJAILTIME' value='{$itemi['crimeJAILTIME']}' /> Jail Reason: <input type='text' name='crimeJREASON' value='{$itemi['crimeJREASON']}' /> Crime XP Given: <input type='text' name='crimeXP' value='{$itemi['crimeXP']}' /> <input type='submit' value='Edit Crime' /></form>"; } function edit_crime_sub() { global $ir,$c,$h,$userid, $db; $db->query("UPDATE crimes SET crimeNAME='{$_POST['crimeNAME']}', crimeBRAVE='{$_POST['crimeBRAVE']}', crimePERCFORM='{$_POST['crimePERCFORM']}', crimeSUCCESSMUNY='{$_POST['crimeSUCCESSMUNY']}', crimeSUCCESSCRYS='{$_POST['crimeSUCCESSCRYS']}', crimeSUCCESSITEM='{$_POST['crimeSUCCESSITEM']}', crimeGROUP='{$_POST['crimeGROUP']}', crimeITEXT='{$_POST['crimeITEXT']}', crimeSTEXT='{$_POST['crimeSTEXT']}', crimeFTEXT='{$_POST['crimeFTEXT']}', crimeJTEXT='{$_POST['crimeJTEXT']}', crimeJAILTIME={$_POST['crimeJAILTIME']}, crimeJREASON='{$_POST['crimeJREASON']}', crimeXP={$_POST['crimeXP']}, crimeITEM={$_POST['crimeITEM']} WHERE crimeID={$_POST['crimeID']}"); print "Crime edited..."; stafflog_add("Edited crime {$_POST['crimeNAME']}"); }
  25. Re: [Mccodes v2] Pass Parcel or Secret Santa [Working Copy] looks awesome illusions. I will definately be checking this out once I get done making sure my template conversion to ingame pages comes out all right....
×
×
  • Create New...