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!

Chumpy's simple regpage and cash shop v1.5 beta

The Dinosaur
Loyal Member
Joined
Jun 29, 2008
Messages
5,028
Reaction score
999
Dunno why i'm bothering to release this. Nobody wants it :p:

This is a basic cash shop designed to work with my simple regpage that uses game Alz from the player's warehouse for buying cash items. The layout is loosely based on the official Cabal EU cash shop without quite so many tabs.

Tested on WinXP 32 bit, Windows 2003 64 bit, Xampp, MSSQL 2000, MSSQL 2005.

Make sure you read the readme.txt carefully.

:thumbup:

Download v1.5->

Download ->

For those that need extra help hexing cabalmain.exe i have made a small video guide at (compiled flash vid)

v1.5 changes
============

It is now possible to log in via the regpage and access both the shop and
the shop admin, you are no longer restricted to accessing in-game only. The
game login and password is used to log in.

When buying items in the cash shop Alz is no longer taken directly from the
warehouse. You must log into the regpage and transfer Alz from warehouse
to the bank (you can only do this when not logged into the game). Alz from
the bank is used to buy cash items either whilst logged into the regpage
or from the in-game cash shop button.

This method does make it easier for those that want donations or some other
form of payment for cash items as you can now populate the bank manually.

DO NOT use the X at the top left of the cash shop itself to try and exit
back to the other panels. The game uses a special URL to close the in-game
browser and this won't work outside the game. Anywhere outside the actual
cash shop the X button should be ok.


Upgradng from v1
==================

1. Copy the new files to the webserver
- Your existing config.php will not be overwritten
- You will need to copy the ALLOW_BANK section into your existing config
if you want to use the option.

2. Run database/upgrade_v1.sql on you cash shop database
- Existing items will not be lost


New Installations
===================

1. Copy the files to a directory on your webserver.

2. Copy config.default.php->config.php, edit to add your MSSQL server logon and
website/forums. Make SURE you set the right ServerIdx or cash items will not
get delivered!

3. Create a new database called "CashShop" and run database/db.sql on it.

4. In etc/cabal/WorldSvr_XX_YY.ini set the following:

UseCashShop=1

Only enable it on WorldSvrs you want the shop available from.

5. Open cabalmain.exe in a hex editor and look around 0x3dee8c. The actual address
will be different for different cabalmain.exes but the string you are looking
for (assiming it hans't been changed already) is:



Once you have found the string is being used for the cash shop address and replace:



The string must be properly zero terminated and cannot be longer than 63 chars
unless you know how to relocate the string in the exe.

To see exactly what address the client is using hit the cash shop button in
game. Right-click and select Properties. That will help you find it in the exe
using a search ;)

6. Test.


Test mode is enabled by default so you can check the shop is picking up the right
users when launched using the in game cash shop button. It will display the
UserNum (v1), the login AuthKey (v2), confirm the login name and the amount of Alz
is the login's Warehouse. It should look similar to this:

data=v1=1&v2=5229E0C411AF4F23B968B0653A76F043
v1=1
v2=5229E0C411AF4F23B968B0653A76F043
Found user ok.
Name=Test.
Alz=999999999.

One you are happy it is working ok open config.php and set the following:

// Print debug info at the top of the cash shop pages
define('TESTMODE',false);


Adding/Editing/Deleting items
===============================

Items are added using the admin button on the left of the cash shop pages.

The admin button will only appear if at least 1 char on your account is
a GM (Nation=3). Otherwise the button will not appear and any attempts to
access the admin panel will result in hack attempt messages.


Disabling Alz transfers
=========================

In config.php:

define('ALLOW_BANK',false);

Set this to false if you don't want to let players transfer Alz to the bank.
This enables you to populate the bank in other ways such as donations.


Maintenance Mode
==================

In config.php:

// Maintenance mode, open to GMs only.
define('MAINTMODE',false);

Set this to true and only accounts with at least 1 GM character can access the
cash shop.


IP validation
===============

In config.php:

// Uses LastIp validation as well as UserNum and AuthKey
// Can cause problems
define('IPVALIDATION',false);

The shop uses the UserNum and AuthKey from the DB to authorise people in the shop
and enabling this will also check the player's IP address matches the LastIp in
the database too. This can cause problems on some setups but for security reasons
keep it enabled unless you get a lot of unexpected hack attempt messages when trying
to use the cash shop.

chumpywumpy - Chumpy's simple regpage and cash shop v1.5 beta - RaGEZONE Forums


