Jump to content
MakeWebGames

I'm at a dead end with my mccode modifications please help...


winfidel

Recommended Posts

On my explore page there are the href links. Click monorail go to that page.

I have cities. I want to set my explore page up so that it list categories: Service / Shops / Locations.

then depending on which city they are in I want links available.

So that monorail is only available in two cities and in a third city I have a cloned version of monorail called rent a plane.

Shops go to the right cities with admin panel but the hrefs go to every city... I don't want Crystal Temple

Battle Tent in every city... help

-----------------------------------------------------------------------------------------------------------------------------------------

Is there a way to add max len to cities? To lock out higher levels from default city... to force progression...

I want to make people move to the next city... where the first city weapons are useless, the first city house is gone and they wake up in the next city homeless with useless weapons

Link to comment
Share on other sites

Re: I'm at a dead end with my mccode modifications please help...

Well I think it would be something like this:

 

if($ir['cityid'] == "1") { echo "[url='example.php']Example[/url]"; }

 

That will get the City ID, so if you have a created city then would have to go into "phpmyadmin" and check the ID of that city or you could do it like this:

 

if($ir['cityname'] == "THE NAME OF YOUR CITY") { echo "[url='example.php']Example[/url]"; }

 

That will get then name of the city etc, but if none of them work then I suggest using this:

 

$sql = sprintf("SELECT * FROM `cities`",$c);
$sql = mysql_query($sql);
while($city = mysql_fetch_array($sql)) {
if($city['cityid'] == "1") { echo "[url='example.php']Example[/url]"; }
}

 

Something like that, hope that's what your looking for :?

Link to comment
Share on other sites

Re: I'm at a dead end with my mccode modifications please help...

I appreciate your help.

I have to explain this better.. please bear with me.

Okay I have it set up to cities.. it shows the names.

on explore page.. we see set things... no matter what city... yes shops can be placed in certain cities...

but what if I want the HREFs only to show up in certain cities? Crystal market in three cities... user stats in two cities... a monorail in one city... a different monorail called plane rental in another city?

also here's a brain teaser... how can I set it up so on one island only my female players get 20% Energy every 5 mins instead of 8%...

Link to comment
Share on other sites

Re: I'm at a dead end with my mccode modifications please help...

winfidel, I'm thinking you might not have understood Extermination's code. It is what you are asking for.

I'm not sure anyone here could have done a better more thorough job of giving you the code you need without actually coding the entire explore page for you. ;)

Link to comment
Share on other sites

Re: I'm at a dead end with my mccode modifications please help...

You know I love you guys in a non threatening to your whichever preference / sexuality way...

I didn't look close enough but after seeing whichever.php... well it's like Christmas came early for me!!!

 

Thank You!!!!! You know you guys will have ROCKSTAR STATUS in my game once its up and running!

Link to comment
Share on other sites

Re: I'm at a dead end with my mccode modifications please help...

I think I would make one little change to that cron Luke.. remember, he wanted his Females to get 20% energy ONLY if they were on one particular Island....(Location number.. whatever loc is supposed to be.

if($ir['location']==1 && $ir['gender']=='Female') {
mysql_query("UPDATE users SET energy=energy+maxenergy*.20 WHERE userid=$userid",$c); }
else
{
mysql_query("UPDATE users SET energy=energy+maxenergy*.08 WHERE userid=$userid",$c); }

 

Or something along that line..

Link to comment
Share on other sites

Re: I'm at a dead end with my mccode modifications please help...

I started with this:

//brave update

$query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave ";

$query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave";

$query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp<maxhp";

$query4="UPDATE users SET hp=maxhp WHERE hp>maxhp";

$query5="UPDATE users SET hp=hp+(maxhp/3) WHERE gender<Female AND cities<'8'");

$query6="UPDATE users SET brave=brave+((maxbrave/10)+5.5) WHERE gender<Female AND cities<'8'");

//enerwill update

$db->query($query);

$db->query($query2);

$db->query($query3);

$db->query($query4);

- - - - - - I was guessing how to use the code

Changed it to:

//brave update

$query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave ";

$query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave";

$query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp<maxhp";

$query4="UPDATE users SET hp=maxhp WHERE hp>maxhp";

if($ir['location']==1 && $ir['gender']=='Female') {

mysql_query("UPDATE users SET energy=energy+maxenergy*.20 WHERE userid=$userid",$c); }

else

{

mysql_query("UPDATE users SET energy=energy+maxenergy*.08 WHERE userid=$userid",$c); }

$db->query($query);

$db->query($query2);

$db->query($query3);

$db->query($query4);

Link to comment
Share on other sites

Re: I'm at a dead end with my mccode modifications please help...

or give your poor database a rest and just use...

mysql_query("UPDATE users SET brave = brave + IF( brave + ((maxbrave/10)+.05) > maxbrave, maxbrave, (maxbrave/10)+.05 ) WHERE userid = $userid",$c);

mysql_query("UPDATE users SET hp = hp + IF( hp + (maxhp/3) > maxhp, maxhp, (maxhp/3) ) WHERE userid = $userid",$c);

if($ir['location']==1 && $ir['gender']=='Female') {

mysql_query("UPDATE users SET energy=energy+maxenergy*.20 WHERE userid=$userid",$c); }

else {

mysql_query("UPDATE users SET energy=energy+maxenergy*.08 WHERE userid=$userid",$c);

}

This only updates the account in question and not a full update (or I should say 4 updates) to the entire user table

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...