Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Guides & Releases
You last visited: Today at 22:01

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

Advertisement



[RELEASE] Script to send Item to Bankteller

Discussion on [RELEASE] Script to send Item to Bankteller within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
HoaX.'s Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 48
Received Thanks: 263
Lightbulb [RELEASE] Script to send Item to Bankteller

Here a little script made by me to send Items to any Users Bankteller:

All you need to do is editing this four rows:
-- UserID:
-- ItemID:
-- Item Count:
-- Produkt Description (max. 20 char.)

Execute Script. Done.
The User will find his Item in his Bank.

Code:
DECLARE @UserID varchar(18), @UserUID bigint, @ItemID int, @ItemCount tinyint, @OrderNumber int, @BuyDate datetime, @ProductCode varchar(20), @Slot tinyint, @empty smallint

-- ****** SHAIYA SYFY / SHAIYA ALLIANCE / SHAIYA RELOADED  ****** --
-- Send Item to User Bank 
-- By [Dev]HoaX 2011
-- ************************************************************** --

-- ----------- CONFIG  ------------------
-- UserID:
SET @UserID = 'HoaX'

-- ItemID:
SET @ItemID = 

-- Item Count:
SET @ItemCount = 1

-- Produkt Description (max. 20 char.)
SET @ProductCode = ' '

-- --------------------------------------
SET @OrderNumber = 1
SET @BuyDate = GETDATE()

SET @UserUID = (SELECT UserUID FROM PS_UserData.dbo.Users_Master WHERE UserID = @UserID)

SET @Slot = 0
SET @empty = -1

WHILE (@Slot <= 239)
BEGIN 

	SET @empty = (SELECT COUNT(Slot) FROM PS_Billing.dbo.Users_Product WHERE UserUID = @UserUID AND Slot = @Slot)
	
	IF (@empty <= 0) BREAK
	ELSE 	
		SET @Slot = @Slot+1
END

INSERT INTO PS_Billing.dbo.Users_Product 
		(UserUID, Slot, ItemID, ItemCount, ProductCode, OrderNumber, BuyDate)
VALUES (@UserUID, @Slot, @ItemID, @ItemCount, @ProductCode, @OrderNumber, @BuyDate)

PRINT ''
IF @Slot < 239 PRINT 'Used slot: '+CONVERT(varchar(3), @Slot)
IF @Slot = 239 PRINT 'THERE IS NO FREE SLOT ANYMORE (240/240 SLOTS USED)!'
HoaX. is offline  
Thanks
19 Users
Old 01/12/2014, 15:39   #2
 
elite*gold: 0
Join Date: Oct 2005
Posts: 184
Received Thanks: 85
thank for the release!

The items actually show up in the bank teller but it has a problem saving when you take the items out.

I get this in the logs.

Code:
--<begin>2014-01-12 15:32:11,*****,36,****,90

{?=call usp_Save_Char_Info_E(90,80, 711,42, 93,12,9,8,7,15, 52826,23320,29620, 35,18, -1,-319098387, 670.024658,30.149288,258.134735, 0,200,0,0,0, 860,22,13,3)}

EXEC usp_Save_User_StoredMoney_E 1,36,20669442

{?=call usp_Save_Char_Product_Item_E(1,36,0,  90,4060267704303550464, 1,2, 1001,1,1, 1200, 1,'2014-01-12 15:31:55','B')}

{?=call usp_Save_Char_Product_Item_E(1,36,1,  90,4060267691418714112, 1,1, 1001,1,1, 1200, 1,'2014-01-12 15:31:53','B')}

{?=call Usp_Save_Char_Item_Mod_E(90,3979319274559832064, 0,5, 1200, 0,0,0,0,0,0,'20000020001600000000',1)}

{?=call Usp_Save_Char_Item_Mod_E(90,4060267704303550464, 1,2, 1200, 0,0,0,0,0,0,'00000000000000000000',1)}

{?=call Usp_Save_Char_Skill_Mod_E(90,1,7,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,341,4,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,5,7,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,7,7,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,8,6,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,9,6,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,10,6,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,118,3,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,112,3,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,171,4,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,174,2,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,87,3,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,24,3,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,73,4,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,58,5,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,39,5,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,32,5,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,4,3,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,3,3,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,20,2,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,56,2,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,40,5,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,156,4,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,38,6,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,18,3,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,192,1,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,157,3,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,151,4,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,180,1,0)}

