Register for your free account! | Forgot your password?

You last visited: Today at 03:31

  • 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: 108
[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 You must register and activate your account in order to view images. button if i helped.



geomangy is offline  
Thanks
8 Users
Old   #2
Chat Killer In Duty

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


PortalDark is offline  
Thanks
1 User
Old   #3
 
elite*gold: 0
Join Date: Nov 2014
Posts: 4
Received Thanks: 0
GooD
mostafa shaaban is offline  
Old   #4
 
elite*gold: 6
Join Date: Oct 2013
Posts: 1,110
Received Thanks: 585
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   #5
 
elite*gold: 100
Join Date: Sep 2009
Posts: 674
Received Thanks: 133
Thanks (Y)
Hamza FiGo is offline  
Old   #6

 
elite*gold: 363
Join Date: Jan 2015
Posts: 778
Received Thanks: 234
Nice very useful
TheRunner is offline  
Old   #7
 
elite*gold: 0
Join Date: Oct 2012
Posts: 137
Received Thanks: 108
Quote:
Originally Posted by TheRunner View Post
Nice very useful
So Press Thanks
geomangy is offline  
Old   #8
 
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,186
Quote:
Originally Posted by geomangy View Post
So Press Thanks
nah he just spamming
Crue* is offline  
Thanks
4 Users
Old   #9
 
elite*gold: 480
Join Date: Jan 2012
Posts: 654
Received Thanks: 574
thanks geomangy and Syloxx.
Justin1337* is offline  
Thanks
1 User
Old   #10

 
elite*gold: 363
Join Date: Jan 2015
Posts: 778
Received Thanks: 234
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   #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   #12
 
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,186
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   #13
 
elite*gold: 0
Join Date: Oct 2012
Posts: 137
Received Thanks: 108
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   #14
 
elite*gold: 0
Join Date: Nov 2011
Posts: 353
Received Thanks: 195
nice ****
bestprem is offline  
Thanks
1 User
Old   #15
 
elite*gold: 200
Join Date: Apr 2013
Posts: 118
Received Thanks: 53
awesome , keep it up geomangy!


Herokan* is offline  
Thanks
1 User
Reply



« Previous Thread | Next Thread »

Similar Threads
[RELEASE] Dead, spawn and create char. coordinates
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...
25 Replies - Metin2 PServer Guides & Strategies
Can i wear mixed Avatar items?
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...
3 Replies - SRO Ask the Experts
[Release] CoEmu v2 Client Create Char Fix
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...
5 Replies - CO2 PServer Guides & Releases
[QUESTION]Is There Any Way That I Can Edit My PK2 to Wear The New ECSRO Avatar?~!
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
6 Replies - SRO PServer - Discussions / Questions



All times are GMT +1. The time now is 03:31.


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

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