ddgamedesign
Members-
Posts
110 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by ddgamedesign
-
Nope....get: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on line 5 when I use this line. Anyone have a clue? I'll send $2.50 Paypal to the first person who can figure this out.
-
Hey all, I have a battletent.php that is modified a little, but i'm wanting it to only show NPCs that are in the city you're currently in. Right now, i'm in cityid 2, but its still showing NPC's from city 1 (and of course when you click to attack them, it says you can only attack NPCs in the city you're in). I have NPCs in there that are set in city 2 already, so how do I modify this to get it to only display NPCs that are currently in the city you're in? Code: <?php include "globals.php"; print "<center>[img=cenpark.jpg]</center> <table width=100% cellspacing=1 class='table'><tr style='background: gray; '><th>Opponent Name</th><th>Level</th><th>Location</th><th>Action</th></tr>"; $q=$db->query("SELECT cb.*,u.*,c.npcid,cy.cityname FROM challengebots cb LEFT JOIN users u ON cb.cb_npcid=u.userid LEFT JOIN challengesbeaten c ON c.npcid=u.userid AND c.userid=$userid LEFT JOIN cities cy ON u.location=cy.cityid ORDER BY RAND() LIMIT 5"); while($r=$db->fetch_row($q)) { $v=$r['userid']; $q2=$db->query("SELECT count(*) FROM challengesbeaten WHERE npcid=$userid"); $times=$db->fetch_single($q2); print "<tr><td><center>{$r['username']}</td><td><center>{$r['level']}"; print "</td><td><center>{$r['cityname']}</td><td>"; if($r['npcid']) { print "[i]Already[/i]"; } else { print "[url='npcattack.php?ID={$r[']<font color='red'><center>Attack![/url]</font>"; } print "</td></tr>"; } print "</table>"; $h->endpage(); ?>
-
Nice first try. My humble observations as a gamer: - Crimes seem too tough. 5 tries, no success, even on the easy ones? A little frustrating. - Jail and hospital sentences are always 1 minute. Not enough to be a deterrent. - Writing and grammar need work in some spots. - Needs more variety in classes, crimes, etc. - Graphic style is nice in some spots (top panel is nice), then cartoony or a little sloppy (the squished 'Earth' graphic') in other spots. All MHO of course. :)
-
What did you change recently, before the error appeared? That might help a bit.
-
McCodes coder needed to assist with a few issues
ddgamedesign replied to ddgamedesign's topic in Engine Support
This issue closed...a simple line in the wrong place. Darn PHP! -
McCodes coder needed to assist with a few issues
ddgamedesign replied to ddgamedesign's topic in Engine Support
Just a few things here and there, right now the issue is: I created an item with two effects in the admin area (something that reduces hospital time and restores life 30%), and when I click use, it doesn't seem to be working at all, it does nothing and prints nothing when Use is clicked from the Inventory area. It's put into the category 'Special' that I created, but I thought with the two effects inserted into it from the Admin area, it would just work. What could be wrong? -
Hey all, I'm now looking for a MCCodes v2 coder to assist me with a few last issues I need resolving. They should be experienced with the script and with PHP, and yes, I will offer some cash to the coder that helps me iron out a few last issues. My MSN (preferred to do it that way): [email protected] Thanks!
-
Never mind, got this figured out.
-
Actually related to the NPC thing: I'm using the default Battle Tent, McCodes V2. How do I randomly load 5 NPC's to fight everytime the battletent.php is loaded? Is there a fairly simple way to do this?
-
Works perfectly, both of you. Thanks for the help!
-
AlabamaHit: Thanks, but replacing my line with yours gives MySQL Query errors. Here's the whole file, for info purposes (it was a free mod, so no sweat there): <?php /* * Made By: Djkanna. */ require_once (dirname (__file__) .'/globals.php'); $users = $db->query ( "SELECT u.`userid`, u.`username`, u.`level`, u.`hp`, u.`gang`, u.`location`, g.`gangname`, g.`gangPREF`, c.`cityname` FROM `users` u LEFT JOIN `gangs` g ON `gangID` = u.`gang` LEFT JOIN `cities` c ON c.`cityID` = u.`location` WHERE ( c.`cityID` = ".$ir['location']." ) "); echo' '; ?> <table width="100%" class="table"> <tr> <th>Player</th><th>Status</th><th>Level</th><th>Posse</th><th>Options</th> </tr> <?php while ($u = $db->fetch_row ($users) ) : ?> <tr> <td><?php echo $u['gang'] != 0 ? "[".$u['gangPREF']."]".stripslashes(htmlentities($u['username'], ENT_QUOTES)) : "".stripslashes(htmlentities($u['username'], ENT_QUOTES)); ?></td> <td><?php echo $u['hp'] <= 1 ? "<span style='font-color: red;'>Unconscious</span>" : "<span style='font-color: green;'>Alive</span>"; ?></td> <td><?php echo number_format($u['level']); ?></td> <td><?php echo $u['gang'] != 0 ? "".stripslashes(htmlentities($u['gangname'], ENT_QUOTES))."" : "<span>No Posse</span>"; ?></td> <td><?php echo $u['hp'] <= 1 ? "<span style='font-color: #999; text-decoration: line-through;'>Attack</span>" : "<span style='font-color: red;'>Attack!</span>"; ?></td> </tr> <?php endwhile; ?> </table> <?php $h->endpage (); ?>
-
Could you let me know, using that code there, how to skip loading NPC's into the display list for attack? Or is that the right approach?
-
furn355: meaning? Can anyone actually help with this? I'm sure its something simple.
-
Hey all, This is the MySQL query to load users eligible for attack on my 'attacklist' screen: $users = $db->query ( "SELECT u.`userid`, u.`username`, u.`level`, u.`hp`, u.`gang`, u.`location`, g.`gangname`, g.`gangPREF`, c.`cityname` FROM `users` u LEFT JOIN `gangs` g ON `gangID` = u.`gang` LEFT JOIN `cities` c ON c.`cityID` = u.`location` WHERE ( c.`cityID` = ".$ir['location']." ) "); How do I adjust it to NOT show NPC's on this screen? I only want them to show up on my Battle Tent area.
-
Forgot about that....I ended up deleting the lines below where it checked to see about whether the user was a member of their own gang, and it worked: elseif($bomb['gang'] == $ir['gang']) { echo "You cannot bomb a member of your own clan!"; $h->endpage(); exit; Otherwise, two players not in a gang (both have gang status 0) couldn't send bombs to one another. The way it checks to see if you can bomb someone is that it increments the variable in Users table: bombattempts It's not an attack, per se, it gives a user the User Bomb, and they have to diffuse it within 10 minutes or it blows up. I like the mod, but it isn't as polished usability wise as it could be.
-
Yeah, I had to take on moment on this too...no, when you create the item, just create it as a 'special' and assign it a name (Mail Bomb, whatever). Then link the item in your inevntory to a label that points to the sendbomb.php file for the effect of the item (the wire cutting sequence).
-
Yes, you would change the =3 in all the appropriate cases to the item ID of the bomb you create, unless its 3 already. (I helped someone with a coding question. The world must be coming to an end, surely.)
-
That's the thing...if you want to finish a game like this, you have to be able to devote time to it, or it'll never get done, pretty much. It'll hang in limbo forever.
-
Anyone have this mod? http://makewebgames.io/index.php?page=Thread&postID=152696&highlight=quest#post152696 He hasn't been on here for a month, so I doubt he'd respond.
-
On a few games, i've seen where players can complete "quests" for bonuses and such. Is there a mod for this, to allow quests and quest parameters to be set?
-
(Request) A Working Lottery?
ddgamedesign replied to ddgamedesign's topic in Requests & In Production
Thanks, rulerofzu! Appreciate the help. I believe I have one that works right now. -
(Request) A Working Lottery?
ddgamedesign replied to ddgamedesign's topic in Requests & In Production
As I said, give me a little bit of time to code one up! I have other things to do other than code free modifications. Understood, and thanks. Just was curious if anyone else had debugged code from that thread they could share. I'm willing to pay a few bucks or whatever, if necessary. -
(Request) A Working Lottery?
ddgamedesign replied to ddgamedesign's topic in Requests & In Production
Anyone else have a working Lottery mod they can share, please? I don't feel like spending hours debugging, if someone was able to muck through the thread I posted and come up with a working Lottery. -
Never mind...figured it out myself. PHP is a weird language at times.
-
(Request) A Working Lottery?
ddgamedesign replied to ddgamedesign's topic in Requests & In Production
There is this one: http://makewebgames.io/index.php?page=Thread&threadID=29157&pageNo=1 But it apparently had some issues with players not being credited winnings and such.