An good text editor (for example: NotPad++) or your sql query and check all variables (alter to bag and inventory) and replace by wharehouse (stored table)
PS: the first slot of whare house is a slot 0 (for the inventory the first slot is 1)
An good text editor (for example: NotPad++) or your sql query and check all variables (alter to bag and inventory) and replace by wharehouse (stored table)
PS: the first slot of whare house is a slot 0 (for the inventory the first slot is 1)
UserStoredItems (warehouse) has only one column defining the location of an item, [Slot], and the first slot is 0.
CharItems (inventory) has 2 columns defining the location of an item, [Bag] and [Slot]. Bag = 0 stands for the equipped items, followed by the 5 inventory bags. Every bag starts with Slot = 0.
@SkullCandy: i think it should a little edit for enchant Weapon or Armor level 0 because Weapon enchant value is 00 -> 01 but Armor enchant value is 00 -> 51 to take effect.
Quote:
USE [PS_GameData]
GO
/****** Object: Trigger [dbo].[GM_Enchant] Script Date: 7/2/2015 2:44:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[GM_Enchant]
ON [dbo].[CharQuests]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
DECLARE @QuestID INT = (SELECT QuestID FROM INSERTED)
IF(@QuestID = 1970)
BEGIN
DECLARE @CharID INT = (SELECT CharID FROM inserted)
DECLARE @UserUID INT = (SELECT UserUID FROM Chars WHERE CharID = @CharID)
DECLARE @ItemType TINYINT
DECLARE @EnchantItemId INT
SET @ItemType = (SELECT Type FROM UserStoredItems WHERE UserUID = @UserUID AND Slot = 0)
SET @EnchantItemId = (SELECT ItemID FROM UserStoredItems WHERE UserUID = @UserUID AND Slot = 1)
-- The perfect lapisia itemid, change it for you needs
INSERT INTO @EnchantItem VALUES (100230),(100001)
-- Add all the gear types you want to use here
INSERT INTO @ArmorTypes VALUES (16),(17),(18),(19),(20),(21),(24),(31),(32),(33), (34),(35),(36),(39)
INSERT INTO @WeaponTypes VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12) ,(13),(14),(15),(45),
(46),(47),(48),(49),(50),(41),(52),(53),(54),(55), (56),(57),(58),(59),(60),(61),(62),(63),(64),(65)
IF ((@ItemType IN (SELECT ArmorTypes FROM @ArmorTypes) OR (@ItemType IN (SELECT WeaponTypes FROM @WeaponTypes))) AND (@EnchantItemID IN (SELECT EnchantID FROM @EnchantItem)))
BEGIN
DECLARE @Enchant TINYINT = (SELECT CAST(SUBSTRING(Craftname, 19, 2) AS TINYINT) FROM UserStoredItems WHERE UserUID = @UserUID AND Slot = 0)
--- max enchant its [10]
IF @Enchant > = 60
GOTO FAIL
ELSE IF @Enchant > = 10 AND @Enchant < 50
GOTO FAIL
SET @Enchant += 1 -- this will increase the enchant by 1
DECLARE @EnchantString CHAR(2) = @Enchant
IF (@ItemType IN (SELECT ArmorTypes FROM @ArmorTypes))
BEGIN
IF LEN(@EnchantString) = 1
SET @EnchantString = '5' + @EnchantString
END
IF (@ItemType IN (SELECT WeaponTypes FROM @WeaponTypes))
BEGIN
IF LEN(@EnchantString) = 1
SET @EnchantString = '0' + @EnchantString
END
UPDATE UserStoredItems
SET Craftname = SUBSTRING(Craftname, 1, 18) + @EnchantString
WHERE UserUID = @UserUID AND Slot = 0
END
ELSE GOTO FAIL
UPDATE UserStoredItems SET [Count] -= 1 WHERE UserUID = @UserUID AND Slot = 1
DELETE FROM UserStoredItems WHERE UserUID = @UserUID AND Slot = 1 AND [Count] = 0
FAIL:
DELETEQUEST:
DELETE FROM CharQuests
WHERE CharID = @CharID AND QuestID = @QuestID
END
END
@SkullCandy: i think it should a little edit for enchant Weapon or Armor level 0 because Weapon enchant value is 00 -> 01 but Armor enchant value is 00 -> 51 to take effect.
this is with quest, i have need without quest, with a item that have 100%
Perfect Enchant Lapisia Game Service 05/26/2015 - Shaiya PServer Guides & Releases - 29 Replies The other day i saw someone asking for a way to make a ingame perfect lapisia in this thread http://www.elitepvpers.com/forum/shaiya-pserver-de velopment/3362049-help-gm-enchant-1-max-18-a.html .
All the credits go to nubness.
I did some tests and everything was working so if you find any bugs make me know.
P.S: if it doesnt work its my fault not his xD
This works on the same concept of this...
[Selling] Shaiya [US/FR/TR/PT/ES ]Ap Items OP/ Perfect Weapon[Armor] Lapisia boxs and more 11/07/2013 - Shaiya Trading - 1 Replies Dear customers,
This is vgolds.com,Shaiya Turkey server in game items hot sales now!Welcome all customers come to our site and have a look,if you need anything you can contact our live chat or you can add our customer service skype:gamesservice!And we also do cooperation with resellers in game,you will have 15% discount for reselling items in game,thanks for your attention!
Shaiya -US- Phoenix
================================================= =========
Caros clientes,
** Este é...
HOW TO MAKE MY CHAR PERFECT? 03/07/2011 - Cabal Private Server - 5 Replies hi 2 all cabaliers, im a beginners, can give me ultra set or anything 4 my char. class WA. TNX