Register for your free account! | Forgot your password?

You last visited: Today at 07:05

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


[Release] Create A Char Wear Avatar

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2012
Posts: 137
Received Thanks: 109
[Release] Create A Char Wear Avatar

Hello Epvp Members,
I Won't Waste Your Time Take It :-

Create This Procedure
PHP Code:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_LEGENDKNIGHT_AVATAR]    Script Date: 05/03/2015 10:13:18 م ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
Create   PROCEDURE 
[dbo].[_LEGENDKNIGHT_AVATAR]
@
CharID        AS INT,
@
Slot            AS TINYINT,
@
RefItemID        AS INT,
@
Data                AS INT
AS
/*------------------------------------------------------------------------------------------------------------------------------------
/*------------------------------------------------------------------------------------------------------------------------------------
/*------------------------------------------------------------------------------------------------------------------------------------
/*------------------------------------------------------------------------------------------------------------------------------------
/*------------------------------------------------------------------------------------------------------------------------------------
.____                                    ._______  __.      .__       .__     __    _________            .___.__                
|    |    ____   ____   ____   ____    __| _/    |/ _| ____ |__| ____ |  |___/  |_  _   ___   ____   __| _/|__| ____    ____  
|    |  _/ __  / ____/ __  /      / __ ||      <  /    |  |/ ___|  |     __ /      / /  _  / __ | |  |/      / ___ 
|    |__  ___// /_/  >  ___/|   |  / /_/ ||    |  |   |    / /_/  >   Y    |        ___(  <_> ) /_/ | |  |   |  / /_/  >
|_______ ___  >___  / ___  >___|  /____ ||____|__ ___|  /_____  /|___|  /__|    ______  /____/____ | |__|___|  /___  / 
        /   /_____/      /     /      /        /    /  /_____/      /               /            /         //_____/  
-----------------------------------------------------------------------------------------------------------------------------------*/
-----------------------------------------------------------------------------------------------------------------------------------*/
-----------------------------------------------------------------------------------------------------------------------------------*/
-----------------------------------------------------------------------------------------------------------------------------------*/
-----------------------------------------------------------------------------------------------------------------------------------*/
    DECLARE @
ItemInSlot    BIGINT
    SET 
@ItemInSlot 0
    SELECT 
@ItemInSlot ItemID FROM _InventoryForAvatar WHERE CharID = @CharID AND Slot = @Slot
    
IF (@ItemInSlot <> 0)
    
BEGIN
        
RETURN -1
    END
    
DECLARE @NewItem    BIGINT
    
DECLARE @Serial        BIGINT
    SET 
@Serial 0
    EXEC 
@NewItem _STRG_ALLOC_ITEM_NoTX @Serial OUTPUT
    
IF (@NewItem 0)
    
BEGIN
        
RETURN -2
    END
    
    
IF (EXISTS(SELECT ItemID FROM _InventoryForAvatar WHERE ItemID = @NewItem))
    
BEGIN
        
RETURN -181818
    END
    
IF (EXISTS(SELECT ItemID FROM _Chest WHERE ItemID = @NewItem))
    
BEGIN
        
RETURN -282828
    END
    UPDATE _Items SET RefItemID 
= @RefItemIDOptLevel 0Variance 0Data = @Data WHERE ID64 = @NewItem
    
IF (@@ERROR <> 0)
    
BEGIN
        
RETURN -3
    END
    UPDATE _InventoryForAvatar SET ItemID 
= @NewItem WHERE CharID = @CharID AND Slot = @Slot
    
IF (@@ERROR <> 0)
    
BEGIN
        
RETURN -4
    END
    
RETURN @NewItem 
And Insert The Following Linkes Into _AddNewChar
PHP Code:
if @RefCharID <=14887 And @RefCharID >=14875 or @RefCharID<=1919 AND @RefCharID>=1907    ---- Male
begin
exec 
[_LEGENDKNIGHT_AVATAR] @newcharid,0,47524,0   -- Avatar Dress ID (male)
exec [_LEGENDKNIGHT_AVATAR] @newcharid,1,47526,0   -- Avatar Hat ID (male)
exec [_LEGENDKNIGHT_AVATAR] @newcharid,2,47522,0   -- Avatar Acc ID (male)
end
if @RefCharID <=14900 And @RefCharID >=14888 or @RefCharID<=1932 AND @RefCharID>=1920    ---- Female
begin
exec 
[_LEGENDKNIGHT_AVATAR] @newcharid,0,47523,0   -- Avatar Dress ID (Female)
exec [_LEGENDKNIGHT_AVATAR] @newcharid,1,47525,0   -- Avatar Hat ID (Female)
exec [_LEGENDKNIGHT_AVATAR] @newcharid,2,47521,0   -- Avatar Acc ID (Female)
end 