chumpywumpy - Chumpy's simple regpage and cash shop v1.5 beta - RaGEZONE Forums



Download mirrors:



 
Last edited by a moderator:
Newbie Spellweaver
Joined
Sep 2, 2008
Messages
11
Reaction score
0
Re: Chumpy's simple regpage and cash shop beta

what does "The string must be properly zero terminated" means
 
Divine Celestial
Loyal Member
Joined
Aug 24, 2007
Messages
890
Reaction score
5
Re: Chumpy's simple regpage and cash shop beta

im just confuse i cant see where i can log in... some little help?
 
Newbie Spellweaver
Joined
May 25, 2005
Messages
77
Reaction score
1
Re: Chumpy's simple regpage and cash shop beta

just follow the guide and read the info!. have u ever try to play in official server?

anyway i think this is same as official server, no need to login, v1 is to get your account ID.
 
Divine Celestial
Loyal Member
Joined
Aug 24, 2007
Messages
890
Reaction score
5
Re: Chumpy's simple regpage and cash shop beta

nope.

if u cant log how u can buy items just common fact. only ;))
 
Newbie Spellweaver
Joined
Sep 2, 2008
Messages
11
Reaction score
0
Re: Chumpy's simple regpage and cash shop beta

you log in in game. :) thats for sure. you buy in game. i already make it work and its great. just make sure that your warehouse have some Alz .

HOw do i compute for item duration? if i put 00000000 it still expires.
 
Newbie Spellweaver
Joined
May 25, 2005
Messages
77
Reaction score
1
Re: Chumpy's simple regpage and cash shop beta

opsss, i mean no need to login for this script it will get your userNUM if you LOGIN in game. just click the Cabal Shop button in game.

follow this guide

5. Open cabalmain.exe in a hex editor and look around 0x3dee8c. The actual address
will be different for different cabalmain.exes but the string you are looking
for (assiming it hans't been changed already) is:

hxxp://shop.cabal.ogplanet.com/cabalAppShop/default.aspx?v1=

Once you have found the string is being used for the cash shop address and replace:

hxxp://www.myserver.com/webshop.php?v1=

The string must be properly zero terminated and cannot be longer than 63 chars
unless you know how to relocate the string in the exe.

To see exactly what address the client is using hit the cash shop button in
game. Right-click and select Properties. That will help you find it in the exe
using a search ;)

cheers

EDIT: i think you need to enter 31 for permanent.
 
Newbie Spellweaver
Joined
Jun 21, 2006
Messages
19
Reaction score
3
Re: Chumpy's simple regpage and cash shop beta

Hello I need help.
The SHOPADMIN does not activate any idea

Thank you for the this very good page.:*::*::*:
 
Newbie Spellweaver
Joined
May 25, 2005
Messages
77
Reaction score
1
Re: Chumpy's simple regpage and cash shop beta

based on chumpy readme file from the script.

Adding/Editing/Deleting items
===============================

Items are added using the admin button on the left of the cash shop pages.

The admin button will only appear if at least 1 char on your account is
a GM (Nation=3). Otherwise the button will not appear and any attempts to
access the admin panel will result in hack attempt messages.
 
Newbie Spellweaver
Joined
Jun 21, 2006
Messages
19
Reaction score
3
Re: Chumpy's simple regpage and cash shop beta

Everything is still equal.. T_T

 
Newbie Spellweaver
Joined
May 25, 2005
Messages
77
Reaction score
1
Re: Chumpy's simple regpage and cash shop beta

how about this?

// Print debug info at the top of the cash shop pages
define('TESTMODE',false);
 
Newbie Spellweaver
Joined
Sep 2, 2008
Messages
11
Reaction score
0
Re: Chumpy's simple regpage and cash shop beta

EDIT: i think you need to enter 31 for permanent.

thanks value 31 makes it permanent. but how about if i want it for 3 days and then it win expire?
how to compute it?:blink:
 
The Dinosaur
Loyal Member
Joined
Jun 29, 2008
Messages
5,028
Reaction score
999
Re: Chumpy's simple regpage and cash shop beta

@Sir chumppy

can i request for your simple reg page? coz your link is deleted...

btw thanks for the share.....GREAT!!!

The regpage is bundled with the shop now (index.php). If you put the shop in go to that address in your browser and you will see the regpage ;)

Everything is still equal.. T_T

