Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 02-26-2013, 01:27 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Besides the views (I have 5 - 2 bots ones, groups, and guilds, plus 1 for mercs), there are also 2 routines, which, by the sound of it, should be included with --routines. Make sure they are added before the view creation. They are:

Code:
delimiter $$

CREATE DEFINER=`root`@`localhost` FUNCTION `GetMobTypeById`(mobid INTEGER UNSIGNED) RETURNS char(1) CHARSET utf8
BEGIN
    DECLARE Result CHAR(1);

    SET Result = NULL;

    IF (select id from character_ where id = mobid) > 0 THEN
      SET Result = 'C';
    ELSEIF (select BotID from bots where BotID = mobid) > 0 THEN
      SET Result = 'B';
    END IF;

    RETURN Result;
END$$
and
Code:
delimiter $$

CREATE DEFINER=`root`@`localhost` FUNCTION `GetMobTypeByName`(mobname VARCHAR(64)) RETURNS char(1) CHARSET utf8
BEGIN
    DECLARE Result CHAR(1);

    SET Result = NULL;

    IF (select id from character_ where name = mobname) > 0 THEN
      SET Result = 'C';
    ELSEIF (select BotID from bots where Name = mobname) > 0 THEN
      SET Result = 'B';
    END IF;

    RETURN Result;
END$$
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:20 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3