Junior Spellweaver
- Joined
- Jan 21, 2008
- Messages
- 126
- Reaction score
- 0
WARNING gm tools does the same!
i searched but didn`t find anything which would help my to add items to my character inventory, maybe i am blind but still i created a simple sql query.
1. first of all, open your mssql enterprise manager.
2. select database GAMEDB
3. On "Stored procedures" right click -> "New stored procedure..."
4. Paste the code (overwriting everything that is in text area)
5. Hit Ok. All done
Usage:
1. Open "SQL query analyzer" (from mssql enterprise manager TOOLS-> sql query analyzer)
2. Select Dd "GAMEDB"
3. in text area write: exec dbo.cabal_tools_additem character_id, item_id, item_opt, place_in_inventory
for example exec dbo.cabal_tools_additem 2, 3, 5, 12
that will add lvl1 healing potion (id = 3) quantity of 5 (itemOpt = 5) to character no 2, in 12 square in inventory
to see what character id u need to add look at db GAMEDB : table cabal_character_table : field characteridx of character u want to add item to
one problem is when u add an item to your ch inventory, u need to rejoin the channel (esc -> select character) and after that u will see your added item, but i will try to fix it (and added item will apear instantly in inventory)
Hope it will be usefull to someone. Sorry for my bad English
i searched but didn`t find anything which would help my to add items to my character inventory, maybe i am blind but still i created a simple sql query.
Code:
/****** Object: Stored Procedure dbo.cabal_tools_additem Script Date: 2008.07.10 ******/
/****** Copyright (c) ZeRo *****/
create procedure [dbo].[cabal_tools_additem ] (@charid int, @itemid int, @itemopt int, @slot int)
as
begin
SET NOCOUNT ON
declare @data varbinary(4096)
select
@data = A.data
FROM
cabal_inventory_table A
WHERE
A.characteridx =@charid
set @data = @data +
dbo.wordtobin(@itemid) +
dbo.int2bin(0) +
dbo.int2bin(@itemopt) +
dbo.wordtobin(@slot) +
dbo.int2bin(0)
UPDATE
dbo.cabal_inventory_table
SET
data = @data
WHERE
characteridx = @charid
SET NOCOUNT OFF
end
GO
1. first of all, open your mssql enterprise manager.
2. select database GAMEDB
3. On "Stored procedures" right click -> "New stored procedure..."
4. Paste the code (overwriting everything that is in text area)
5. Hit Ok. All done
Usage:
1. Open "SQL query analyzer" (from mssql enterprise manager TOOLS-> sql query analyzer)
2. Select Dd "GAMEDB"
3. in text area write: exec dbo.cabal_tools_additem character_id, item_id, item_opt, place_in_inventory
for example exec dbo.cabal_tools_additem 2, 3, 5, 12
that will add lvl1 healing potion (id = 3) quantity of 5 (itemOpt = 5) to character no 2, in 12 square in inventory
to see what character id u need to add look at db GAMEDB : table cabal_character_table : field characteridx of character u want to add item to
one problem is when u add an item to your ch inventory, u need to rejoin the channel (esc -> select character) and after that u will see your added item, but i will try to fix it (and added item will apear instantly in inventory)
Hope it will be usefull to someone. Sorry for my bad English
Last edited: