Skip to content

Commit f27f9cb

Browse files
committed
support "Mage" vocation
several OT servers merge MS/ED vocation into a Mage vocation having the best features of both MS and ED. Without this fix, on those servers, vBot would constantly error out with Error: (...) concatenat voc: a nil value I tried submitting this upstream, but it seems vBot upstream is unmaintained: Vithrax/vBot#17
1 parent ece0ee8 commit f27f9cb

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • modules/game_bot/default_configs/vBot_4.8/vBot

modules/game_bot/default_configs/vBot_4.8/vBot/extras.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,13 +570,14 @@ if true then
570570
guild = guild.."..."
571571
end
572572
local voc
573-
if text:lower():find("sorcerer") then
573+
local lowerText = text:lower()
574+
if lowerText:find("sorcerer") or lowerText:find("mage") then
574575
voc = "MS"
575-
elseif text:lower():find("druid") then
576+
elseif lowerText:find("druid") then
576577
voc = "ED"
577-
elseif text:lower():find("knight") then
578+
elseif lowerText:find("knight") then
578579
voc = "EK"
579-
elseif text:lower():find("paladin") then
580+
elseif lowerText:find("paladin") then
580581
voc = "RP"
581582
end
582583
local creature = getCreatureByName(name)

0 commit comments

Comments
 (0)