|
You last visited: Today at 19:07
Advertisement
Model Switcher
Discussion on Model Switcher within the SRO PServer Questions & Answers forum part of the SRO Private Server category.
02/19/2017, 14:39
|
#1
|
elite*gold: 0
Join Date: Jul 2015
Posts: 134
Received Thanks: 15
|
Model Switcher
hello
can anyone help me or give me a link to how to make Model Switcher for weapons in vSro ?
i read other treads but all buggy or missing codes and lines
Thank you
Peace
|
|
|
02/22/2017, 22:24
|
#2
|
elite*gold: 0
Join Date: Mar 2010
Posts: 101
Received Thanks: 14
|
Try this its working well with me but after some edits
Notice: Its not my work
Quote:
refobjCommon
1 125892 ITEM_ROVER_CHANGE_WEAPON_STYLE ???????????(???) xxx SN_ITEM_ROVER_CHANGE_WEAPON_APVP1 SN_ITEM_ROVER_CHANGE_WEAPON_APVP1_TT_DESC 1 0 3 3 13 14 180000 3 0 1 1 1 255 0 1 0 0 129 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr JOBium\etc\JOB.ddj xxx xxx 2236414
refobjItem
2236414 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 ????(?) 1 [USU1:SKILL_MALL_JOB] -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 0 0 0
Create New Procedure --_NOVA_SWITCHER
----------------------
AS
BEGIN
--//---------------------------------------------------------------
DECLARE @INVSIZE TINYINT,
@Top1Wep int,
@OldItm int
Set @InvSize = (select InventorySize from sro_vt_shard.._char where charid = @charid)
set @Top1Wep = (select top 1 inv.itemid from sro_vt_shard.._inventory inv inner join sro_vt_shard.._items itm on inv.itemid = itm.id64
where itm.refitemid in (select ItemID from _ModelSwitcher) and itm.serial64 > 0 and inv.itemid <> 0 and inv.slot between 13 and @InvSize and inv.charid = @charid )
Set @OldItm = (select top 1 refitemid from sro_vt_shard.._items where id64 <> 0 and id64 = @Top1Wep and serial64 > 0)
if @Top1Wep > 0
Begin
Declare @NewItm int = case
When @olditm in (select ItemID from _ModelSwitcher)
then (select top 1 Newitemid from _ModelSwitcher where ItemID = @olditm )
end /* will destroy any item that he tries to switch if he dont have required items */
update sro_vt_shard.._items set RefItemID = @NewItm where RefItemID = @OldItm and ID64 = @Top1Wep and Serial64 > 0
End
END
GO
Create Table
-------------
USE [SRO_VT_SHARDLOG]
GO
/****** Object: Table [dbo].[_ModelSwitcher] Script Date: 6/6/2015 2:43:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[_ModelSwitcher](
[ItemID] [int] NOT NULL,
[ItemCode] [varchar](max) NOT NULL,
[NewitemID] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
_AddLogItem > SRO_VT_SHARDLOG
-----------------------------
if (@ItemRefID = 125892)
BEGIN
EXEC SRO_VT_SHARDLOG.dbo._NOVA_SWITCHER @CharID
END
|
DONT FORGET TO EDIT SPACES
|
|
|
02/24/2017, 14:58
|
#3
|
elite*gold: 0
Join Date: Jul 2015
Posts: 134
Received Thanks: 15
|
Thank you but what should i edit to make it work ?
|
|
|
02/25/2017, 15:46
|
#4
|
elite*gold: 0
Join Date: Jan 2009
Posts: 944
Received Thanks: 404
|
I saw many ppl are asking about model switch procedure , here is my way:
First create the scroll
RefObjCommon line:
1 42875 ITEM_MALL_MODEL_SWITCH_SCROLL_13D ????? (????) xxx SN_ITEM_MALL_MODEL_SWITCH_SCROLL SN_ITEM_MALL_MODEL_SWITCH_SCROLL_TT_DESC 0 0 3 3 3 1 180000 3 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr item\etc\modelswitch_scroll.ddj xxx xxx 21577
RefObjItem line:
21577 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 ???? 1 ?????? -1 RESURRECT 1000 COOLTIME:0x00000000 -1 xxx -1 xxx -1 xxx -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0
To change the model , I just copied the refobjcommon and refobjitem of the item which I wanted to change the skin and I created a new item
RefObjCommon line :
1 42876 ITEM_CH_TBLADE_11_SET_B_RARE_SKIN_13D ??_?? xxx SN_ITEM_CH_TBLADE_11_SET_B SN_ITEM_CH_TBLADE_11_SET_B_TT_DESC 0 0 3 1 6 5 180000 0 6 1 1 1 255 3 1 1 1 0 0 12540000 5698 8548 0 9000 4389000 1 101 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 item\etc\weapon\tblade_13.bsr item\etc\drop_ch_equip_rare.bsr item\china\weapon\tblade_13.ddj xxx xxx 21578
RefObjItem line:
21578 1 2 0 0 31 40 95 116 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 18 2742 2902 3351 3546 68,2 3071 3250 3656 3869 100,4 2984 3105 3647 3795 4456 4636 5305 5520 123 259 0 4 16 1 ITEM_CH_TBLADE_12_A_RARE 1 ITEM_CH_TBLADE_12_B_RARE 1 ITEM_CH_TBLADE_12_C_RARE -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 3 ?? ??? ?? ?? ? 9 0 0
and changed the .bsr and ddj path
item\etc\weapon\tblade_13.bsr item\etc\drop_ch_equip_rare.bsr item\china\weapon\tblade_13.ddj
without creating any aditional table.
Now the upgrade procedure:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_ModelSwitch] Script Date: 25.02.2017 16:41:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[_ModelSwitch13D]
@ D Int
As
-- Declare expression.
Declare @ Name Varchar(60) = 'Leo' , -- Creater Name
@ lot INT = 13 ,
-- Use This Query to get each item ID by Codename128
-- Select ID From [SRO_VT_SHARD].[dbo].[_RefObjCommon] Where CodeName128 Like 'Item Code Name'
@ CH_TBLADE_ID int = 25672 , @ CH_TBLADE_ID int = 42876, --ch tblade
--------------------------------------------------------------------------------------------
-- Start Upgrade system :
-- CH Weapons Upgrade.
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @ CH_TBLADE_ID , CreaterName = @ Name Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @ D and Slot = @ lot and ItemID> 0) and RefItemID = @ CH_TBLADE_ID
GO
then add this querry to bottom of your
_AddLogItem querry:
IF (@ItemRefID = 42875) -- RefObjCommon ID
Begin
Execute [SRO_VT_SHARDLOG].[dbo].[_ModelSwitch] @ D
End
End
|
|
|
02/26/2017, 15:23
|
#5
|
elite*gold: 0
Join Date: Jul 2015
Posts: 134
Received Thanks: 15
|
Quote:
Originally Posted by leo2111
I saw many ppl are asking about model switch procedure , here is my way:
First create the scroll
RefObjCommon line:
1 42875 ITEM_MALL_MODEL_SWITCH_SCROLL_13D ????? (????) xxx SN_ITEM_MALL_MODEL_SWITCH_SCROLL SN_ITEM_MALL_MODEL_SWITCH_SCROLL_TT_DESC 0 0 3 3 3 1 180000 3 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr item\etc\modelswitch_scroll.ddj xxx xxx 21577
RefObjItem line:
21577 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 ???? 1 ?????? -1 RESURRECT 1000 COOLTIME:0x00000000 -1 xxx -1 xxx -1 xxx -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0
To change the model , I just copied the refobjcommon and refobjitem of the item which I wanted to change the skin and I created a new item
RefObjCommon line :
1 42876 ITEM_CH_TBLADE_11_SET_B_RARE_SKIN_13D ??_?? xxx SN_ITEM_CH_TBLADE_11_SET_B SN_ITEM_CH_TBLADE_11_SET_B_TT_DESC 0 0 3 1 6 5 180000 0 6 1 1 1 255 3 1 1 1 0 0 12540000 5698 8548 0 9000 4389000 1 101 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 item\etc\weapon\tblade_13.bsr item\etc\drop_ch_equip_rare.bsr item\china\weapon\tblade_13.ddj xxx xxx 21578
RefObjItem line:
21578 1 2 0 0 31 40 95 116 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 18 2742 2902 3351 3546 68,2 3071 3250 3656 3869 100,4 2984 3105 3647 3795 4456 4636 5305 5520 123 259 0 4 16 1 ITEM_CH_TBLADE_12_A_RARE 1 ITEM_CH_TBLADE_12_B_RARE 1 ITEM_CH_TBLADE_12_C_RARE -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 3 ?? ??? ?? ?? ? 9 0 0
and changed the .bsr and ddj path
item\etc\weapon\tblade_13.bsr item\etc\drop_ch_equip_rare.bsr item\china\weapon\tblade_13.ddj
without creating any aditional table.
Now the upgrade procedure:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_ModelSwitch] Script Date: 25.02.2017 16:41:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[_ModelSwitch13D]
@ D Int
As
-- Declare expression.
Declare @ Name Varchar(60) = 'Leo' , -- Creater Name
@ lot INT = 13 ,
-- Use This Query to get each item ID by Codename128
-- Select ID From [SRO_VT_SHARD].[dbo].[_RefObjCommon] Where CodeName128 Like 'Item Code Name'
@ CH_TBLADE_ID int = 25672 , @ CH_TBLADE_ID int = 42876, --ch tblade
--------------------------------------------------------------------------------------------
-- Start Upgrade system :
-- CH Weapons Upgrade.
Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @ CH_TBLADE_ID , CreaterName = @ Name Where ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @ D and Slot = @ lot and ItemID> 0) and RefItemID = @ CH_TBLADE_ID
GO
then add this querry to bottom of your
_AddLogItem querry:
IF (@ItemRefID = 42875) -- RefObjCommon ID
Begin
Execute [SRO_VT_SHARDLOG].[dbo].[_ModelSwitch] @ D
End
End
|
Msg 156, Level 15, State 1, Procedure _ModelSwitch13D, Line 24
Incorrect syntax near the keyword 'Update'.
Msg 137, Level 15, State 2, Procedure _ModelSwitch13D, Line 24
Must declare the scalar variable "@New_CH_TBLADE_ID".
Msg 137, Level 15, State 2, Procedure _ModelSwitch13D, Line 24
Must declare the scalar variable "@weaponslot".
thats what i get
|
|
|
02/26/2017, 16:41
|
#6
|
elite*gold: 0
Join Date: Jan 2009
Posts: 944
Received Thanks: 404
|
Quote:
Originally Posted by khaledmajdoub
Msg 156, Level 15, State 1, Procedure _ModelSwitch13D, Line 24
Incorrect syntax near the keyword 'Update'.
Msg 137, Level 15, State 2, Procedure _ModelSwitch13D, Line 24
Must declare the scalar variable "@New_CH_TBLADE_ID".
Msg 137, Level 15, State 2, Procedure _ModelSwitch13D, Line 24
Must declare the scalar variable "@weaponslot".
thats what i get
|
try to fix it , you have the errors list there, try to fix it....
|
|
|
02/26/2017, 19:50
|
#7
|
elite*gold: 0
Join Date: Jul 2015
Posts: 134
Received Thanks: 15
|
Quote:
Originally Posted by leo2111
try to fix it , you have the errors list there, try to fix it....
|
tried Declare many times works but Update is making a problem . ty for the help lol , and the lines u gave up there wasnt correct btw .
|
|
|
02/27/2017, 20:58
|
#8
|
elite*gold: 0
Join Date: Jan 2009
Posts: 944
Received Thanks: 404
|
Quote:
Originally Posted by khaledmajdoub
tried Declare many times works but Update is making a problem . ty for the help lol , and the lines u gave up there wasnt correct btw .
|
@ CH_TBLADE_ID int = 25672 , @ CH_TBLADE_ID int = 42876 ,
delete that and then execute the procedure. In case that you will add more lines you have to divide every line with comma
< , >
Which lines?
|
|
|
03/06/2017, 02:06
|
#9
|
elite*gold: 0
Join Date: Jan 2009
Posts: 944
Received Thanks: 404
|
With me works everything perfectly, I'm using sql express 2014.
|
|
|
11/03/2020, 15:35
|
#10
|
elite*gold: 14
Join Date: Feb 2016
Posts: 1,607
Received Thanks: 444
|
Quote:
Originally Posted by qilera
same error like khaled... need help
|
Provide a screen shot of the error, and also the query you use please, and i will try my best to help you fixing it
|
|
|
11/03/2020, 22:03
|
#11
|
elite*gold: 14
Join Date: Feb 2016
Posts: 1,607
Received Thanks: 444
|
Quote:
Originally Posted by qilera
Thank u for the fast answere! Here it is...
|
for some reasons the update is not working, can you upload the query here, so i can take a look
|
|
|
11/04/2020, 04:35
|
#12
|
elite*gold: 0
Join Date: Jan 2019
Posts: 14
Received Thanks: 4
|
there is already a coma beside that equal sign @ CH_TBLADE_ID=44145 ,
remove it
|
|
|
11/21/2020, 00:24
|
#13
|
elite*gold: 0
Join Date: Jun 2011
Posts: 22
Received Thanks: 3
|
i hate model switchers, but thanks for providing you're contribution!
|
|
|
11/21/2020, 01:57
|
#14
|
dotCom
elite*gold: 12400
Join Date: Mar 2009
Posts: 15,879
Received Thanks: 4,385
|
SRO Private Server -> SRO PServer Quest…
#moved
|
|
|
Similar Threads
|
[Release] Model Switcher
11/13/2018 - SRO PServer Guides & Releases - 26 Replies
my Crapyy Code was working on Galullians & yea it will work with you to
- AddLogItem
if (@ItemRefID = 43054)
BEGIN
EXEC SRO_VT_SHARDLOG.dbo._NOVA_SWITCHER @CharID
|
Model Switcher
08/10/2015 - SRO Private Server - 3 Replies
solved !! ##
|
Model Switcher
01/22/2015 - SRO Private Server - 34 Replies
so i was wondering how elamidas did it
i was looking for hints how should i do something like that
so guys any ideas about how to do or at least hints?
thank you
|
Suche jemanden mit LC Model Switcher
11/26/2013 - Last Chaos - 1 Replies
topic
meldet euch per pn oder im thread dann wird weiter besprochen
lg
|
All times are GMT +2. The time now is 19:07.
|
|