Insert item query

07/28/2011 16:31 Onizukaka#1
HI all,

My commands game001 didnt working, what is the way to inser this :

USE [Telecaster]
GO

DECLARE @return_value int

EXEC @return_value = [dbo].[smp_insert_item]
@IN_SID = 1, --Change this Per Item
@IN_OWNER_ID = 1, --Char ID
@IN_ACCOUNT_ID = 0,
@IN_SUMMON_ID = 0,
@IN_AUCTION_ID = 0,
@IN_KEEPING_ID = 0,
@IN_CODE = 910037, --Item Code
@IN_IDX = 100, --Place in Inv (doesnt seem to matter)
@IN_FLAG = 0,
@IN_CNT = 1, --How Many you want
@IN_LEVEL = 1, --Item Level
@IN_ENHANCE = 0, -- Item +
@IN_ENDURANCE = 100,
@IN_GCODE = 1,
@IN_REMAIN_TIME = 0,
@IN_ELEMENTAL_EFFECT_TYPE = 0,
@IN_ELEMENTAL_EFFECT_EXPIRE_TIME = N'1970-01-01 11:00:00.000',
@IN_ELEMENTAL_EFFECT_ATTACK_POINT = 0,
@IN_ELEMENTAL_EFFECT_MAGIC_POINT = 0

SELECT 'Return Value' = @return_value

GO

i dont know how to use this text... and how to repair my command game001 ?
07/28/2011 16:46 Uebari#2
You have to do this in SMSS, MSSQL Query Window. Simple as that....
07/28/2011 16:56 ismokedrow#3
LMAO, I can put money that he didn't issue the 'learn_all_skill("name")' command before trying to add items. o_O
07/28/2011 17:13 Onizukaka#4
Thx but where in MSSQL Query Window? can you explain with pictures please ?

before my command game001 worked with 'learn_all_skill("name")', but no its finish, its a bug when i create a new character.

Ps : sorry for my english, i am french :)

and how to repair my command game001 ?
07/28/2011 18:24 s0ul37#5
Left near top - "New Query" - past the code, edit the ID, value you want & press Execute. (Relog in game)
07/28/2011 19:12 Onizukaka#6
and how you save the query, because when i put a item, it disapper when i put a second item...

and how to repair the command, its better than query.
07/29/2011 01:44 Cieldaron#7
Quote:
Originally Posted by Onizukaka View Post
@IN_SID = 1, --Change this Per Item
You answered it in your question already.

-- in MSSQl means a comment (part of a script which isn't included in execution, just for making it readable for programmers).

E.g. "--Trolololol" won't affect the query's result(s).

"Change this per item" -> Change this value per item you want to insert.

For the first item use "@IN_SID = 1",
for the second item use "@IN_SID = 2".

If you use two times the same ID, the firstly used ID's item will be overwritten with the second Item having the same ID.


Greez,

Cieldaron
07/31/2011 11:25 DrakuLL777#8
Insert all items (the modified code of an insertion items)!!!

1. Create the new character (after creation bowl off to close login the server and the game server it is not necessary).

2. Delete all lines in table Item of database Telecaster (table Item should be empty ATTENTION don't delete a line if you have other characters differently you will lose all items at all characters).

3. Import table ItemResource of database Arcadia to database Telecaster (it is not necessary to rename).

4. Launch this code:

Code:
USE [Telecaster]
 GO

 DECLARE @return_value int
 DECLARE @id int, @i int
 
 SET @i=1 -- or 2 if you have a card of the bear track as this card isn't displayed in table Item
 
 DECLARE ASD CURSOR DYNAMIC SCROLL READ_ONLY FOR 
 SELECT [id] FROM [ItemResource] order by id
 OPEN ASD 
 FETCH FIRST FROM ASD INTO @id
 WHILE (@@FETCH_STATUS=0)
 BEGIN
 EXEC [dbo].[smp_insert_item]
 @IN_SID = @i,
 @IN_OWNER_ID = 1, --Char ID (ID which you have created recently the new character mandatory to LEARN WHAT and to interpose for a place of this digit!!!)
 @IN_ACCOUNT_ID = 0,
 @IN_SUMMON_ID = 0,
 @IN_AUCTION_ID = 0,
 @IN_KEEPING_ID = 0,
 @IN_CODE = @id,
 @IN_IDX = @i,
 @IN_FLAG = 0,
 @IN_CNT = 1, 
 @IN_LEVEL = 1, 
 @IN_ENHANCE = 0, 
 @IN_ENDURANCE = 100,
 @IN_GCODE = 1,
 @IN_REMAIN_TIME = 1312186301,
 @IN_ELEMENTAL_EFFECT_TYPE = 0,
 @IN_ELEMENTAL_EFFECT_EXPIRE_TIME = N'1970-01-01 06:00:00.000',
 @IN_ELEMENTAL_EFFECT_ATTACK_POINT = 0,
 @IN_ELEMENTAL_EFFECT_MAGIC_POINT = 0
 set @i+=1 --or if it doesn't work that @i=@i+1 
 FETCH NEXT FROM ASD INTO @id
 END
 CLOSE ASD
 DEALLOCATE ASD

 SELECT 'Return Value' = @return_value

 GO
5. Come into game and enter this character (be not frightened if at you all hangs it normally for an insertion of set of things time from several seconds about one minute is necessary).

6. Described all above is applied exceptional with a view of the test.