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
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]
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 :
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 :
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
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....
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?
[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