Jump to content
MakeWebGames

Recommended Posts

Posted

Re: Converter

 

Is there a awebsitte where u can put code in and auto converts for you ?

Please tell me you're not serious?

You're looking for a site that will "auto-create" mods just from your description?

HAHAHAH!!!!

Posted

Re: Converter

 

Please tell me you're not serious?

You're looking for a site that will "auto-create" mods just from your description?

HAHAHAH!!!!

I thought he ment an auto converter so V1 modifications to V2 modifications and vica versa. If so I dont see why that is so funny. :|

Posted

Re: Converter

I really don't mean to be funny...

BUT!!!

I knew nothing about php coding when i first started and i mean NOTHING...

there is a thread on CE that teaches you how to convert v1 - v2

I used the forementioned thread when i started!!!

If you are not prepared to put time and effort into learning how to code then forget owning a game...

Posted

Re: Converter

ive not got a game at the moment iand it was an idea .I am strating coding i wass justt thinking bout makingg life easierr converting thats all

Posted

Re: Converter

 

ive not got a game at the moment iand it was an idea .I am strating coding i wass justt thinking bout makingg life easierr converting thats all

Takes 5 seconds to convert manually. Takes a while to make a site. Once made

5 secs to type in site name, 5 secs to grab code and put it in. Takes 5 secs to load. 5 secs to put into new fle and hit save.

5 secs doing it like us

20 secs doing it the lazy/noob way.

Posted

Re: Converter

ill make a small v1-v2 / v2-v1 converter tomorow ill also give code out as all i expec it to be is

$1=array(text, text);

$2=array(text, text);

$3=st_replace($1, $2, $text);

$3=st_replace($2, $2, $text);

echo $3;

Posted

Re: Converter

Here, this works on local server...But for me don't work on my online server...

But I'm not going to stress it, you fix it. its a good start. for you.

 

<?php

if(isset($_POST['do']))
{
echo '<h2>v1 to v2 Mod has been Converted</h2>
';
          echo 'Ok, Cheif lazy. your work is done.
';
echo '[url="convert.php"]> Go Back[/url]

';
$post = trim($_POST['do']);
if(empty($post))
{
	echo 'Seems the submit was empty.

';
	echo '[url="convert.php"]> Go Back[/url]';
}
else if(strlen($post) < 5)
{
	echo 'It seems that the submit was not long enough.

';
	echo '[url="convert.php"]> Go Back[/url]';
}
else
{
	$array_1 = array
('session_start();
require "global_func.php";
if($_SESSION[\'loggedin\']==0) { header("Location: login.php");exit; }
$userid=$_SESSION[\'userid\'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir[\'money\']);
$cm=money_formatter($ir[\'crystals\'],\'\');
$lv=date(\'F j, Y, g:i a\',$ir[\'laston\']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();');
	$_POST['do'] = stripslashes($_POST['do']);
	$array_2 = array("include_once('globals.php');");
	$convert = str_replace($array_1, $array_2, $_POST['do']);
	echo '<textarea rows="100" cols="100" name="do">'.$convert.'</textarea>


	[url="convert.php"]> Go Back[/url]';
}
}
else
{
echo '<h2>v1 to v2 Mod Converter</h2>

';
echo 'Just enter you stuff in the area below, it will change it for you since you are to lazy to.

';
echo '<form action="convert.php" method="post">';
echo '<textarea rows="100" cols="100" name="do"></textarea>';
echo '

<input type="submit" value="Convert It" />';
echo '</form>';
}


?>
Posted

Re: Converter

Here's an online version which work's for me.. But it add's excessive line breaks :/

 

<?php
echo '<title>Mod Converter</title>';
if(isset($_POST['do']))   {
  echo '<h2>v1 to v2 Mod has been Converted</h2>
';
  echo 'Ok, Cheif lazy. your work is done.
';
  echo '[url="'.$_SERVER['PHP_SELF'].'"]> Go Back[/url]

';
  $post = trim($_POST['do']);
  if(empty($post))   {
     echo 'Seems the submit was empty.

';
     echo '[url="'.$_SERVER['PHP_SELF'].'"]> Go Back[/url]';
  }
  else if(strlen($post) < 5)   {
     echo 'It seems that the submit was not long enough.

';
     echo '[url="'.$_SERVER['PHP_SELF'].'"]> Go Back[/url]';
  }
  else   {
     $array_1 = array(
           'session_start();',
           'require "global_func.php";',
           'if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }',
           '$userid=$_SESSION['userid'];',
           'require "header.php";',
           '$h = new headers;',
           '$h->startheaders();',
           'include "mysql.php";',
           'global $c;',
           '$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());',
           '$ir=mysql_fetch_array($is);',
           'check_level();',
           '$fm=money_formatter($ir['money']);',
           '$cm=money_formatter($ir['crystals']);',
           '$cm=money_formatter($ir['crystals'],'');', 
           '$lv=date('F j, Y, g:i a',$ir['laston']);',
           '$h->userdata($ir,$lv,$fm,$cm);',
           '$h->menuarea();'
     );
     $_POST['do'] = stripslashes($_POST['do']);
     $converted = str_replace($array_1,'', $_POST['do']);
     $converted = str_replace('<?php',"<?php include_once('globals.php'); /*Mod converter converted this mod*/", $converted);
     highlight_string($converted);
  }
}
else   {
  echo '<h2>v1 to v2 Mod Converter</h2>

';
  echo 'Just enter you stuff in the area below, it will change it for you since you are to lazy to.

';
  echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post">';
  echo '<textarea rows="100" cols="100" name="do"></textarea>';
  echo '

<input type="submit" value="Convert It" />';
  echo '</form>';
}
?>

 

Yes i took alabama's code and modified it.

Posted

Re: Converter

i must be really missing something here...

ok to use the convertor you have to copy the v1 header info then paste it into the convertor script, click convert it then copy the output result of include_once('globals.php'); then select the header info on the mod you are converting and paste the output result from the convertor...

so why not just select the v1 header info in the mod you are converting and paste include_once('globals.php'); over it...

half the work of using the convertor...

or am i missing something here :|

Posted

Re: Converter

Well, what mine does is.. you post the entire v1 script, it will take the first 15-19 lines and take it away, then i add to it <?php\ninclude_once('globals.php');\n/*Mod converter converted this mod*/ which i then echo it through highlight_string() and will produce a php highlighted v2 modification :)

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