IP validation can sometimes cause problems like that which is why it is possible to switch it off. Look in config.php and set define('IPVALIDATION',false); to define('IPVALIDATION',true); and see if that works.
 
Experienced Elementalist
Joined
Dec 16, 2007
Messages
227
Reaction score
0
Re: Chumpy's simple regpage and cash shop beta

@Sir cypher

why is my cash shop in game not working? " the service is not yet avaible?

even i hex the cabalmain.
 
Newbie Spellweaver
Joined
May 25, 2005
Messages
77
Reaction score
1
Re: Chumpy's simple regpage and cash shop beta

@Sir cypher

why is my cash shop in game not working? " the service is not yet avaible?

even i hex the cabalmain.

Please read the guide carefully, you need to activate it from your server.
Code:
# Allow cash shop
# You must have a cash shop website set up
# Your client must also be hexed to the correct URL for your shop
AllowCashShop=1
 
Experienced Elementalist
Joined
Dec 16, 2007
Messages
227
Reaction score
0
Re: Chumpy's simple regpage and cash shop beta

can i use it in lan or single pc only? cause i follow already the guide, i hex the client

but nothing has change..the service is not yet availabe!!!!
 
Newbie Spellweaver
Joined
Sep 2, 2008
Messages
11
Reaction score
0
Re: Chumpy's simple regpage and cash shop beta

How to Compute item Duration? the only thing i know about it is it is the last 8 Digit

what do i put at item duration? any hint? someone say 31 is no expiry ,
how to make it 3 days. a week or one month?
 
The Dinosaur
Loyal Member
Joined
Jun 29, 2008
Messages
5,028
Reaction score
999
Re: Chumpy's simple regpage and cash shop beta

how about this?

Missed that post. Sorry. Test mode prints a load of info at the top of the page so you can see exactly which char it will operate on. Setting it to false like that will hide the info.

can i use it in lan or single pc only? cause i follow already the guide, i hex the client

but nothing has change..the service is not yet availabe!!!!
It will work for anyone who connects to the server and can access the pages. Being told the service is not yet available means you didn't change/add the AllowCashShop=1 line in your worldsvr config and reload the worldsvr as an2ny_18 says.

How to Compute item Duration? the only thing i know about it is it is the last 8 Digit

