Jump to content
MakeWebGames

Recommended Posts

Posted

[mccode v2] Mining V2 Converted

Was a few functions missing as well as a few other nic nac things. So here's the one i have managed to get working for you.

 

First.

mine.php

 

You're unable to view this code.

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

 

Next open up global_func.php Find

?>

Above that add

 

You're unable to view this code.

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

 

Open up cron_fivemins

in your queries add

 

You're unable to view this code.

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

 

SQLS

 

You're unable to view this code.

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

 

Run this Query Once in phpmyadmin

UPDATE `users` SET `power`=`max_power`

 

You should be good to go, any errors fix here.

ALL Credits go to whomever originally designed this mod.

Thanks.

Posted

you forgot to add the bars on here for the header.php

 

You're unable to view this code.

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

 

You're unable to view this code.

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

 

not tested. lol.

Posted

Wasnt sure if players needed/wanted them

I added a snippet on the actual mod that tells you how much power you have left / max power at top :p

Might also want to add something in Register.php to set their power to max when they sign up, or they'll start with 0

but again, optional :P

Posted

To start them off with full Power open up register.php

find

 

You're unable to view this code.

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

 

in the above query, after lastip_signup change to lastip_signup, power, maxpower)

Further in that query find '$IP' change to '$IP', 10, 10)

Now you can alter the above SQL where the Defaults are set to 0

 

You're unable to view this code.

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

Posted
In MCC V2 it's ''safer'' to use $db->query(); rather then mysql_query();

 

Not if you use $c the connection identifier, plus it's faster not filtering it through the class files :-)

the only REAL differance is $db has it's own "error handler"

But if script is written properly it shouldn't error, as well as if you wanted you could just add OR die(mysql_error()); to the end of the statements and will get the exact same thing $db does only faster :P

Posted

$c isn't needed..

So my advice would be remove the $c & change it too $db->query(); =]

 

After a lengthy conversation with Equinox, and a bit of php.net surfing

It's just the same to use mysql_query only differance is speed.

mysql_query is faster.

Have you looked at the $db->query in the class file?

 

You're unable to view this code.

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

Posted

well its upto them if they want to add it lol.

also on the mining mod i would put this to make it look better. lol.

 

You're unable to view this code.

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

 

makes it look better i think lol.

Posted

You're unable to view this code.

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

 

That's $db->query

:P

mysql_query $c or die(mysql_error());

 

Exact same thing only not calling to a seperate file to do the work i can do as I type :P

 

ANYwho

It does look better Nicholas, thanks :)

Posted

$db->query(); is easier than writing mysql_query() then using the connection ident the using as the prefered method on here die().

With an extreme app you may be better off using a class for querys as it's much easier but for the sake of it use what the chuff you like it's your preference if people don't like it their more than welcome to change it as they please ;)

As for safer well that depends on the circumstances but normally I think there is no difference ;)

Posted

If you look at the "link" at the beginning of the post you would realize that this mod was already posted and has been floating around forever.

it was just missing some vital parts to actually make it work, so i fixed it.

Nothing huge.

 

You're unable to view this code.

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

 

Funny, I was just thinking you felt that way about yourself and i'm coming to terms with you dont know half as much as what you claim to think you know.

 

I see nothing wrong with discussing PHP with other coders and perhaps learning something from them.

It's educational and beneficial.

We cant all just think we know everything like you or no one would ever progress.

Posted

Wow putting words into my mouth now, Immortal i don't have a issue with you on here (you just think i do) i have never said i was a GURU have you?

I never claim i know something i don't i normally don't even claim i know what i know so you show me a recent post where i have claimed i am the master of PHP or a guru and then your flaming will be valid but until then mr "security GURU" ill partake in my hobby which is PHP.

In reference to this modification i simply asked a question since i seem to remember it being sold when i first came into mc codes because someone tried selling it to me in a "mod pack" and listed it as paid when they listed the mods, So i simply wanted to know if it was or not.

It seems your putting words into my mouth i have never EVER said i was the best at php i think even in one of our argument topics i clearly stated i was a BASIC PHP programmer and i do it for a hobby. MWG is full of noobs not even BASIC coders (no offence guys but it's true) i spend my time trying to help as i did you on many subjects and now since you think you know everything your a "guru".

If your going to continue off topic and get yet again another topic deleted, think first and use the PM function.

Posted

No need it's not worth my time.

 

Depends on the class i guess, like immortal said he had to discuss it with another coder so im sure he now knows everything. I personally find it easier to use class but not MCC.

I posted a fixed mod for free for the users of mwg, you're the one flaming in it, i'm just replying :)

 

as far as using the class for ease, yes, it is easier to use $db

But it's "better" to use mysql_

so if i slap it together using mysql_ and take my own time doing it, i dont see why anyone would have a problem with it and I wouldnt even change it as i've already done the hard work for you :D

Posted

I agree with the mysql_query()

Mainly as it was my doing that suggest such a thing, yes there are things mysql_query() can't do without a class, but if you're so worried about the (or die mysql_error()), write your own? Make a function that adds it onto the end of mysql_query() :wacko:

Posted
No need it's not worth my time.
Depends on the class i guess, like immortal said he had to discuss it with another coder so im sure he now knows everything. I personally find it easier to use class but not MCC.

I posted a fixed mod for free for the users of mwg, you're the one flaming in it, i'm just replying :)

You posted a fixed mod for free (it's someone elses so obviously free) for the users of MWG, you're the one flaming in it(i simply asked a question, your the one who took it to heart (Maybe i was wrong about it been paid my mistake) ), i'm just replying (as am i to your insulting reply where you accuse me of something then simple flame me and then don't back it up when it backfires).

Would still love to see where i said i was a GURU (you => mastermccodes signature) or claimed i know stuff i don't but typical Immortal Thug can't back up anything you do or say. Seems like your just into slander...

This mod does look good though.

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