[FUN/MECH] npcx (v0.0.31) - The NPC eXtender (now for 1.8.1) [1097-1157]

Discussion in 'Inactive/Unsupported Plugins' started by wizjany, May 9, 2011.

  1. Offline

    wizjany

    npcx - The NPC eXtender
    Version: 0.0.31

    UPDATE: mixxit has took the initiative to update the npclib to 1.8, all credit for this update goes to him! it should work on any 1.8 version of craftbukkit

    If you are having trouble, please read the old thread here and the included readme.txt that mixxit left. If you know of any other tutorials, do post and I'll add them.

    Info Update: Well long story short I am beginning to get bored of Minecraft and I don't have as much time as I would like to develop this plugin. This probably means that the rewrite I had planned is just going to die. Besides lack of time and motivation, I find it extremely pointless to write an API for NPCs outside of bukkit/craftbukkit, which makes the rewrite I was working on very frustrating. However, I will continue to update mixxit's code for new versions of minecraft, but don't expect any new features or anything.
    Update 2: As NPCs are being planned natively for 1.8 (the adventure update), I will probably be working on a (separate) plugin or directly with the NPC API if I have time.

    Note: If you have iConomy, make sure you have at least version 5+ or you'll get an error like this.
    Code:
    [SEVERE] Could not pass event WHATEVER_EVENT to npcx
    java.lang.NoClassDefFoundError: com/iConomy/iConomy
    You should also be able to add "use-iConomy=false" in the npcx properties file.

    If you're having trouble installing MySql on windows, here's a nice guide: http://forums.bukkit.org/posts/293544, thanks to Atticus Craft. Basic WAMP/LAMP/MAMP servers should work fine too, just make sure you have the username/password correct and the database with permissions to the right user.

    Features:
    • You can create npcs
    • And they do stuff
    • Everything should work like it did in mixxit's last version
    And by "work like it did" I mean I have no clue if there were bugs from then, but they're probably still around now. Please report any you find so I can take them into consideration.

    For MC 1.8.1 (1097+, no RB yet) Download
    For MC 1.7 (937+, 953, 1k): Download
    For MC 1.6 (807+): Download
    For MC 1.5 (740-803): Download
    Source Code

    Changelog:
    Version 0.0.31
    • Updated to MC 1.8.1 (by Mixxit)
    Version 0.0.3
    • Updated for Grum's internal renaming
    Version 0.0.2
    • Updated for 1.6
    Version 0.0.1
    • Updated for 1.5
    • Began code revamp
    All credits go to mixxit for his work. Special thanks to sk89q and fullwall, even if they don't know they helped.
     
    wassilij, Zoaen, nathanaelps and 2 others like this.
  2. Offline

    Heaney

    Ohh!

    So if I want a guard to be friendly to some people, I change their standing to 1000, and for people I want the guards to attack... I set it to -1000?
     
  3. Offline

    wizjany

    yes, assuming the guard is in that faction
    killing them also lowers your standing with the faction (by 1 point per kill i believe, the default is 0, so 1000 kills to make them hostile...you'd think they'd learn faster eh?)
     
  4. Offline

    kappatango

    So, with me being lazy :p is there a way to quickly set up NPC's or is it fully manual via commands for each one?
     
  5. Offline

    Slyvr

    Is there a way to configure this? It seems like too much
     
  6. Offline

    wizjany

    in the source code
    if you know MySQL, i'd say you can fairly quickly make one npc and use it as a template
     
  7. Offline

    kappatango

    I do know SQL so maybe this is the way to do it for me. Thanks :)
     
  8. Offline

    Slyvr

    Where can I find the permissions?
    The readme just has npcx.fulladmin, unless that's all that's there.
    I'm getting an issue where users can't talk to NPCs because of permissions...not sure if its something else or npcx
     
  9. Offline

    wizjany

    something else probably
     
  10. Offline

    Slyvr

    Yes, found something called modifyworld.interact that was messing with it.
    The HP and Atk power of NPCs is not done right though. I set it to 1 on both of them and it still takes 3 of my own deaths and a shitton of attacking before one dies.
     
  11. Offline

    wizjany

    if you're referring to those values in the database, i'm pretty sure those were never implemented
     
  12. Offline

    mixxit

    Just to note guys, there's still no npcs in 1.8 so there won't be a new generation the original version of this till notch adds them - till then Wizjany's version (and i think he's doing a much needed rewrite) is the one to use and i'd like to pass my personal thanks to him for taking the reigns after i departed (as i often do!)

    Wizjany:

    RE: 1.8, Kekec852 has updated npclib https://github.com/Kekec852/NPCLib

    for

    2011-09-16 13:10:30 [SEVERE] java.lang.NoSuchMethodError: net.minecraft.server.ItemInWorldManager.<init>(Lnet/minecraft/server/WorldServer;)V
    2011-09-16 13:10:30 [SEVERE] at net.gamerservices.npclibfork.NpcSpawner.SpawnBasicHumanNpc(Unknown Source)
    2011-09-16 13:10:30 [SEVERE] at net.gamerservices.npcx.myNPC.Spawn(Unknown Source)
    2011-09-16 13:10:30 [SEVERE] at net.gamerservices.npcx.npcx.think(Unknown Source)
    2011-09-16 13:10:30 [SEVERE] at net.gamerservices.npcx.Tick.run(Unknown Source)
    2011-09-16 13:10:30 [SEVERE] at java.util.TimerThread.mainLoop(Timer.java:512)
    2011-09-16 13:10:30 [SEVERE] at java.util.TimerThread.run(Timer.java:462)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  13. Offline

    wizjany

    bah, even mixxit doesn't bother reading the first post

    yea i'll get around to updating it some time, i have some other things to get to though, but npcx shouldn't be difficult, there's only a few changes
     
  14. Offline

    mixxit

    i kind of patched it up for the latest dev build of 1.8.1, not fully tested though

    Jar Version: http://github.com/mixxit/npcx/raw/master/npcx.jar

    CHumanNpc:

    Code:
    package net.gamerservices.npclibfork;
    
    import java.util.logging.Logger;
    
    import net.minecraft.server.Entity;
    import net.minecraft.server.EntityHuman;
    import net.minecraft.server.EntityPlayer;
    import net.minecraft.server.ItemInWorldManager;
    import net.minecraft.server.MinecraftServer;
    import net.minecraft.server.NetworkManager;
    import net.minecraft.server.NetHandler;
    import net.minecraft.server.Packet18ArmAnimation;
    import net.minecraft.server.World;
    import net.minecraft.server.WorldServer;
    
    import org.bukkit.craftbukkit.CraftServer;
    import org.bukkit.event.entity.EntityTargetEvent;
    
    public class CHumanNpc extends EntityPlayer {
    
        private static final Logger logger = Logger.getLogger("Minecraft");
        private int lastTargetId;
        private long lastBounceTick;
        private int lastBounceId;
    
        public CHumanNpc(MinecraftServer minecraftserver, World world, String s, ItemInWorldManager iteminworldmanager) {
            super(minecraftserver, world, s, iteminworldmanager);
    
            NetworkManager netMgr = new NpcNetworkManager(new NpcSocket(), "npc mgr", new NetHandler() {
                @Override
                public boolean c() {
                    return false;
                }
            });
            this.netServerHandler = new NpcNetHandler(minecraftserver, this, netMgr);
            netMgr.a(this.netServerHandler);
    
            this.lastTargetId = -1;
            this.lastBounceId = -1;
            this.lastBounceTick = 0;
        }
    
        public void animateArmSwing() {
            this.b.getTracker(this.dimension).a(this, new Packet18ArmAnimation(this, 1));
        }
    
        public void forceSetName(String n) {
            this.displayName = n;
        }
    
        @Override
        public boolean b(EntityHuman entity) {
    
            EntityTargetEvent event = new NpcEntityTargetEvent(getBukkitEntity(), entity.getBukkitEntity(), NpcEntityTargetEvent.NpcTargetReason.NPC_RIGHTCLICKED);
            CraftServer server = ((WorldServer) this.world).getServer();
            server.getPluginManager().callEvent(event);
    
            return super.b(entity);
        }
    
        @Override
        public void a_(EntityHuman entity) {
            if (lastTargetId == -1 || lastTargetId != entity.id) {
                EntityTargetEvent event = new NpcEntityTargetEvent(getBukkitEntity(), entity.getBukkitEntity(), NpcEntityTargetEvent.NpcTargetReason.CLOSEST_PLAYER);
                CraftServer server = ((WorldServer) this.world).getServer();
                server.getPluginManager().callEvent(event);
            }
            lastTargetId = entity.id;
    
            super.a_(entity);
        }
    
        @Override
        public void c(Entity entity) {
            if (lastBounceId != entity.id || System.currentTimeMillis() - lastBounceTick > 1000) {
                EntityTargetEvent event = new NpcEntityTargetEvent(getBukkitEntity(), entity.getBukkitEntity(), NpcEntityTargetEvent.NpcTargetReason.NPC_BOUNCED);
                CraftServer server = ((WorldServer) this.world).getServer();
                server.getPluginManager().callEvent(event);
    
                lastBounceTick = System.currentTimeMillis();
            }
    
            lastBounceId = entity.id;
    
            super.c(entity);
        }
    }
    
    errrrr getworldserver needs some work :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  15. Offline

    Jake044

    Awesome! We've been waiting for this ^.^
     
  16. Offline

    wassilij

    Working perfect with Bukkit Build 1166, thx.
     
  17. Offline

    xhuul

    I have iConomy installed and working but the npc merchants still use the npcx economy. is there anything special i have to do to get npcx to recognize iConomy?
     
  18. Offline

    Nalun

    I've tried to create pathgroups and when i want to create a position with Code:
    /npcx pathgroup add PATHGROUPID(NUMBER) POSITIONNO(NUMBER)
    it says Insufficient arguments
    /npcx pathgroup add pathgroupid order name

    What can i do??
     
  19. Offline

    mixxit

    First you need to create a group to store all your path points in

    /npcx pathgroup create NalunsPath

    This will give you an ID for the pathgroup it just created save it for later for this example lets say the pathgroup ID it gave you was 75

    Then you need to run around at each point you want the path to go and type (changing the position number at the end (start with 1 then move to 2 then 3 etc)

    /npcx pathgroup add 75 1

    move a bit for the next position

    /npcx pathgroup add 75 2

    and so on :)

    Once you have your path you can assign it to your spawngroup (see /npcx spawngroup pathgroup)
     
  20. Offline

    wizjany

    you forgot the name...
     
  21. Offline

    Nalun

    Thx for your answer. My NPC's move^^
     
  22. Offline

    Chett

    Love that thing. You both made a good job.
     
  23. Offline

    nafoulinard

    Using "[ECON] iConomy 6.0.3 (Celty) [1080]"
    Npcx (latest version) just doesn't seems to reconize it... the merchant only are interested in "npcx money"
    am i doing something wrong?
    (got the 1.8.1 mc version with a few other mods like "jobs 1060" latest version (this one does see the Iconomy plugin) mob spawner latest version too)

    oh and i get an error message everytime i use the /npcx civ money putyournamehere
    ... nvm that, i get some error on all the civ things... first time i ran the pluggin it was fine, it failed around the time i created my first npc merchant


    he's the server error message when i try a /npcx civ command: (to me it looks like chinese...)
    [WARNING] npcx: error: null[Ljava.lang.StackTraceElement;@94fe42
    [SEVERE] java.lang.NullPointerException
    [SEVERE] at net.gamerservices.npcx.npcx.onCommand(npcx.java:1306)
    [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:39)
    [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
    [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:353)
    [SEVERE] at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:755)
    [SEVERE] at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:720)
    [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:713)
    [SEVERE] at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:91)
    [SEVERE] at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
    [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)

    Am i doing something wrong?
    What can i do to make it work?
     
  24. Offline

    Chett

    Testing 8 hours straight now. Translated Parts to german (Got 50+ aged Players who dont speak english ;) - Your PlugIn gives me a back in the days EQ Feeling. And Adds the RP i wanted.

    [Questions]

    I know, u dont like Questions, but...

    NPC roaming/pathing looks strange. Any chance to shorten the "break" between 2 waypoints? Runspeed control? Please, can u make Npc's stop moving, when talking to them? (Reminds me of the JBoots Quest in EQ)

    Where do i set the respawntimer ? Can i set different timer for different spawngroups? *beg*

    Where do i set the aggro range ? Can i set different ranges to different spawngroups? *beg*

    In the Doc u talk bout a temporary ‘spawn’ npc, who does not respond and is gone, when gets killed - howto Spawn them without a spawngroup? *beg*

    How to create Quests (with ID and stuff) that are shown up in the Quest Table i can see in Mysql - how to trigger reward/rewardcoin/rewardtext? Did i miss something? How to connect Triggerwords with Quests? QuestNameTriggerword ? How to Create Data for that Table?

    Did you think about giving Faction as reward for Quests? And/Or a Faction based Quests/Triggerwords mechanic? (Have a required amount of Faction to get a Quest/Triggerword)

    Àny Chance to set the NPC Name color (i.e. for rare and very rare Spanws in spawngroups? (I need to give my older Players Hints ;-P )

    Dont wanna bother u, just gettin max power out of your fantastic tool, Sir. And i am not a programmer, just a user ... so, be kind, any answer is accepted ;-).

    Thx in advance

    Latest ICon6 seems not to work with Npcx, like metioned above me. But need to throw a deeper look as soon ur Plugins lets me - need to test ;-)

    Awesome Plugin. Dont drop it!

    [EDIT]

    After around 3 hours my TestPathingNpc with 12 waypoints stopped moving without a reason.
    30 Minutes later. He's still not moving and started fighting air ;-P Hopefully he runs Amok in a another 30 Minutes, and that really would be an Feature, not a Bug :)
    Anyone else ?
     
    wassilij likes this.
  25. Offline

    wassilij

    I like your ideas, i hope they get implemented. :)
     
  26. Offline

    Chett

    Hm, thx :) But i guess i get n answer like.

    -snip-

    Checkout yourself...

    He likes to snip...

    :)
     
  27. Offline

    wizjany

    You forgot to read the part in the first post where this is no longer getting new features or anything.
     
  28. Offline

    mixxit

    i'm officially working on a new version which will support sqlite
     
    undeadmach1ne, wizjany and wassilij like this.
  29. when i try the commands it just says "an error occured" every command i say :'(
     
  30. Offline

    exaglob

    Look at your server.log file if npcx conect properly to your database.
    next, verify if your database have benn updrade with the npcx's tables.
    if your database is empty, it would say that npcx cant connect to it.
    if your sever.log file say that npcx have properly connect to your database and your database is always empty, try to create tables by hand.
    this is the sql for all tables :
    -- Adminer 3.2.1 MySQL dump SET NAMES utf8; SET foreign_key_checks = 0; SET time_zone = 'SYSTEM'; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `faction_entries`; CREATE TABLE `faction_entries` ( `id` int(10) unsigned NOT NULL auto_increment, `faction_id` int(10) unsigned default NULL, `target_faction_id` int(10) unsigned default NULL, `amount` int(11) default NULL, `arg` int(11) default '1', PRIMARY KEY (`id`), UNIQUE KEY `factiontarget` (`faction_id`,`target_faction_id`), KEY `fk_factionidme` (`faction_id`), KEY `fk_factionidthem` (`faction_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `faction_list`; CREATE TABLE `faction_list` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(45) default NULL, `base` int(11) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `flags`; CREATE TABLE `flags` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(45) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `loottable_entries`; CREATE TABLE `loottable_entries` ( `id` int(11) NOT NULL auto_increment, `loottable_id` int(11) default NULL, `item_id` int(11) default NULL, `amount` int(11) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `loottables`; CREATE TABLE `loottables` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(50) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `merchant`; CREATE TABLE `merchant` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(45) default NULL, `category` varchar(45) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `merchant_entries`; CREATE TABLE `merchant_entries` ( `id` int(10) unsigned NOT NULL auto_increment, `merchantid` int(10) unsigned default NULL, `itemid` int(10) unsigned default NULL, `amount` int(10) unsigned default NULL, `pricebuy` int(10) unsigned default NULL, `pricesell` int(10) unsigned default NULL, PRIMARY KEY (`id`), KEY `fk_merchantid` (`merchantid`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `npc`; CREATE TABLE `npc` ( `id` int(11) unsigned NOT NULL auto_increment, `name` char(40) default 'dummy', `category` char(40) default NULL, `faction_id` int(11) unsigned default NULL, `loottable_id` int(11) unsigned default NULL, `weapon` int(11) unsigned default '0', `helmet` int(11) unsigned default '0', `chest` int(11) unsigned default '0', `legs` int(11) unsigned default '0', `boots` int(11) unsigned default '0', `merchantid` int(10) unsigned default NULL, `hp` int(11) unsigned default '100', `damage` int(11) unsigned default '3', `coin` int(11) unsigned default '100', `storageid` int(11) unsigned default NULL, PRIMARY KEY (`id`), KEY `fk_npc_factionid` (`faction_id`), KEY `fk_npc_loottableid` (`loottable_id`), KEY `fk_npc_merchantid` (`merchantid`), KEY `fk_npc_storageid` (`storageid`) ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `npc_faction`; CREATE TABLE `npc_faction` ( `id` int(11) unsigned NOT NULL auto_increment, `npc_id` int(11) unsigned default NULL, `faction_id` int(11) unsigned default NULL, `amount` int(11) default NULL, PRIMARY KEY (`id`), UNIQUE KEY `npctofaction` (`npc_id`,`faction_id`), KEY `fk_npcid` (`npc_id`), KEY `fk_factionid` (`faction_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `npc_triggerwords`; CREATE TABLE `npc_triggerwords` ( `id` int(10) unsigned NOT NULL auto_increment, `npcid` int(11) unsigned default NULL, `triggerword` char(40) default NULL, `reply` varchar(512) default NULL, `category` char(40) default NULL, PRIMARY KEY (`id`), KEY `fk_npct2n` (`npcid`) ) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `pathgroup`; CREATE TABLE `pathgroup` ( `id` int(10) unsigned NOT NULL auto_increment, `name` char(40) default NULL, `category` char(40) default NULL, `world` varchar(45) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `pathgroup_entries`; CREATE TABLE `pathgroup_entries` ( `id` int(10) unsigned NOT NULL auto_increment, `s` int(11) unsigned default NULL, `pathgroup` int(11) unsigned default NULL, `name` char(40) default NULL, `x` char(40) default NULL, `y` char(40) default NULL, `z` char(40) default NULL, `yaw` char(40) default NULL, `pitch` char(40) default NULL, PRIMARY KEY (`id`), KEY `fk_pathgroupid` (`pathgroup`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `player`; CREATE TABLE `player` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(45) default NULL, `coin` int(10) unsigned default NULL, `flags` int(10) unsigned default NULL, `petid` int(11) default NULL, PRIMARY KEY (`id`), UNIQUE KEY `name_UNIQUE` (`name`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `player_bank`; CREATE TABLE `player_bank` ( `id` int(10) unsigned NOT NULL auto_increment, `playername` varchar(45) default NULL, `itemid` int(10) unsigned default NULL, `coin` int(10) unsigned default NULL, `amount` int(10) unsigned default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `player_faction`; CREATE TABLE `player_faction` ( `id` int(11) unsigned NOT NULL auto_increment, `player_name` varchar(45) default NULL, `faction_id` int(11) unsigned default NULL, `amount` int(11) default NULL, PRIMARY KEY (`id`), UNIQUE KEY `playerfactionzz` (`player_name`,`faction_id`), KEY `fk_faction_id` (`faction_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `player_flags`; CREATE TABLE `player_flags` ( `id` int(10) unsigned NOT NULL auto_increment, `flagid` int(10) unsigned default NULL, `playername` varchar(45) default NULL, `value` varchar(45) default NULL, PRIMARY KEY (`id`), KEY `fk_flagid` (`flagid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `player_quests`; CREATE TABLE `player_quests` ( `id` int(11) NOT NULL, `questid` int(11) unsigned default NULL, `playername` varchar(45) default NULL, `status` int(10) unsigned default '1', `step` int(10) unsigned default '1', PRIMARY KEY (`id`), KEY `fk_questid` (`questid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `quests`; CREATE TABLE `quests` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(45) default 'DefaultQuest', `reward` int(10) unsigned default '0', `rewardcoin` int(10) unsigned default '0', `rewardtext` varchar(512) default 'Well done!', `step` int(11) default '1', `category` varchar(45) default 'default', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `settings`; CREATE TABLE `settings` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(45) default NULL, `value` varchar(45) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `spawngroup`; CREATE TABLE `spawngroup` ( `id` int(10) unsigned NOT NULL auto_increment, `name` char(40) default 'defaultspawngroup', `world` char(40) default NULL, `category` char(40) default NULL, `x` char(40) default NULL, `y` char(40) default NULL, `z` char(40) default NULL, `yaw` char(40) default NULL, `pitch` char(40) default NULL, `pathgroupid` int(10) unsigned default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `spawngroup_entries`; CREATE TABLE `spawngroup_entries` ( `id` int(10) unsigned NOT NULL auto_increment, `spawngroupid` int(11) unsigned default NULL, `npcid` int(11) unsigned default NULL, PRIMARY KEY (`id`), KEY `fk_spawngroupid` (`spawngroupid`), KEY `fk_npcidSGE` (`npcid`) ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `storage`; CREATE TABLE `storage` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(45) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `zone`; CREATE TABLE `zone` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(45) default 'The Wild', `x` int(11) default NULL, `z` int(11) default NULL, `ownername` varchar(45) default '', PRIMARY KEY (`id`), UNIQUE KEY `loc` (`x`,`z`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `zone_members`; CREATE TABLE `zone_members` ( `id` int(10) unsigned NOT NULL auto_increment, `playername` varchar(45) default NULL, `zoneid` int(10) unsigned default NULL, PRIMARY KEY (`id`), UNIQUE KEY `zoneidmember` (`playername`,`zoneid`), KEY `fk_zoneid` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- 2011-09-29 23:08:44


    Hope i help you....
     
  31. Offline

    ItsQ

    /reload command will double all npc's
     

Share This Page