This tutorial is for a new people so please don't write stupid comments
Let's begin:
As always Editor is available to download.
Step #1:
Open TRpsGame Editor and load TRpsGame.tcd.

Let's explaim few things before we start to editing something:
So as you probably know to start playing RPS you need to use NPC.
NPC need to know which type of RTS game you want to play so that's why NPC using bType to recognize the type of game.
As a example let's take a Moon Crystal RTS:

As you can see we have only 2 values available in the first Item in the Listbox
"bType = 1" and "wNeedItem = 9476 (Moon Crystal)" which are needed to initialize RTS game, NPC need to know which Item need Player to start the game that's why for every RTS game you need to have created such record.
Actually I have 4 Types of RTS game but only 3 are supported by the defeault UI in the game.
In my case I'm using Normal, Large and Moon Crystals:
bType = 1 for Moon Crystal game,
bType = 2 for Normal Crystal game,
bType = 3 for Large Crystal game.
bType can be different depending on TRpsGame.tcd but you get the point.
Step #2:
After a short explanation we can move to editing tcd file,
I have already prepared the tcd earlier but it's not a big problem, I will try to explain everything:
Let's say we started playing RTS and we get lucky and we won 1 time:
NPC need to know what type of reward you will get if you stop playing after first win.
That's why we need a second record in our TRpsGame.tcd:
As I mentioned before I'm using bType = 1 for Moon Crystal game.
AS you can see bWin value is responsible for informing NPC what kind of reward we will get if we win x times.
In our case bWin = 1 because we won just one time ;c
Let's talk a little bit about rewards.
We can win up to 2 rewards (Items) and money.
So It means if we stop playing after first win we will get:
- Arcane Reagent x10.
- Gemstone x10.
- 250 silver.
I don't think i need to go deeper in this topic


We want to win more!
We have already 2 wins in the row:
So it means Client need a second record for a second win.
It means you need to repeat the whole process but for second wind:
- bWin = 2.

Client (UI) supports up to 15 wins by default, my tcd file contains only 10 for each RPS game but as I said you can have up to 15
Step #3:
It's time to move to the Database and do exacty the same thing we did for tcd file but let's explain few things first:
PHP Code:
bType
bWinCount = up to 15
dwRewardMoney - How much money you get if you win
wRewardItem_1 - First Reward
wRewardItem_2 - Second Reward
bItemCount_1 - Count of first reward
bItemCount_2 - Count of second reward
bProb_Win - Chance to win
bProb_Draw - Chance to draw
bProb_Lose - Chance to lose
wItemID - Item needed to start playing RPS (Small Crystal( ItemID = 9416), Normal Crystal( ItemID = 9417), Large Crystal( ItemID = 9418) and Moon Crystal( ItemID = 9476)
)
-Open TRPSGAMECHART:
For a tutorial purpose I'v deleted all record from my table and create 4 new record for each bType I'm using:

I hope everything is clear for you
Don't forget to save everything and restart the server

VirusTotal:






