|
You last visited: Today at 13:41
Advertisement
sript for [PaidItem]
Discussion on sript for [PaidItem] within the Rappelz Private Server forum part of the Rappelz category.
02/24/2012, 22:33
|
#1
|
elite*gold: 0
Join Date: Feb 2012
Posts: 9
Received Thanks: 0
|
sript for [PaidItem]
how to add objects change (more powerful) with this script?
Code:
Use Telecaster
DECLARE @id int; --accountid
DECLARE @itemcount int; --Anzahl der Items
DECLARE @item int;
DECLARE @avatarid int;
-----------Insert Settings here-----------------
SET @item = '' --INSERT ITEM ID (e.g. 2010764 R6 Cloak)
SET @itemcount = '1' --INSERT THE NUMBER OF ITEMS
SELECT @avatarid = sid FROM Character WHERE name = '' --INSERT CHARACTER NAME
------------------------------------------------
SELECT @id = account_id FROM Character WHERE sid = @avatarid
--Warning
IF @id IS NULL
BEGIN
PRINT 'WARNING: This Character does not exist. No Rows affected!'
RETURN
END
--DB Update
INSERT INTO [telecaster].[dbo].[PaidItem]([account_id],[avatar_id],[avatar_name],[item_code],[item_count],[rest_item_count],[bought_time],[valid_time],[server_name],[taken_avatar_id],[taken_avatar_name],[taken_server_name],[taken_time],[taken_account_id],[confirmed],[confirmed_time]) VALUES (@id,@avatarid,NULL,@item,@itemcount,@itemcount,'2011-10-01 12:00:00.000',NULL,NULL,NULL,NULL,NULL,NULL,@id,NULL,NULL)
|
|
|
02/24/2012, 22:51
|
#2
|
elite*gold: 0
Join Date: Sep 2009
Posts: 1,456
Received Thanks: 290
|
i dont see a reason to use this query, since u can add items via console, ingame via chat or by using tools
|
|
|
02/24/2012, 23:02
|
#3
|
elite*gold: 0
Join Date: Feb 2012
Posts: 9
Received Thanks: 0
|
because when I get on the GM-TOOL command after a disconnection, reconnection people lose their objects
or with this script people lose their objects
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
|
|
|
02/24/2012, 23:09
|
#4
|
elite*gold: 0
Join Date: Sep 2009
Posts: 1,456
Received Thanks: 290
|
i doubt its caused by the tool itself, it was discussed here 1 or 2 days ago, when ppl have a lot of items in inventory and server crashes, they might loose some of them.
|
|
|
02/24/2012, 23:20
|
#5
|
elite*gold: 0
Join Date: Feb 2012
Posts: 9
Received Thanks: 0
|
I must then have a problem in my database because I lost objects, there to that with this scrip
Code:
Use Telecaster
DECLARE @id int; --accountid
DECLARE @itemcount int; --Anzahl der Items
DECLARE @item int;
DECLARE @avatarid int;
-----------Insert Settings here-----------------
SET @item = '' --INSERT ITEM ID (e.g. 2010764 R6 Cloak)
SET @itemcount = '1' --INSERT THE NUMBER OF ITEMS
SELECT @avatarid = sid FROM Character WHERE name = '' --INSERT CHARACTER NAME
------------------------------------------------
SELECT @id = account_id FROM Character WHERE sid = @avatarid
--Warning
IF @id IS NULL
BEGIN
PRINT 'WARNING: This Character does not exist. No Rows affected!'
RETURN
END
--DB Update
INSERT INTO [telecaster].[dbo].[PaidItem]([account_id],[avatar_id],[avatar_name],[item_code],[item_count],[rest_item_count],[bought_time],[valid_time],[server_name],[taken_avatar_id],[taken_avatar_name],[taken_server_name],[taken_time],[taken_account_id],[confirmed],[confirmed_time]) VALUES (@id,@avatarid,NULL,@item,@itemcount,@itemcount,'2011-10-01 12:00:00.000',NULL,NULL,NULL,NULL,NULL,NULL,@id,NULL,NULL)
, that i loses nothing.
With the command, be it loses the object 50 lv 50, be the creatures are more tame, after a disconnection
|
|
|
02/24/2012, 23:50
|
#6
|
elite*gold: 0
Join Date: Jun 2010
Posts: 573
Received Thanks: 163
|
This is the Query i made btw.
The reason for this query is, that you can't insert some items via insert_item to another players inventory. Donation wings for example will always appear in your inventory.
Ppl wont lose stuff with this query since it will be inserted directly into the database and the gameserver keeps many things just in his local memory and saves them to the database only periodically. So if the Gameserver crashes there can be some changes which were not comitted to the database and those changes get lost.
you can manually save those changes with the command: #saveall'20' (lower values then 20 will prolly crash your gameserver tho. 20 works pretty well)
|
|
|
02/24/2012, 23:58
|
#7
|
elite*gold: 0
Join Date: Feb 2012
Posts: 9
Received Thanks: 0
|
/run insert_item(100001, 1, 50, 50, 2,"invincibel")
and objects are lost, there is not a command line to put in gameserveur for his backup automatically??
because I can not add anything in the gameserver (game001), because it is a script that starts it, and it is in the process windows impossible has returned from the command
|
|
|
02/25/2012, 11:31
|
#8
|
elite*gold: 0
Join Date: Jun 2010
Posts: 573
Received Thanks: 163
|
as i said. #saveall'20'
just read the post above...
|
|
|
02/25/2012, 12:09
|
#9
|
elite*gold: 0
Join Date: Feb 2012
Posts: 9
Received Thanks: 0
|
I can not go back "#saveall'20", for the Gameserver, qand start the task manager because it is a script that starts the server, I have problems with: auto-reboots
|
|
|
02/25/2012, 17:04
|
#10
|
elite*gold: 0
Join Date: Jun 2010
Posts: 573
Received Thanks: 163
|
Sorry I don't get what you want to say. Learn english or gtfo
|
|
|
Similar Threads
|
L2Walker Sript for class change quest
03/29/2011 - Lineage 2 - 1 Replies
Hi,
Sameone have a script for class change to a bounty hunter??
|
sript anzeigen lassen
01/20/2010 - General Coding - 1 Replies
hallo,
ich bin auf der suche nach einem tool für mein firefox.
ich weiß das ich das früher schonmal konnte, aber nach der letzten "plättung" des rechners.
Es geht darum, das ich mir wenn ich mir den Seitenquelltext einer Seite angucke auch den "versteckten" Inhalt des Quelltextes sehen möchte.
Könnt ihr mir da vielleicht helfen?
danke
|
Easy Sript ( mit Fehler oO)
08/18/2008 - General Coding - 19 Replies
Also liebe Coders.
Ich habe mir hier mla ein ganz easy script gemacht..
Soo.. Er meldet mir bei
den fehler...
|
All times are GMT +2. The time now is 13:41.
|
|