Jump to content

Recommended Posts

Posted (edited)

Hi !
I have find no information about it and told the solution over a help topic so to help those who need it here a tiny guide to be able to use "Dimensional Merchan" aka Vitamin Manager.

It is a feature that send item from SQL to player without any server reboot or commands needed.
Al it need is a player restart if he/she were online when you executed SQL Command.
(it does //premium_item command over SQL and for all player.)

So let start, I assume in this guide that you  start with a server shutdown.) :)

Know Issue(s) :

You can not send any non stackable items like full.

 

Required :
Gracia final and or highter (I can not tell if any other chronicle work !)
MyExt.

Now let enable that NPC to spawn and allow feature in "MyExt64.ini"

; Enables Vitamin Manager
EnableVitaminManager = true
; Enables withdrawing of non-premium items through Vitamin Manager
EnableVitaminManagerNonPremiumItems = true

be sure to have these Enabled.

Now let add the line to be able to retrieve item (in case you do no have it at base like me.)
so for that open "e_premium_manager001.htm" (it was it for me.)
And add this line :

<a action="bypass -h menu_select?ask=1&reply=1"><font color="LEVEL">Retrieve a Dimensional Item</font></a><br> 

So in the end it look like that(Attention that totaly unofficial html but working one.) 

<html>
    <head>
    </head>
    <body>
        Dimensional Merchant:<br>
        Greetings, adventurer! I know I may look strange to you, but I have traveled through time and space, scouring the corners of reality, to bring you the finest wares in all the land. <br>
        My agents are collecting rarities, trinkets, and treasures the likes of which you have never seen. 
        They have returned, with several unusual items, maybe some have been shared to you. <br>
        <a action="bypass -h menu_select?ask=1&reply=1"><font color="LEVEL">Retrieve a Dimensional Item</font></a><br>
        <a action="bypass -h menu_select?ask=2&reply=1">Exchange a Minion Coupon for a Minion pet</a><br>
        <a action="link e_premium_manager009.htm">Exchange a Premium Minion Coupon for a Premium Minion pet</a><br>
    </body>
</html>

now here my AI section for this npc in case you do not have it but it is not modified, it was not required at all on Gracia final)
 

  Reveal hidden contents

 

Now your server should be able to receive Item from SQL
So try to launch it with npc and while it boot we will "fix" SQL table "user_premium_item" to auto increment warehouse_no field.
if your already does and you have populated it you can skip to next step.
If not make a backup of your SQL database and drop "user_premium_item"
and execute this mssql script (it will re-create user_premium_item with auto increment field :)) :

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[user_premium_item]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[user_premium_item](
    [warehouse_no] [bigint] NOT NULL IDENTITY,
    [buyer_id] [int] NOT NULL,
    [buyer_char_id] [int] NULL,
    [buyer_char_name] [nvarchar](50) NULL,
    [recipient_id] [int] NOT NULL,
    [recipient_char_id] [int] NULL,
    [recipient_char_name] [nvarchar](50) NULL,
    [server_receive_date] [datetime] NOT NULL CONSTRAINT [DF_premium_service_server_receive_date]  DEFAULT (getdate()),
    [item_id] [int] NOT NULL,
    [item_amount] [bigint] NOT NULL,
    [item_remain] [bigint] NOT NULL,
    [ibserver_delete_date] [datetime] NULL,
 CONSTRAINT [PK_user_premium_item] PRIMARY KEY CLUSTERED 
(
    [warehouse_no] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO

now that you got proper Database and server that just wait you.
We will first try it on your builder character.
So execute this code but pay attention you 4 id to change and 1 string !

INSERT INTO user_premium_item 
    (buyer_id,
    buyer_char_id,
    buyer_char_name,
    recipient_id,
    recipient_char_id,
    recipient_char_name,
    item_id,
    item_amount,
    item_remain,
    ibserver_delete_date)
SELECT
    Builder Account ID,
    Builder Character ID of the accound ID,
    'Name of the character',
    Account ID that will receive the item,
    0 <- leave it to zero any character from accound can receive it, 
    null <- if 0 leave to null. ,
    8659 <- Item ID,
    5 <- Quantity sent,
    5 <- Remaining quantity,
    null <- Delete item Date (null to keep it for ever)
GO

here an example I made.
builder account id is 13
character id on this account is 65
it's name is LineageTwo
This character sent 8685 (a sweet chest :D)
5 time to it's account.

INSERT INTO user_premium_item 
    (buyer_id,
    buyer_char_id,
    buyer_char_name,
    recipient_id,
    recipient_char_id,
    recipient_char_name,
    item_id,
    item_amount,
    item_remain,
    ibserver_delete_date)
SELECT
    13,
    65,
    'LineageTwo',
    13,
    0,
    null,
    8659,
    5,
    5,
    null
GO

Now it should look like that : 

22713566_1459357170766339_22630909240231

Now to send an item too all we just need to mode a tiny bit.

INSERT INTO user_premium_item 
    (buyer_id,
    buyer_char_id,
    buyer_char_name,
    recipient_id,
    recipient_char_id,
    recipient_char_name,
    item_id,
    item_amount,
    item_remain,
    ibserver_delete_date)
SELECT
    Builder Account ID,
    Builder Character ID of the accound ID,
    'Name of the character',
    uid, <- leave it that way, it will fetch all uid from user_account table.
    0, <- same as before it is to all character from the account to get it
    null, <- not required if no id as character as be provided.
    8659, <- Item ID
    5, <- Item Quantity
    5, <- Item Quantity remaing
    null <- delete item at the date provided.
FROM lin2db.dbo.user_account

so for a working example with same builder account and id + name than previous example here it is :

INSERT INTO user_premium_item 
    (buyer_id,
    buyer_char_id,
    buyer_char_name,
    recipient_id,
    recipient_char_id,
    recipient_char_name,
    item_id,
    item_amount,
    item_remain,
    ibserver_delete_date)
SELECT
    13,
    65,
    'LineageTwo',
    uid,
    0,
    null,
    8659,
    5,
    5,
    null
FROM lin2db.dbo.user_account

It will look like the previous screenshot but for all players.
So in short with this method you can easly send item to all character from SQLwithout needing to reboot server.
I can be userfull for reward from a game over php page, a donation system and many many things :)
Hope you enjoy 

Edited by Jojo_
Who the fuck coded that edit system that a pain in ass
  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...