Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - RyukLikesApples

1
RMXP Script Database / Re: [XP] RMX-OS
April 24, 2012, 10:04:54 am
What if the cutscenes use sprites that move around? Since the server controls the npcs wouldn't it look weird? Or by enemies do you mean the ones in battle, not npcs?

Thanks,
Ryuk
2
RMXP Script Database / Re: [XP] RMX-OS
April 23, 2012, 09:34:34 pm
I tried his file when I first started (~7 days ago) and seeing as it did not work, I had to compile my own :P

Edit:  My god, Blizzard, you are an absolute genius. IT WORKS!

And finally: a game question: is it possible to force parts of the game to be clientside? for instance, cutscenes need to be clientside to display properly, or is there an alternative method to making cutscenes that you would recommend?

Ryuk
3
RMXP Script Database / Re: [XP] RMX-OS
April 23, 2012, 03:02:43 pm
The files included gave me elf header errors. Compiling MySQL.so by myself fixed the problem, but global switches and vars script had errors using it. After upgrading to 1.9.1 global switches and vars worked but login started having problems. I will try what you recommended by movin the command up, will update after I do so; thank you very much for your help.
4
RMXP Script Database / Re: [XP] RMX-OS
April 23, 2012, 02:10:03 am
MOAL, set the Database Timeout to 0.

In other news, still no worky; I am certain that the line is causing errors. (47)
5
RMXP Script Database / Re: [XP] RMX-OS
April 22, 2012, 05:28:01 pm
Hm...I just noticed that if I removed the foreign keys, data isn't saved at all! If I make an account called Test1, the database is unchanged!

I tried dropping the entire database and remaking (0 rows in each table) and when I login there is an error:

