Chumpys Web Shop, Starting With Alz [Howto] SQL 2005

Newbie Spellweaver
Joined
Jul 2, 2005
Messages
96
Reaction score
0
If anyone is user the Chumpy item shop i will share with you how to add 10k Alz into a new registered users bank:

(Using SQL 2005)
In the Account Database->Programmability->Stored Procedures->cabal_toolregisterAccount->right click->modify:
Under "select @usernum as usernum" add the following:
Code:
insert into [CashShop].[dbo].[Bank](usernum, Alz)
values(@UserNum,10000)

so the whole of the Procedure looks like the following (Mine is edited to make account premium for 999 days and give them 10k alz in Chumpys online store):
Code:
USE [account]
GO
/****** Object:  StoredProcedure [dbo].[cabal_tool_registerAccount]    Script Date: 01/01/2009 06:10:12 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO

/****** Object:  Stored Procedure dbo.cabal_tool_registerAccount    Script Date: 2008-4-14 21:40:21 ******/


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, dbo.fn_md5(@password), '0', 1, '7700000000000' )

	set @UserNum = @@identity


	insert into cabal_charge_auth(usernum, type, expiredate, payminutes)
	values(@UserNum, 1, DATEADD(day, 999, getdate()), 0)
	
	select @UserNum as usernum
insert into [CashShop].[dbo].[Bank](usernum, Alz)
values(@UserNum,10000)
commit

Now, as you can see below, my new accounts registered has a nice amount of starting Cabal Cash :)
02goswej - Chumpys Web Shop, Starting With Alz [Howto] SQL 2005 - RaGEZONE Forums

02goswej - Chumpys Web Shop, Starting With Alz [Howto] SQL 2005 - RaGEZONE Forums

Hope this helps some people :o - WOPS SORRY, Dual monitor didnt notice it would take a SS of both T_T
 
Oh your using the bank method ^.^ i see :p im implementing a donation method :o i hope Chumpy dun mind me messing with his source xD
 
Back