I have a [Mu Online] Ex 802 server, and it has {SHOP CASH} system for players to be able to buy their items. Well my Server has a control panel in which I can add the amount of currency the Player will have, plus this system is in C #.
The Shop Cash game uses 1 table to connect to sql:
- Tabela " GameShop_Data"
- Colunas " MemberGuid , WCoinC , WCoinP , WCoinG"
He does this check: When he enters the game, and opens Shop Cash, there is a field called: {Amount of Golds: VALUE} - Basically the check to know whats golds has it does the following: IT SEEKS IN TABLE SQL "GameShop_Data" (as the user connected with his account he already has as base member_guid) so he searches the user's MemberGuid field in the table connected and it has the column "WCoinC" (being the main currency) and sees the amount of Golds in this column and it shows in the GAME the amount that verified in SQL.
-
The columns starting with W are the coin types you have in the GAME.
-
The MemberGuid column is like an organization type of "id".
But the server has a website where there are 3 types of control panel:
- User Control Panel
- Game Master Control Panel
-
Admin Control Panel
-
In the control panel of {administrator} you have the option to add the amount of currency, there are two types of coins in it.
-
To add basically needs three fields {login, currency name (SELECT being two), quantity}.
More if I only put the login as an ID, it will not work.
For the simple reason:
INSERT INTO "GameShop_Data" ("username", "WCoinC", ...) VALUES ("user typed in input", "VALUE typed in input",);
If you run this code, a random "id" will appear in the database.
An example: If the user that I want to put gold, has a id of number 25, more in the table there are 3 users placed, ie let's suppose that these three I put the 'Golds' through the panel that I quoted the on top first done in C #.
[MemberGuid] | [WCoinC] | [WCoinP] | [WCoinP]
"1" "500" "NULL" "NULL"
"2" "500" "NULL" "NULL"
"3" "500" "NULL" "NULL"
"SCRIPT PERFORMED BY THE PANEL MADE IN C # IS RUNNING CORRECTLY"
More if I run the above script with specific data on the basis that this user that I typed in the input field of the Control Panel of the WEB SITE the id is "6"
INSERT INTO "GameShop_Data" ("username", "WCoinC") VALUES ("mauricio1", "1000");
TABLE WILL SO:
[MemberGuid] | [WCoinC] | [WCoinP] | [WCoinP] | [username]
"1" "500" "NULL" "NULL" "NULL"
"2" "500" "NULL" "NULL" "NULL"
"3" "500" "NULL" "NULL" "NULL"
"4" "1000" "NULL" "NULL" "mauricio1"
In other words: he created a random MemberGuid for dealing with an "int" with a primary key (and did not put the id "6" that in the game would identify the 'Golds' of the logged in account).
Well I would like to know which script I should use to do this verification correctly and so I can add the Golds to the players through the WEBSITE Control Panel.
- Remembering that the login id of each account is in the "MEMB_INFO" table as in the second image of the publication.