problem with recall Durability & Blue Scroll

01/11/2019 13:44 devdash#1
PHP Code:
IF (@Operation 41) and (@ItemRefID XXXXXXXXX)
Begin 
Update SRO_VT_SHARD
.dbo._Items Set MagParamNum 0MagParam1 NULLMagParam2 NULLMagParam3 NULLMagParam4 NULLMagParam5 NULLMagParam6 NULLMagParam7 NULLMagParam8 NULLMagParam9 NULLMagParam10 NULLMagParam11 NULLMagParam12 NULL  Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_InventoryWhere CharID = [MENTION=395373]Chari[/MENTION]and Slot '13' and ItemID 0
End 

this scroll will remove all the blues and the durability at the same time, i want it to make it two parts, 1 for only durability and leave the blues, and one for the blues and leave the durability, thanks in advance.
01/11/2019 14:33 Royalblade*#2
Got this flying around.
I know you can't use it yourself, but ask your next door professional sro dev to implement the solution in your own style.
HF

Quote:

USE [SRO_VT_ROYAL]
GO
/****** Object: StoredProcedure [dbo].[_RedStatRemover] Script Date: 03/07/2016 10:36:24 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[_RedStatRemover]
@CharID INT

AS

DECLARE @Param1 BIGINT,
@Param2 BIGINT,
@Param3 BIGINT,
@Param4 BIGINT,
@Param5 BIGINT,
@Param6 BIGINT,
@Param7 BIGINT,
@Param8 BIGINT,
@Param9 BIGINT,
@Param10 BIGINT,
@ParamNum TINYINT,
@SQL nvarchar(400),
@RedStat TINYINT,
@ID64 INT;

SELECT @Param1 = magic1.ID ,
@Param2 = magic2.ID ,
@Param3 = magic3.ID ,
@Param4 = magic4.ID ,
@Param5 = magic5.ID ,
@Param6 = magic6.ID ,
@Param7 = magic7.ID ,
@Param8 = magic8.ID ,
@Param9 = magic9.ID ,
@Param10 = magic10.ID,
@ParamNum = items0.MagParamNum,
@ID64 = items0.ID64

FROM SRO_VT_SHARD_INIT.dbo._Inventory AS invent0
INNER JOIN SRO_VT_SHARD_INIT.dbo._Items AS items0 ON invent0.ItemID = items0.ID64 AND (invent0.Slot = 13)
INNER JOIN SRO_VT_SHARD_INIT.dbo._RefObjCommon AS ref0 ON items0.RefItemID = ref0.ID
INNER JOIN SRO_VT_SHARD_INIT.dbo._Char AS chart ON invent0.CharID = chart.CharID
LEFT JOIN _RefMagicOptNew AS magic1 ON (items0.MagParam1 & 2147483647) = magic1.ID
LEFT JOIN _RefMagicOptNew AS magic2 ON (items0.MagParam2 & 2147483647) = magic2.ID
LEFT JOIN _RefMagicOptNew AS magic3 ON (items0.MagParam3 & 2147483647) = magic3.ID
LEFT JOIN _RefMagicOptNew AS magic4 ON (items0.MagParam4 & 2147483647) = magic4.ID
LEFT JOIN _RefMagicOptNew AS magic5 ON (items0.MagParam5 & 2147483647) = magic5.ID
LEFT JOIN _RefMagicOptNew AS magic6 ON (items0.MagParam6 & 2147483647) = magic6.ID
LEFT JOIN _RefMagicOptNew AS magic7 ON (items0.MagParam7 & 2147483647) = magic7.ID
LEFT JOIN _RefMagicOptNew AS magic8 ON (items0.MagParam8 & 2147483647) = magic8.ID
LEFT JOIN _RefMagicOptNew AS magic9 ON (items0.MagParam9 & 2147483647) = magic9.ID
LEFT JOIN _RefMagicOptNew AS magic10 ON (items0.MagParam10 & 2147483647) = magic10.ID
LEFT JOIN _RefMagicOptNew AS magic11 ON (items0.MagParam11 & 2147483647) = magic11.ID
LEFT JOIN _RefMagicOptNew AS magic12 ON (items0.MagParam12 & 2147483647) = magic12.ID

WHERE chart.CharID = @CharID

SET @RedStat = (SELECT CASE WHEN @Param1 BETWEEN 1 AND 4
THEN 1
WHEN @Param2 BETWEEN 1 AND 4
THEN 2
WHEN @Param3 BETWEEN 1 AND 4
THEN 3
WHEN @Param4 BETWEEN 1 AND 4
THEN 4
WHEN @Param5 BETWEEN 1 AND 4
THEN 5
WHEN @Param6 BETWEEN 1 AND 4
THEN 6
WHEN @Param7 BETWEEN 1 AND 4
THEN 7
WHEN @Param8 BETWEEN 1 AND 4
THEN 8
WHEN @Param9 BETWEEN 1 AND 4
THEN 9
WHEN @Param10 BETWEEN 1 AND 4
THEN 10
ELSE NULL
END )


IF @RedStat < @ParamNum
BEGIN
SET @SQL = ' UPDATE SRO_VT_SHARD_INIT.dbo._Items
SET MagParam' + CAST(@RedStat AS nvarchar(2)) + ' = MagParam' + CAST(@ParamNum AS nvarchar(2)) + ',
MagParam' + CAST(@ParamNum AS nvarchar(2)) + ' = MagParam' + CAST(@RedStat AS nvarchar(2)) + ',
MagParamNum -= 1
WHERE ID64 = ' + CAST(@ID64 AS nvarchar(10))

EXEC sp_executeSQL @SQL, N'@RedStat TINYINT, @ParamNum TINYINT, @ID64 INT', @RedStat, @ParamNum, @ID64
RETURN -3
END
ELSE IF @RedStat = @ParamNum
BEGIN
UPDATE SRO_VT_SHARD_INIT.dbo._Items
SET MagParamNum -= 1
WHERE ID64 = @ID64
RETURN -1
END
ELSE
BEGIN
DECLARE @Charname VARCHAR(32) = (SELECT Charname16 FROM SRO_VT_SHARD_INIT.dbo._Char WHERE CharID = @CharID)
INSERT INTO _Notification (TYPE,Target,Content,Executor)
VALUES (4,@Charname, 'Error | Put the Item into Inventory Slot 1 please.',0)
EXEC SRO_VT_SHARD_INIT.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_SKALIDOR_ANAL_FUCK_REDSTAT',1,0
RETURN -2
END

01/11/2019 15:33 devdash#3
Quote:
Originally Posted by Royalblade* View Post
Got this flying around.
I know you can't use it yourself, but ask your next door professional sro dev to implement the solution in your own style.
HF
i learned the english online so its not my thing please explain what do u want to say, and yes i can't use it by my self, i can't even see where should i place my scroll ID
01/11/2019 18:09 #HB#4
Quote:
Originally Posted by alydandy View Post
i can't even see where should i place my scroll ID
There's no need for ItemID. It's by CharID, it's only thing needed tho. He just gave you a rare scroll code.

The procedure basically tries to remove the red stat from the item at the first slot, however if something went wrong, it will tell him and also return him back the scroll with the code "ITEM_SKALIDOR_ANAL_FUCK_REDSTAT". Nice code name BTW.
01/11/2019 18:15 Royalblade*#5
How it works:

The procedure removes the RED stat (durability reduce) from the first item inside the inventory.

You need the table called "_RefMagicOptNew". Try to get it from somewhere, maybe it's very almost the same as "_refMagicOpt" or similar in the shard.

Anyways how it works:

You create a scroll.
Then do something like:

If @[Only registered and activated users can see links. Click Here To Register...] = XX AND @[Only registered and activated users can see links. Click Here To Register...]emID = XX
EXEC _RedStatRemover @[Only registered and activated users can see links. Click Here To Register...]D

And done.

EDIT:
Oh and sorry, the TABS got removed kinda. Click here: [Only registered and activated users can see links. Click Here To Register...]
01/11/2019 18:16 devdash#6
Quote:
Originally Posted by #HB View Post
There's no need for ItemID. It's by CharID, it's only thing needed tho. He just gave you a rare scroll code.

The procedure basically tries to remove the red stat from the item at the first slot, however if something went wrong, it will tell him and also return him back the scroll with the code "ITEM_SKALIDOR_ANAL_FUCK_REDSTAT". Nice code name BTW.
so what do u want to say is all i need to do is create a new scroll with code ITEM_SKALIDOR_ANAL_FUCK_REDSTAT and it will work fine ?with do any link bettween em ?

Quote:
Originally Posted by Royalblade* View Post
How it works:

The procedure removes the RED stat (durability reduce) from the first item inside the inventory.

You need the table called "_RefMagicOptNew". Try to get it from somewhere, maybe it's very almost the same as "_refMagicOpt" or similar in the shard.

Anyways how it works:

You create a scroll.
Then do something like:

If @[Only registered and activated users can see links. Click Here To Register...] = XX AND @[Only registered and activated users can see links. Click Here To Register...]emID = XX
EXEC _RedStatRemover @[Only registered and activated users can see links. Click Here To Register...]D

And done.

EDIT:
Oh and sorry, the TABS got removed kinda. Click here: [Only registered and activated users can see links. Click Here To Register...]
i jsut googled that _RefMagicOptNew
only ur topic pop up...
1 single result..

so i can't get it, can u upload it here please!

or just give me a more simple producer without payback scroll if fail if u dont want to share this one...
01/11/2019 18:26 Royalblade*#7
I dont have the table anymore... Check magicOptions.TXT inside the pk2 maybe?
There should also be a similar table in the shard that you can use.
This is from "Script Date: 03/07/2016 10:36:24".

Lost the table somewhere.
03/21/2019 02:00 devdash#8
thanks for all the answers guys appreciate it <3

topic close please
03/21/2019 12:09 hexagram1#9
Quote:
Originally Posted by alydandy View Post
thanks for all the answers guys appreciate it <3

topic close please
Can you share the correct procedure please? i am looking for kinda the same scroll.
03/21/2019 15:37 devdash#10
Quote:
Originally Posted by hexagram1 View Post
Can you share the correct procedure please? i am looking for kinda the same scroll.
PHP Code:
IF (@Operation 41) and (@ItemRefID XXXXXXXXX
Begin  
Update SRO_VT_SHARD
.dbo._Items Set MagParamNum 0MagParam1 NULLMagParam2 NULLMagParam3 NULLMagParam4 NULLMagParam5 NULLMagParam6 NULLMagParam7 NULLMagParam8 NULLMagParam9 NULLMagParam10 NULLMagParam11 NULLMagParam12 NULL  Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_InventoryWhere CharID ChariD and Slot '13' and ItemID 0)  
End