Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Simple regpage and cash shop - using eCoins!

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jun 18, 2013
Messages
27
Reaction score
11
Hello guys,

This is a edit of Chumpy's simple regpage and cash shop v1.5 beta, all i did was to change alz to ecoins.

To set this up u need to read in order readme.txt and readmeNEW.txt

Pls, dont post "u can do this more easy".. im not a coder. I post this for guys noobs like me.

To add ItemShop in game u have to modify or add next lines to LoginSvr_01.ini

[SITE_URL]
CASHWEB_URL=http://your shop/
GUILDWEB_URL=http://your web page or forum/
CASHWEB_URL_CHARGE=http://donation link for "refill ecoin" button/




************************
All credits go to Chumpy.
************************
EDIT:

in2ruder - Simple regpage and cash shop - using eCoins! - RaGEZONE Forums


in2ruder - Simple regpage and cash shop - using eCoins! - RaGEZONE Forums


in2ruder - Simple regpage and cash shop - using eCoins! - RaGEZONE Forums

 
Last edited:
Leech feeder.
Joined
Oct 19, 2008
Messages
802
Reaction score
99
ah im unlucky :D wanted to use it for quick page for testing... but its using outdated mssql library :/ my whole webserver is set up for something newer.
Also there is a extra ' in config - under // Text to display for link - it breaks the script.
 
Newbie Spellweaver
Joined
Sep 14, 2013
Messages
16
Reaction score
2
ah im unlucky :D wanted to use it for quick page for testing... but its using outdated mssql library :/ my whole webserver is set up for something newer.
Also there is a extra ' in config - under // Text to display for link - it breaks the script.

if you gonna use latest php you need to use pdo sqlsrv and sqlsrv also you need to recode this script.
 
Leech feeder.
Joined
Oct 19, 2008
Messages
802
Reaction score
99
yeah i know.. but recoding is hell... it needs to be completely rebuilt as there isnt matchign command for everything.
And thats not a priorty right now.
 
Junior Spellweaver
Joined
Nov 6, 2012
Messages
150
Reaction score
25
What in wrong? can some1 help
Error
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'DB_ACC.dbo.cabal_auth_table'. (severity 16) in C:\xampp\htdocs\reg.php on line 6

Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\reg.php on line 6

