Hey guys, what's up!?
Well, i'm wondering if can we set to the new chars begin with Seal of Sun clothes inside their lv 0 items!
Also as weapon...
Can someone do this?
Thanks .
Printable View
Hey guys, what's up!?
Well, i'm wondering if can we set to the new chars begin with Seal of Sun clothes inside their lv 0 items!
Also as weapon...
Can someone do this?
Thanks .
So either you change the stats at the DB of the basic items..
OR.. ( More interesting :) shud work theoretically adding the lines to the _AddNewChar procedure)
PHP Code:
Declare
@BasicWCode varchar(max), @Race varchar(max), --@CharName varchar(max),
@WeaponType varchar(max), @Degree varchar(max), @WeaponCodeName varchar(max),
@SOX varchar(max), @Gender varchar(max), @BasicGearCode varchar(max),
@GearType varchar(max), @SuitCodeName varchar(max), @LegsCodeName varchar(max),
@ShoesCodeName varchar(max), @ShieldYN int, @ShieldCodeName varchar(max),
@Plus int;
--SET @CharName = 'Lukhach_HP16' /*Already defined @ Add_New_Char*/
SET @Degree = '01' /*1st Degree on default*/
SET @SOX = 'C' /*SUN*/
SET @Plus = 9 /*e.g.*/
SET @Gender = (
CASE
WHEN (((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) >= 1907) AND ((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) <= 1919))
OR
(((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) >= 14875) AND ((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) <= 14887))
THEN 'M'
WHEN (((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) >= 1920) AND ((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) <= 1932))
OR
(((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) >= 14888) AND ((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) <= 14900))
THEN 'W'
ELSE NULL
END
);
SET @Race = (
CASE
WHEN (((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) >= 1907) AND ((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) <= 1919))
OR
(((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) >= 1920) AND ((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) <= 1932))
THEN 'CH'
WHEN (((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) >= 14875) AND ((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) <= 14887))
OR
(((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) >= 14888) AND ((SELECT RefObjID FROM _Char WHERE CharName16 like @CharName) <= 14900))
THEN 'EU'
ELSE NULL
END
);
SET @BasicWCode =
(
SELECT TOP 1 ref.CodeName128 FROM _RefObjCommon
JOIN _Char as chart on @CharName = chart.CharName16
JOIN _Inventory as invent on chart.CharID = invent.CharID
JOIN _Items as items on invent.ItemID = items.ID64
JOIN _RefObjCommon as ref on items.RefItemID = ref.ID
WHERE invent.Slot = 6 /* = Weapon */ AND chart.CharName16 = @CharName
)
SET @WeaponType =
(
SELECT SUBSTRING(@BasicWCode,PATINDEX('%'+@Race+'%',@BasicWCode)+3,(PATINDEX('%'+@Degree+'%',@BasicWCode)-1)-(PATINDEX('%'+@Race+'%',@BasicWCode)+3))
);
SET @WeaponCodeName = 'ITEM_'+@Race+'_'+@WeaponType+'_'+@Degree+'_'+@SOX+'_'+'RARE'
SET @ShieldYN = 0
IF (@WeaponType = 'SWORD' OR @WeaponType = 'BLADE' OR @WeaponType = 'STAFF' OR @WeaponType = 'DARKSTAFF')
begin
SET @ShieldCodeName = 'ITEM_'+@Race+'_SHIELD_'+@Degree+'_'+@SOX+'_RARE'
SET @ShieldYN = 1
exec _ADD_ITEM_EXTERN @CharName,@ShieldCodeName,1,@Plus
end
SET @BasicGearCode =
(
SELECT TOP 1 ref.CodeName128 FROM _RefObjCommon
JOIN _Char as chart on @CharName = chart.CharName16
JOIN _Inventory as invent on chart.CharID = invent.CharID
JOIN _Items as items on invent.ItemID = items.ID64
JOIN _RefObjCommon as ref on items.RefItemID = ref.ID
WHERE invent.Slot = 1 /* = Suit */ AND chart.CharName16 = @CharName
);
SET @GearType =
(
SELECT SUBSTRING(@BasicGearCode,PATINDEX('%'+@Gender+'%',@BasicGearCode)+2,(PATINDEX('%'+@Degree+'%',@BasicGearCode)-1)-(PATINDEX('%'+@Gender+'%',@BasicGearCode)+2))
);
SET @SuitCodeName = 'ITEM_'+@Race+'_'+@Gender+'_'+@GearType+'_'+@Degree+'_BA_'+@SOX+'_'+'RARE'
SET @LegsCodeName = 'ITEM_'+@Race+'_'+@Gender+'_'+@GearType+'_'+@Degree+'_LA_'+@SOX+'_'+'RARE'
SET @ShoesCodeName = 'ITEM_'+@Race+'_'+@Gender+'_'+@GearType+'_'+@Degree+'_FA_'+@SOX+'_'+'RARE'
exec _ADD_ITEM_EXTERN @CharName,@WeaponCodeName,1,@Plus
exec _ADD_ITEM_EXTERN @CharName,@SuitCodeName,1,@Plus
exec _ADD_ITEM_EXTERN @CharName,@LegsCodeName,1,@Plus
exec _ADD_ITEM_EXTERN @CharName,@ShoesCodeName,1,@Plus
It's incomplete it doesn't yet equip it to the char, that's up to you now since I made already most of the work.
The Sun items are already at the chars inventory, you only need to find the right slot and replace the ItemID with the (quasi the basic stuff changing with the new Sun items at the inventory)..
0 -> Head
1 -> Suit
2 -> Shoulder
3 -> Hands
4 -> Legs
5 -> Shoes
6 -> 1st Weapon Slot
7 -> Shield/Arrows
8 -> Job Item
9 -> Earring
10 -> Necklace
11 -> Ring 1
12 -> Ring 2
..Slots - as you wish.
that's PRETTY easy ^^
that's how it'd work, or shud :)
Maybe isnt equiped to the char because Eur clothes need 1 lv mastery?
yeah ... it wont work for euro's.. just do as jangan did and give each char that logs amount of items as of if the char is male gets all items male ch / if fem and so on .. credits to jangan for that . i can give u the query if uwant
Dun act that unimaginative.. you can set the mastery level already on 1 or whatever the requirements for lvl 1 Sun items are.
+ as mentioned above I didn't write the lines to equip the items yet, it's just about help here not to do all the work
so , how to do this? ,any final answer?