{?=call Usp_Save_Char_Skill_Mod_E(90,342,6,0)}

{?=call Usp_Save_Char_ApplySkill_Del_E(90,0,0,1)}

{?=call Usp_Save_Char_ApplySkill_Add_E2(90,228,1,9)}

EXEC usp_Save_Char_QuickSlot_Del_E 90

EXEC usp_Save_Char_QuickSlot_Add_E 90,0,0,100,39

EXEC usp_Save_Char_QuickSlot_Add_E 90,0,1,100,40

EXEC usp_Save_Char_QuickSlot_Add_E 90,0,5,100,156

EXEC usp_Save_Char_QuickSlot_Add_E 90,0,9,100,118

EXEC usp_Save_Char_QuickSlot_Add_E 90,1,0,100,341

EXEC usp_Save_Char_QuickSlot_Add_E 90,1,2,100,156

EXEC usp_Save_Char_QuickSlot_Add_E 90,1,9,101,4

--<end>2014-01-12 15:32:11,****,36,*****,90
the ** is my userid and charname i rather not write


edit: fixed it. The problem was in [dbo].[usp_Save_Char_Product_Item_E]
Psycnosis is offline  
Thanks
2 Users
Old 01/18/2014, 03:37   #3
 
[GM]Heisenberg's Avatar
 
elite*gold: 0
Join Date: Jan 2014
Posts: 17
Received Thanks: 5
Thank you for share this script !
[GM]Heisenberg is offline  
Thanks
1 User
Old 01/30/2014, 00:39   #4
 
HoaX.'s Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 48
Received Thanks: 263
Fix for Bank

Quote:
Originally Posted by Psycnosis View Post
thank for the release!

The items actually show up in the bank teller but it has a problem saving when you take the items out.

I get this in the logs.


the ** is my userid and charname i rather not write
That should get your Bank working:

--> USE PS_GameData Database
Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER OFF
GO
-- ************************************************************** --
--
-- Bank FIX by [Dev]HoaX 2011
-- ************************************************************** --

ALTER Proc [dbo].[usp_Save_Char_Product_Item_E]

@ServerID tinyint,
@UserUID int,
@BankSlot tinyint,

@CharID int,
@ItemUID bigint,
@Bag tinyint,
@Slot tinyint,
@ItemID int,
@Type tinyint,
@TypeID tinyint,
@Quality smallint,	--int
@Gem1 tinyint,
@Gem2 tinyint,
@Gem3 tinyint,
@Gem4 tinyint,
@Gem5 tinyint,
@Gem6 tinyint,
@Craftname varchar(20) = '', 
@Count tinyint,
@Maketime datetime,
@Maketype varchar(1)

AS

SET XACT_ABORT ON

DECLARE @ProductCode varchar(20)
DECLARE @OrderNumber int
DECLARE @VerifyCode bigint
DECLARE @BuyDate datetime

IF(@Quality >= 5000)
BEGIN
	SET @Quality=0
END

BEGIN DISTRIBUTED TRANSACTION


INSERT INTO CharItems(CharID,Bag,Slot,ItemID,Type,TypeID,ItemUID,Quality,Gem1,Gem2,Gem3,Gem4, 
Gem5,Gem6,CraftName,[Count],Maketime,Maketype)
VALUES(@CharID,@Bag,@Slot,@ItemID,@Type,@TypeID,@ItemUID,@Quality,@Gem1,@Gem2,@Gem3,@Gem4, 
@Gem5,@Gem6,@Craftname,@Count,@Maketime,@Maketype)


SELECT @ProductCode=ProductCode,@OrderNumber=OrderNumber,@VerifyCode=VerifyCode,@BuyDate=BuyDate
-- Old: FROM PS_USERDB01.PS_Billing.dbo.Users_Product 
FROM PS_Billing.dbo.Users_Product 
WHERE UserUID=@UserUID AND Slot=@BankSlot

INSERT INTO ProductLog(ServerID,UserUID,CharID,ItemID,ItemUID,Quality,ItemCount,ProductCode,OrderNumber,VerifyCode,BuyDate,ReceiveDate)
VALUES(@ServerID,@UserUID,@CharID,@ItemID,@ItemUID,@Quality,@Count,@ProductCode,@OrderNumber,@VerifyCode,@BuyDate,@Maketime)


-- Old: DELETE FROM PS_USERDB01.PS_Billing.dbo.Users_Product WHERE UserUID=@UserUID AND Slot=@BankSlot

