Hello, because I was bored today I've worked a little on NPC. You can now add npc to the map you want easily, I've also fixed a bug with the Npc pathfinding.
Code:
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Lun 27 Octobre 2014 à 14:07
-- Version du serveur: 5.6.12-log
-- Version de PHP: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données: `darkorbit_new`
--
-- --------------------------------------------------------
--
-- Structure de la table `portals`
--
CREATE TABLE IF NOT EXISTS `portals` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pos_x` int(11) NOT NULL,
`pos_y` int(11) NOT NULL,
`map_id` int(11) NOT NULL,
`arrive_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=53 ;
--
-- Contenu de la table `portals`
--
INSERT INTO `portals` (`id`, `pos_x`, `pos_y`, `map_id`, `arrive_id`) VALUES
(1, 185, 115, 1, 2),
(2, 20, 20, 2, 1),
(3, 185, 20, 2, 40),
(4, 185, 115, 2, 38),
(5, 20, 20, 9, 6),
(6, 185, 115, 10, 5),
(7, 185, 20, 10, 8),
(8, 185, 115, 11, 7),
(9, 20, 20, 10, 10),
(10, 185, 115, 12, 9),
(11, 185, 20, 12, 12),
(12, 20, 115, 11, 11),
(13, 20, 20, 11, 14),
(14, 20, 115, 8, 13),
(16, 100, 15, 12, 17),
(17, 190, 60, 15, 18),
(18, 20, 20, 12, 19),
(19, 185, 115, 4, 18),
(20, 105, 65, 15, 21),
(21, 220, 145, 16, 20),
(22, 20, 115, 15, 23),
(23, 185, 115, 13, 22),
(24, 20, 20, 15, 25),
(25, 185, 115, 14, 24),
(26, 220, 120, 16, 27),
(27, 105, 65, 14, 26),
(28, 190, 135, 16, 29),
(29, 105, 65, 13, 28),
(30, 185, 20, 13, 31),
(31, 20, 115, 14, 30),
(32, 15, 60, 13, 33),
(33, 190, 60, 4, 32),
(34, 100, 15, 14, 35),
(35, 100, 120, 8, 34),
(36, 185, 115, 3, 37),
(37, 185, 20, 4, 36),
(38, 20, 20, 4, 4),
(40, 20, 115, 3, 3),
(43, 185, 20, 3, 44),
(44, 20, 115, 7, 43),
(45, 185, 115, 7, 46),
(46, 185, 20, 8, 45),
(47, 20, 115, 5, 48),
(48, 185, 20, 6, 47),
(49, 185, 115, 6, 50),
(50, 20, 20, 8, 49),
(51, 20, 115, 6, 52),
(52, 185, 20, 7, 51);