Cannot add or update a child row: a foreign key constraint fails (`rmxosdb`.`ips`, CONSTRAINT `ips_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE)
./Data/Action_Handler1.rb:47:in `query'
/srv/rmxos/rmx/Data/Action_Handler1.rb:47:in `try_register'
/srv/rmxos/rmx/Data/Client.rb:135:in `check_connection'
/srv/rmxos/rmx/Data/Client.rb:47:in `handle'
/srv/rmxos/rmx/Data/Server.rb:272:in `block in run'


Edit: Prior to upgrading ruby and it's counterpart mysql.so, this worked fine, as did the database sql commands (wiped it clean a fair amount of times).

Edit 2: The process I use is 1. Stop server. 2. Drop database 3. Use mysql script (RMX-OS SQL Database.sql) 4. Check to see that there are 0 rows in each table 5. start the server (no problems) 5. use client to try and register 6. hit enter key for the register button after I inpout username and password 7."You have been disconnected" and the error in console, no data is written to mysql server.

Edit 2 million: If I comment out this line: #      RMXOS.server.sql.query("REPLACE INTO ips(user_id, ip) VALUES (#{user_id}, '#{ip}')")


the entire thing WORKS, even data saving. So I KNOW it is this line. Yeah, it is this line. But then I get some other errors later about how the IP doesnt exist etc.
6
RMXP Script Database / Re: [XP] RMX-OS
April 22, 2012, 04:51:13 pm
Alright well, I fixed the error by removing foreign constraints completely; in the mysql database I merely executed the code without constraints as follows:
-- phpMyAdmin SQL Dump
-- version 3.5.0
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 21, 2012 at 10:40 PM
-- Server version: 5.5.22-log
-- PHP Version: 5.3.10

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `rmxosdb`
--

-- --------------------------------------------------------

--
-- Table structure for table `buddy_list`
--

CREATE TABLE IF NOT EXISTS `buddy_list` (
  `user1_id` int(10) unsigned NOT NULL,
  `user2_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`user1_id`,`user2_id`),
  KEY `user2_id` (`user2_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `guilds`
--

CREATE TABLE IF NOT EXISTS `guilds` (
  `guild_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `leader_id` int(10) unsigned NOT NULL,
  `guildname` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`guild_id`),
  UNIQUE KEY `leader_id` (`leader_id`),
  UNIQUE KEY `guildname` (`guildname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `inbox`
--

CREATE TABLE IF NOT EXISTS `inbox` (
  `pm_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `recipient_id` int(10) unsigned NOT NULL,
  `sendername` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `senddate` datetime NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `unread` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`pm_id`),
  KEY `recipient_id` (`recipient_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `ips`
--

CREATE TABLE IF NOT EXISTS `ips` (
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `ip` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`user_id`,`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `ips`
--

INSERT INTO `ips` (`user_id`, `ip`) VALUES
(1, '72.197.185.233');

-- --------------------------------------------------------

--
-- Table structure for table `save_data`
--

CREATE TABLE IF NOT EXISTS `save_data` (
  `user_id` int(10) unsigned NOT NULL,
  `data_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `data_value` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`user_id`,`data_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `save_data`
--

INSERT INTO `save_data` (`user_id`, `data_name`, `data_value`) VALUES
(1, 'Game_Actors', '[Array]'),
(1, 'Game_Actors/@data', '[nil,nil,nil,nil,nil,nil,nil,nil,nil,Game_Actor]'),
(1, 'Game_Actors/@data[9]/Game_Actor', '[9,"Crispin","Crispin",0,9,35,0,0,0,0,1,0,Array,550,550,Array,0,0,0,0,0,0,0,0,Array,Array,1,8,8,0,0,Hash,Array]'),
(1, 'Game_Actors/@data[9]/Game_Actor/@item_hotkeys', '[0,0,0,0,0,0,0,0,0,0]'),
(1, 'Game_Actors/@data[9]/Game_Actor/@skill_hotkeys', '[0,0,0,0,0,0,0,0,0,0]'),
(1, 'Game_Actors/@data[9]/Game_Actor/@skills', '[]'),
(1, 'Game_Actors/@data[9]/Game_Actor/@state_time', '{}'),
(1, 'Game_Actors/@data[9]/Game_Actor/@states', '[]'),
(1, 'Game_Actors/@data[9]/Game_Actor/@triggers', '[]'),
(1, 'Game_Map', '[1]'),
(1, 'Game_Party', '[0,0,Array,Hash,Hash,Hash]'),
(1, 'Game_Party/@actors', '[Game_Actor]'),
(1, 'Game_Party/@actors[0]/Game_Actor', '[9,"Crispin","Crispin",0,9,35,0,0,0,0,1,0,Array,550,550,Array,0,0,0,0,0,0,0,0,Array,Array,1,8,8,0,0,Hash,Array]'),
(1, 'Game_Party/@actors[0]/Game_Actor/@item_hotkeys', '[0,0,0,0,0,0,0,0,0,0]'),
(1, 'Game_Party/@actors[0]/Game_Actor/@skill_hotkeys', '[0,0,0,0,0,0,0,0,0,0]'),
(1, 'Game_Party/@actors[0]/Game_Actor/@skills', '[]'),
(1, 'Game_Party/@actors[0]/Game_Actor/@state_time', '{}'),
(1, 'Game_Party/@actors[0]/Game_Actor/@states', '[]'),
(1, 'Game_Party/@actors[0]/Game_Actor/@triggers', '[]'),
(1, 'Game_Party/@armors', '{}'),
(1, 'Game_Party/@items', '{}'),
(1, 'Game_Party/@weapons', '{33=>6,34=>6,35=>5}'),
(1, 'Game_Player', '[43,44,1376,1408,"Crispin",nil]'),
(1, 'Game_SelfSwitches', '[Hash]'),
(1, 'Game_SelfSwitches/@data', '{}'),
(1, 'Game_Switches', '[Array]'),
(1, 'Game_Switches/@data', '[nil,true,false]'),
(1, 'Game_System', '[0,false,false,true,false,0,true,true,true,true,true,true,true,true,true,true,true,true,false,true]'),
(1, 'Game_Variables', '[Array]'),
(1, 'Game_Variables/@data', '[nil,15,0]'),
(1, 'Graphics.frame_count', '4295');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
  `usergroup` int(10) NOT NULL DEFAULT '0',
  `banned` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`user_id`, `username`, `password`, `usergroup`, `banned`) VALUES
(1, 'Ryuk', 'pc20nGPeltQ', 10, 0);

-- --------------------------------------------------------

--
-- Table structure for table `user_data`
--

CREATE TABLE IF NOT EXISTS `user_data` (
  `user_id` int(10) unsigned NOT NULL,
  `notrade` tinyint(1) NOT NULL DEFAULT '0',
  `lastlogin` datetime NOT NULL,
  `guild_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  KEY `guild_id` (`guild_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `user_data`
--

INSERT INTO `user_data` (`user_id`, `notrade`, `lastlogin`, `guild_id`) VALUES
(1, 0, '2012-04-20 05:59:18', NULL);

--
-- Constraints for dumped tables
--

--
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

7
RMXP Script Database / Re: [XP] RMX-OS
April 19, 2012, 08:10:21 pm
Using Ruby-Mysql 2.8.1 (mysql.so) and ruby 1.9.1, RMX-OS gives me an error:

2012-04-19 22:10:27 UTC; -1 () - Error:
Cannot add or update a child row: a foreign key constraint fails (`rmxosdb`.`ips`, CONSTRAINT `ips_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE)
./Data/Action_Handler1.rb:47:in `query'
/srv/rmxos/rmx/Data/Action_Handler1.rb:47:in `try_register'
/srv/rmxos/rmx/Data/Client.rb:135:in `check_connection'
/srv/rmxos/rmx/Data/Client.rb:47:in `handle'
/srv/rmxos/rmx/Data/Server.rb:272:in `block in run'

Using 2.8 mysql.so in conjunction with Ruby 1.8 did not work when I added Global Switches, and global switches worked when I used the 2.8.1 mysql.so and ruby 1.9. However, after a database wipe, I was greeted by this message when attempting to log in. Would you be able to help me fix this? I seem to remember that befre the wipe, existing accounts had no problems logging in, but after the wipe REGISTERING accounts caused this problem. And now I cannot remember the formatting of user entries in the database D:

Please Advise,
Ryuk