Click on button if i helped.



geomangy is offline  
Thanks
8 Users
Old 03/09/2015, 11:57   #2
Chat Killer In Duty

 
elite*gold: 5
Join Date: May 2008
Posts: 15,436
Received Thanks: 5,902
#Approved


PortalDark is offline  
Thanks
1 User
Old 03/10/2015, 12:33   #3
 
elite*gold: 0
Join Date: Nov 2014
Posts: 4
Received Thanks: 0
GooD
mostafa shaaban is offline  
Old 03/10/2015, 13:04   #4
 
elite*gold: 6
Join Date: Oct 2013
Posts: 1,128
Received Thanks: 600
Code:
USE [SILKROAD_SYLOXX]
GO

/****** Object:  StoredProcedure [dbo].[_AssignItemID]    Script Date: 09.03.2015 00:36:01 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


/**
version : 1
author : syloxx
created date : 2015-03-07
description : Assign ItemID for new items.
**/

CREATE PROCEDURE [dbo].[_AssignItemID]
AS
SET NOCOUNT ON;
SET XACT_ABORT ON;

DECLARE @ItemID bigint
    , @ItemSerial bigint;

/**_# Rollback and return if inside an uncommittable transaction.*/
IF XACT_STATE() = -1
BEGIN
    GOTO ErrorHandler;
END

BEGIN TRY
    /**_# Get first available ItemID.*/
    SELECT TOP 1 @ItemID = ItemID
    FROM SRO_VT_SHARD.dbo._ItemPool WITH (UPDLOCK READPAST)
    WHERE InUse = 0

    /**_# Get latest item serial number.*/
    UPDATE SRO_VT_SHARD.dbo._LatestItemSerial
    SET LatestItemSerial += 1

    SELECT @ItemSerial = LatestItemSerial
    FROM SRO_VT_SHARD.dbo._LatestItemSerial WITH (UPDLOCK)

    IF @ItemID IS NULL OR @ItemID = 0
    BEGIN
        /**_# Insert empty item design.*/
        INSERT INTO SRO_VT_SHARD.dbo._Items (RefItemID, OptLevel, Data, MagParamNum, Serial64)
        VALUES (0, 0, 0, 0, @ItemSerial)

        SET @ItemID = SCOPE_IDENTITY()

        INSERT INTO SRO_VT_SHARD.dbo._ItemPool (ItemID, InUse)
        VALUES (@ItemID, 1)
    END
    ELSE
    BEGIN
        /**_# Reset existing item data.*/
        UPDATE SRO_VT_SHARD.dbo._Items
        SET RefItemID = 0
            , OptLevel = 0
            , Variance = 0
            , Data = 0
            , MagParamNum = 0
            , CreaterName = NULL
            , Serial64 = @ItemSerial
        WHERE ID64 = @ItemID

        UPDATE SRO_VT_SHARD.dbo._ItemPool
        SET InUse = 1
        WHERE ItemID = @ItemID
    
        /**_# Remove item from table dbo._BindingOptionWithItem.*/
        IF EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._BindingOptionWithItem WITH (NOLOCK) WHERE nItemDBID = @ItemID)
            DELETE FROM SRO_VT_SHARD.dbo._BindingOptionWithItem
            WHERE nItemDBID = @ItemID

        /**_# Remove item from table dbo._RentItemInfo.*/
        IF EXISTS (SELECT * FROM SRO_VT_SHARD.dbo._RentItemInfo WITH (NOLOCK) WHERE nItemDBID = @ItemID)
            DELETE FROM SRO_VT_SHARD.dbo._RentItemInfo
            WHERE nItemDBID = @ItemID
    END
END TRY
BEGIN CATCH
    GOTO ErrorHandler;
END CATCH;

RETURN @ItemID

ErrorHandler:
IF XACT_STATE() <> 0
    ROLLBACK TRANSACTION;

