mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 04:28:00 +00:00
[Quest API] Add DeleteBot() to Perl/Lua (#4167)
### Perl
- Add $bot->DeleteBot().
```
sub EVENT_SAY {
if ($text =~/#deletebot/i && $client->Admin() >= 100) {
my @bot_list = $entity_list->GetBotList();
foreach $ent (@bot_list) {
if ($ent) {
quest::shout("Deleting " . $ent->GetCleanName());
$ent->DeleteBot();
$ent->Camp(0);
}
}
}
}
```
### Lua
- Add bot:DeleteBot().
```
function event_say(e)
if(e.message:findi("#deletebot")) then
local bot_list = eq.get_entity_list():GetBotList();
for ent in bot_list.entries do
if (ent) then
e.self:Message(7,"Deleting " .. ent:GetCleanName() .. "");
ent:DeleteBot();
ent:Camp(false);
end
end
end
end
```
### Notes
- Allows operators to delete bots.
This commit is contained in:
@@ -60,6 +60,7 @@ public:
|
||||
uint32 GetBotID();
|
||||
void Camp();
|
||||
void Camp(bool save_to_database);
|
||||
void DeleteBot();
|
||||
Lua_ItemInst GetAugmentAt(int16 slot_id, uint8 augment_index);
|
||||
int GetAugmentIDAt(int16 slot_id, uint8 augment_index);
|
||||
luabind::object GetAugmentIDsBySlotID(lua_State* L, int16 slot_id) const;
|
||||
|
||||
Reference in New Issue
Block a user