Add or delete an item into or out of someones inventory

Results 1 to 8 of 8
  1. #1
    Member corri800 is offline
    MemberRank
    Mar 2012 Join Date
    54Posts

    wink Add or delete an item into or out of someones inventory

    Hello Ragezooners,

    I have a quesiton again.

    How am I able to add / delete an item into or out of someones inventory? I want to perform this in sql but I dont know what to do with the information in tItem table.

    1. nItemKey - I dont know what this is or where to get it.
    2. nStorageType - Dont know again.
    3. nOwner - I thought this could be the char ID but it isnt.
    4. nStorage - The same as in 3
    5. nItemID - Item ID ;)
    6. nFlags - Isnt needable I think.
    7. dDate - Everyone knows this.

    I hope someone of you is able to help me.

    Best regards,
    Corri


  2. #2
    Proficient Member Canic is offline
    MemberRank
    Feb 2010 Join Date
    159Posts

    Re: Add or delete an item into or out of someones inventory

    1. nItemKey - Identify ID for the Item
    2. nStorageType - Inventory/Reward Inventory/Storage
    3. nOwner - nCharNo from tCharacter
    4. nStorage - Slot of Inventory/Storage
    5. nItemID - ID from ItemInfo
    6. nFlags - Idk (Should be something like used or unused or whatever)
    7. dDate - Date

  3. #3
    Apprentice JustAnotherWnB is offline
    MemberRank
    Jul 2013 Join Date
    GermanyLocation
    10Posts

    Re: Add or delete an item into or out of someones inventory

    Quote Originally Posted by corri800 View Post
    Hello Ragezooners,

    How am I able to add / delete an item into or out of someones inventory? I want to perform this in sql but I dont know what to do with the information in tItem table.
    (I guess you are using odin files so idk if this works with older files)

    Execute this query in w00_character

    Deleting a Item:
    Delete from dbo.tItem where nOwner = [Insert nOwner here, is nCharNo in tCharacters.] and nItemID = [Insert Item ID here (Check ItemInfo.shn)]

    Example:
    Delete from dbo.tItem where nOwner = 70 and nItemID = 0

    This will delete the item Leather Boots from the inventory of user 70

    Inserting them:
    I think pretty much the same just with Insert instead of Delete. Maybe I am wrong try it o:

  4. #4
    Member corri800 is offline
    MemberRank
    Mar 2012 Join Date
    54Posts

    Re: Add or delete an item into or out of someones inventory

    Thank you for your fast replies, but how do I get this Identify ID ?

  5. #5
    Rada Rada. Delius is offline
    MemberRank
    Jul 2012 Join Date
    AustraliaLocation
    431Posts

    Re: Add or delete an item into or out of someones inventory

    Iteminfo

  6. #6
    Member corri800 is offline
    MemberRank
    Mar 2012 Join Date
    54Posts

    Re: Add or delete an item into or out of someones inventory

    In ItemInfo is no "Identify ID" there is just the normal Item ID.

  7. #7
    -.- NextIdea is offline
    MemberRank
    Nov 2012 Join Date
    343Posts

    Re: Add or delete an item into or out of someones inventory

    @Delius
    Quote Originally Posted by Canic View Post
    1. nItemKey - Identify ID for the Item
    ...
    corri800 means that.

    @corri800
    You don't need it. It's just a unique key in DB to prevent duplicate rows.

  8. #8
    Member corri800 is offline
    MemberRank
    Mar 2012 Join Date
    54Posts

    Re: Add or delete an item into or out of someones inventory

    @NextIdea Thank you :)

    Can you please help me with another problem so I dont have to open another thread?

    Everytime I want to port from Elderine to Roumen I get a server disconnect.
    With portscrolls or portals its always the same but you can port to Roumen from any other place without any problems.



Advertisement