Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Register your account to receive email notifications when new services and mods are added.


This forum is now closed and has moved to a new location! Click here to find out why.
Pages: [1] 2

AuthorTopic: [MCCode] Crystal Gym  (Read 3496 times)

Cronus

  • Administrator
  • Senior Member
  • *****
  • Reputation Power: 2901
  • Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!
  • Offline Offline
  • Posts: 550
    • MSN Messenger - preston__08@hotmail.com
    • View Profile
    • WWW
[MCCode] Crystal Gym
« on: February 06, 2009, 02:25:40 AM »
Crystal Gym

This is a gym where users can use their crystals instead of energy to train.
Very good for use as a donator-only feature.

The file is attached in .rar form.
You will need to be registered and logged in to access it.
« Last Edit: February 26, 2009, 01:16:58 PM by Cronus »
Logged
My msn is preston__08@hotmail.com if anyone is interested, I am online frequently.

DGM-Studios

  • Basic Member
  • *
  • Reputation Power: 0
  • DGM-Studios has no influence.
  • Offline Offline
  • Posts: 22
    • MSN Messenger - katsuto@dgm-studios.com
    • View Profile
    • WWW
Re: [MCCode] Crystal Gym
« Reply #1 on: February 16, 2009, 02:38:55 AM »
Cool Modification man as are all of your mods, Slightly edited the one i'm using tho i put restrictions on how many times a day you can use it and how many crystals you can use at once and like you said it's a donator only feature! :D
Logged

Cronus

  • Administrator
  • Senior Member
  • *****
  • Reputation Power: 2901
  • Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!
  • Offline Offline
  • Posts: 550
    • MSN Messenger - preston__08@hotmail.com
    • View Profile
    • WWW
Re: [MCCode] Crystal Gym
« Reply #2 on: February 16, 2009, 09:46:50 PM »
Yea I assume it will be edited before it hits any games.
Each game has its own preferences ;)
Logged
My msn is preston__08@hotmail.com if anyone is interested, I am online frequently.

DGM-Studios

  • Basic Member
  • *
  • Reputation Power: 0
  • DGM-Studios has no influence.
  • Offline Offline
  • Posts: 22
    • MSN Messenger - katsuto@dgm-studios.com
    • View Profile
    • WWW
Re: [MCCode] Crystal Gym
« Reply #3 on: February 17, 2009, 08:32:08 AM »
Yeah true, Most people that own game's and can't code just change the Visual text and say it's their mod have you noticed that?
Logged

Cronus

  • Administrator
  • Senior Member
  • *****
  • Reputation Power: 2901
  • Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!
  • Offline Offline
  • Posts: 550
    • MSN Messenger - preston__08@hotmail.com
    • View Profile
    • WWW
Re: [MCCode] Crystal Gym
« Reply #4 on: February 17, 2009, 08:41:56 AM »
It usually shows when people do that.
The code usually speaks for itself.  :P
Logged
My msn is preston__08@hotmail.com if anyone is interested, I am online frequently.

DGM-Studios

  • Basic Member
  • *
  • Reputation Power: 0
  • DGM-Studios has no influence.
  • Offline Offline
  • Posts: 22
    • MSN Messenger - katsuto@dgm-studios.com
    • View Profile
    • WWW
Re: [MCCode] Crystal Gym
« Reply #5 on: February 17, 2009, 08:45:07 AM »
Haha Yep That's correct, That's how they all get caught don't even bother changing a few Functions! LOL
Logged

Crazy-T

  • Basic Member
  • *
  • Reputation Power: 0
  • Crazy-T is looked down upon.
  • Offline Offline
  • Posts: 23
    • MSN Messenger - bb-16-ac@hotmail.co.uk
    • View Profile
Re: [MCCode] Crystal Gym
« Reply #6 on: February 18, 2009, 05:10:52 PM »
Haha Yep That's correct, That's how they all get caught don't even bother changing a few Functions! LOL

LOL!
Logged
Self Taught Website Dev'er
If you need me pm on here or email/pm me on Msn bb-16-ac@hotmail.co.uk

DGM-Studios

  • Basic Member
  • *
  • Reputation Power: 0
  • DGM-Studios has no influence.
  • Offline Offline
  • Posts: 22
    • MSN Messenger - katsuto@dgm-studios.com
    • View Profile
    • WWW
Re: [MCCode] Crystal Gym
« Reply #7 on: February 22, 2009, 08:20:20 PM »
LOL Thought I Would make it sound funny if i said that  ;D
Logged