what do i put at item duration? any hint? someone say 31 is no expiry ,
how to make it 3 days. a week or one month?
The DurationIdx is the same one used in the cabal cash tools or my gm tools. Which exact values to use depends on the client you use though as different clients use different values (i.e. GP client vs SAUR0N's synch patch). Check product.scp on the sever to see what the values are (31 is usually permanent).
 
Experienced Elementalist
Joined
Dec 16, 2007
Messages
227
Reaction score
0
Re: Chumpy's simple regpage and cash shop beta

@Sir chumpy

nothing happen...i already do the allowcashshop=1 and also hex the main.

but service is not yet available...help pls!!

btw, this is my main setup: <<<<< is this right localhost or my lan ip?
 
Newbie Spellweaver
Joined
May 25, 2005
Messages
77
Reaction score
1
Re: Chumpy's simple regpage and cash shop beta

Fix for cancel buying.

Code:
echo '<DIV id=wrapper style="DISPLAY: none">';

    echo '<TABLE height="100%" width="100%">';
    echo '<TBODY><TR><TD vAlign=center align=middle>';
      echo '<TABLE cellSpacing=0 cellPadding=0 border=0><TBODY>';
      echo '<TR><TD width=35><IMG height=40 src="http://forum.ragezone.com/images/Item_Game_Box_s_01.gif" width=35></TD>';
      echo '<TD class=white style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 5px" vAlign=top align=middle background="http://forum.ragezone.com/images/Item_Game_Box_s_02.gif"><STRONG>Are you sure?</STRONG></TD>';
      echo '<TD width=35><IMG height=40 src="http://forum.ragezone.com/images/Item_Game_Box_s_03.gif" width=35></TD></TR>';
      echo '<TR>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_04.gif"> </TD>';
      echo '<TD class=orange style="PADDING-BOTTOM: 20px; PADDING-TOP: 20px" align=middle width=200 background="http://forum.ragezone.com/images/Item_Game_Box_s_05.gif" height=50><STRONG><SPAN style="WIDTH: 280px">Please confirm you wish to buy the selected item.</SPAN></STRONG></TD>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_06.gif"> </TD>';
      echo '</TR>';
      echo '<TR>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_04.gif"> </TD>';
      echo '<TD class=orange style="PADDING-BOTTOM: 20px; PADDING-TOP: 20px" align=middle background="http://forum.ragezone.com/images/Item_Game_Box_s_05.gif" height=20>';
      echo '<IMG style="CURSOR: pointer" onclick="javscript:location.href=\'./buy.php?v1='.$v1.'&v2='.$v2.'&co='.$item.'\'" alt="Confirm purchase" src="http://forum.ragezone.com/images/Btn_Yes.gif" border=0>      ';
      echo '<IMG style="CURSOR: pointer" onclick="javscript:location.href=[COLOR="Red"]\'./webshop.php\'"[/COLOR] alt="Cancel purchase" src="http://forum.ragezone.com/images/Btn_No.gif" border=0>';
      echo '</TD>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_06.gif"> </TD>';
      echo '</TR>';
      echo '<TR>';
      echo '<TD><IMG src="http://forum.ragezone.com/images/Item_Game_Box_s_07.gif" width=35></TD>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_08.gif"> </TD>';
      echo '<TD><IMG src="http://forum.ragezone.com/images/Item_Game_Box_s_09.gif" width=35></TD>';
      echo '</TR></TBODY>';
      echo '</TABLE>';
    echo '</TD></TR></TBODY>';
    echo '</TABLE>';

    echo '</DIV>';
  }

} else {

Replace with this

Code:
echo '<DIV id=wrapper style="DISPLAY: none">';

    echo '<TABLE height="100%" width="100%">';
    echo '<TBODY><TR><TD vAlign=center align=middle>';
      echo '<TABLE cellSpacing=0 cellPadding=0 border=0><TBODY>';
      echo '<TR><TD width=35><IMG height=40 src="http://forum.ragezone.com/images/Item_Game_Box_s_01.gif" width=35></TD>';
      echo '<TD class=white style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 5px" vAlign=top align=middle background="http://forum.ragezone.com/images/Item_Game_Box_s_02.gif"><STRONG>Are you sure?</STRONG></TD>';
      echo '<TD width=35><IMG height=40 src="http://forum.ragezone.com/images/Item_Game_Box_s_03.gif" width=35></TD></TR>';
      echo '<TR>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_04.gif"> </TD>';
      echo '<TD class=orange style="PADDING-BOTTOM: 20px; PADDING-TOP: 20px" align=middle width=200 background="http://forum.ragezone.com/images/Item_Game_Box_s_05.gif" height=50><STRONG><SPAN style="WIDTH: 280px">Please confirm you wish to buy the selected item.</SPAN></STRONG></TD>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_06.gif"> </TD>';
      echo '</TR>';
      echo '<TR>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_04.gif"> </TD>';
      echo '<TD class=orange style="PADDING-BOTTOM: 20px; PADDING-TOP: 20px" align=middle background="http://forum.ragezone.com/images/Item_Game_Box_s_05.gif" height=20>';
      echo '<IMG style="CURSOR: pointer" onclick="javscript:location.href=\'./buy.php?v1='.$v1.'&v2='.$v2.'&co='.$item.'\'" alt="Confirm purchase" src="http://forum.ragezone.com/images/Btn_Yes.gif" border=0>      ';
      echo '<IMG style="CURSOR: pointer" onclick="javscript:location.href=\'./webshop.php?v1='.$v1.'&v2='.$v2.'\'" alt="Cancel purchase" src="http://forum.ragezone.com/images/Btn_No.gif" border=0>';
      echo '</TD>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_06.gif"> </TD>';
      echo '</TR>';
      echo '<TR>';
      echo '<TD><IMG src="http://forum.ragezone.com/images/Item_Game_Box_s_07.gif" width=35></TD>';
      echo '<TD background="http://forum.ragezone.com/images/Item_Game_Box_s_08.gif"> </TD>';
      echo '<TD><IMG src="http://forum.ragezone.com/images/Item_Game_Box_s_09.gif" width=35></TD>';
      echo '</TR></TBODY>';
      echo '</TABLE>';
    echo '</TD></TR></TBODY>';
    echo '</TABLE>';

    echo '</DIV>';
  }

} else {

ok ok ok just replace this line, rz forum modified the image link.

echo '<IMG style="CURSOR: pointer" onclick="javscript:location.href=\'./webshop.php?v1='.$v1.'&v2='.$v2.'\'" alt="Cancel purchase" src="/images/Btn_No.gif" border=0>';

chumpy can i edit your code, I'm going to add some option like Alz and Cash.

Thanks
 
Back
Top