EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bots (https://www.eqemulator.org/forums/forumdisplay.php?f=676)
-   -   Working SQL Bot file (https://www.eqemulator.org/forums/showthread.php?t=39200)

Havok2all 01-08-2015 06:32 PM

Working SQL Bot file
 
Anyone have a working SQL file for bots? I have tried like 6 different versions going back almost 2 years and everyone has had some form of issue. Either the "name already being used" or "No HP column" and most recently "melee bots stand there doing nothing".

Anyone who has a working source able to point to where they got it?

Thanks.

Uleat 01-08-2015 07:56 PM

Going back 2 years is probably a bad thing...

Try using the sql files located in git repo here:
https://github.com/EQEmu/Server/tree...s/sql/git/bots

Post back if you have issues sourcing either those in (drop, then load.)

Havok2all 01-08-2015 08:25 PM

That's the one I currently sourced in (I've come full circle). My current issue is that melee bots just stand there during a fight.

ionhsmith 01-08-2015 08:42 PM

I tried to do this and i get an error ... Says FUNCTION peq.GetMobType does not exist ... i was trying to do this fix as well

Uleat 01-08-2015 11:41 PM

Not sure on that particular function..was it deleted?


EDIT: It may be possible that your load_bots.sql didn't fully run. That function is created in that script.

werebat 01-09-2015 09:50 AM

If you are using a recent build, bots are not working properly anyway. The HP problem and spellcasting issue makes them unpredictable. Until that is resolved, the casters do not work. Not sure about melee bots.

If your build is pre-December, then you should be ok.

Havok2all 01-09-2015 08:48 PM

My issue is the opposite Werebat. Casters are working for me, but melee just stand there and do nothing. They srun to target, but don't attack. As I stated in my first post, I went back trying different source builds of load_bots going back almnost 2 years. I couldn't get any of them to work.

I am really perplexed. I had a server before and bots worked fine. Wish like hell I held onto that file now :(

Riklin 01-11-2015 10:25 PM

Quote:

Originally Posted by ionhsmith (Post 236668)
I tried to do this and i get an error ... Says FUNCTION peq.GetMobType does not exist ... i was trying to do this fix as well


I ran into this issue. What I did to fix it was to create a peqtest database instance and source the September 2014 data, then source in the bots, then source in the mercs. After all that, I copied the GetMobType function in the peqtest database and pasted it in the real database. Worked perfectly for me.

werebat 01-12-2015 09:27 AM

Here is the issue. I fixed it in on my build.

In the load_bots.sql there are two lines that need to be corrected.

197 DELIMTER \\
212 END \\

The problem is that you cannot use a backslash as a delimiter. Change the \\ to $$ and rerun it. You may need to run drop_bots first so you dont hit a bunch of duplicate errors.

197 DELIMTER $$
212 END $$

Uleat 01-12-2015 04:46 PM

Yousir, are correct!

http://dev.mysql.com/doc/refman/5.1/...-defining.html


Not sure how that occurred..I rewrote those and not sure why I would have used 'backs' :/
(I know it was something that I did because all of the old delimiters are '$$')

Forward slashes are fine too..but, I'll push that change to the repo and hopefully it will make it into the peq dump soon.

Thanks for catching that!


EDIT: EQEmu git repo have been updated..the 'old' script actually used '//'..so, not sure how I did that...

Havok2all 01-13-2015 06:19 PM

Bah :P That didn't fix my issue with melee standing around watching the fight.

werebat 01-13-2015 06:22 PM

That is a code issue and not the sql. Recent changes affected the hp and STR values. My caster bots would fight until level 12 but now they just sit. They do cast but they wont melee.

fault 01-19-2015 10:43 PM

getting the following errors in that updated bot sql file

ideas? mysql 5.0.11

Quote:

SQL query:

ALTER TABLE `guild_members` DROP PRIMARY KEY;

MySQL said: Documentation
#1091 - Can't DROP 'PRIMARY'; check that column/key exists
and

Quote:

DELIMITER $$
CREATE FUNCTION `GetMobType` (mobname VARCHAR(64)) RETURNS CHAR(1)
BEGIN
DECLARE Result CHAR(1);
SET Result = NULL;
IF (SELECT COUNT(*) FROM `character_data` WHERE `name` = mobname) > 0 THEN
SET Result = 'C';
ELSEIF (SELECT COUNT(*) FROM `bots` WHERE `Name` = mobname) > 0 THEN
SET Result = 'B';
END IF;
RETURN Result;
END$$

MySQL said: Documentation
#1548 - Cannot load from mysql.proc. The table is probably corrupted

werebat 01-20-2015 09:22 AM

sounds like your mysql needs to be upgraded to 5.1.

fault 01-24-2015 08:48 PM

Ive got now:

Code:

mysql --version
mysql  Ver 14.14 Distrib 5.5.41, for Linux (x86_64) using readline 5.


still get this:

Code:

SQL query:



DELIMITER $$

DROP FUNCTION IF EXISTS `GetMobTypeByName` $$

MySQL said: Documentation
#1548 - Cannot load from mysql.proc. The table is probably corrupted



All times are GMT -4. The time now is 05:28 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.