
Lilith
Members-
Posts
295 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Lilith
-
LMFAO, ok WRX can anyone say aqua teen hunger force? Sorry, your shotgun City login reminds me of that cartoon, just needs a guy in his underwear now.
-
Thanks for the tips, to answer some of what you have noticed, this file is like 6 pages long with multiple functions. I didn't feel the need to post the entire file and bore everyone to death, so I only included the pertinent parts. You don't sound sarcastic, as this is the first time I have messed with functions, and Ive only been coding for around 4 months. I learn fast, but Im still missing pieces. ($farmplots) is defined and used in the //blah blah blah/// that I edited out for making the post shorter. The farming file I'm changing is located in the free mods section WAYYYY back. It never did work properly, but the concept behind it was very close to the mod I wanted to create, so I figured it was a good place to start. This function is the only thing not working in it yet. After I get it functioning, Ill change the labels to better reflect what the mod is. for example barn=rental licence, animals=tenants, land=apartment building, etc. After the player makes some investment into this mod, it will return a rental income based on how much they have invested, and how well they have maintained their apartments.
-
Ok, so Im trying to take a farming mod and develop a new mod from it. (something more interesting involving collecting rent from tenants) But, I keep getting the error Fatal error: Call to undefined function animals() in /home/battlefo/public_html/farm.php on line 9 I have researched switch, case, functions ect with the normal sites, but cant seem to identify the error. Everything on google for Call to undefined function is followed by my_sql_connect for wordpress etc dealing with not being able to connect to the database. So, Im pretty stumped here. Can someone explain to me why you would use the switch($_GET['action']) with listed cases, and why I'm seeing this error? <?php include("globals.php"); switch($_GET['action']) { case 'barnfi' : barnfi(); break; case 'barnbou' : barnbou(); break; case 'upgrade': upgrade(); break; case 'animals': animals(); break; case 'farm': farm(); break; case 'land': land(); break; case 'landb': landb(); break; default: index(); } function index() //Blah Blah Blah/// //function that is being sited in the error// function animals() { global $ir, $c, $userid, $h, $db; } if ($farmplots>0) { print "[b]Sarah:[/b] Hi! Welcome to the managment area of your ofice. Here you can find the tenants that you can let move in and collect rent from! You pay the aplicible moving fees for these tenants, then you pay the maintenence guy on your building his wages and eventually you'll start making money back from their rent. Cool huh? But if you fail to pay the maintence man, your tenants will leave! [b]Sarah:[/b] So who would you like? "; $arraypick = mysql_query("select * from tenants"); } print "<table><tr><td>[b]Tenant name[/b]</td><td>[b]Tenant Moving Fees[/b]</td><td>[b]Maintenence Costs[/b]</td><td>[b]Rent Paid[/b]</td><td>[b]Number of Applicants[/b]</td><td>[b]Approve[/b]</td></tr>"; while ($display = mysql_query($arraypick)) { print "<tr><td>".$display['type']."</td><td><center>'".number_format($display['cost'])."'</center></td><td><center>".$display['rent']." ".$display['instock']."</center></td><td><center>[url='farm.php?action=animals&step=buyanimal&id=".$display[']Buy[/url]</center></td></tr>"; } print "</table> "; if ($step == "buyanimal") { $animload = mysql_query("select * from farm_anim_listdb where id='$id'"); $anim = mysql_query($animload); $animload = mysql_query("select * from tenants where owner=$userid'"); $animnum = mysql_query($animload)*10; $total = $animnum; } if ($total > ($farmplots*10)) { print "You do not have enough space to house this tenant."; } elseif (($ir['money']) < $anim['cost']) { print "You cannot afford this."; } else { print "[b]Sarah:[/b] I'll send that tenant right over!"; $rem_money = mysql_query("Update user set money=money-".$anim['cost']." where userid=$userid'"); $add_tenant = mysql_query("Insert into farm_animdb (id,owner,animalname,cost,matureage,prod_name,prod_amount,assist_need,food_need,water_need) values ('',$userid','".$anim['animalname']."','".$anim['cost']."','".$anim['matureage']."','".$anim['prod_name']."','".$anim['prod_amount']."','".$anim['assist_need']."','".$anim['food_need']."','".$anim['water_need']."')"); $red_stock = mysql_query("update farm_anim_listdb set instock=instock-1 where id='".$anim['id']."'"); } } $h->endpage(); exit; //blah blah blah//
-
Hers a decent layout that is great for a free layout. The images are pretty stock looking but with a little bit of effort and some free border less tiles copied over the images I'm providing, the customization and originality of this layout is endless. Header file Cascading Style Sheet(place in layout folder in public html) compiled image Screenshot images to copy into layout folder in your public html Header.png topper.png footer.png mainbg.png leftbg.png colsbg.png colbg.png another example of this same layout (just better graphics). Best part about this layout, IMO, is that the main background image never moves when you scroll, only the center part where the game is contained. As well as all images being in a png format, you can set your custom images to differing levels of transparency allowing the main bg to be seen behind the header, or other image you wish.
-
@analog that just gives me an error message, unexpected t string thing. @dayo, yes I wish to replace the black background with that image via css I have figured it out because of your help. I had to add (class="col_wrap") to <td width="80%" class="col_wrap" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; Now to create the footer :) thanks again for all your help!
-
Many grateful thanks, it seems that this week is my week for for duh moments. I appreciate everyone's help.
-
Wow, I found out raven was illegal and failed to care about or download any "updates" they released. I shared my opinion and experiences and get flamed. OP asked very simply: "So if i buy mccode v2 can i keep on using ravan theme ? And how can i switch my files from ravan to mccode vs2 smootly ?" can you keep using the theme, I suppose so but, you still risk action by the original creators. As far as a smooth switch, refer to my earlier post. Heaven forbid someone give a strait answer in here? Sorry I forgot to add in my opinion on how to make a clean switch. My profound apologies for encouraging someone new to the forums to avoid the massive "you used raven" bashing that occurs here by recreating the game with clean mccodes. And even more apologies for encouraging a new developer to actually get the files that give proper credit to the creators. I went through this with you guys, and got zilch for help! So if you just want to flame and bash, STFU till you can add something useful and on topic.
-
I have posted a working link to the header file in the OP. However, I am not sure where the left menu ends .... I think that is the majority of my issue.
-
see if you can find a prepaid visa, load it with some cash, then buy mccodes.
-
having a MCC write a C++ to support 3d and selling the base code for it would be sweet for sure . However, im confident that people already do that, and it should probably be better left to "the experts". ID rather see MCC improve what they already know and are basically the industry leaders for. Besides, I design in 3d, I don't want my hobbies to be 3d too. Talk about taking your work home with you.
-
Rather than all this free and that free, etc etc, I would find it nice if Damstew and Coldblooded gave each of us that were scammed and provided them with paypal transactions after purchasing the full version, the opportunity to participate in a class action lawsuit for lost time, effort, uptime, ect. I essentially have paid the $100 for v2 (part to raven, part to Mcc) and therefore should not be entitled to anything free from MCC. However, I should be allowed to participate in a class action lawsuit to recover lost earnings for down time on my game, etc etc etc. That should come out of Raven's pocket, not MCC. If MCC really wanted to show that they will lay claim to their creation, they would head this venture or provide contact information so that we may do it without them in addition to what MCC has lost. This way, everyone would be entitled to what they put the time effort and work into. IMO on what MCC will get from raven : $15 for each person that came forward and supplied paypal information AND bought the code with the discount. I don't see how they can legally be entitled to recover anything for their customers losses, and its a pretty solid case that they lost $15 for each sold code as described above.
-
you would be referring to [img=/images/filename] Id rather use css than html for this, but thanks for trying.
-
the original actual works, however people have suggested improvements and better ways of coding this. Better is always a matter of opinion, so that said, Id use the clean copy DJK posted as it is easier to read. Then simply add the improvements posted here that you feel suit how you want to code.
-
Ive spent many hours/days/weeks trying to get the exact layout for my game that I had in mind, and im soooo close! but here lies the problem, I cant figure out where to insert the into my header to put in the image I want behind the game. a picture is worth a thousand words. See that nasty black box???? yeah, its supposed to have behind the text via the Here is the css lines that pertain to that image (i have two of them that ore only slightly different, you get the point) .col_wrap{background:url(/images/colbg.png) top repeat-y;width:780px; float:left;} .col{background:url(/images/colbgtop.png) top repeat-y;width:780px; float:left;} and here is my header file. http://pastebin.com/neBSZ46t Thanks in advance for any hints, tips tricks ect.
-
Having been through what you are dealing with Prime, . Most of you seem to think that raven is exactly like mccodes, but its not. most of the mods here on MWG wouldn't work with raven even tho I was told that they were the same thing. The basis Mccodes has for suing Raven is the engine .... basically globals.php and global_funct.php (or whtever they are). Other than that, Raven tweaked almost every part of the files and tons of stupid little stuff so that you couldn't use the mods posted here without some major revamping. I would suggest getting a free server and buying mccodes, loading it, and keeping your raven script running till you can build the mccodes version to match the raven version for functionality and appearance, then after testing, switch them out. Yall can talk a lt of $hit about mccodes, but raven is worse for customization! Having been there done that, dont waste any more time on raven. But do keep it open and generating income till you can build up your mccodes to match it.
-
[any version] Removal of 1 minute crons
Lilith replied to Haunted Dawg's topic in Free Modifications
I know Im missing something here, where do you put a command to place a time stamp into (somewhere in the DB) so the program knows what its taking the min from? This file seems to update timestamps just fine, but how do you get timestamps there in the first place? I'm so confused and cant get this to work. OK, so I get it, no help for the dumb ass...... Helps when you install to the right server...... (installed to test, was checking it on main) This worked perfectly only with changes to the cron commands that I have customized. -
sits here patiently with notepad and pencil taking notes.
-
im actualy using CONtext, but beyond the idea that it colors the code making it easier to read, its not much better than notepad, thanks much for the link!
-
um,,, ok, noobie showing here, but what is pastbin?
-
IMO, Sniko does a very nice job of developing mods that work well, are creative in their design, and as economy stability is high on my list, his mods seem to promote this concept. Only drawback to Sniko's mods is that as nice a guy as he is, and willing to help, he doesn't do custom just for you mods. His belief that he likes coding and wont turn it into a job means he develops things how he wants and not on a timeline. So hiring him is difficult (if not impossible), but his existing and future mods are sure to be great.
-
it wasn't you, it did get cut in the copy paste process, but has been added back! thanks greatly, that would have been a nightmare for me to find. On the bright side, im trying.
-
most of the structure issues are due to my ability (or lack there of) in these forums, I haven't figured out how to get it to display in these forums the same as it does in my files. IF anyone wants a copy of this that is lass cramped, PM me and ill be happy to send a copy that is easier to read.
-
for v2.1 What it does This is a donator market with the following features Donators may sell donator days Game managers determine the price of each donator day (currently set to $2000) How it can benefit the users donator days seem to pile up on the guys who donate, but are impossible to come by for those who do not donate. Ive played other games where you can buy donator packs that other players have purchased, but the prices are hardly worth the effort The set price helps deter inflation that can be caused by donator items This keeps donators donating, and non donators playing and able to keep up with a little extra effort How this was created I have taken several examples of a crystal market from the free mods here on MWG and modified them to become a market for donator days. I also refrenced somerandombastard's donator days market for the sql information (but havent compaired to see how close to the same they turned out) This mod has contributions and ideas from many coders across MWG who helped me figure it out, and is (in my mind at least) comunity property. I know its not the latest or greatest mod, and there are probably some security issues, but I wanted to give something back to the community. Query to create the sql table and feilds [mysql]CREATE TABLE `ddaysmarket` ( `ddID` int(11) NOT NULL auto_increment, `ddQTY` bigint(20) NOT NULL default '0', `ddADDER` int(11) NOT NULL default '0', `ddPRICE` bigint(20) NOT NULL default '2000', //change '2000' to the price you want DDays to sell / buy for PRIMARY KEY (`ddID`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;[/mysql] Name: dmarket.php <?phpinclude "globals.php";print "<h3>Donator Day Market</h3>";$_GET['ID']=abs(@intval($_GET['ID']));$price = 2000;//change 2000 to the price you want DDays to sell / buy forswitch($_GET['action']){case "buy":case "buy":ddays_buy();break; case "remove":ddays_remove();break; case "add":ddays_add();break; default:ddays_index();break;}function ddays_index(){global $ir,$c,$userid,$h;$price = 2000; //change 2000 to the price you want DDays to sell / buy forprint "[Add A Listing] "; $q=mysql_query("SELECT dd.*, u.* FROM ddaysmarket dd LEFT JOIN users u ON u.userid=dd.ddADDER ORDER BY ddQTY ASC",$c);while($r=mysql_fetch_array($q)){if($r['ddADDER'] == $userid) { $link = "Remove"; } else { $link = "Buy"; }$each= (int) $r['ddPRICE'] / $r['ddQTY'];echo "";}echo "AdderQtyPrice eachPrice totalLinks {$r['username']} [{$r['userid']}] {$r['ddQTY']} \$" . number_format($each)." \$".number_format($r['ddPRICE'])." [$link] ";}function ddays_remove(){global $ir,$c,$userid,$h;$q=mysql_query("SELECT * FROM ddaysmarket WHERE ddID={$_GET['ID']} AND ddADDER=$userid",$c);if(!mysql_num_rows($q)){echo "Error, either these Donator Days do not exist, or you are not the owner. > Back";$h->endpage();exit;}$r=mysql_fetch_array($q);mysql_query("UPDATE users SET donatordays=donatordays+{$r['ddQTY']} where userid=$userid",$c) or die(mysql_error());mysql_query("DELETE FROM ddaysmarket WHERE ddID={$_GET['ID']}",$c);echo "Donator Days removed from market! > Back";}function ddays_buy(){global $ir,$c,$userid,$h;$price = 2000;$q=mysql_query("SELECT * FROM ddaysmarket dd WHERE ddID={$_GET['ID']}",$c);if(!mysql_num_rows($q)){echo "Error, either these Donator Days do not exist, or they have already been bought. > Back";$h->endpage();exit;}$r=mysql_fetch_array($q);if($r['ddPRICE'] > $ir['money']){echo "Error, you do not have the funds to buy these Donator Days. > Back";$h->endpage();exit;}mysql_query("UPDATE users SET donatordays=donatordays+{$r['ddQTY']} where userid=$userid",$c) or die(mysql_error());mysql_query("DELETE FROM ddaysmarket WHERE ddID={$_GET['ID']}",$c);mysql_query("UPDATE users SET money=money-{$r['ddPRICE']} where userid=$userid",$c);mysql_query("UPDATE users SET money=money+{$r['ddPRICE']} where userid={$r['ddADDER']}",$c);event_add($r['ddADDER'],"{$ir['username']} bought your {$r['ddQTY']} Donator Days from the market for \$".number_format($r['ddPRICE']).".",$c);print "You bought the {$r['ddQTY']} Donator Days from the market for \$".number_format($r['ddPRICE']).". Back";}function ddays_add(){global $ir,$c,$userid,$h;$price = 2000; //change 2000 to the price you want DDays to sell / buy for$_POST['amnt'] = abs((int) $_POST['amnt']);if($_POST['amnt']){if($_POST['amnt'] > $ir['donatordays']){die ("You are trying to add more Donator Days to the market than you have.");}$tp=$_POST['amnt']*$price;mysql_query("INSERT INTO ddaysmarket VALUES('',{$_POST['amnt']},$userid,$tp)", $c);mysql_query("UPDATE users SET donatordays=donatordays-{$_POST['amnt']} WHERE userid=$userid", $c);echo "Donator Days added to market! > Back"; } else {echo "Adding a listing... You have {$ir['donatordays']} Donator Days that you can add to the market.Donator Days: $ ".number_format($price)." per each donator day ";}}$h->endpage();?>
-
haha, if I'm ever going to have a "thug" on my side, id actually pick an Irishman! Easy going and fun till threatened, then totally unstoppable. I mean hell, haven't you guys seen Boondock Saints? Every guy I ever met from Ireland is a lot like that! So they arent all red headed, and most of them are skinny, but the Irish are bad ass in a good way.
-
I have found that active players like things like the streets and mining and Sniko's smuggle mod where they can sail to (set) number of cites each day and smuggle crystals back from those places. active players get rewards for being active and doing the daily tasks, but those who dont log in, dont get the rewards. (I esp think the smuggle mod keeps the economy low by providing additional crystals in the game)