strats

  • Active Member
  • **
  • Reputation Power: 13
  • strats has no influence.
  • Offline Offline
  • Posts: 109
    • View Profile
Re: [MCCode] Crystal Gym
« Reply #8 on: April 22, 2009, 05:43:26 AM »
Yeah true, Most people that own game's and can't code just change the Visual text and say it's their mod have you noticed that?


I am not a coder, I do try very hard to put together mods and I have and will never say say a mod is mine. Even if I edit it.
I'm a good girl.  ;D
Logged

crash2009

  • Basic Member
  • *
  • Reputation Power: 1
  • crash2009 has no influence.
  • Offline Offline
  • Posts: 5
    • View Profile
Re: [MCCode] Crystal Gym
« Reply #9 on: April 27, 2009, 01:01:57 PM »
can someone please tell me how i can make this feature for donators only so only donators can use it.

thank you
Logged

Cronus

  • Administrator
  • Senior Member
  • *****
  • Reputation Power: 2901
  • Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!
  • Offline Offline
  • Posts: 550
    • MSN Messenger - preston__08@hotmail.com
    • View Profile
    • WWW
Re: [MCCode] Crystal Gym
« Reply #10 on: April 27, 2009, 03:00:32 PM »
can someone please tell me how i can make this feature for donators only so only donators can use it.

thank you

Near the top put:
Code: [Select]
if($ir['donatordays'] < 1)
{
print"You cannot use this as you are not a donator.";
die("");
}
Logged
My msn is preston__08@hotmail.com if anyone is interested, I am online frequently.

Crazy-T

  • Basic Member
  • *
  • Reputation Power: 0
  • Crazy-T is looked down upon.
  • Offline Offline
  • Posts: 23
    • MSN Messenger - bb-16-ac@hotmail.co.uk
    • View Profile
Re: [MCCode] Crystal Gym
« Reply #11 on: April 27, 2009, 04:11:16 PM »
can someone please tell me how i can make this feature for donators only so only donators can use it.

thank you

Near the top put:
Code: [Select]
if($ir['donatordays'] < 1)
{
print"You cannot use this as you are not a donator.";
die("");
}

xD lol..

Here is few ways to do it:P

if(!$ir['donatordays'])
{
 echo 
'You cannot use this as you are not a donator.';
 
$h->endpage();
 exit;
}

if(
$ir['donatordays'] < 1)
{
 echo 
'You cannot use this as you are not a donator.';
 
$h->endpage();
 exit;
}

if(
$ir['donatordays'] < 1)
{
 die(
'You cannot use this as you are not a donator.');
}


Theres loads more.. also lol cba to type them
Logged
Self Taught Website Dev'er
If you need me pm on here or email/pm me on Msn bb-16-ac@hotmail.co.uk

strats

  • Active Member
  • **
  • Reputation Power: 13
  • strats has no influence.
  • Offline Offline
  • Posts: 109
    • View Profile
Re: [MCCode] Crystal Gym
« Reply #12 on: April 28, 2009, 10:55:28 AM »
Would some one be an angel and convert this to V2 so I can try it out?
Logged

Rioter

  • Basic Member
  • *
  • Reputation Power: 18
  • Rioter has no influence.
  • Offline Offline
  • Posts: 11
    • View Profile
    • Email
Re: [MCCode] Crystal Gym
« Reply #13 on: April 28, 2009, 11:24:16 AM »
I have'nt tested this at all...

Code: [Select]
<?php
/*-----------------------------------------------------
-- Mono Country v1.0 BETA
-- A product of DBS-entertainment
-- Copyright held 2005 by Dabomstew
-- INDEX.php
-----------------------------------------------------*/
include "globals.php";

