Bot Account Limit
I was wondering how to limit bot spawns to specific account access like I use to under the commands tab in Heidi. I set the bots so only GM could spawn them until they are fixed. Since I updated the Commands say old and now we have command_settings however the bots are not in there ... So where can I go to set this now ?
|
You want to look in `rule_values` for that particular setting.
|
I looked in there too but i dont see it in there
|
Those rules are added during the updater script's bot installation process.
You'll just need to add them manually too in your case, since you added the bot tables manually: Code:
INSERT INTO `rule_values` VALUES ('1', 'Bots:AAExpansion', '8', 'The expansion through which bots will obtain AAs'); I need to dig around sometime and figure out how exactly that system works. EDIT: Actually... There's several things that you will need to do since you did a manual install. (The script itself used to perform all of those task..but, too many people were having 'special case' failures for something that worked absolutely fine on my system and was coded to ansi sql specs...) Run the script portion of these lines individually..some may fail: https://github.com/EQEmu/Server/blob...pdate.pl#L1099 https://github.com/EQEmu/Server/blob...pdate.pl#L1102 https://github.com/EQEmu/Server/blob...pdate.pl#L1106 https://github.com/EQEmu/Server/blob...pdate.pl#L1108 if you haven't done this already: https://github.com/EQEmu/Server/blob...pdate.pl#L1111 |
I have those in there but not the one that i can make it so only gms can soawn or make bots.
|
Make sure you see my edit..the last one includes the `command_settings` entry.
Just bump the `status` of that up to whatever you want the minimum to be. |
ok I'm not doing something right on this I guess ... how exactly do I run these scripts? I thought I could just pull them from the links you sent but guess I was wrong ... might be out of my knowledge
|
On the lines linked to, you want what's inside the outermost quotes.
|
select all, copy, and run in what ? type of thing I guess is what I'm asking lol
|
Ok I stopped being special and figured it out ... thanks Uleat that worked
|
ok so after I got it so only GM can spawn bots how do I delete the current ones from bot_data
I get this error DELETE FROM `peq`.`bot_data` WHERE `bot_id`=1; /* SQL Error (1451): Cannot delete or update a parent row: a foreign key constraint fails (`peq`.`bot_stances`, CONSTRAINT `FK_bot_stances_1` FOREIGN KEY (`bot_id`) REFERENCES `bot_data` (`bot_id`)) */ |
Bot ID's are tied to multiple tables..gimme a little bit and I'll see if there's something that can be accomplished easily.
|
ok sounds good... I guess I could always do the drop_bots sql and reload them ... would that work ?
|
I'm not liking what I see in terms of ease-of-use...
I don't particularly care to test it on my working database because I have changes in it that need to be scripted out first. I can't say whether or not doing a manual drop/load will work because I haven't tested that process. If you're using HeidiSQL or Navicat, you'd probably be best suited to manually select the entries and delete them by table until they clear out. The only one (I believe) that you don't need to touch is `bot_command_settings` - if you happened to be using that dev branch. |
hmm I use heidi ill give it a shot and post what i find... I know i cant delete it from bot_data because thats whats giving me the error so ill try the others.
|
Try `bot_data` last as most of the constraints are tied to the `bot_id` column there.
|
Ok so i was able to delete everything from the other tables and then delete the bot_data erasing the bots which is good. I came up with another issue though. Under Rule_values where u can limit the amount of bots people can have up at one time I set it to 1 and it is not working. Set at 1 people are still able to spawn multiple bots at the same time.
|
https://github.com/EQEmu/Server/blob.../bot.cpp#L9722
Make sure that the rule you are changing in the database is named 'Bots:SpawnLimit' exactly - no deviations in spelling. Quote:
The `ruleset_id` also plays a role in this..though, I can never figure out which one is supposed to be active... Code:
SELECT * FROM `rule_sets` LIMIT 1; (Is this why rulesets are so hard to deal with?) |
Mine says Bots:SpawnBotCount
And my rule_set is at 1 |
There's 8 rule name changes starting here: https://github.com/EQEmu/Server/blob...pdate.pl#L1119
You'll need to update the names to match what the server code uses. Code:
if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:BotAAExpansion'") ne "" && $db){ It sounds like you have the old rule names in place..so, you should be able to just run the 8 UPDATE queries. Still not sure why your install wouldn't register for the updater script. |
Yea it seems my updates are not working very well through the updater for some reason. I have to manually source in everything.
is there a way to copy and paste that code without getting all the numbers |
I got this when doing the query
SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIK' at line 1 */ |
Remember, you just want the SQL portion of those lines.
Code:
print get_mysql_result("UPDATE `rule_values` SET `rule_name` = 'Bots:AAExpansion' WHERE `rule_name` LIKE 'Bots:BotAAExpansion';"); Code:
UPDATE `rule_values` SET `rule_name` = 'Bots:AAExpansion' WHERE `rule_name` LIKE 'Bots:BotAAExpansion'; The outer 'wrapper' is the perl script - which doesn't run too well in MySQL :) |
ok awesome that updated thanks.
so is this Bots:QuestableSpawnLimit a quest people can do to be able to use bots? |
All times are GMT -4. The time now is 11:15 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.