Results 1 to 3 of 3
  1. #1
    index.html's Avatar
    Join Date
    Sep 2017
    Gender
    male
    Location
    Genesis 6:7
    Posts
    101
    Reputation
    10
    Thanks
    293

    Loading items from database :)

    Sorry for the music lol
    this is on my rotmg remake





    I want to know if there's a better way of doing it.
    The slots in the database seem too much , maybe there's a way of shrinking it idk.
    Last edited by index.html; 05-27-2018 at 01:46 PM.

  2. #2
    Devwarlt's Avatar
    Join Date
    Oct 2016
    Gender
    male
    Posts
    28
    Reputation
    10
    Thanks
    8
    My Mood
    Inspired

    Lightbulb

    You can serialize data from your database, e.g. split string for each slot, make it with JSON or similar.

    Usage:

    Code:
    // Then you can get slots based in index.
    string[] idsFromDb = "0|5|10|15|20|25|30|35".Split("|");
    
    List<int> serializedIds = new List<int>();
    
    foreach (string idFromDb in idsFromDb) serializedIds.Add(Convert.ToInt32(idFromDb));
    
    Console.WriteLine(serializedSlots[7]); // Output: "35" as INT.
    Enjoy.
    Last edited by Devwarlt; 05-27-2018 at 02:30 PM.


    Do you need help or support in your RotMG Private Server? I could help you, leave a private message to me, contact bellow:

    https://******.com/Devwarlt

  3. #3
    index.html's Avatar
    Join Date
    Sep 2017
    Gender
    male
    Location
    Genesis 6:7
    Posts
    101
    Reputation
    10
    Thanks
    293
    Quote Originally Posted by Devwarlt View Post
    You can serialize data from your database, e.g. split string for each slot, make it with JSON or similar.

    Usage:

    Code:
    // Then you can get slots based in index.
    string[] idsFromDb = "0|5|10|15|20|25|30|35".Split("|");
    
    List<int> serializedIds = new List<int>();
    
    foreach (string idFromDb in idsFromDb) serializedIds.Add(Convert.ToInt32(idFromDb));
    
    Console.WriteLine(serializedSlots[7]); // Output: "35" as INT.
    Enjoy.
    This seems like a good idea.
    Will probably do, thanks alot.

Similar Threads

  1. [Solved] Rare items from quest load!
    By gwubwihvbwe in forum Adventure Quest Worlds (AQW) Help
    Replies: 5
    Last Post: 08-10-2016, 08:52 AM
  2. Banned for mailing items from hack account?
    By Super Saiyan in forum Vindictus Discussions
    Replies: 18
    Last Post: 05-23-2011, 12:31 AM
  3. [Help]Removing item from listbox [solved]
    By pushdis15 in forum Visual Basic Programming
    Replies: 9
    Last Post: 04-14-2011, 08:47 PM
  4. [Help]Removing items from ListViewEx? [Solved]
    By Invidus in forum Visual Basic Programming
    Replies: 5
    Last Post: 09-24-2010, 02:57 PM
  5. Load from database, serial keys.
    By Zoom in forum Visual Basic Programming
    Replies: 4
    Last Post: 10-03-2009, 04:40 PM