Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server
You last visited: Today at 12:40

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

Advertisement



Auto Enchant only for Leg

Discussion on Auto Enchant only for Leg within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1
 
st.jimmy998's Avatar
 
elite*gold: 0
Join Date: Jan 2013
Posts: 343
Received Thanks: 137
Auto Enchant only for Leg

Can help me with this? I want to Enchant +10 only Leg Weps and Armor, and this scripts Enchant everything inside the Inventary, there is any way to do it?


Code:
USE [PS_GameData]
GO
/****** Object:  Trigger [dbo].[Auto_Enchant]    Script Date: 6/16/2015 1:11:16 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE TRIGGER [dbo].[Auto_Enchant]
ON [dbo].[UserStoredItems]
AFTER INSERT
AS 
BEGIN
SET NOCOUNT ON;

DECLARE @UserUID INT
DECLARE @Slot INT 
DECLARE @Types TINYINT 
DECLARE @CraftName VARCHAR(20)
DECLARE @Enchant NVARCHAR(2)
DECLARE @Rolls VARCHAR(18)

SET @UserUID = (SELECT UserUID FROM inserted)
SET @Slot = (SELECT Slot FROM inserted)
SET @Types = (SELECT [Type] FROM inserted)
SET @CraftName = (SELECT Craftname FROM inserted)
SET @Enchant = (SELECT SUBSTRING(Craftname, 19, 2) FROM inserted)
SET @Rolls = (SELECT CAST(SUBSTRING(Craftname, 1, 18) AS NVARCHAR)FROM inserted)

IF @Types IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19,31,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,69,84) and @CraftName = ''
BEGIN
UPDATE UserStoredItems
SET CRAFTNAME = 00000000000000000000
WHERE UserUID = @UserUID AND Slot = @Slot
END

IF @Types IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,69,84)
AND @Enchant < 20
BEGIN
SET @Enchant = 20
UPDATE UserStoredItems
SET CRAFTNAME = @Rolls + @Enchant
WHERE UserUID = @UserUID AND Slot = @Slot
END
ELSE IF @Types IN (16,17,18,19,20,21,67,68,70,71,31,32,33,34,35,36,82,83,85,86,24,39) 
AND @Enchant < 70
BEGIN
SET @Enchant = 70
UPDATE UserStoredItems
SET CRAFTNAME = @Rolls + @Enchant
WHERE UserUID = @UserUID AND Slot = @Slot
END

	END
Code:
USE [PS_GameData]
GO
/****** Object:  StoredProcedure [dbo].[usp_Save_Char_Item_Add_E]    Script Date: 6/16/2015 2:15:02 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO


/****** 개체: 저장 프로시저 dbo.usp_Save_Char_Item_Add_E ******/


ALTER Proc [dbo].[usp_Save_Char_Item_Add_E]

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

AS
DECLARE @Maketime as datetime
SELECT @Maketime = CONVERT(datetime, @MaketimeZ, 120)
--SET NOCOUNT ON

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

-- AUTO ENCHANT BY: ALCATRAZ-------------------------------------------------------------------------------------------------------------------------------
DECLARE @Enchant NVARCHAR(2)
DECLARE @Rolls VARCHAR(18) 

SET @Enchant = (SELECT SUBSTRING(@Craftname, 19, 2))
SET @Rolls = (SELECT CAST(SUBSTRING(@Craftname, 1, 18) AS NVARCHAR))

IF @Type IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19,31,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,69,84) and @CraftName = ''
BEGIN
SET @Craftname = 00000000000000000000
END

IF @Type IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,69,84)
AND @Enchant < 20
BEGIN
SET @Enchant = 20
SET @CRAFTNAME = @Rolls + @Enchant
END
ELSE IF @Type IN (16,17,18,19,20,21,67,68,70,71,31,32,33,34,35,36,82,83,85,86,24,39) 
AND @Enchant < 70
BEGIN
SET @Enchant = 70
SET @CRAFTNAME = @Rolls + @Enchant
END
-- AUTO ENCHANT END----------------------------------------------------------------------------------------------------

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)

IF(@@ERROR = 0)
BEGIN
RETURN 1
END
ELSE
BEGIN
RETURN -1
END
st.jimmy998 is offline  
Old 02/08/2016, 01:02   #2
 
elite*gold: 0
Join Date: Jul 2012
Posts: 312
Received Thanks: 285
Code:
IF @Type IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,69,84) AND @TypeID IN (1,2) 
AND @Enchant < 20
Dont know if its working but you can try something like this. Add all the weapons and armors you want to enchant @TypeID IN (here).
EDIT:
Way easyer to do as JuuF suggested.
Code:
IF @Type IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,69,84) AND (SELECT Slot FROM PS_GameDefs.dbo.Items WHERE ItemID = @ItemID) = 5
andr3y_you96 is offline  
Thanks
1 User
Old 02/08/2016, 16:33   #3
 
elite*gold: 50
Join Date: Sep 2011
Posts: 408
Received Thanks: 1,262
Or simply add a check to Slot column, if the value in slot column is equal to 5 execute the enchant function.
JuuF is offline  
Thanks
4 Users
Reply


Similar Threads Similar Threads
WTB Auto Enchant Bot
05/16/2015 - S4 League Trading - 8 Replies
Hallo, Ich bin auf der Suche nach 'nem bot, der automatisch mp filler kauft und bis zu einem gewuenschten Punkt enchantet (zB +4 Td Def) Bitte melden, falls jmd so etwas besitzt haha Mit freundlich Gruessen
[Auto Enchant Issue ]
07/24/2014 - Shaiya Private Server - 8 Replies
Hello Iv been using auto enchater reroller for long time now , and have worked evrywhere exept one server that i wont mention the name , simply when i open the Injector , and press INJECT , nothing happens at all , like if i never done anything , and enchantin' and rerollin normaly is kinda pissy so please if u know how can i solve this , feel free to post here. Cheers
[HILFE]Auto Enchant mit SPE
06/01/2011 - Shaiya - 1 Replies
Hey, kann mir mal jemand verraten wie ich mit den Shaiya Packet Editor, automatisch Enchanten kann? ich weiЯ zu 1000% das es geht.. nur wie??
L2 Phx Auto Enchant Script Help!
03/17/2011 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 0 Replies
Hi guys, well ill explain my problem. i wanna use this script //Автоматизация заточки предметов до необходимого уровня by NLObP //version 0.3 от 23.06.2008г. program Enchant; {************************************************ ******************************** Возможности скрипта: -------------------- 0.1 + Панель управления; + Затачиваем по очереди все предметы с ItemID пока не переломаем
Auto enchant?
05/29/2007 - Lineage 2 - 7 Replies
Hello atm im playing on a interlude private server(l2-darkkingdom.de). on the pvp/pk server they have save enchant 21 at weps and 31 at armor. now its very boring to enchant 12 items to +31 ^^ coze i want very high enchanted items (hihi) is there a way to auto-enchant it up to 31? best regards Darkdome



All times are GMT +2. The time now is 12:40.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.