if(
$ir['jailtime'] > 0)
{
die(
"<b><font color=red size=+1>You are in Jail for {$ir['jailtime']} more minute(s).<br />
Until you are out you can't train</font></b><br /><br />
<a href='jail.php'>Return to Jail</a>"
);
}
if(
$ir['hosptime'] > 0)
{
die(
"<b><font color=red size=+1>You are in the Trauma Center for {$ir['hosptime']} more minute(s).<br />
Until you are out you can't train</font></b><br /><br />
<a href='hospital.php'>Return to Trauma Center</a>"
);
}
if(
$_GET['crystals']>1000)
{
die(
"You cannot use that many crystals at one time.<br />
1,000 crystals is the most you can use at a single time.
"
);
}
if(isset(
$_GET['train']))
{
$tgain=0;
{
$out="";
for(
$i=1;$i<=$_GET['crystals'] && $ir['crystals'] > 0;$i++)
{
if (
$ir['crystals'] >= $_GET['crystals'])
{
$gain=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/150)*($ir['maxenergy']/12);
$tgain+=$gain;
if (
$_GET['train']=="IQ") { $gain/=100; }
$ir[$_GET['train']]+=$gain;
$egain=$gain/10;
$ts=$ir[$_GET['train']];
$st=$_GET['train'];
mysql_query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain WHERE userid=$userid<br />".mysql_error());
$wu=(int) (rand(8,12));
mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=will-$wu WHERE userid=$userid",$c);
mysql_query("UPDATE users SET will=0 WHERE will<0",$c);
}
else
{
$out="You do not have that many crystals.";
}
}
}
$stat=$ir[$st];
$crystals=($ir['crystals']-$_GET['crystals']);
$i--;
$out="You begin training your $st.<br />
You have gained $tgain $st by training it {$_GET['crystals']} times.<br />
You now have $stat $st and $crystals crystals left.<br /><br />"
;
}
else
{
$out="<h3><center>Crystal Rec Center</center></h3>";
}
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
print 
"<table width=50% border=1 bordercolor='blue'>
<tr><td background='backmain.jpg'>$out</td></tr><tr>
<td  align=center valign=middle background='backmain.jpg'><center>Choose how many crystals you want to use to train.</br> You currently have <b><font color=yellow>{$ir['crystals']}</font></b> crystals.</center><br /></td></tr>

<tr><td width=50% align=center valign=middle background='backmain.jpg'>"
;
if ( 
$ir['energy'] > 0) {
print 
"
<form action='crystalgym.php' method='get'>
Enter the number of crystals you wish to use: <br>
<input type='text' name='crystals' value='' /><br /><br>
Stat: <br><select type='dropdown' name='train'>
<option value='strength'>Strength</option>
<option value='agility'>Agility</option>
<option value='labour'>Labour</option>
<option value='guard'>Defense</option></select></td></tr>
<tr><td  align=center valign=middle background='backmain.jpg'>
<input type='submit' value='Train Now!' /></form>
<br /><hr /><h3>Stats Info:</h3>"
;
$ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ'];
$arr=urlencode(serialize(array($ir['strength'],$ir['agility'],$ir['guard'],$ir['labour'],$ir['IQ'])));
$ir['strank']=get_rank($ir['strength'],'strength');
$ir['agirank']=get_rank($ir['agility'],'agility');
$ir['guarank']=get_rank($ir['guard'],'guard');
$ir['labrank']=get_rank($ir['labour'],'labour');
$ir['IQrank']=get_rank($ir['IQ'],'IQ');
$tsrank=get_rank($ts,'strength+agility+guard+labour+IQ');
$ir['strength']=number_format($ir['strength']);
$ir['agility']=number_format($ir['agility']);
$ir['guard']=number_format($ir['guard']);
$ir['labour']=number_format($ir['labour']);
$ir['IQ']=number_format($ir['IQ']);
$ts=number_format($ts);

print 
"<table border='2'><tr><td><b>Strength:</b> {$ir['strength']} [Ranked: {$ir['strank']}]</td><td><b>Agility:</b> {$ir['agility']} [Ranked: {$ir['agirank']}]</td></tr>
<tr><td><b>Defense:</b> {$ir['guard']} [Ranked: {$ir['guarank']}]</td><td><b>Labor:</b> {$ir['labour']} [Ranked: {$ir['labrank']}]</td></tr>
<tr><td><b>IQ: </b> {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td><td><b>Total stats:</b> {$ts} [Ranked: $tsrank]</td></tr></table>"
;
} else {
print 
"You do not have any crystals to train with!";

}
print 
"</td></tr></td></tr></table>";

$h->endpage();
?>


That's it lol, some may say I didnt do it proply but it work's(hopefully) so what's the problem.
Logged

strats

  • Active Member
  • **
  • Reputation Power: 13
  • strats has no influence.
  • Offline Offline
  • Posts: 109
    • View Profile
Re: [MCCode] Crystal Gym
« Reply #14 on: May 10, 2009, 04:27:52 PM »
What's up with that?
I click to go to gym and theres another index in there lol
Logged
Pages: [1] 2
« previous next »
 


This forum is now closed and has moved to a new location! Click here to find out why.