• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

GTS System

1,748
Posts
14
Years
I have successfully set up the GTS server but I have only a little knowledge about Ruby, can someone write down how can I call the GTS script inside the game (the event script)? or all the scripts I must call to use it (if there is one for each thing the GTS can make. For example one for send a Pokémon, other for checking your current uploaded Pokémon, etc.)

The readme file should suffice enough information.

Anyways, to use call: "gts_initialize" through an event with a script.
 

Zeak6464

Zeak #3205 - Discord
1,101
Posts
11
Years
  • Age 31
  • USA
  • Seen Oct 9, 2023
Due to PHP 5.5 , I had to recode on how it connects to the data base now
so for now use mysqli reason is due to PHP5.5 offialy no longer supports mysql_
http://codular.com/php-mysqli

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO

Code:
$db = new mysqli($host, $user, $password)
 
1,748
Posts
14
Years
I don't exactly feel like this is needed since 5.5 is still pretty new (I think?) and those using it most likely know how to change it to mysqli.
 
423
Posts
13
Years
  • Age 37
  • Seen Aug 31, 2023
ok so using the latest version (gts2.0.1) and the pokemon uploads fine but when i make a new save game to test it the online id remains as 1 and unable to do anything any suggestions ?

ok got it working it was due to me using the multiple save game script and the gts script making all the other games have the same id as the game.rxdata so ive removed the copy your id over to new game thing.
 
Last edited by a moderator:
1,748
Posts
14
Years
ok so using the latest version (gts2.0.1) and the pokemon uploads fine but when i make a new save game to test it the online id remains as 1 and unable to do anything any suggestions ?

ok got it working it was due to me using the multiple save game script and the gts script making all the other games have the same id as the game.rxdata so ive removed the copy your id over to new game thing.

I have no idea what you meant by your solution. But, I'm glad it worked.
 
423
Posts
13
Years
  • Age 37
  • Seen Aug 31, 2023
well from what i figured out the multiple save script still uses game.rxdata or whatever the default save file is then adds suffix so the gts script detects the 1st slot file and applies the online id to the others aswell
 
1
Posts
11
Years
  • Seen Jan 14, 2015
I am struggling with the script taking too long. I made sure the server was running PHP 5.4 to avoid the issues with deprecation. It is initialized, and when I view the MySQL server via phpmyadmin it shows tables setup but it cant load in the game.

Any help?
 
23
Posts
10
Years
Hey Umbreon, Nice script!

Can you help me with the PHP upload? I tried but the PHP file has making a syntax error on line 1, on the "?".
sorry for the bad english :S
 

rigbycwts

Hmm, hmm.
98
Posts
11
Years
  • Seen Feb 22, 2019
I tested the GTS server on my Bitnami WAMPstack, and I got this error when calling GTSCore.install:
Code:
Exception: RuntimeError
Message: Script error within event 45, map 31 (Route 3):
Exception: NoMethodError
Message: Section005:368:in `connect'undefined method `size' for nil:NilClass
***Full script:
GTSCore.install

Interpreter:243:in `pbExecuteScript'
Sockets:510:in `initialize'
Sockets:586:in `new'
Sockets:586:in `pbHttpRequest'
Sockets:562:in `pbPostData'
GTS:1168:in `execute'
GTS:1290:in `install'
(eval):1:in `pbExecuteScript'
Interpreter:1606:in `eval'
Interpreter:243:in `pbExecuteScript'

Interpreter:276:in `pbExecuteScript'
Interpreter:1606:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'

However, my settings are:
gts.php (password hidden):
Code:
$user = "root";
    $password = "*******";
    $host = "localhost";
    $port = 3306;
    $database = "pokemon";
    $settings_table = "settings";
    $table = "gts";

In the Script Editor:
Code:
URL = "http://localhost:8080/essentials-gts/gts.php"

The same error happens when I use 127.0.0.1 instead of localhost.
 
29
Posts
8
Years
  • Age 34
  • Seen Oct 16, 2021
How can i add GTS

Could some one give me detailed instructions on how to use the .php and setup mysql for

w ww.pokecommunity.com/showthread.php?t=317998

thank you :)
 
1,748
Posts
14
Years
Well, you'll first need a website or webserver of some sort that both supports PHP as well as allows you to use an FTP. It's recommended that the website/server can handle MySQL as well (which usually it does) though, it is possible to use an external MySQL database.

Next, create your MySQL database, open the PHP file and configure the top settings to that of your database.

Upload your PHP file to your website/server.

Edit the URL variable in RGSS script to that of your newly uploaded php file.

Finally, there's a function you need to call, if I remember correctly it'd be something like "GTS.setup" I can't remember. Though, the Readme included in the zip should have a more accurate name for the function.

Now you can finally run the GTS system.

Notice: If you still can't figure it out, this script probably isn't the right one for you.
 
68
Posts
8
Years
  • Age 28
  • Seen Dec 3, 2016
If I press the exit button the trading screen just pops up again after a few seconds oO
 
11
Posts
8
Years
  • Age 33
  • Seen Jun 4, 2016
could you link me to a english tutorial on how to place it because i only know the part to place the script in the script editor pls help btw could be spanish to
 
1,748
Posts
14
Years
could you link me to a english tutorial on how to place it because i only know the part to place the script in the script editor pls help btw could be spanish to

Before you continue.... DO NOT USE IF YOU HAVE NO IDEA HOW TO UPLOAD A PHP FILE AND SETUP A MYSQL DATABASE!

I will not personally give you a tutorial as this is more advanced an requires you to have a webhost with both PHP as well as MySQL support. The reason for this is because if you already had a webhost capable of PHP and MySQL you would (most likely) already know how to correctly set it up, or at least have a dev that can set it up for you.
 
1
Posts
8
Years
  • Age 24
  • Seen Sep 18, 2015
How can I call GTSCore.install in game??

EDIT: Im a noob
 
Last edited:
40
Posts
8
Years
  • Age 33
  • Seen Apr 11, 2024
I've managed to create the PHP file on my site and install the trade system into my game.

My problem now is I'm unsure how to test the trading.

I created a copy of my game in a different place (desktop) and restarted the game. Using a female player with a different name than my main game using a male called Red.

The both were able to upload pokemon to the database but the girl's pokemon rewrote the slot used by Red so there were no longer matching Pokemon that should have been found and traded. Just the one the girl added while the boy game didn't even recognise the pokemon being available at all yet could withdraw his own.

I'm sorry if I'm not making sense. I can't figure out how to word it all.
 
1
Posts
9
Years
  • Age 33
  • Seen Jun 5, 2022
Like DJShira says, can someone reupload please? download doesnt work.
 
1,748
Posts
14
Years
I unfortunately do not have a backup anywhere obvious, though I'll look through some of my older flash drives to see if I have a version of it somewhere
 
Back
Top