Warning: mssql_result(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\reg.php on line 7

Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'DB_ACC.dbo.cabal_auth_table'. (severity 16) in C:\xampp\htdocs\reg.php on line 8

Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\reg.php on line 8

Warning: mssql_result(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\reg.php on line 9

Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'DB_GAM.dbo.cabal_character_table'. (severity 16) in C:\xampp\htdocs\reg.php on line 10

Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\reg.php on line 10

Warning: mssql_result(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\reg.php on line 11

Reg page
$r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table');
$num_acc=mssql_result($r,0,0);
$r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table where Login=1');
$num_onl=mssql_result($r,0,0);
$r=mssql_query('select count (*) from '.DB_GAM.'.dbo.cabal_character_table');
$num_cha=mssql_result($r,0,0);
 
Newbie Spellweaver
Joined
Jun 18, 2013
Messages
27
Reaction score
11
Hi mate,

Dont know why u have troubles :s .. just read careful readme.txt and readmenew.txt ...

anyway i used register in other way ..

, make on your web server a folder named register and put all files from this arhive in that folder. Just run
dont forgot to change authentification details in config.php




i did both query on cashshop db.. i have to use those in another db?


webshop is working? u have trouble only with register?

anyway .. is using accouts from game .. if u alrady have a register tool .. u dont have to use this one for register


PS: to make transfer eCoins from warehouse to bank and reverse, u need to add a "stored procedure" .. i write in "readmenew.txt" what u have to do

Good Luck!
 
Last edited:
Leech feeder.
Joined
Oct 19, 2008
Messages
802
Reaction score
99
Well the errors are clearly database related - it cant find them. Check the names of db-s in mysql.
 
Junior Spellweaver
Joined
Nov 6, 2012
Messages
150
Reaction score
25
In table dbo.CashAccount u need to add a new column "Reserved1 (bigint, null)"
how to do that? :|
in2ruder - Simple regpage and cash shop - using eCoins! - RaGEZONE Forums

dunno can some1 explain?
 
Leech feeder.
Joined
Oct 19, 2008
Messages
802
Reaction score
99
u need to drop and recreate the table - it wil lwipe any datai n it tho.
 
Newbie Spellweaver
Joined
Jul 13, 2009
Messages
20
Reaction score
2
Fix reg.php
Code:
<?php
[COLOR="#FF0000"]include('config.php');[/COLOR]
$num_acc=0;
$num_cha=0;
$num_onl=0;
$r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table');
$num_acc=mssql_result($r,0,0);
$r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table where Login=1');
$num_onl=mssql_result($r,0,0);
$r=mssql_query('select count (*) from '.DB_GAM.'.dbo.cabal_character_table');
$num_cha=mssql_result($r,0,0);

echo '<p>There are currently <span style="font-size:16px;font-weight:bold">'.$num_onl.'</span> people online right now.</p>';
echo '<p>Registered accounts: <span style="font-size:16px;font-weight:bold">'.$num_acc.'</span> | Characters created: <span style="font-size:16px;font-weight:bold">'.$num_cha.'</span></p>';

echo '<p style="font-size:24px;font-weight:bold">Account registration</p>';

echo '<p>Username and password must be minimum 6 chars, letters and numbers only.</p>';

echo '<form method="post" action="'.$_PHP['self'].'">';
echo '<table cellspacing="4" cellpadding="0" border="0">';
echo '<tr><td align="right">Login: </td><td><input type="text" name="uname" class="editbox"></td></tr>';
echo '<tr><td align="right">Pass: </td><td><input type="password" name="pass" class="editbox"></td></tr>';
echo '<tr><td align="right">Confirm pass: </td><td><input type="password" name="pass2" class="editbox"></td></tr>';
echo '<tr><td colspan="2" align="right"><input type="submit" value="Register account" class="button"></td></tr>';
echo '</table>';
echo '</form>';

echo '<br /><span style="font-weight:bold">Website:</span> <a href="'.LINK_WSITE.'">'.NAME_WSITE.'</a><br />';
echo '<span style="font-weight:bold">Forums:</span> <a href="'.LINK_FORUM.'">'.NAME_FORUM.'</a><br />';

$uid='';
$pass='';
$failed=false;

if (isset($_POST['uname'])) {
  if (!ctype_alnum($_POST['uname']) || strlen($_POST['uname'])<6) {
	  $failed=true;
	  echo '<p class="errortext">Invalid username. Minimum 6 characters, letters and numbers only.</p> ';
  } else {
	$uid=$_POST['uname'];	
  }
}

if (isset($_POST['pass'])) {
  if (!ctype_alnum($_POST['pass']) || strlen($_POST['pass'])<6) {
	  $failed=true;
	  echo '<p class="errortext">Invalid password. Minimum 6 characters, letters and numbers only.</p> ';
  } else {
	$pass=$_POST['pass'];	
  }
}

if (isset($_POST['pass2'])) {
  if (!ctype_alnum($_POST['pass2'])) {
	  $failed=true;
  } else {
    if ($_POST['pass2']!=$_POST['pass']) {
	    $failed=true;
	    echo '<p class="errortext">The entered passwords do not match.</p> ';
    }
  }
}

if ($failed==true) {
  echo '<p class="errortext">Failed.</p> ';	
} else {
	
	if ($uid!='' && $pass!='') {
      $r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table where ID="'.$uid.'"');
      if (mssql_result($r,0,0)==0) {
        $r=mssql_query('exec '.DB_ACC.'.dbo.cabal_tool_registerAccount "'.$uid.'","'.$pass.'"');
        if ($r==false) {
  	      echo '<p class="errortext">Something went wrong :( </p>';
        } else {
  	      echo '<p class="goodtext">Account created successfully!</p>';
        }
        mssql_free_result($r);
        mssql_close($link);	
      } else {
	      echo '<p class="errortext">Logon name already used.</p> ';
      }
    }
}

?>

Fix admin.php for add new item (line 135)
Code:
$r=mssql_query('insert into '.DB_CCA.'.dbo.ShopItems [COLOR="#FF0000"](Name,Description,ItemIdx,DurationIdx,ItemOpt,Image,Honour,Alz,Category,Available,Old_ItemIdx,Old_Name,ProdID,ITEMID)[/COLOR] values ("'.$iname.'","'.$idesc.'","'.$iidx.'","'.$idur.'","'.$iopt.'","'.$iimage.'",0,"'.$ialz.'","'.$icat.'","'.$iavail.'"[COLOR="#FF0000"],0,0,0,0[/COLOR])');
 
Newbie Spellweaver
Joined
Dec 31, 2011
Messages
6
Reaction score
0
help me with this one please
i got this error if Withdraw
hel - Simple regpage and cash shop - using eCoins! - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Jul 13, 2009
Messages
20
Reaction score
2
help me with this one please
i got this error if Withdraw
View attachment 139413

Modify ur StoredProcedure [dbo].[cabal_tool_registerAccount]
register new account

Code:
USE [Account]
GO
/****** Object:  StoredProcedure [dbo].[cabal_tool_registerAccount]    Script Date: 11/02/2013 01:38:42 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER  PROCEDURE [dbo].[cabal_tool_registerAccount]   (@id varchar(32),  @password  varchar(32))
AS
begin tran
	declare @UserNum as int

	insert into cabal_auth_table( ID, Password, Login, AuthType, IdentityNo ) 
	values(@id, pwdencrypt(@password), '0', 1, '7700000000000' )

	set @UserNum = @@identity


	insert into cabal_charge_auth(usernum, type, expiredate, payminutes)
	values(@UserNum, 0, DATEADD(day, 1000, getdate()), 0)
	
	[COLOR="#FF0000"]insert into CabalCash..cashaccount (id,UserNum,Cash,CashBonus,UpdateDateTime) values(@id,@UserNum,0,0,GETDATE())[/COLOR]

	select @UserNum as usernum
commit
 
Elite Diviner
Joined
Jun 23, 2012
Messages
465
Reaction score
39
How to fix this error

Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\register\index.php on line 26


thnks
 
Newbie Spellweaver
Joined
Mar 21, 2013
Messages
49
Reaction score
2
Hey guys when i want to open the Shop inGame i got the Error that Option of "loaded" is 0 or undefind.
And when i try to open The shop in Google Chrome in the upper left Corner is just displayed: Hack attempt
Can sb tell me how to fix this??
And can sb tell me which ports the Shop is using for database connection
 
Last edited:
Newbie Spellweaver
Joined
Feb 11, 2013
Messages
65
Reaction score
0
hey guys i get an error if i transfer money of the warenhouse to the bank.
And the value of the bank is changing but not of the warenhouse. clould anybody help me.
Here is the error:

Warning: mssql_query() [ ]: General SQL Server error: Check messages from the SQL Server (severity 18) in C:\xampp\htdocs\jas\account.php on line 42

Warning: mssql_query() [ ]: Query failed in C:\xampp\htdocs\jas\account.php on line 42
 
Status
Not open for further replies.
Back
Top