Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: Items Script

  1. #1
    Soldier
    Join Date
    Jun 2013
    Location
    France
    Posts
    55

    Items Script

    Hello Graalians,
    I'm creating an item system, so I would like to know if my following method would be secure, if there is another better way to do it,...

    So to create it, I would like to use a database where I'll have two tables
    -Items (itemId, itemName, itemImage, itemDescription, itemPrice, itemWeapon)
    -PlayerItems(playersId, itemId, itemNumbers)

    Then I'll create an Inventory and get all items and their numbers in the Inventory of the player.

    Is it a good idea? It could be better and more secure?

    Thanks for your answers,
    Joe.

  2. #2
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    It works.

    Make sure you have this.trigger("update",""); on your DB so the variables will stay even when server will be restarted.
    -Johnaudi

  3. #3
    Soldier
    Join Date
    Jun 2013
    Location
    France
    Posts
    55
    Okay, but is there another way to do it?
    Because it seems heavy for the server to me, cause it will takes a row for each items or each player :/ so if there is much players and much items, it will be really heavy in database?

  4. #4
    Joe do u like ely
    ------------------------------------------------------------------




  5. #5
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by Joe View Post
    Okay, but is there another way to do it?
    Because it seems heavy for the server to me, cause it will takes a row for each items or each player :/ so if there is much players and much items, it will be really heavy in database?
    On iOS servers, we store the items in .clientr variables, which I highly dislike.
    -Johnaudi

  6. #6
    Soldier
    Join Date
    Jun 2013
    Location
    France
    Posts
    55
    It's highly recommanded to store everything in database: items, money, ... ? (I saw that on certain server they keep their items params into text files :/ Is it better to use DB or files for Items params like id, weapon, price, img, desc,...)
    I saw that in certain scripts Items Information (id, price, weapon,...) are stored into DB Npc, but whats the difference between DB Npc and a SQL DB?

    Also do you know where how to modify the showstat window? Or if I make a new one, do you know where are stored the info like name, country, kills,... and how to get them?
    Last edited by Joe; 03-12-2014 at 02:04 PM.

  7. #7
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by Joe View Post
    It's highly recommanded to store everything in database: items, money, ... ? (I saw that on certain server they keep their items params into text files :/ Is it better to use DB or files for Items params like id, weapon, price, img, desc,...)
    I saw that in certain scripts Items Information (id, price, weapon,...) are stored into DB Npc, but whats the difference between DB Npc and a SQL DB?

    Also do you know where how to modify the showstat window? Or if I make a new one, do you know where are stored the info like name, country, kills,... and how to get them?
    Country/Name/Email are player specific, it's preferable to use client/clientr flags on that.
    -Johnaudi

  8. #8
    Soldier
    Join Date
    Jun 2013
    Location
    France
    Posts
    55
    Okay but where I can find a wiki of all clientr variable or a tuto about clientr flags (and flags are stored into files? so I thought it wasn't recommanded to use clientr for data :/)
    Also why clientr variables aren't very secure, because some server use it so Idk what I should do :/ ?
    Last edited by Joe; 03-12-2014 at 06:11 PM.

  9. #9
    I'd recommend leveraging the information in sql.

    If done properly, you could do character slots (multiple inventories, one user account, different characters).

  10. #10
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by Joe View Post
    Okay but where I can find a wiki of all clientr variable or a tuto about clientr flags (and flags are stored into files? so I thought it wasn't recommanded to use clientr for data :/)
    Also why clientr variables aren't very secure, because some server use it so Idk what I should do :/ ?
    player.clientr.johnisawesome = "hi";

    If you know what I mean -- clientr variables can only be written in serverside, and only be READ in clientside (this way hackers would fail at changing the variable dynamically)
    -Johnaudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •