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!

Auto Premium, map codes

Newbie Spellweaver
Joined
Apr 25, 2007
Messages
37
Reaction score
0
Right, well I had a search in the forums and it looks like no one has explained on how to do this so I'll have a go.

You say you want to give every player premium status? With free map codes?

Darn your awesome, but how do you go about doing it?

Triggers I say. Lets, for example, add auto premium to our database.

First, right click the cabal_auth_table and go All Tasks > Manage Triggers.

Triggers react to whatever happens in the table they're assigned to. In this example, whenever someone registers, we want the trigger to fetch their UserNum, and add it into the cabal_charge_auth table.

Here's what I put into my trigger
Code:
CREATE TRIGGER [Auto-Premium] ON [dbo].[cabal_auth_table] 
FOR INSERT
AS

-- First we need to declare what we need
Declare @usrnum char(4)
-- This line grabs what was just inserted into the database, and selects the usernum
Select @usrnum = (Select UserNum From Inserted)
-- Next, all we have to do is use that UserNum and insert it into the cabal_charge_auth table, along with premium info
Insert into dbo.cabal_charge_auth(UserNum,Type,ExpireDate,PayMinutes,ServiceKind) values (@usrnum,'5','10/10/2010 01:00:00','0','1')
The "Inserted" table is a virtual table which contains all of the fields and values from the actual "INSERT" command that made SQL Server call the trigger in the first place.

For the Map and Warp codes, I just added them into the cabal_sp_newchar stored procedure in the GameDB

Code:
<SNIP>
        insert into cabal_quickslot_table (characterIdx, data) select @characteridx, quickSlotData from #TempTable
        insert into cabal_questdata_table (characterIdx, data, flags) select @characteridx, questData, questFlagsData from #TempTable
        commit tran
        ----------------------------------------------------------------------------------------------

        -- 리턴값 0xA1 ~ 0xA6
        drop table #tempTable
        select convert(int, @result)
        -----------------------------------------------------------------------------------------------    
-- Here is where I added the Warp and Map codes, near the bottom of the procedure
        update cabal_character_table set WarpBField = '511', MapsBField = '511' where CharacterIdx = @characteridx
    end

SET NOCOUNT OFF
end
GO

Anyone else got any handy little tips like this?

Edit: Actually, can someone help me out? Trying to add stuff to the MyCashItem table, but it's not appearing ingame? GM tool isn't working either, unless I got something wrong there.
 
Master Summoner
Joined
Nov 9, 2004
Messages
527
Reaction score
53
Nice... but im using my own premium trigger its simple, right click the cabal_charge_auth table and go All Tasks > Manage Triggers. For GP Client, (With dummies attack works) type this:

CREATE TRIGGER [premiumforall] ON [dbo].[cabal_charge_auth]
FOR INSERT, UPDATE, DELETE
AS
UPDATE [account].[dbo].[cabal_charge_auth] SET
[Type] = 5
,[ExpireDate] = DATEADD(year, 10, getdate())
,[PayMinutes] = 999999
,[ServiceKind] = 1

For chinese client with dummies attack working type this:

CREATE TRIGGER [premiumforall] ON [dbo].[cabal_charge_auth]
FOR INSERT, UPDATE, DELETE
AS
UPDATE [account].[dbo].[cabal_charge_auth] SET
[Type] = 2
,[ExpireDate] = DATEADD(year, 10, getdate())
,[PayMinutes] = 999999
,[ServiceKind] = 5

It will make everyone with premium, for new registers too.. =]
 
Experienced Elementalist
Joined
Jan 29, 2005
Messages
210
Reaction score
3
more easy change "cabal_tool_registerAccount"

servicekind (5 for chinese and 1 for english client)
Code:
insert into cabal_charge_auth(usernum, type, expiredate, payminutes[COLOR="Red"], servicekind[/COLOR])
values(@UserNum, [COLOR="Red"]1[/COLOR], DATEADD(day, [COLOR="red"]100[/COLOR], getdate()), 0[COLOR="red"], 1[/COLOR])

change 100 for number of premium days

about all maps, just change in cabal_newCharData_table... easy...
 
Joined
Aug 9, 2008
Messages
613
Reaction score
6
can you post the advisable trigger

CREATE TRIGGER [premiumforall] ON [dbo].[cabal_charge_auth]
FOR INSERT, UPDATE, DELETE
AS
UPDATE [account].[dbo].[cabal_charge_auth] SET
[Type] = 5
,[ExpireDate] = DATEADD(year, 10, getdate())
,[PayMinutes] = 999999
,[ServiceKind] = 1

how to update coz i already inputed im using chumpy files so i need premium type SET
[Type] = 5 to 1
 
Last edited by a moderator:
Junior Spellweaver
Joined
Oct 30, 2008
Messages
122
Reaction score
0
heloo..

Where i need to setting.....can you give me clue....
i not understand....
 
Junior Spellweaver
Joined
Oct 30, 2008
Messages
122
Reaction score
0
how to edit at sql .....give me info.....
i want used dortdort ....

where i found cabal_charge_auth table in sql.....

help me pls....

how to give auto to all new player premium , and can use all map and GPS........

i try still premium ok..but use all map and GPS still happen....

give me simple for setting......

i used dordot guide............

Thanks
 
Last edited by a moderator:
Newbie Spellweaver
Joined
Jul 2, 2005
Messages
96
Reaction score
0
Im using SQL 2005, where is the cabal_sp_newchar procedure in this, im doing it for a friend but i have no idea how to use 2005 T_T
 
Newbie Spellweaver
Joined
Mar 28, 2009
Messages
5
Reaction score
0
more easy change "cabal_tool_registerAccount"

servicekind (5 for chinese and 1 for english client)
Code:
insert into cabal_charge_auth(usernum, type, expiredate, payminutes[COLOR="Red"], servicekind[/COLOR])
values(@UserNum, [COLOR="Red"]1[/COLOR], DATEADD(day, [COLOR="red"]100[/COLOR], getdate()), 0[COLOR="red"], 1[/COLOR])

change 100 for number of premium days

about all maps, just change in cabal_newCharData_table... easy...


whare cabal_tool_registerAccount?? i can't find it... :(:
 
Back
Top