RETURN 0
GO
i see u use _STRG_ALLOC_ITEM_NoTX i rewrote this procedure maybe its usefull for you


Syloxx is offline  
Thanks
3 Users
Old 03/10/2015, 16:01   #5
 
elite*gold: 100
Join Date: Sep 2009
Posts: 698
Received Thanks: 146
Thanks (Y)
Hamza FiGo is offline  
Old 03/13/2015, 01:08   #6


 
elite*gold: 907
Join Date: Jan 2015
Posts: 791
Received Thanks: 237
Nice very useful
TheRunner is offline  
Old 03/13/2015, 01:28   #7
 
elite*gold: 0
Join Date: Oct 2012
Posts: 137
Received Thanks: 109
Quote:
Originally Posted by TheRunner View Post
Nice very useful
So Press Thanks
geomangy is offline  
Old 03/13/2015, 08:47   #8
 
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,187
Quote:
Originally Posted by geomangy View Post
So Press Thanks
nah he just spamming
Crue* is offline  
Thanks
4 Users
Old 03/13/2015, 17:51   #9
 
elite*gold: 480
Join Date: Jan 2012
Posts: 654
Received Thanks: 575
thanks geomangy and Syloxx.
Justin1337* is offline  
Thanks
1 User
Old 03/13/2015, 20:34   #10


 
elite*gold: 907
Join Date: Jan 2015
Posts: 791
Received Thanks: 237
Quote:
Originally Posted by geomangy View Post
So Press Thanks
Sure

Quote:
Originally Posted by Crue* View Post
nah he just spamming
why i need spamming ?
TheRunner is offline  
Thanks
1 User
Old 03/13/2015, 21:43   #11
 
elite*gold: 0
Join Date: Mar 2015
Posts: 24
Received Thanks: 1
I have a question, how long did it take you to make this?
Muracuja is offline  
Old 03/13/2015, 22:30   #12
 
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,187
Quote:
Originally Posted by Muracuja View Post
I have a question, how long did it take you to make this?
enough posts for today ?
Crue* is offline  
Thanks
1 User
Old 03/14/2015, 23:27   #13
 
elite*gold: 0
Join Date: Oct 2012
Posts: 137
Received Thanks: 109
Quote:
Originally Posted by Justin1337* View Post
thanks geomangy and Syloxx.
Ty

Quote:
Originally Posted by Muracuja View Post
I have a question, how long did it take you to make this?
About 10 Min Include The Test.
geomangy is offline  
Thanks
1 User
Old 03/18/2015, 04:04   #14
 
elite*gold: 0
Join Date: Nov 2011
Posts: 353
Received Thanks: 198
nice ****
bestprem is offline  
Thanks
1 User
Old 03/18/2015, 07:32   #15
 
elite*gold: 200
Join Date: Apr 2013
Posts: 118
Received Thanks: 54
awesome , keep it up geomangy!


Herokan* is offline  
Thanks
1 User
Reply



« [Release] JSRO SL Files / DB / Client ! | every thing about mbot /tutorial / new download links »

Similar Threads
[RELEASE] Dead, spawn and create char. coordinates
03/09/2014 - Metin2 PServer Guides & Strategies - 25 Replies
Hello com! Today I wanna share with you this one never published ;) g_create_map: -- Map Spawn 00 00 00 00 01 00 00 00 15 00 00 00 29 00 00 00
Can i wear mixed Avatar items?
02/13/2012 - SRO Ask the Experts - 3 Replies
Hi, I'd like to know can i wear mixed Avatar items...example: devil wings dress, noble hat, arabian accesory? By the way how people get permanent devil or angel wings avatars when there are no permanent devil wings dress at item mall...only noble...
[Release] CoEmu v2 Client Create Char Fix
11/28/2009 - CO2 PServer Guides & Releases - 5 Replies
Im not sure if this had been released yet i didnt find anything when i searched so here it is. This will fix the bug when u make a char and get the "Characted created! Please hit back twice and then re-log in to the game!" message. It will now...
[QUESTION]Is There Any Way That I Can Edit My PK2 to Wear The New ECSRO Avatar?~!
09/22/2009 - SRO PServer - Discussions / Questions - 6 Replies
I Mean Like Wearing The Ninja Or Pirate Dress Without Buying Them from ECSRO PK2 Edit I Mean Plz Don't Turn This Into Spam Thread THX



All times are GMT +2. The time now is 07:05.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.