DELETE FROM PS_Billing.dbo.Users_Product WHERE UserUID=@UserUID AND Slot=@BankSlot

IF( @@ERROR=0 AND @@ROWCOUNT=1)
BEGIN
	COMMIT TRAN
	RETURN 1
END
ELSE
BEGIN
	ROLLBACK TRAN
	RETURN -1
END


SET XACT_ABORT OFF
HoaX. is offline  
Thanks
2 Users
Old 01/30/2014, 11:49   #5
 
elite*gold: LOCKED
Join Date: Oct 2013
Posts: 3,414
Received Thanks: 1,844
#Added to Index!
Stureplan is offline  
Thanks
1 User
Old 01/30/2014, 19:00   #6
 
elite*gold: 0
Join Date: Aug 2011
Posts: 41
Received Thanks: 14
Wenn ich den Fix für die Bank via SQL einspiele kommt immer folgender fehler

Aber die prozedur ist bei mir ja vorhanden O.o
h3adsh00ter is offline  
Old 02/05/2014, 16:18   #7
 
HoaX.'s Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 48
Received Thanks: 263
Quote:
Originally Posted by h3adsh00ter View Post
Wenn ich den Fix für die Bank via SQL einspiele kommt immer folgender fehler

Aber die prozedur ist bei mir ja vorhanden O.o

--> USE PS_GameData Database
HoaX. is offline  
Old 02/04/2019, 21:26   #8
 
igordolv's Avatar
 
elite*gold: 0
Join Date: Oct 2015
Posts: 24
Received Thanks: 2
Quote:
Originally Posted by HoaX. View Post
--> USE PS_GameData Database
Hi, it works yet? where I put that escrypt to run on my server!
igordolv is offline  
Old 02/04/2019, 21:55   #9
 
elite*gold: 0
Join Date: Mar 2018
Posts: 251
Received Thanks: 104
Thumbs up hi

Quote:
Originally Posted by igordolv View Post
Hi, it works yet? where I put that escrypt to run on my server!
yes it work ...
[DEV]Wan is offline  
Old 02/04/2019, 23:36   #10
 
elite*gold: 0
Join Date: Jun 2014
Posts: 134
Received Thanks: 124
Quote:
Originally Posted by igordolv View Post
Hi, it works yet? where I put that escrypt to run on my server!
start automatic MSDTC in services too for fix.
perlisson is offline  
Old 02/05/2019, 07:25   #11
 
igordolv's Avatar
 
elite*gold: 0
Join Date: Oct 2015
Posts: 24
Received Thanks: 2
Quote:
Originally Posted by perlisson View Post
start automatic MSDTC in services too for fix.
what is the name of the file that I have to execute inside this cod. Thank you

I'm starting to study Shaiya's tutorials to make a shaiya for me! I played shaiya 9 years and never got interested in creating. I see many Shaiya proved bad.

Quote:
Originally Posted by [DEV]Wan View Post
yes it work ...
Thank you my friend.
I'm starting to study Shaiya's tutorials to make a shaiya for me! I played shaiya 9 years and never got interested in creating. I see many Shaiya bad.
igordolv is offline  
Reply

Tags
bank, bankteller, buy, item, send


Similar Threads Similar Threads
[Help] Item Send Script
06/24/2011 - Flyff Private Server - 4 Replies
Hallo Leute, Ich hab ein kleines Problem mit einer HP, da in v15 die Prozedur dbo.usp_ProvideItem_Bill in der CHARACTER_01_DBF nicht geht. Ich hab hier den Befehl in der PHP Datei odbc_exec($connect, "EXEC CHARACTER_01_DBF.dbo.usp_ProvideItem_Bill '$idofchar', '$serverindex', '$tid', '$count'"); Die eigentlichen ODBC Funktionen gehen, wie z.B. den cash wert um 200 runter zu setzten.
[Release]Item send Skript [PHP]
08/17/2010 - Flyff PServer Guides & Releases - 0 Replies
Hallo Elitepvpers Ich release heute nur kurz das Item Send Skript (gefunden auf Rage-ZoNe). Damit kannst du sofort einem Character das Item zuweisen ;). Folgendes Kannst du dort einstellen : -Zu welchem Char (Char Name) -Item Betrag -Item Name (Er muss exakt sein/oder Item ID) -Item Element -Element Upgrade Level -Item upgrade Level



All times are GMT +1. The time now is 22:02.


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.