Jump to content
MakeWebGames

[mccode v2] Gym


Recommended Posts

Guest Anonymous
Posted

And since I'm feeling in a generous mood...

Heres a replacement for the bog-standard gym.php script.

Images available from http://nyna.co.uk/gallery/

Installation:

1. Save this script down to gym2.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

2. Modify your mainmenu.php to add a link to the new gym

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Enjoy

(Minor edits to restore original jail functionality - I use a totally different jail system on my test site - sorry 'bout that)

  • Replies 109
  • Created
  • Last Reply

Top Posters In This Topic

Guest Anonymous
Posted

Re: Free 2 - Gym

Come on, this is simple stuff...

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

becomes

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted

Re: Free 2 - Gym

Hate to be a hassle but how would I convert this to V1?

I replaced the require globals.php and the $db-> with my_sql but it forces me to the login page...

Guest Anonymous
Posted

Re: Free 2 - Gym

Sorry, I never used V1 and I doubt it would run on the Lite version - Perhaps somebody else...

Posted

Re: Free 2 - Gym

 

$db-> should be replaced with mysql_

Not my_sql :-)

Toxication

That is very true. :-D. Theres more then 1 thread to convert versions. Search function is a little nice.
Guest Anonymous
Posted

Re: Free 2 - Gym

 

Nice mod...but where would I put the gain exp bit:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You will need to modify that query, but look towards the bottom of the form processing section. There are two queries $sql1 and $sql2 that do the actual update of the users and userstats.

You can either amend those to suit, or add another query. I never bothered with updating the experience - CBA ;)

Posted

Re: Free 2 - Gym

I'm sorry, but seeing as it is different to my previous gym, I don't know how to add in another query....I am just starting to learn properly. What would the query be, if you don't mind? :)

Guest Anonymous
Posted

Re: Free 2 - Gym

I have no idea - I don't run any DBS/MCcodes system (at least public facing)

If you can't figure out the basics, perhaps, either a) ask someone else, b) learn the languages PHP/MySQL reasonably well or c) Don't use my extensions.

I'm afraid I design all my extensions purely for my own amusement. I release them occasionally as I see fit, and to hopefully teach you lot a little about how they can be written (Not that mine are "good" - they just work for me).

Without understanding the language, you will have problems, and I'm really not the best person to ask, I'm too impatient, sometimes arrogant, and I have difficulty explaining myself to people without a similar level of knowledge.

So basically, my apologies, ask around though, there are a few how could help out I'm sure.

Guest Anonymous
Posted

Re: Free 2 - Gym

Maybe worth reading about the session function in the PHP manual.

I believe a session_start( ) *may* help - I actually use a prepend file ( ./include("./prepend.php"); ) which initiates the session handling amongst other things...

On reflection - perhaps not - including the globals *should* be initiating the session setup so I'm not sure what the issue is here.

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...