Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 13:15

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HOWTO] Create Coins ID

Discussion on [HOWTO] Create Coins ID within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
[HOWTO] Create Coins ID

Every character that did visit the D-Shop gets a unique ID, witch is different from the user_no
I know its retarded but we have to deal with it
so lets look at the SP in the database:

PHP Code:
/****** Object:  Stored Procedure dbo.BL_CreateIdCode    Script Date: 2006-5-25 13:03:36 ******/

CREATE PROCEDURE  dbo.BL_CreateIdCode
@o_id_code        varchar(20)         OUTPUT    
AS
BEGIN
    
    
DECLARE @serv_code  char(2)
    DECLARE @
rand_seqno varchar(12)
    DECLARE @
rand_code varchar(36)
    
SET @serv_code '01'
    
SET @rand_code newid() 
    
SET @rand_seqno SubString(@rand_code18) + SubString(@rand_code104)
    
SET @o_id_code = @serv_code CONVERT(VARCHAR(6), GetDate(), 12) +  @rand_seqno

END

GO 
And his user_no is: 09082414173865
but we dont need that yet!

we need to create a code like: 010909167956B7D86FEB

01 => The server ID code (normaly 01)
090916 => The date (year month day)
7956B7D86FEB => A random 12 number & letter code

we can make one with the following code

PHP Code:
<?php

//-----------------------------------------------------
// This is for MSSQL newid()
function create_newid($length$characters){

    if (
$characters == ''){ return ''; }
    
$chars_length strlen($characters)-1;
    
    
mt_srand((double)microtime()*1000000);
    
    
$newid '';
    while(
strlen($newid) < $length){
        
$rand_char mt_rand(0$chars_length);
        
$newid .= $characters[$rand_char];
    }
    
    return 
$newid;

}
//-----------------------------------------------------


// Server code is always 01
$serv_code '01';

// Create a random code
$rand_code create_newid(12'ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890');

// Get the ymd date
$date date("ymd");

// Add it all toghter
$o_id_code $serv_code '' $date '' $rand_code;

// echo out the code
echo $o_id_code

?>
Now insert into a db

PHP Code:
INSERT INTO user_cash
    
(
    
id,
    
user_no,
    
group_id,
    
amount,
    
free_amount
    
)
VALUES
    
(
    
$o_id_code// the code we just created
    
$i_user_no// the user_no
    
'01'// the group code => should be 01
    
'0'// the amount
    
'0' // the free amount
    

this should work, if not ..... let me know
janvier123 is offline  
Thanks
2 Users
Old 01/02/2011, 08:21   #2
 
elite*gold: 0
Join Date: Feb 2008
Posts: 185
Received Thanks: 57
Cool, but not needed.
caper is offline  
Old 01/02/2011, 08:36   #3
 
elite*gold: 0
Join Date: Dec 2010
Posts: 36
Received Thanks: 4
Quote:
Originally Posted by caper View Post
Cool, but not needed.
Pls leave if u dun appreciate the man's work. Stop spamming..
bullet21.=BrokeBack_MT is offline  
Old 01/02/2011, 09:04   #4
 
elite*gold: 0
Join Date: Dec 2010
Posts: 52
Received Thanks: 4
Thanks Janvier!!!! Your awesome!
Cryptic. is offline  
Old 01/02/2011, 09:51   #5
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
There, now you know its made
janvier123 is offline  
Old 01/02/2011, 23:53   #6
 
elite*gold: 260
Join Date: Sep 2010
Posts: 564
Received Thanks: 203
I left a Thanks even if I have no use of it but you get the Thanks for the work
Skeptiks is offline  
Old 01/03/2011, 02:20   #7
 
pieter's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 568
Received Thanks: 176
u can also add a line to SP_CHAR_CREATE to execute this procedure
this is usefull when awarding characters free coins since u cant award coins untill they have openned dshop

when u add EXEC dbo.SP_YourCustomSPtoAddTheLines

to SP_CHAR_CREATE

u can award coins eventhough they did not open dshop yet
pieter is offline  
Reply


Similar Threads Similar Threads
[Metin2]HowTo create your own Client
01/07/2013 - Metin2 PServer Guides & Strategies - 142 Replies
Hallu^^ Habe euch ein Video gemacht wie ihr euren eigenen Clienten erstellen könnt. Man muss nix erklären, im Video ist alles beschrieben. YouTube - HowTo create your own Client Lg, Joshi
[HOWTO] Create User No
01/04/2011 - Dekaron Private Server - 1 Replies
Ok, here is how you create a user_no for the database PHP Code $dk_time=strftime("%y%m%d%H%M%S"); list($usec1, $sec1) = explode(" ",microtime()); $dk_user_no=$dk_time.substr($usec1,2,2); echo $dk_user_no;
[HowTo] Create your own [SP] Trainer
06/04/2010 - S4 League Hacks, Bots, Cheats & Exploits - 39 Replies
Hallo Leute, da ich sehr viele PNs bekommen habe und auch sehr viele in Topics gefragt haben wie man einen Trainer mit AutoIT erstellt, stelle ich hier ein kleines Tutorial zur Verfügung! Ich bin nicht daran gewillt iwelche Beleidigungen gegen mich bzw. dieses Topic zu beantworten! Für Fragen bin ich sehr gerne offen! Was benötigen wir? AutoIT - Script Editor
[HoWTo] Create Wow Pserver
01/01/2010 - WoW Private Server - 3 Replies
Willkommen auf dem How to create a WoW Pserver 1.Downloaden wir hier für ganz wichtig die Novos Easys Mangos Server: Link: RapidShare: 1-CLICK Web hosting - Easy Filehosting 2. Nach dem Download downloadet ihr dannach Navicat 8 Link: RapidShare: 1-CLICK Web hosting - Easy Filehosting 3. Dann anschließend müsst ihr auch noch Net FRAMEWORK 3.5 haben Link: Downloaddetails: .NET Framework 3.5
[Howto] Create packet checksums
09/22/2009 - 9Dragons - 7 Replies
For many of you packet hackers around here I noticed many are slightly modifying captured packets and resending them. Which usually results in getting disconnected. The majority of the time it's due to not including the new checksum of the packet, the other time it's because the packet wasn't encrypted. To create a packet checksum, you must first be familiar with the structure of a basic 9Dragons packet. A sample packet looks like the following: 0C 00 62 02 1D 73 04 0A 01 00 F5 D3 The...



All times are GMT +1. The time now is 13:16.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.