Jump to content
MakeWebGames

Recommended Posts

Posted

I was Thinking bwt a mod that gives people Crystals every 24 hours they get a chance to loot 1 between 10 im not sure if you can do it or not as im learning to code :/ just my thoughts.

i kno it says mccode lite but do it for all mcc if you can :L

Posted

In your day cron you want one query

$chanceset = rand(1,10);

mysql_query("UPDATE `users` SET `row_name` = `row_name` + $chanceset WHERE `fedjail` = 0") or die (mysql_error());

Change row_name to the row name...eg. crystals

now with all due respect, stop asking questions on everything you get stuck on. Help yourself...Or Google it...jeeze man

Posted

Why would you wish to give someone a crystal every day if they're banned? You wouldn't.

 

Why would you wanna give someone a crystal every day who isn't active? You wouldn't.

 

 

I wouldn't even use this in ANY live game, it's stupid, however he asked so I supplied the code.

Posted

OK, DreamCoder,

I don't know you very much, but I can tell your a person who wants to own a game, to make themselves think, and your mates think, your a coder. Jordan has gave you a code for you in HIS time, what HE typed. Be grateful of what you get. Jordan think's it's a rubbish Idea.. So? I don't like the idea myself, and other people might agree with me, but since it's your idea, it's great init?

Also, yet again, Jordan has a point. People who are in-active or are in Fed will be getting Crystals.. So since your brother know's so much. Ask him to help you. And start acting your flippin' age!

It's people like you who can afford something, and take advantage of it.. ~_~ (AKA internet - Opportunity to go on Official websites)

Posted

Brother is on holidays :/ and oki thanks for the suggestion , but I can tell your a person who wants to own a game, to make themselves think, and your mates think, your a coder

and no i dont want people to think it i can do a minimum amount of html that is what im currently learning and most of them know that i will carry on with html then i will move onto Css

Posted

I'd suggest keeping it friendly (it's heading the way to unfriendlyness(not a word I know spell checker)).

It's a good idea, though the concept lacks.

I like the idea of rewarding active members but giving them all a single crystal each day isn't the right way to go about it.

Posted

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)

Posted

i think theres a daily hand out mod anyway for the donators ? but they have to click on the page so not active you got nothing may be better then mass handing them out once a day the chance to claim up to 10 crystals

Posted

Would this work

<?php

include "globals.php";

$q=$db->query("SELECT `daily`, `userid` FROM users WHERE daily=1 AND userid=$userid");

$r=$db->fetch_row($q);

if($r['daily']>0)

{

echo "You have already collected your daily reward";

$h->endpage();

exit;

}

else

{

$db->query(sprintf("UPDATE `users` SET `daily`=%u WHERE `userid`=%d", 1, $userid));

$db->query(sprintf("UPDATE `users` SET `crystals`=`crystals`+%d WHERE `userid`=%d", 60, $userid));

echo "Here are your 60 Daily Crystals";

}

?>

 

CREATE TABLE IF NOT EXISTS `dailycrystals` (

`crystals_done` int(11) NOT NULL default '60'

)

change the 60 to the amount you want to give them everyday also for the cron add

 

$db->query("UPDATE users SET daily=0");

that would be for the cron_day.php file and put Daily Reward on the Mainmenu part or explore part and they get X amount of crystals every day only once a day !:)

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