Bot saylinks and command aliases.

This commit is contained in:
Kinglykrab 2015-07-05 22:32:59 -04:00
parent 1d29c873fb
commit e2ac647e03
12 changed files with 222 additions and 311 deletions

View File

@ -8,6 +8,12 @@ mackal: Rewrite NPC combat attack round logic
See: http://www.eqemulator.org/forums/showthread.php?t=38708 See: http://www.eqemulator.org/forums/showthread.php?t=38708
You can set Combat:UseLiveCombatRounds to false to use the old rules You can set Combat:UseLiveCombatRounds to false to use the old rules
PC Double Attack rates kind of follow the same thing but still needs to be implemented PC Double Attack rates kind of follow the same thing but still needs to be implemented
Kinglykrab: WARNING: summonburriedplayercorpse is now summonburiedplayercorpse, getplayerburriedcorpsecount is now getplayerburiedcorpsecount, summon_burried_player_corpse is now summon_buried_player_corpse, and get_player_burried_corpse_count is now get_player_buried_corpse_count FIX THESE IN YOUR SCRIPTS OR THEY WILL NOT WORK!!!!
Added bot saylinks (thanks Uleat!)
Command aliases for #augmentitem (#aug), #findnpctype (#fn), #findspell (#fs)
Bot command changes: #bot sow -> #bot speed, #bot magepet -> #bot setpet, #bot resurrectme -> #bot resurrect
Changed all occurrences of burried to buried in the code.
client_packet.cpp was referencing old columns in character_corpses, not sure how we didn't already see this before.
== 7/4/2015 == == 7/4/2015 ==
mackal: Reworked the activated avoidace skills (riposte, dodge, etc) based on dev quotes mackal: Reworked the activated avoidace skills (riposte, dodge, etc) based on dev quotes

View File

@ -506,6 +506,8 @@ RULE_INT(Bots, BotAAExpansion, 8) // Bots get AAs through this expansion
RULE_BOOL(Bots, BotGroupXP, false) // Determines whether client gets xp for bots outside their group. RULE_BOOL(Bots, BotGroupXP, false) // Determines whether client gets xp for bots outside their group.
RULE_BOOL(Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs. RULE_BOOL(Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs.
RULE_BOOL(Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner levels/de-levels (false is original behavior) RULE_BOOL(Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner levels/de-levels (false is original behavior)
RULE_BOOL(Bots, BotCharacterLevelEnabled, false) // Enables required level to spawn bots
RULE_INT(Bots, BotCharacterLevel, 0) // 0 as default (if level > this value you can spawn bots if BotCharacterLevelEnabled is true)
RULE_CATEGORY_END() RULE_CATEGORY_END()
#endif #endif

View File

@ -8731,52 +8731,53 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
c->Message(0, "#bot create [name] [class (id)] [race (id)] [model (male/female)] - create a permanent bot. See #bot help create."); c->Message(0, "#bot create [name] [class (id)] [race (id)] [model (male/female)] - create a permanent bot. See #bot help create.");
c->Message(0, "#bot help create - show all the race/class id. (make it easier to create bots)"); c->Message(0, "#bot help create - show all the race/class id. (make it easier to create bots)");
c->Message(0, "#bot delete - completely destroy forever the targeted bot and all its items."); c->Message(0, "#bot delete - completely destroy forever the targeted bot and all its items.");
c->Message(0, "#bot list [all/class(1-16)] - list your bots all or by class. Classes: 1(WAR), 2(CLR), 3(PAL), 4(RNG), 5(SHD), 6(DRU), 7(MNK), 8(BRD), 9(ROG), 10(SHM), 11(NEC), 12(WIZ), 13(MAG), 14(ENC), 15(BST), 16(BER)"); c->Message(0, "#bot list [all/class(1-16)] - list all of your bots or list by class. Classes: 1(WAR), 2(CLR), 3(PAL), 4(RNG), 5(SHD), 6(DRU), 7(MNK), 8(BRD), 9(ROG), 10(SHM), 11(NEC), 12(WIZ), 13(MAG), 14(ENC), 15(BST), 16(BER)");
c->Message(0, "#bot spawn [bot name] - spawn a bot from it's name (use list to see all the bots). "); c->Message(0, "#bot spawn [bot name] - spawn a bot from it's name (use list to see all the bots). ");
c->Message(0, "#bot inventory list - show the inventory (and the slots IDs) of the targeted bot."); c->Message(0, "#bot inventory list - show the inventory (and the slots IDs) of the targeted bot.");
c->Message(0, "#bot inventory remove [slotid] - remove the item at the given slot in the inventory of the targeted bot."); c->Message(0, "#bot inventory remove [slotid] - remove the item at the given slot in the inventory of the targeted bot.");
c->Message(0, "#bot update - you must type that command once you gain a level."); c->Message(0, "#bot update - you must type that command once you gain a level.");
c->Message(0, "#bot summon - It will summon your targeted bot to you."); c->Message(0, "#bot summon - It will summon your targeted bot to you.");
c->Message(0, "#bot ai mez - If you're grouped with an Enchanter, he will mez your target."); c->Message(0, "#bot ai mez - If you're grouped with an Enchanter, he will mesmerize your target.");
c->Message(0, "#bot picklock - You must have a targeted Rogue bot in your group and be right on the door."); c->Message(0, "#bot picklock - You must have a targeted Rogue bot in your group and be right on the door.");
c->Message(0, "#bot cure [poison|disease|curse|blindness] Cleric has most options"); c->Message(0, "#bot cure [poison|disease|curse|blindness] Cleric has most options");
c->Message(0, "#bot bindme - You must have a Cleric in your group to get Bind Affinity cast on you."); c->Message(0, "#bot bindme - You must have a Cleric in your group to get Bind Affinity cast on you.");
c->Message(0, "#bot track - look at mobs in the zone (ranger has options)"); c->Message(0, "#bot track - look at mobs in the zone (Ranger has options)");
c->Message(0, "#bot target calm - attempts to pacify your target mob."); c->Message(0, "#bot target calm - attempts to pacify your target mob.");
c->Message(0, "#bot evac - transports your pc group to safe location in the current zone. bots are lost"); c->Message(0, "#bot evac - transports your group to safe location in the current zone (bots are lost)");
c->Message(0, "#bot resurrectme - Your bot Cleric will rez you."); c->Message(0, "#bot resurrect - Your Cleric bot will resurrect your targeted player corpse.");
c->Message(0, "#bot corpse summon - Necromancers summon corpse."); c->Message(0, "#bot corpse summon - Necromancers summon your targeted player's corpses.");
c->Message(0, "#bot lore - cast Identify on the item on your mouse pointer."); c->Message(0, "#bot lore - cast Identify on the item on your mouse pointer.");
c->Message(0, "#bot sow - Bot sow on you (Druid has options)"); c->Message(0, "#bot speed - Bots will cast Spirit of Wolf on you (Druid has options)");
c->Message(0, "#bot invis - Bot invisiblity (must have proper class in group)"); c->Message(0, "#bot invis - Bot invisiblity (must have proper class in group)");
c->Message(0, "#bot levitate - Bot levitation (must have proper class in group)"); c->Message(0, "#bot levitate - Bot levitation (must have proper class in group)");
c->Message(0, "#bot resist - Bot resist buffs (must have proper class in group)"); c->Message(0, "#bot resist - Bot resist buffs (must have proper class in group)");
c->Message(0, "#bot runeme - Enchanter Bot cast Rune spell on you"); c->Message(0, "#bot runeme - Enchanter bot casts Rune spell on you");
c->Message(0, "#bot shrink - Shaman or Beastlord will shrink target"); c->Message(0, "#bot shrink - Shaman or Beastlord will shrink target");
c->Message(0, "#bot endureb - Bot enduring breath (must have proper class in group)"); c->Message(0, "#bot endureb - Bot enduring breath (must have proper class in group)");
c->Message(0, "#bot charm - (must have proper class in group)"); c->Message(0, "#bot charm - (must have proper class in group)");
c->Message(0, "#bot dire charm - (must have proper class in group)"); c->Message(0, "#bot dire charm - (must have proper class in group)");
c->Message(0, "#bot pet remove - (remove pet before charm)"); c->Message(0, "#bot pet remove - (remove pet before charm)");
c->Message(0, "#bot gate - you need a Druid or Wizard in your group)"); c->Message(0, "#bot gate - Druid or Wizard bot will cast gate.");
c->Message(0, "#bot archery - Toggle Archery Skilled bots between using a Bow or using Melee weapons."); c->Message(0, "#bot archery - Toggle Archery Skilled bots between using a Bow or using Melee weapons.");
c->Message(0, "#bot magepet [earth|water|air|fire|monster] - Select the pet type you want your Mage bot to use."); c->Message(0, "#bot setpet [earth|water|air|fire|monster] - Select the pet type you want your Magician bot to use.");
c->Message(0, "#bot giveitem - Gives your targeted bot the item you have on your cursor."); c->Message(0, "#bot giveitem - Gives your targeted bot the item you have on your cursor.");
c->Message(0, "#bot augmentitem - Allows you to augment items for other classes. You must have the Augmentation Sealer window filled."); c->Message(0, "#bot augmentitem - Allows you to augment items for other classes. (You MUST have the Augmentation Sealer window filled)");
c->Message(0, "#bot camp - Tells your bot to camp out of the game."); c->Message(0, "#bot camp - Tells your bot to camp out of the game.");
c->Message(0, "#bot group help - Displays the commands available to manage any BOTs in your group."); c->Message(0, "#bot group help - Displays the commands available to manage any bots in your group.");
c->Message(0, "#bot botgroup help - Displays the commands available to manage BOT ONLY groups."); c->Message(0, "#bot botgroup help - Displays the commands available to manage bot ONLY groups.");
c->Message(0, "#bot mana [<bot name or target> | all] - Displays a mana report for all your spawned bots."); c->Message(0, "#bot mana [<bot name or target> | all] - Displays a mana report for all your spawned bots.");
c->Message(0, "#bot setfollowdistance ### - sets target bots follow distance to ### (ie 30 or 250)."); c->Message(0, "#bot setfollowdistance ### - sets target bots follow distance to ### (ie 30 or 250).");
c->Message(0, "#bot [hair|haircolor|beard|beardcolor|face|eyes|heritage|tattoo|details <value>] - Change your BOTs appearance."); c->Message(0, "#bot [hair|haircolor|beard|beardcolor|face|eyes|heritage|tattoo|details <value>] - Change your bot's appearance.");
c->Message(0, "#bot armorcolor <slot> <red> <green> <blue> - #bot help armorcolor for info"); c->Message(0, "#bot armorcolor <slot> <red> <green> <blue> - #bot help armorcolor for info");
c->Message(0, "#bot taunt [on|off] - Turns taunt on/off for targeted bot"); c->Message(0, "#bot taunt [on|off] - Determines whether or not your targeted bot will taunt.");
c->Message(0, "#bot stance [name] [stance (id)|list] - Sets/lists stance for named bot (Passive = 0, Balanced = 1, Efficient = 2, Reactive = 3, Aggressive = 4, Burn = 5, BurnAE = 6)"); c->Message(0, "#bot stance [name] [stance (id)|list] - Sets/lists stance for named bot (Passive = 0, Balanced = 1, Efficient = 2, Reactive = 3, Aggressive = 4, Burn = 5, BurnAE = 6)");
c->Message(0, "#bot groupmessages [on|off] [bot name|all] - Turns group messages on/off for named bot/all bots."); c->Message(0, "#bot groupmessages [on|off] [bot name|all] - Turns group messages on/off for named bot/all bots.");
c->Message(0, "#bot defensive [bot name] - Causes warrior or knight bot to use defensive discipline / buff."); c->Message(0, "#bot defensive [bot name] - Causes Warrior, Shadow Knight, or Paladin bot to use their defensive discipline or buff.");
c->Message(0, "#bot healrotation help - Displays the commands available to manage BOT heal rotations."); c->Message(0, "#bot healrotation help - Displays the commands available to manage BOT heal rotations.");
c->Message(0, "#bot pull [<bot name>] [target] - Bot Pulling Target NPC's"); c->Message(0, "#bot pull [<bot name>] [target] - Bot Pulling Target NPCs");
c->Message(0, "#bot setinspectmessage - Copies your inspect message to a targeted bot that you own"); c->Message(0, "#bot setinspectmessage - Copies your inspect message to a targeted bot that you own");
c->Message(0, "#bot bardoutofcombat [on|off] - Determines wheter bard bots use out of combat songs."); c->Message(0, "#bot bardoutofcombat [on|off] - Determines whether Bard bots use out of combat songs.");
c->Message(0, "#bot showhelm [on|off] - Determines whether or not your targeted bot's helmet will show. (Requires a respawn to take effect)");
return; return;
} }
@ -9083,6 +9084,13 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
} }
if(!strcasecmp(sep->arg[1], "spawn") ) { if(!strcasecmp(sep->arg[1], "spawn") ) {
if (RuleB(Bots, BotCharacterLevelEnabled)) {
if (c->GetLevel() < RuleI(Bots, BotCharacterLevel)) {
c->Message(0, "You are only level %d, you must be level %d to spawn a bot!", c->GetLevel(), RuleI(Bots, BotCharacterLevel));
return;
}
}
uint32 botId = GetBotIDByBotName(std::string(sep->arg[2])); uint32 botId = GetBotIDByBotName(std::string(sep->arg[2]));
if(GetBotOwnerCharacterID(botId, &TempErrorMessage) != c->CharacterID()) { if(GetBotOwnerCharacterID(botId, &TempErrorMessage) != c->CharacterID()) {
@ -9588,7 +9596,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
Tracker->CastToBot()->BotGroupSay(Tracker->CastToBot(), "Tracking mobs nearby", c->GetName()); Tracker->CastToBot()->BotGroupSay(Tracker->CastToBot(), "Tracking mobs nearby", c->GetName());
entity_list.ShowSpawnWindow(c, RangeD, false); entity_list.ShowSpawnWindow(c, RangeD, false);
} else } else
Tracker->CastToBot()->BotGroupSay(Tracker->CastToBot(), "You want to [track all], [track near], or [track rare]?", c->GetName()); Tracker->CastToBot()->BotGroupSay(Tracker->CastToBot(), "Do you want to %s, %s, or %s?", Tracker->CastToBot()->CreateSayLink(c, "#bot track all", "track all").c_str(), Tracker->CastToBot()->CreateSayLink(c, "#bot track near", "track near").c_str(), Tracker->CastToBot()->CreateSayLink(c, "#bot track rare", "track rare").c_str());
break; break;
case BARD: case BARD:
@ -9658,7 +9666,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|| !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 1)) { || !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 1)) {
Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "I don't have the needed level yet", sep->arg[2]); Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "I don't have the needed level yet", sep->arg[2]);
} else } else
Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "Do you want [cure poison], [cure disease], [cure curse], or [cure blindness]?", c->GetName()); Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "Do you want to cure %s, %s, %s, or %s?", Curer->CastToBot()->CreateSayLink(c, "#bot cure poison", "poison").c_str(), Curer->CastToBot()->CreateSayLink(c, "#bot cure disease", "disease").c_str(), Curer->CastToBot()->CreateSayLink(c, "#bot cure curse", "curse").c_str(), Curer->CastToBot()->CreateSayLink(c, "#bot cure blindness", "blindness").c_str());
break; break;
case SHAMAN: case SHAMAN:
@ -9678,7 +9686,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|| !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 2)) { || !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 2)) {
Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "I don't have the needed level yet", sep->arg[2]); Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "I don't have the needed level yet", sep->arg[2]);
} else } else
Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "Do you want [cure poison], [cure disease], or [cure blindness]?", c->GetName()); Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "Do you want to cure %s, %s, or %s?", Curer->CastToBot()->CreateSayLink(c, "#bot cure poison", "poison").c_str(), Curer->CastToBot()->CreateSayLink(c, "#bot cure disease", "disease").c_str(), Curer->CastToBot()->CreateSayLink(c, "#bot cure blindness", "blindness").c_str());
break; break;
case DRUID: case DRUID:
@ -9696,7 +9704,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|| !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 5)) { || !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 5)) {
Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "I don't have the needed level yet", sep->arg[2]) ; Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "I don't have the needed level yet", sep->arg[2]) ;
} else } else
Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "Do you want [cure poison], or [cure disease]?", c->GetName()); Curer->CastToBot()->BotGroupSay(Curer->CastToBot(), "Do you want to cure %s or %s?", Curer->CastToBot()->CreateSayLink(c, "#bot cure poison", "poison").c_str(), Curer->CastToBot()->CreateSayLink(c, "#bot cure disease", "disease").c_str());
break; break;
default: default:
c->Message(15, "You must have a Cleric, Shaman, or Druid in your group."); c->Message(15, "You must have a Cleric, Shaman, or Druid in your group.");
@ -9780,9 +9788,9 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
} }
//Resurrect //Resurrect
if(!strcasecmp(sep->arg[1], "resurrectme")) { if(!strcasecmp(sep->arg[1], "resurrect")) {
Mob *target = c->GetTarget(); Mob *target = c->GetTarget();
if(target == nullptr || !target->IsCorpse()) { if(target == nullptr || !target->IsPlayerCorpse()) {
c->Message(15, "You must select a corpse!"); c->Message(15, "You must select a corpse!");
return; return;
} }
@ -9808,7 +9816,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
return; return;
} }
if(!strcasecmp(sep->arg[1], "magepet")) { if(!strcasecmp(sep->arg[1], "setpet")) {
if(c->GetTarget() && c->GetTarget()->IsBot() && (c->GetTarget()->GetClass() == MAGICIAN)) { if(c->GetTarget() && c->GetTarget()->IsBot() && (c->GetTarget()->GetClass() == MAGICIAN)) {
if(c->GetTarget()->CastToBot()->GetBotOwnerCharacterID() == c->CharacterID()) { if(c->GetTarget()->CastToBot()->GetBotOwnerCharacterID() == c->CharacterID()) {
int botlevel = c->GetTarget()->GetLevel(); int botlevel = c->GetTarget()->GetLevel();
@ -10144,7 +10152,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
} }
// Sow // Sow
if ((!strcasecmp(sep->arg[1], "sow")) && (c->IsGrouped())) { if ((!strcasecmp(sep->arg[1], "speed")) && (c->IsGrouped())) {
Mob *Sower; Mob *Sower;
uint32 SowerClass = 0; uint32 SowerClass = 0;
Group *g = c->GetGroup(); Group *g = c->GetGroup();
@ -10182,37 +10190,37 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
switch(SowerClass) { switch(SowerClass) {
case DRUID: case DRUID:
if ((!strcasecmp(sep->arg[2], "regular")) && (zone->CanCastOutdoor()) && (c->GetLevel() >= 10)) { if ((!strcasecmp(sep->arg[2], "regular")) && (zone->CanCastOutdoor()) && (c->GetLevel() >= 10)) {
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Casting sow..."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Casting Spirit of Wolf.");
Sower->CastSpell(278, c->GetID(), 1, -1, -1); Sower->CastSpell(278, c->GetID(), 1, -1, -1);
} }
else if ((!strcasecmp(sep->arg[2], "regular")) && (zone->CanCastOutdoor()) && (c->GetLevel() <= 10)) else if ((!strcasecmp(sep->arg[2], "regular")) && (zone->CanCastOutdoor()) && (c->GetLevel() <= 10))
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I'm not level 10 yet."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I'm not level 10 yet.");
else if ((!strcasecmp(sep->arg[2], "wolf")) && zone->CanCastOutdoor() && (c->GetLevel() >= 20)) { else if ((!strcasecmp(sep->arg[2], "wolf")) && zone->CanCastOutdoor() && (c->GetLevel() >= 20)) {
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Casting group wolf..."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Casting group Spirit of Wolf.");
Sower->CastSpell(428, c->GetID(), 1, -1, -1); Sower->CastSpell(428, c->GetID(), 1, -1, -1);
} }
else if ((!strcasecmp(sep->arg[2], "wolf")) && (c->GetLevel() <= 20)) else if ((!strcasecmp(sep->arg[2], "wolf")) && (c->GetLevel() <= 20))
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I'm not level 20 yet."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I'm not level 20 yet.");
else if ((!strcasecmp(sep->arg[2], "feral")) && (c->GetLevel() >= 50)) { else if ((!strcasecmp(sep->arg[2], "feral")) && (c->GetLevel() >= 50)) {
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Casting Feral Pack..."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Casting Feral Pack.");
Sower->CastSpell(4058, c->GetID(), 1, -1, -1); Sower->CastSpell(4058, c->GetID(), 1, -1, -1);
} }
else if ((!strcasecmp(sep->arg[2], "feral")) && (c->GetLevel() <= 50)) else if ((!strcasecmp(sep->arg[2], "feral")) && (c->GetLevel() <= 50))
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I'm not level 50 yet."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I'm not level 50 yet.");
else if ((!strcasecmp(sep->arg[2], "shrew")) && (c->GetLevel() >= 35)) { else if ((!strcasecmp(sep->arg[2], "shrew")) && (c->GetLevel() >= 35)) {
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Casting Pack Shrew..."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Casting Pack Shrew.");
Sower->CastSpell(4055, c->GetID(), 1, -1, -1); Sower->CastSpell(4055, c->GetID(), 1, -1, -1);
} }
else if ((!strcasecmp(sep->arg[2], "wolf")) && (c->GetLevel() <= 35)) else if ((!strcasecmp(sep->arg[2], "wolf")) && (c->GetLevel() <= 35))
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I'm not level 35 yet."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I'm not level 35 yet.");
else if ((!zone->CanCastOutdoor()) && (!strcasecmp(sep->arg[2], "regular")) || (!zone->CanCastOutdoor()) && (!strcasecmp(sep->arg[2], "wolf"))) else if ((!zone->CanCastOutdoor()) && (!strcasecmp(sep->arg[2], "regular")) || (!zone->CanCastOutdoor()) && (!strcasecmp(sep->arg[2], "wolf")))
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I can't cast this spell indoors, try [sow shrew] if you're 35 or higher, or [sow feral] if you're 50 or higher."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I can't cast this spell indoors, try %s if you're 35 or higher, or %s if you're 50 or higher.", Sower->CastToBot()->CreateSayLink(c, "#bot speed shrew", "Pack Shrew").c_str(), Sower->CastToBot()->CreateSayLink(c, "#bot speed feral", "Feral Pack").c_str());
else if (!zone->CanCastOutdoor()) else if (!zone->CanCastOutdoor())
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I can't cast this spell indoors, try [sow shrew] if you're 35 or higher, or [sow feral] if you're 50 or higher."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I can't cast this spell indoors, try 5s if you're 35 or higher, or %s if you're 50 or higher.", Sower->CastToBot()->CreateSayLink(c, "#bot speed shrew", "Pack Shrew").c_str(), Sower->CastToBot()->CreateSayLink(c, "#bot speed feral", "Feral Pack").c_str());
else if (zone->CanCastOutdoor()) else if (zone->CanCastOutdoor())
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Do you want [sow regular] or [sow wolf]?"); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "Do you want %s or %s?", Sower->CastToBot()->CreateSayLink(c, "#bot speed regular", "Spirit of Wolf").c_str(), Sower->CastToBot()->CreateSayLink(c, "#bot speed wolf", "Group Spirit of Wolf").c_str());
else if (!zone->CanCastOutdoor()) else if (!zone->CanCastOutdoor())
Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I can't cast this spell indoors, try [sow shrew] if you're 35 or higher, or [sow feral] if you're 50 or higher."); Sower->CastToBot()->BotGroupSay(Sower->CastToBot(), "I can't cast this spell indoors, try %s if you're 35 or higher, or %s if you're 50 or higher.", Sower->CastToBot()->CreateSayLink(c, "#bot speed shrew", "Pack Shrew").c_str(), Sower->CastToBot()->CreateSayLink(c, "#bot speed feral", "Feral").c_str());
break; break;
case SHAMAN: case SHAMAN:
if ((zone->CanCastOutdoor()) && (c->GetLevel() >= 9)) { if ((zone->CanCastOutdoor()) && (c->GetLevel() >= 9)) {
@ -10258,7 +10266,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
Group *g = c->GetGroup(); Group *g = c->GetGroup();
Mob *target = c->GetTarget(); Mob *target = c->GetTarget();
if(target == nullptr || (!target->IsClient() && (c->GetTarget()->CastToBot()->GetBotOwner() != c))) if(target == nullptr || (!target->IsClient() && (c->GetTarget()->CastToBot()->GetBotOwner() != c)))
c->Message(15, "You must select a player or bot you own"); c->Message(15, "You must select a player or bot you own!");
else if(g) { else if(g) {
for(int i = 0; i < MAX_GROUP_MEMBERS; i++){ for(int i = 0; i < MAX_GROUP_MEMBERS; i++){
@ -10305,6 +10313,25 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
// Gate // Gate
if ((!strcasecmp(sep->arg[1], "gate")) && (c->IsGrouped())) { if ((!strcasecmp(sep->arg[1], "gate")) && (c->IsGrouped())) {
const char* druidgate[25][4] = { { "#bot gate karana", "karana", "North Karana", "550" }, { "#bot gate commons", "commons", "West Commonlands", "551" },
{ "#bot gate tox", "tox", "Toxxulia Forest", "552" }, { "#bot gate butcher", "butcher", "Butcherblock Mountains", "553" }, { "#bot gate lava", "lava", "Lavastorm Mountains", "554" },
{ "#bot gate ro", "ro", "South Ro", "555" }, { "#bot gate feerott", "feerrott", "Feerrott", "556" }, { "#bot gate steamfont", "steamfont", "Steamfont Mountains", "557" },
{ "#bot gate misty", "misty", "Misty Thicket", "558" }, { "#bot gate wakening", "wakening", "Wakening Lands", "1398" }, { "#bot gate iceclad", "iceclad", "Ieclad Ocean", "1434" },
{ "#bot gate divide", "divide", "The Great Divide", "1438" }, { "#bot gate cobalt", "cobalt", "Cobalt Scar", "1440" }, { "#bot gate combines", "combines", "The Combines", "1517" },
{ "#bot gate surefall", "surefall", "Surefall Glade", "2020" }, { "#bot gate grimling", "grimling", "Grimling Forest", "2419" }, { "#bot gate twilight", "twilight", "The Twilight Sea", "2424" },
{ "#bot gate dawnshroud", "dawnshroud", "Dawnshroud Peak", "2429" }, { "#bot gate nexus", "nexus", "The Nexus", "2432" }, { "#bot gate pok", "pok", "Plane of Knowledge", "3184" },
{ "#bot gate stonebrunt", "stonebrunt", "Stonebrunt Mountains", "3792" }, { "#bot gate bloodfields", "bloodfields", "Bloodfields", "6184" },
{ "#bot gate emerald", "emerald", "The Emerald Jungle", "1737" }, { "#bot gate skyfire", "skyfire", "Skyfire Mountains", "1736" }, { "#bot gate slaughter", "slaughter", "Wall of Slaughter", "6179" } };
const char* wizardgate[24][4] = { { "#bot gate commons", "commons", "West Commonlands", "566" }, { "#bot gate fay", "fay", "Greater Faydark", "563" },
{ "#bot gate ro", "ro", "South Ro", "567" }, { "#bot gate tox", "tox", "Toxxulia Forest", "561" }, { "#bot gate nk", "nk", "North Karana", "562" },
{ "#bot gate nek", "nek", "Nektulos Forest", "564" }, { "#bot gate wakening", "wakening", "Wakening Lands", "1399" }, { "#bot gate iceclad", "iceclad", "Iceclad Ocean", "1418" },
{ "#bot gate divide", "divide", "The Great Divide", "1423" }, { "#bot gate cobalt", "cobalt", "Cobaltscar", "1425" }, { "#bot gate dreadlands", "dreadlands", "Dreadlands", "1516" },
{ "#bot gate wk", "wk", "West Karana", "568" }, { "#bot gate twilight", "twilight", "Twilight Sea", "2425" }, { "#bot gate dawnshroud", "dawnshroud", "Dawnshroud Peak", "2430" },
{ "#bot gate nexus", "nexus", "Nexus", "2944" }, { "#bot gate pok", "pok", "Plane of Knowledge", "3180" }, { "#bot gate wos", "wos", "Wall of Slaughter", "6178" },
{ "#bot gate grimling", "grimling", "Grimling Forest", "2420" }, { "#bot gate emerald", "emerald", "Emerald Jungle", "1739" }, { "#bot gate hateplane", "hateplane", "Plane of Hate", "666" },
{ "#bot gate airplane", "airplane", "Plane of Sky", "674" }, { "#bot gate skyfire", "skyfire", "Skyfire Mountains", "1738" },
{ "#bot gate bloodfields", "bloodfields", "Bloodfields", "6183" }, { "#bot gate stonebrunt", "stonebrunt", "Stonebrunt Mountains", "3793" } };
bool valid = false;
Mob *Gater; Mob *Gater;
uint32 GaterClass = 0; uint32 GaterClass = 0;
Group *g = c->GetGroup(); Group *g = c->GetGroup();
@ -10328,212 +10355,36 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
} }
} }
switch(GaterClass) { switch(GaterClass) {
case DRUID: case DRUID: {
if ((!strcasecmp(sep->arg[2], "karana")) && (c->GetLevel() >= 25) ) { for (int i = 0; i < 25; i++) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Karana."); if (!strcasecmp(sep->arg[2], druidgate[i][1])) {
Gater->CastSpell(550, c->GetID(), 1, -1, -1); Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Gating to %s!", druidgate[i][2]);
} else if ((!strcasecmp(sep->arg[2], "commons")) && (c->GetLevel() >= 27)) { Gater->CastSpell(atoi(druidgate[i][3]), c->GetID(), 1, -1, -1);
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Commons."); valid = true;
Gater->CastSpell(551, c->GetID(), 1, -1, -1); }
} else if ((!strcasecmp(sep->arg[2], "tox")) && (c->GetLevel() >= 25)) { }
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Toxxulia."); if (!valid) {
Gater->CastSpell(552, c->GetID(), 1, -1, -1); Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "With the proper level I can gate you to all of the following zones:");
} else if ((!strcasecmp(sep->arg[2], "butcher")) && (c->GetLevel() >= 25)) { for (int i = 0; i < 25; i++)
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Butcherblock."); Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "%s", Gater->CastToBot()->CreateSayLink(c, druidgate[i][0], druidgate[i][2]).c_str());
Gater->CastSpell(553, c->GetID(), 1, -1, -1); }
} else if ((!strcasecmp(sep->arg[2], "lava")) && (c->GetLevel() >= 30)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Lavastorm.");
Gater->CastSpell(554, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "ro")) && (c->GetLevel() >= 32)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Ro.");
Gater->CastSpell(555, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "feerrott")) && (c->GetLevel() >= 32)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Feerrott.");
Gater->CastSpell(556, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "steamfont")) && (c->GetLevel() >= 31)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Steamfont.");
Gater->CastSpell(557, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "misty")) && (c->GetLevel() >= 36)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Misty.");
Gater->CastSpell(558, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "wakening")) && (c->GetLevel() >= 40)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Wakening Lands.");
Gater->CastSpell(1398, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "iceclad")) && (c->GetLevel() >= 32)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Iceclad Ocean.");
Gater->CastSpell(1434, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "divide")) && (c->GetLevel() >= 36)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of The Great Divide.");
Gater->CastSpell(1438, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "cobalt")) && (c->GetLevel() >= 42)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Cobalt Scar.");
Gater->CastSpell(1440, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "combines")) && (c->GetLevel() >= 33)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of The Combines.");
Gater->CastSpell(1517, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "surefall")) && (c->GetLevel() >= 26)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Surefall Glade.");
Gater->CastSpell(2020, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "grimling")) && (c->GetLevel() >= 29)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Grimling Forest.");
Gater->CastSpell(2419, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "twilight")) && (c->GetLevel() >= 33)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Twilight.");
Gater->CastSpell(2424, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "dawnshroud")) && (c->GetLevel() >= 37)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Dawnshroud.");
Gater->CastSpell(2429, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "nexus")) && (c->GetLevel() >= 26)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of The Nexus.");
Gater->CastSpell(2432, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "pok")) && (c->GetLevel() >= 38)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Knowledge.");
Gater->CastSpell(3184, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "stonebrunt")) && (c->GetLevel() >= 28)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Stonebrunt Mountains.");
Gater->CastSpell(3792, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "bloodfields")) && (c->GetLevel() >= 55)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Bloodfields.");
Gater->CastSpell(6184, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "emerald")) && (c->GetLevel() >= 39)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Wind of the South.");
Gater->CastSpell(1737, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "skyfire")) && (c->GetLevel() >= 44)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Wind of the North.");
Gater->CastSpell(1736, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "slaughter")) && (c->GetLevel() >= 64)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Circle of Slaughter.");
Gater->CastSpell(6179, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "karana")
|| !strcasecmp(sep->arg[2], "tox")
|| !strcasecmp(sep->arg[2], "butcher") && (c->GetLevel() <= 25))
|| !strcasecmp(sep->arg[2], "commons") && (c->GetLevel() <= 27)
|| (!strcasecmp(sep->arg[2], "ro")
|| !strcasecmp(sep->arg[2], "feerrott") && (c->GetLevel() <= 32))
|| !strcasecmp(sep->arg[2], "steamfont") && (c->GetLevel() <= 31)
|| !strcasecmp(sep->arg[2], "misty") && (c->GetLevel() <= 36)
|| !strcasecmp(sep->arg[2], "lava") && (c->GetLevel() <= 30)
|| !strcasecmp(sep->arg[2], "wakening") && (c->GetLevel() <= 40)
|| !strcasecmp(sep->arg[2], "iceclad") && (c->GetLevel() <= 32)
|| !strcasecmp(sep->arg[2], "divide") && (c->GetLevel() <= 38)
|| !strcasecmp(sep->arg[2], "cobalt") && (c->GetLevel() <= 42)
|| !strcasecmp(sep->arg[2], "combines") && (c->GetLevel() <= 33)
|| !strcasecmp(sep->arg[2], "surefall") && (c->GetLevel() <= 26)
|| !strcasecmp(sep->arg[2], "grimling") && (c->GetLevel() <= 29)
|| !strcasecmp(sep->arg[2], "twilight") && (c->GetLevel() <= 33)
|| !strcasecmp(sep->arg[2], "dawnshroud") && (c->GetLevel() <= 37)
|| !strcasecmp(sep->arg[2], "nexus") && (c->GetLevel() <= 26)
|| !strcasecmp(sep->arg[2], "pok") && (c->GetLevel() <= 38)
|| !strcasecmp(sep->arg[2], "stonebrunt") && (c->GetLevel() <= 28)
|| !strcasecmp(sep->arg[2], "bloodfields") && (c->GetLevel() <= 55)
|| !strcasecmp(sep->arg[2], "emerald") && (c->GetLevel() <= 38)
|| !strcasecmp(sep->arg[2], "skyfire") && (c->GetLevel() <= 43)
|| !strcasecmp(sep->arg[2], "wos") && (c->GetLevel() <= 64)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "I don't have the needed level yet.");
} else
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "With the proper level I can [gate] to [karana], [commons], [tox], [butcher], [lava], [ro], [feerrott], [steamfont], [misty], [wakening], [iceclad], [divide], [cobalt], [combines], [surefall], [grimling], [twilight], [dawnshroud], [nexus], [pok], [stonebrunt], [bloodfields], [emerald], [skyfire] or [wos].");
break; break;
case WIZARD: }
if ((!strcasecmp(sep->arg[2], "commons")) && (c->GetLevel() >= 35) ) { case WIZARD: {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Common Portal."); for (int i = 0; i < 24; i++) {
Gater->CastSpell(566, c->GetID(), 1, -1, -1); if (!strcasecmp(sep->arg[2], wizardgate[i][1])) {
} else if ((!strcasecmp(sep->arg[2], "fay")) && (c->GetLevel() >= 27)) { Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Gating to %s!", wizardgate[i][2]);
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Fay Portal."); Gater->CastSpell(atoi(wizardgate[i][3]), c->GetID(), 1, -1, -1);
Gater->CastSpell(563, c->GetID(), 1, -1, -1); valid = true;
} else if ((!strcasecmp(sep->arg[2], "ro")) && (c->GetLevel() >= 37)) { }
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Ro Portal."); }
Gater->CastSpell(567, c->GetID(), 1, -1, -1); if (!valid) {
} else if ((!strcasecmp(sep->arg[2], "tox")) && (c->GetLevel() >= 25)) { Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "With the proper level I can gate you to all of the following zones:");
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Toxxulia Portal."); for (int i = 0; i < 24; i++)
Gater->CastSpell(561, c->GetID(), 1, -1, -1); Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "%s", Gater->CastToBot()->CreateSayLink(c, wizardgate[i][0], wizardgate[i][2]).c_str());
} else if ((!strcasecmp(sep->arg[2], "nk")) && (c->GetLevel() >= 27)) { }
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting North Karana Portal.");
Gater->CastSpell(562, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "nek")) && (c->GetLevel() >= 32)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Nektulos Portal.");
Gater->CastSpell(564, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "wakening")) && (c->GetLevel() >= 43)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Wakening Lands Portal.");
Gater->CastSpell(1399, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "iceclad")) && (c->GetLevel() >= 33)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Iceclad Ocean Portal.");
Gater->CastSpell(1418, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "divide")) && (c->GetLevel() >= 36)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Great Divide Portal.");
Gater->CastSpell(1423, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "cobalt")) && (c->GetLevel() >= 43)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Cobalt Scar Portal.");
Gater->CastSpell(1425, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "combines")) && (c->GetLevel() >= 34)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Combines Portal.");
Gater->CastSpell(1516, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "wk")) && (c->GetLevel() >= 27)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting West Karana Portal.");
Gater->CastSpell(568, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "twilight")) && (c->GetLevel() >= 27)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Twilight Portal.");
Gater->CastSpell(2425, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "dawnshroud")) && (c->GetLevel() >= 27)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Dawnshroud Portal.");
Gater->CastSpell(2430, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "nexus")) && (c->GetLevel() >= 29)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Nexus Portal.");
Gater->CastSpell(2944, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "pok")) && (c->GetLevel() >= 27)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Plane of Knowledge Portal.");
Gater->CastSpell(3180, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "wos")) && (c->GetLevel() >= 27)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Wall of Slaughter Portal.");
Gater->CastSpell(6178, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "grimling")) && (c->GetLevel() >= 29)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Fay Portal.");
Gater->CastSpell(2420, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "emerald")) && (c->GetLevel() >= 37)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Porting to Emerald Jungle.");
Gater->CastSpell(1739, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "hateplane")) && (c->GetLevel() >= 39)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Porting to Hate Plane.");
Gater->CastSpell(666, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "airplane")) && (c->GetLevel() >= 39)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Porting to Airplane.");
Gater->CastSpell(674, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "skyfire")) && (c->GetLevel() >= 36)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Porting to Skyfire.");
Gater->CastSpell(1738, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "bloodfields")) && (c->GetLevel() >= 55)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Bloodfields Portal.");
Gater->CastSpell(6183, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "stonebrunt")) && (c->GetLevel() >= 27)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "Casting Stonebrunt Portal.");
Gater->CastSpell(3793, c->GetID(), 1, -1, -1);
} else if ((!strcasecmp(sep->arg[2], "commons") && (c->GetLevel() <= 35))
|| !strcasecmp(sep->arg[2], "fay") && (c->GetLevel() <= 27)
|| (!strcasecmp(sep->arg[2], "ro") && (c->GetLevel() <= 37))
|| !strcasecmp(sep->arg[2], "tox") && (c->GetLevel() <= 25)
|| !strcasecmp(sep->arg[2], "nk") && (c->GetLevel() <= 25)
|| !strcasecmp(sep->arg[2], "nek") && (c->GetLevel() <= 32)
|| !strcasecmp(sep->arg[2], "wakening") && (c->GetLevel() <= 43)
|| !strcasecmp(sep->arg[2], "iceclad") && (c->GetLevel() <= 33)
|| !strcasecmp(sep->arg[2], "divide") && (c->GetLevel() <= 36)
|| !strcasecmp(sep->arg[2], "cobalt") && (c->GetLevel() <= 43)
|| !strcasecmp(sep->arg[2], "combines") && (c->GetLevel() <= 34)
|| !strcasecmp(sep->arg[2], "wk") && (c->GetLevel() <= 37)
|| !strcasecmp(sep->arg[2], "twilight") && (c->GetLevel() <= 33)
|| !strcasecmp(sep->arg[2], "dawnshroud") && (c->GetLevel() <= 39)
|| !strcasecmp(sep->arg[2], "nexus") && (c->GetLevel() <= 29)
|| (!strcasecmp(sep->arg[2], "pok")
|| !strcasecmp(sep->arg[2], "hateplane")
|| !strcasecmp(sep->arg[2], "airplane") && (c->GetLevel() <= 38))
|| !strcasecmp(sep->arg[2], "grimling") && (c->GetLevel() <= 29)
|| !strcasecmp(sep->arg[2], "bloodfields") && (c->GetLevel() <= 55)
|| !strcasecmp(sep->arg[2], "stonebrunt") && (c->GetLevel() <= 27)
|| !strcasecmp(sep->arg[2], "emerald") && (c->GetLevel() <= 36)
|| !strcasecmp(sep->arg[2], "skyfire") && (c->GetLevel() <= 36)
|| !strcasecmp(sep->arg[2], "wos") && (c->GetLevel() <= 64)) {
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "I don't have the needed level yet.");
} else
Gater->CastToBot()->BotGroupSay(Gater->CastToBot(), "With the proper level I can [gate] to [commons], [fay], [ro], [tox], [nk], [wakening], [iceclad], [divide], [cobalt], [combines], [wk], [grimling], [twilight], [dawnshroud], [nexus], [pok], [stonebrunt], [bloodfields], [emerald], [skyfire], [hateplane], [airplane] or [wos].", c->GetName());
break; break;
}
default: default:
c->Message(15, "You must have a Druid or Wizard in your group."); c->Message(15, "You must have a Druid or Wizard in your group.");
break; break;
@ -10680,25 +10531,25 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
if ((c->GetLevel() <= 14) && (!strcasecmp(sep->arg[2], "undead"))) if ((c->GetLevel() <= 14) && (!strcasecmp(sep->arg[2], "undead")))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 14 yet."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 14 yet.");
else if ((!c->IsInvisible(c)) && (!c->invisible_undead) && (c->GetLevel() >= 14) && (!strcasecmp(sep->arg[2], "undead"))) { else if ((!c->IsInvisible(c)) && (!c->invisible_undead) && (c->GetLevel() >= 14) && (!strcasecmp(sep->arg[2], "undead"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting invis undead."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Invisibility vs. Undead.");
Inviser->CastSpell(235, c->GetID(), 1, -1, -1); Inviser->CastSpell(235, c->GetID(), 1, -1, -1);
} }
else if ((c->GetLevel() <= 4) && (!strcasecmp(sep->arg[2], "live"))) else if ((c->GetLevel() <= 4) && (!strcasecmp(sep->arg[2], "live")))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 4 yet."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 4 yet.");
else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 4) && (!strcasecmp(sep->arg[2], "live"))) { else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 4) && (!strcasecmp(sep->arg[2], "live"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting invisibilty."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Invisibilty.");
Inviser->CastSpell(42, c->GetID(), 1, -1, -1); Inviser->CastSpell(42, c->GetID(), 1, -1, -1);
} }
else if ((c->GetLevel() <= 6) && (!strcasecmp(sep->arg[2], "see"))) else if ((c->GetLevel() <= 6) && (!strcasecmp(sep->arg[2], "see")))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 6 yet."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 6 yet.");
else if ((c->GetLevel() >= 6) && (!strcasecmp(sep->arg[2], "see"))) { else if ((c->GetLevel() >= 6) && (!strcasecmp(sep->arg[2], "see"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting see invisible."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting See Invisibility.");
Inviser->CastSpell(80, c->GetID(), 1, -1, -1); Inviser->CastSpell(80, c->GetID(), 1, -1, -1);
} }
else if ((c->IsInvisible(c)) || (c->invisible_undead)) else if ((c->IsInvisible(c)) || (c->invisible_undead))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed.");
else else
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Do you want [invis undead], [invis live] or [invis see]?"); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Do you want %s, %s, or %s?", Inviser->CastToBot()->CreateSayLink(c, "#bot invis live", "Invisibility").c_str(), Inviser->CastToBot()->CreateSayLink(c, "#bot invis undead", "Invisibility vs. Undead").c_str(), Inviser->CastToBot()->CreateSayLink(c, "#bot invis see", "See Invisibility").c_str());
break; break;
case MAGICIAN: case MAGICIAN:
if (!strcasecmp(sep->arg[2], "undead")) if (!strcasecmp(sep->arg[2], "undead"))
@ -10706,47 +10557,47 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
else if ((c->GetLevel() <= 8) && (!strcasecmp(sep->arg[2], "live"))) else if ((c->GetLevel() <= 8) && (!strcasecmp(sep->arg[2], "live")))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 8 yet."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 8 yet.");
else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 8) && (!strcasecmp(sep->arg[2], "live"))) { else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 8) && (!strcasecmp(sep->arg[2], "live"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting invisibilty."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Invisibilty.");
Inviser->CastSpell(42, c->GetID(), 1, -1, -1); Inviser->CastSpell(42, c->GetID(), 1, -1, -1);
} }
else if ((c->GetLevel() <= 16) && (!strcasecmp(sep->arg[2], "see"))) else if ((c->GetLevel() <= 16) && (!strcasecmp(sep->arg[2], "see")))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 16 yet."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 16 yet.");
else if ((c->GetLevel() >= 16) && (!strcasecmp(sep->arg[2], "see"))) { else if ((c->GetLevel() >= 16) && (!strcasecmp(sep->arg[2], "see"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting see invisible."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting See Invisibility.");
Inviser->CastSpell(80, c->GetID(), 1, -1, -1); Inviser->CastSpell(80, c->GetID(), 1, -1, -1);
} }
else if ((c->IsInvisible(c)) || (c->invisible_undead)) else if ((c->IsInvisible(c)) || (c->invisible_undead))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed.");
else else
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Do you want [invis live] or [invis see]?"); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Do you want %s or %s?", Inviser->CastToBot()->CreateSayLink(c, "#bot invis live", "Invisibility").c_str(), Inviser->CastToBot()->CreateSayLink(c, "#bot invis see", "see Invisibility").c_str());
break; break;
case WIZARD: case WIZARD:
if ((c->GetLevel() <= 39) && (!strcasecmp(sep->arg[2], "undead"))) if ((c->GetLevel() <= 39) && (!strcasecmp(sep->arg[2], "undead")))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 39 yet."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 39 yet.");
else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 39) && (!strcasecmp(sep->arg[2], "undead"))) { else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 39) && (!strcasecmp(sep->arg[2], "undead"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting invis undead."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Invisibility vs. Undead.");
Inviser->CastSpell(235, c->GetID(), 1, -1, -1); Inviser->CastSpell(235, c->GetID(), 1, -1, -1);
} }
else if ((c->GetLevel() <= 16) && (!strcasecmp(sep->arg[2], "live"))) else if ((c->GetLevel() <= 16) && (!strcasecmp(sep->arg[2], "live")))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 16 yet."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 16 yet.");
else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 16) && (!strcasecmp(sep->arg[2], "live"))) { else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 16) && (!strcasecmp(sep->arg[2], "live"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting invisibilty."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Invisibilty.");
Inviser->CastSpell(42, c->GetID(), 1, -1, -1); Inviser->CastSpell(42, c->GetID(), 1, -1, -1);
} }
else if ((c->GetLevel() <= 4) && (!strcasecmp(sep->arg[2], "see"))) else if ((c->GetLevel() <= 4) && (!strcasecmp(sep->arg[2], "see")))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 6 yet."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 6 yet.");
else if ((c->GetLevel() >= 4) && (!strcasecmp(sep->arg[2], "see"))) { else if ((c->GetLevel() >= 4) && (!strcasecmp(sep->arg[2], "see"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting see invisible."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting See Invisibility.");
Inviser->CastSpell(80, c->GetID(), 1, -1, -1); Inviser->CastSpell(80, c->GetID(), 1, -1, -1);
} }
else if ((c->IsInvisible(c)) || (c->invisible_undead)) else if ((c->IsInvisible(c)) || (c->invisible_undead))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed.");
else else
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Do you want [invis undead], [invis live] or [invis see]?"); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Do you want %s, %s, or %s?", Inviser->CastToBot()->CreateSayLink(c, "#bot invis undead", "Invisibility vs. Undead").c_str(), Inviser->CastToBot()->CreateSayLink(c, "#bot invis live", "Invisibility").c_str(), Inviser->CastToBot()->CreateSayLink(c, "#bot invis see", "See Invisibility").c_str());
break; break;
case NECROMANCER: case NECROMANCER:
if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (!strcasecmp(sep->arg[2], "undead"))) { if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (!strcasecmp(sep->arg[2], "undead"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting invis undead."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Invisibility vs. Undead.");
Inviser->CastSpell(235, c->GetID(), 1, -1, -1); Inviser->CastSpell(235, c->GetID(), 1, -1, -1);
} }
else if (!strcasecmp(sep->arg[2], "see")) else if (!strcasecmp(sep->arg[2], "see"))
@ -10756,7 +10607,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
else if ((c->IsInvisible(c))|| (c->invisible_undead)) else if ((c->IsInvisible(c))|| (c->invisible_undead))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed.");
else else
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I only have [invis undead]"); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I only have %s.", Inviser->CastToBot()->CreateSayLink(c, "#bot invis undead", "Invisibility vs. Undead").c_str());
break; break;
case DRUID: case DRUID:
if (!strcasecmp(sep->arg[2], "undead")) if (!strcasecmp(sep->arg[2], "undead"))
@ -10767,7 +10618,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Superior Camouflage."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Superior Camouflage.");
Inviser->CastSpell(34, c->GetID(), 1, -1, -1); Inviser->CastSpell(34, c->GetID(), 1, -1, -1);
} else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 4) && (!strcasecmp(sep->arg[2], "live")) && (zone->CanCastOutdoor())) { } else if ((!c->IsInvisible(c))&& (!c->invisible_undead) && (c->GetLevel() >= 4) && (!strcasecmp(sep->arg[2], "live")) && (zone->CanCastOutdoor())) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Camouflage..."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting Camouflage.");
Inviser->CastSpell(247, c->GetID(), 1, -1, -1); Inviser->CastSpell(247, c->GetID(), 1, -1, -1);
} }
else if ((c->GetLevel() >= 4) && (!strcasecmp(sep->arg[2], "live")) && (!zone->CanCastOutdoor())) else if ((c->GetLevel() >= 4) && (!strcasecmp(sep->arg[2], "live")) && (!zone->CanCastOutdoor()))
@ -10775,13 +10626,13 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
else if ((c->GetLevel() <= 13) && (!strcasecmp(sep->arg[2], "see"))) else if ((c->GetLevel() <= 13) && (!strcasecmp(sep->arg[2], "see")))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 13 yet."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I'm not level 13 yet.");
else if ((c->GetLevel() >= 13) && (!strcasecmp(sep->arg[2], "see"))) { else if ((c->GetLevel() >= 13) && (!strcasecmp(sep->arg[2], "see"))) {
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting see invisible."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Casting See Invisibility.");
Inviser->CastSpell(80, c->GetID(), 1, -1, -1); Inviser->CastSpell(80, c->GetID(), 1, -1, -1);
} }
else if ((c->IsInvisible(c)) || (c->invisible_undead)) else if ((c->IsInvisible(c)) || (c->invisible_undead))
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed."); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "I can't cast this if you're already invis-buffed.");
else else
Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Do you want [invis live] or [invis see]?"); Inviser->CastToBot()->BotGroupSay(Inviser->CastToBot(), "Do you want %s or %s?", Inviser->CastToBot()->CreateSayLink(c, "#bot invis live", "Invisibility").c_str(), Inviser->CastToBot()->CreateSayLink(c, "#bot invis see", "See Invisibility").c_str());
break; break;
default: default:
c->Message(15, "You must have a Enchanter, Magician, Wizard, Druid, or Necromancer in your group."); c->Message(15, "You must have a Enchanter, Magician, Wizard, Druid, or Necromancer in your group.");
@ -10908,19 +10759,19 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
switch(ResisterClass) { switch(ResisterClass) {
case CLERIC: case CLERIC:
if(!strcasecmp(sep->arg[2], "poison") && (c->GetLevel() >= 6)) { if(!strcasecmp(sep->arg[2], "poison") && (c->GetLevel() >= 6)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting poison protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Poison protection.");
Resister->CastToBot()->Bot_Command_Resist(1, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(1, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "disease") && (c->GetLevel() >= 11)) { } else if(!strcasecmp(sep->arg[2], "disease") && (c->GetLevel() >= 11)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting disease protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Disease protection.");
Resister->CastToBot()->Bot_Command_Resist(2, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(2, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "fire") && (c->GetLevel() >= 8)) { } else if(!strcasecmp(sep->arg[2], "fire") && (c->GetLevel() >= 8)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting fire protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Fire protection.");
Resister->CastToBot()->Bot_Command_Resist(3, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(3, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "cold") && (c->GetLevel() >= 13)) { } else if(!strcasecmp(sep->arg[2], "cold") && (c->GetLevel() >= 13)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting cold protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Cold protection.");
Resister->CastToBot()->Bot_Command_Resist(4, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(4, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() >= 16)) { } else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() >= 16)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting magic protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Magic protection.");
Resister->CastToBot()->Bot_Command_Resist(5, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(5, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() <= 16) } else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() <= 16)
|| !strcasecmp(sep->arg[2], "cold") && (c->GetLevel() <= 13) || !strcasecmp(sep->arg[2], "cold") && (c->GetLevel() <= 13)
@ -10929,24 +10780,24 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|| !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 6)) { || !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 6)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "I don't have the required level yet."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "I don't have the required level yet.");
} else } else
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Do you want [resist poison], [resist disease], [resist fire], [resist cold], or [resist magic]?"); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Do you want %s, %s, %s, %s, or %s?", Resister->CastToBot()->CreateSayLink(c, "#bot resist poison", "Resist Poison").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot resist disease", "Resist Disease").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot invis fire", "Resist Fire").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot invis cold", "Resist Cold").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot invis magic", "Resist Magic").c_str());
break; break;
case SHAMAN: case SHAMAN:
if(!strcasecmp(sep->arg[2], "poison") && (c->GetLevel() >= 20)) { if(!strcasecmp(sep->arg[2], "poison") && (c->GetLevel() >= 20)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting poison protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Poison protection.");
Resister->CastToBot()->Bot_Command_Resist(12, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(12, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "disease") && (c->GetLevel() >= 8)) { } else if(!strcasecmp(sep->arg[2], "disease") && (c->GetLevel() >= 8)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting disease protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Disease protection.");
Resister->CastToBot()->Bot_Command_Resist(13, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(13, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "fire") && (c->GetLevel() >= 5)) { } else if(!strcasecmp(sep->arg[2], "fire") && (c->GetLevel() >= 5)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting fire protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Fire protection.");
Resister->CastToBot()->Bot_Command_Resist(14, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(14, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "cold") && (c->GetLevel() >= 1)) { } else if(!strcasecmp(sep->arg[2], "cold") && (c->GetLevel() >= 1)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting cold protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Cold protection.");
Resister->CastToBot()->Bot_Command_Resist(15, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(15, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() >= 19)) { } else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() >= 19)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting magic protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Magic protection.");
Resister->CastToBot()->Bot_Command_Resist(16, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(16, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() <= 19) } else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() <= 19)
|| !strcasecmp(sep->arg[2], "cold") && (c->GetLevel() <= 1) || !strcasecmp(sep->arg[2], "cold") && (c->GetLevel() <= 1)
@ -10955,24 +10806,24 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|| !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 20)) { || !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 20)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "I don't have the needed level yet."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "I don't have the needed level yet.");
} else } else
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Do you want [resist poison], [resist disease], [resist fire], [resist cold], or [resist magic]?"); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Do you want %s, %s, %s, %s, or %s?", Resister->CastToBot()->CreateSayLink(c, "#bot resist poison", "Resist Poison").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot resist disease", "Resist Disease").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot invis fire", "Resist Fire").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot invis cold", "Resist Cold").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot invis magic", "Resist Magic").c_str());
break; break;
case DRUID: case DRUID:
if (!strcasecmp(sep->arg[2], "poison") && (c->GetLevel() >= 19)) { if (!strcasecmp(sep->arg[2], "poison") && (c->GetLevel() >= 19)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting poison protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Poison protection.");
Resister->CastToBot()->Bot_Command_Resist(7, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(7, Resister->GetLevel());
} else if (!strcasecmp(sep->arg[2], "disease") && (c->GetLevel() >= 19)) { } else if (!strcasecmp(sep->arg[2], "disease") && (c->GetLevel() >= 19)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting disease protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Disease protection.");
Resister->CastToBot()->Bot_Command_Resist(8, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(8, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "fire")) { // Fire level 1 } else if(!strcasecmp(sep->arg[2], "fire")) { // Fire level 1
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting fire protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Fire protection.");
Resister->CastToBot()->Bot_Command_Resist(9, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(9, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "cold") && (c->GetLevel() >= 13)) { } else if(!strcasecmp(sep->arg[2], "cold") && (c->GetLevel() >= 13)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting cold protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Cold protection.");
Resister->CastToBot()->Bot_Command_Resist(10, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(10, Resister->GetLevel());
} else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() >= 16)) { } else if(!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() >= 16)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting magic protection."); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Casting Magic protection.");
Resister->CastToBot()->Bot_Command_Resist(11, Resister->GetLevel()); Resister->CastToBot()->Bot_Command_Resist(11, Resister->GetLevel());
} else if (!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() <= 16) } else if (!strcasecmp(sep->arg[2], "magic") && (c->GetLevel() <= 16)
|| !strcasecmp(sep->arg[2], "cold") && (c->GetLevel() <= 9) || !strcasecmp(sep->arg[2], "cold") && (c->GetLevel() <= 9)
@ -10980,7 +10831,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|| !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 19)) { || !strcasecmp(sep->arg[2], "poison") && (c->GetLevel() <= 19)) {
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "I don't have the required level yet.") ; Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "I don't have the required level yet.") ;
} else } else
Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Do you want [resist poison], [resist disease], [resist fire], [resist cold], or [resist magic]?"); Resister->CastToBot()->BotGroupSay(Resister->CastToBot(), "Do you want %s, %s, %s, %s, or %s?", Resister->CastToBot()->CreateSayLink(c, "#bot resist poison", "Resist Poison").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot resist disease", "Resist Disease").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot invis fire", "Resist Fire").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot invis cold", "Resist Cold").c_str(), Resister->CastToBot()->CreateSayLink(c, "#bot invis magic", "Resist Magic").c_str());
break; break;
default: default:
c->Message(15, "You must have a Cleric, Shaman, or Druid in your group."); c->Message(15, "You must have a Cleric, Shaman, or Druid in your group.");
@ -11053,7 +10904,8 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
botGroupLeader->BotGroupSay(botGroupLeader, "I am prepared to lead."); botGroupLeader->BotGroupSay(botGroupLeader, "I am prepared to lead.");
else else
botGroupLeader->BotGroupSay(botGroupLeader, "I cannot lead."); botGroupLeader->BotGroupSay(botGroupLeader, "I cannot lead.");
} else }
else
c->Message(13, "You must target a spawned bot first."); c->Message(13, "You must target a spawned bot first.");
return; return;
@ -11108,16 +10960,19 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
if(Bot::AddBotToGroup(botGroupMember, g)) { if(Bot::AddBotToGroup(botGroupMember, g)) {
database.SetGroupID(botGroupMember->GetName(), g->GetID(), botGroupMember->GetBotID()); database.SetGroupID(botGroupMember->GetName(), g->GetID(), botGroupMember->GetBotID());
botGroupMember->BotGroupSay(botGroupMember, "I have joined %s\'s group.", botGroupLeader->GetName()); botGroupMember->BotGroupSay(botGroupMember, "I have joined %s\'s group.", botGroupLeader->GetName());
} else }
else
botGroupMember->BotGroupSay(botGroupMember, "I can not join %s\'s group.", botGroupLeader->GetName()); botGroupMember->BotGroupSay(botGroupMember, "I can not join %s\'s group.", botGroupLeader->GetName());
} else { } else {
Group* tempGroup = botGroupMember->GetGroup(); Group* tempGroup = botGroupMember->GetGroup();
if(tempGroup) if(tempGroup)
botGroupMember->BotGroupSay(botGroupMember, "I can not join %s\'s group. I am already a member in %s\'s group.", botGroupLeader->GetName(), tempGroup->GetLeaderName()); botGroupMember->BotGroupSay(botGroupMember, "I can not join %s\'s group. I am already a member in %s\'s group.", botGroupLeader->GetName(), tempGroup->GetLeaderName());
} }
} else }
else
c->Message(13, "You must target a spawned bot first."); c->Message(13, "You must target a spawned bot first.");
} else }
else
botGroupLeader->BotGroupSay(botGroupMember, "I have no more openings in my group, %s.", c->GetName()); botGroupLeader->BotGroupSay(botGroupMember, "I have no more openings in my group, %s.", c->GetName());
} else { } else {
Group* tempGroup = botGroupLeader->GetGroup(); Group* tempGroup = botGroupLeader->GetGroup();
@ -11148,9 +11003,11 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
botGroupMember->BotGroupSay(botGroupMember, "I am no longer in a group."); botGroupMember->BotGroupSay(botGroupMember, "I am no longer in a group.");
else else
botGroupMember->BotGroupSay(botGroupMember, "I can not leave %s\'s group.", g->GetLeaderName()); botGroupMember->BotGroupSay(botGroupMember, "I can not leave %s\'s group.", g->GetLeaderName());
} else }
else
botGroupMember->BotGroupSay(botGroupMember, "I am not in a group."); botGroupMember->BotGroupSay(botGroupMember, "I am not in a group.");
} else }
else
c->Message(13, "You must target a spawned bot first."); c->Message(13, "You must target a spawned bot first.");
return; return;
@ -13350,4 +13207,45 @@ void Bot::BotHealRotationsClear(Client* c) {
} }
} }
std::string Bot::CreateSayLink(Client* c, const char* message, const char* name) {
int sayid = 0;
int sz = strlen(message);
char *escaped_string = new char[sz * 2];
database.DoEscapeString(escaped_string, message, sz);
std::string query = StringFormat("SELECT `id` FROM `saylink` WHERE `phrase` = '%s'", escaped_string);
auto results = database.QueryDatabase(query);
if (results.Success()) {
if (results.RowCount() >= 1) {
for (auto row = results.begin();row != results.end(); ++row)
sayid = atoi(row[0]);
} else {
std::string insert_query = StringFormat("INSERT INTO `saylink` (`phrase`) VALUES ('%s')", escaped_string);
results = database.QueryDatabase(insert_query);
if (!results.Success()) {
Log.Out(Logs::General, Logs::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str());
} else {
results = database.QueryDatabase(query);
if (results.Success()) {
if (results.RowCount() >= 1)
for(auto row = results.begin(); row != results.end(); ++row)
sayid = atoi(row[0]);
}
else
Log.Out(Logs::General, Logs::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str());
}
}
}
safe_delete_array(escaped_string);
sayid += 500000;
Client::TextLink linker;
linker.SetLinkType(linker.linkItemData);
linker.SetProxyItemID(sayid);
linker.SetProxyText(name);
auto say_link = linker.GenerateLink();
return say_link;
}
#endif #endif

View File

@ -549,6 +549,8 @@ public:
void SetNumHealRotationMembers( uint8 numMembers ) { _numHealRotationMembers = numMembers; } void SetNumHealRotationMembers( uint8 numMembers ) { _numHealRotationMembers = numMembers; }
void SetBardUseOutOfCombatSongs(bool useOutOfCombatSongs) { _bardUseOutOfCombatSongs = useOutOfCombatSongs;} void SetBardUseOutOfCombatSongs(bool useOutOfCombatSongs) { _bardUseOutOfCombatSongs = useOutOfCombatSongs;}
void SetShowHelm(bool showhelm) { _showhelm = showhelm; } void SetShowHelm(bool showhelm) { _showhelm = showhelm; }
std::string CreateSayLink(Client* botOwner, const char* message, const char* name);
// Class Destructors // Class Destructors
virtual ~Bot(); virtual ~Bot();

View File

@ -6008,7 +6008,7 @@ void Client::Handle_OP_GMSearchCorpse(const EQApplicationPacket *app)
char *escSearchString = new char[129]; char *escSearchString = new char[129];
database.DoEscapeString(escSearchString, gmscs->Name, strlen(gmscs->Name)); database.DoEscapeString(escSearchString, gmscs->Name, strlen(gmscs->Name));
std::string query = StringFormat("SELECT charname, zoneid, x, y, z, time_of_death, rezzed, IsBurried " std::string query = StringFormat("SELECT charname, zoneid, x, y, z, time_of_death, is_rezzed, is_buried "
"FROM character_corpses WheRE charname LIKE '%%%s%%' ORDER BY charname LIMIT %i", "FROM character_corpses WheRE charname LIKE '%%%s%%' ORDER BY charname LIMIT %i",
escSearchString, maxResults); escSearchString, maxResults);
safe_delete_array(escSearchString); safe_delete_array(escSearchString);

View File

@ -170,6 +170,7 @@ int command_init(void) {
command_add("appearance", "[type] [value] - Send an appearance packet for you or your target", 150, command_appearance) || command_add("appearance", "[type] [value] - Send an appearance packet for you or your target", 150, command_appearance) ||
command_add("attack", "[targetname] - Make your NPC target attack targetname", 150, command_attack) || command_add("attack", "[targetname] - Make your NPC target attack targetname", 150, command_attack) ||
command_add("augmentitem", "Force augments an item. Must have the augment item window open.", 250, command_augmentitem) || command_add("augmentitem", "Force augments an item. Must have the augment item window open.", 250, command_augmentitem) ||
command_add("aug", nullptr, 250, command_augmentitem) ||
command_add("ban", "[name] [reason]- Ban by character name", 150, command_ban) || command_add("ban", "[name] [reason]- Ban by character name", 150, command_ban) ||
command_add("beard", "- Change the beard of your target", 80, command_beard) || command_add("beard", "- Change the beard of your target", 80, command_beard) ||
command_add("beardcolor", "- Change the beard color of your target", 80, command_beardcolor) || command_add("beardcolor", "- Change the beard color of your target", 80, command_beardcolor) ||
@ -216,12 +217,14 @@ int command_init(void) {
command_add("flagedit", "- Edit zone flags on your target", 100, command_flagedit) || command_add("flagedit", "- Edit zone flags on your target", 100, command_flagedit) ||
command_add("flags", "- displays the flags of you or your target", 0, command_flags) || command_add("flags", "- displays the flags of you or your target", 0, command_flags) ||
command_add("flymode", "[0/1/2] - Set your or your player target's flymode to off/on/levitate", 50, command_flymode) || command_add("flymode", "[0/1/2] - Set your or your player target's flymode to off/on/levitate", 50, command_flymode) ||
command_add("fn", nullptr, 100, command_findnpctype) ||
command_add("fov", "- Check wether you're behind or in your target's field of view", 80, command_fov) || command_add("fov", "- Check wether you're behind or in your target's field of view", 80, command_fov) ||
command_add("freeze", "- Freeze your target", 80, command_freeze) || command_add("freeze", "- Freeze your target", 80, command_freeze) ||
command_add("fz", nullptr, 10, command_findzone) || command_add("fs", nullptr, 50, command_findspell) ||
command_add("fz", nullptr, 100, command_findzone) ||
command_add("gassign", "[id] - Assign targetted NPC to predefined wandering grid id", 100, command_gassign) || command_add("gassign", "[id] - Assign targetted NPC to predefined wandering grid id", 100, command_gassign) ||
command_add("gender", "[0/1/2] - Change your or your target's gender to male/female/neuter", 50, command_gender) || command_add("gender", "[0/1/2] - Change your or your target's gender to male/female/neuter", 50, command_gender) ||
command_add("getplayerburriedcorpsecount", "- Get the target's total number of burried player corpses.", 100, command_getplayerburriedcorpsecount) || command_add("getplayerburiedcorpsecount", "- Get the target's total number of buried player corpses.", 100, command_getplayerburiedcorpsecount) ||
command_add("getvariable", "[varname] - Get the value of a variable from the database", 200, command_getvariable) || command_add("getvariable", "[varname] - Get the value of a variable from the database", 200, command_getvariable) ||
command_add("gi", nullptr,200, command_giveitem) || command_add("gi", nullptr,200, command_giveitem) ||
command_add("ginfo", "- get group info on target.", 20, command_ginfo) || command_add("ginfo", "- get group info on target.", 20, command_ginfo) ||
@ -386,7 +389,7 @@ int command_init(void) {
command_add("spon", "- Sends OP_MemorizeSpell", 80, command_spon) || command_add("spon", "- Sends OP_MemorizeSpell", 80, command_spon) ||
command_add("stun", "[duration] - Stuns you or your target for duration", 100, command_stun) || command_add("stun", "[duration] - Stuns you or your target for duration", 100, command_stun) ||
command_add("summon", "[charname] - Summons your player/npc/corpse target, or charname if specified", 80, command_summon) || command_add("summon", "[charname] - Summons your player/npc/corpse target, or charname if specified", 80, command_summon) ||
command_add("summonburriedplayercorpse", "- Summons the target's oldest burried corpse, if any exist.", 100, command_summonburriedplayercorpse) || command_add("summonburiedplayercorpse", "- Summons the target's oldest buried corpse, if any exist.", 100, command_summonburiedplayercorpse) ||
command_add("summonitem", "[itemid] [charges] - Summon an item onto your cursor. Charges are optional.", 200, command_summonitem) || command_add("summonitem", "[itemid] [charges] - Summon an item onto your cursor. Charges are optional.", 200, command_summonitem) ||
command_add("suspend", "[name] [days] [reason] - Suspend by character name and for specificed number of days", 150, command_suspend) || command_add("suspend", "[name] [days] [reason] - Suspend by character name and for specificed number of days", 150, command_suspend) ||
command_add("task", "(subcommand) - Task system commands", 150, command_task) || command_add("task", "(subcommand) - Task system commands", 150, command_task) ||
@ -7801,7 +7804,7 @@ void command_deletegraveyard(Client *c, const Seperator *sep)
return; return;
} }
void command_summonburriedplayercorpse(Client *c, const Seperator *sep) void command_summonburiedplayercorpse(Client *c, const Seperator *sep)
{ {
Client *t=c; Client *t=c;
@ -7815,12 +7818,12 @@ void command_summonburriedplayercorpse(Client *c, const Seperator *sep)
Corpse* PlayerCorpse = database.SummonBuriedCharacterCorpses(t->CharacterID(), t->GetZoneID(), zone->GetInstanceID(), t->GetPosition()); Corpse* PlayerCorpse = database.SummonBuriedCharacterCorpses(t->CharacterID(), t->GetZoneID(), zone->GetInstanceID(), t->GetPosition());
if(!PlayerCorpse) if(!PlayerCorpse)
c->Message(0, "Your target doesn't have any burried corpses."); c->Message(0, "Your target doesn't have any buried corpses.");
return; return;
} }
void command_getplayerburriedcorpsecount(Client *c, const Seperator *sep) void command_getplayerburiedcorpsecount(Client *c, const Seperator *sep)
{ {
Client *t=c; Client *t=c;
@ -7834,9 +7837,9 @@ void command_getplayerburriedcorpsecount(Client *c, const Seperator *sep)
uint32 CorpseCount = database.GetCharacterBuriedCorpseCount(t->CharacterID()); uint32 CorpseCount = database.GetCharacterBuriedCorpseCount(t->CharacterID());
if(CorpseCount > 0) if(CorpseCount > 0)
c->Message(0, "Your target has a total of %u burried corpses.", CorpseCount); c->Message(0, "Your target has a total of %u buried corpses.", CorpseCount);
else else
c->Message(0, "Your target doesn't have any burried corpses."); c->Message(0, "Your target doesn't have any buried corpses.");
return; return;
} }

View File

@ -279,8 +279,8 @@ void command_refundaa(Client *c, const Seperator *sep);
void command_traindisc(Client *c, const Seperator *sep); void command_traindisc(Client *c, const Seperator *sep);
void command_deletegraveyard(Client *c, const Seperator *sep); void command_deletegraveyard(Client *c, const Seperator *sep);
void command_setgraveyard(Client *c, const Seperator *sep); void command_setgraveyard(Client *c, const Seperator *sep);
void command_getplayerburriedcorpsecount(Client *c, const Seperator *sep); void command_getplayerburiedcorpsecount(Client *c, const Seperator *sep);
void command_summonburriedplayercorpse(Client *c, const Seperator *sep); void command_summonburiedplayercorpse(Client *c, const Seperator *sep);
void command_unscribespell(Client *c, const Seperator *sep); void command_unscribespell(Client *c, const Seperator *sep);
void command_scribespell(Client *c, const Seperator *sep); void command_scribespell(Client *c, const Seperator *sep);
void command_refreshgroup(Client *c, const Seperator *sep); void command_refreshgroup(Client *c, const Seperator *sep);

View File

@ -835,7 +835,7 @@ bool Corpse::Process() {
Save(); Save();
player_corpse_depop = true; player_corpse_depop = true;
corpse_db_id = 0; corpse_db_id = 0;
Log.Out(Logs::General, Logs::None, "Tagged %s player corpse has burried.", this->GetName()); Log.Out(Logs::General, Logs::None, "Tagged %s player corpse has buried.", this->GetName());
} }
else { else {
Log.Out(Logs::General, Logs::Error, "Unable to bury %s player corpse.", this->GetName()); Log.Out(Logs::General, Logs::Error, "Unable to bury %s player corpse.", this->GetName());

View File

@ -1748,18 +1748,18 @@ XS(XS__clear_zone_flag)
XSRETURN_EMPTY; XSRETURN_EMPTY;
} }
XS(XS__summonburriedplayercorpse); XS(XS__summonburiedplayercorpse);
XS(XS__summonburriedplayercorpse) XS(XS__summonburiedplayercorpse)
{ {
dXSARGS; dXSARGS;
if (items != 5) if (items != 5)
Perl_croak(aTHX_ "Usage: summonburriedplayercorpse(char_id,dest_x,dest_y,dest_z,dest_heading)"); Perl_croak(aTHX_ "Usage: summonburiedplayercorpse(char_id,dest_x,dest_y,dest_z,dest_heading)");
bool RETVAL; bool RETVAL;
uint32 char_id = (int)SvIV(ST(0)); uint32 char_id = (int)SvIV(ST(0));
auto position = glm::vec4((float)SvIV(ST(1)), (float)SvIV(ST(2)), (float)SvIV(ST(3)),(float)SvIV(ST(4))); auto position = glm::vec4((float)SvIV(ST(1)), (float)SvIV(ST(2)), (float)SvIV(ST(3)),(float)SvIV(ST(4)));
RETVAL = quest_manager.summonburriedplayercorpse(char_id, position); RETVAL = quest_manager.summonburiedplayercorpse(char_id, position);
ST(0) = boolSV(RETVAL); ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0)); sv_2mortal(ST(0));
@ -1784,19 +1784,19 @@ XS(XS__summonallplayercorpses)
XSRETURN(1); XSRETURN(1);
} }
XS(XS__getplayerburriedcorpsecount); XS(XS__getplayerburiedcorpsecount);
XS(XS__getplayerburriedcorpsecount) XS(XS__getplayerburiedcorpsecount)
{ {
dXSARGS; dXSARGS;
if (items != 1) if (items != 1)
Perl_croak(aTHX_ "Usage: getplayerburriedcorpsecount(char_id)"); Perl_croak(aTHX_ "Usage: getplayerburiedcorpsecount(char_id)");
uint32 RETVAL; uint32 RETVAL;
dXSTARG; dXSTARG;
uint32 char_id = (int)SvIV(ST(0)); uint32 char_id = (int)SvIV(ST(0));
RETVAL = quest_manager.getplayerburriedcorpsecount(char_id); RETVAL = quest_manager.getplayerburiedcorpsecount(char_id);
XSprePUSH; PUSHu((IV)RETVAL); XSprePUSH; PUSHu((IV)RETVAL);
XSRETURN(1); XSRETURN(1);
@ -3712,7 +3712,7 @@ EXTERN_C XS(boot_quest)
newXS(strcpy(buf, "get_spawn_condition"), XS__get_spawn_condition, file); newXS(strcpy(buf, "get_spawn_condition"), XS__get_spawn_condition, file);
newXS(strcpy(buf, "getguildnamebyid"), XS__getguildnamebyid, file); newXS(strcpy(buf, "getguildnamebyid"), XS__getguildnamebyid, file);
newXS(strcpy(buf, "getlevel"), XS__getlevel, file); newXS(strcpy(buf, "getlevel"), XS__getlevel, file);
newXS(strcpy(buf, "getplayerburriedcorpsecount"), XS__getplayerburriedcorpsecount, file); newXS(strcpy(buf, "getplayerburiedcorpsecount"), XS__getplayerburiedcorpsecount, file);
newXS(strcpy(buf, "gettaskactivitydonecount"), XS__gettaskactivitydonecount, file); newXS(strcpy(buf, "gettaskactivitydonecount"), XS__gettaskactivitydonecount, file);
newXS(strcpy(buf, "givecash"), XS__givecash, file); newXS(strcpy(buf, "givecash"), XS__givecash, file);
newXS(strcpy(buf, "gmmove"), XS__gmmove, file); newXS(strcpy(buf, "gmmove"), XS__gmmove, file);
@ -3802,7 +3802,7 @@ EXTERN_C XS(boot_quest)
newXS(strcpy(buf, "stopalltimers"), XS__stopalltimers, file); newXS(strcpy(buf, "stopalltimers"), XS__stopalltimers, file);
newXS(strcpy(buf, "stoptimer"), XS__stoptimer, file); newXS(strcpy(buf, "stoptimer"), XS__stoptimer, file);
newXS(strcpy(buf, "summonallplayercorpses"), XS__summonallplayercorpses, file); newXS(strcpy(buf, "summonallplayercorpses"), XS__summonallplayercorpses, file);
newXS(strcpy(buf, "summonburriedplayercorpse"), XS__summonburriedplayercorpse, file); newXS(strcpy(buf, "summonburiedplayercorpse"), XS__summonburiedplayercorpse, file);
newXS(strcpy(buf, "summonitem"), XS__summonitem, file); newXS(strcpy(buf, "summonitem"), XS__summonitem, file);
newXS(strcpy(buf, "surname"), XS__surname, file); newXS(strcpy(buf, "surname"), XS__surname, file);
newXS(strcpy(buf, "targlobal"), XS__targlobal, file); newXS(strcpy(buf, "targlobal"), XS__targlobal, file);

View File

@ -513,16 +513,16 @@ void lua_toggle_spawn_event(int event_id, bool enable, bool strict, bool reset)
quest_manager.toggle_spawn_event(event_id, enable, strict, reset); quest_manager.toggle_spawn_event(event_id, enable, strict, reset);
} }
void lua_summon_burried_player_corpse(uint32 char_id, float x, float y, float z, float h) { void lua_summon_buried_player_corpse(uint32 char_id, float x, float y, float z, float h) {
quest_manager.summonburriedplayercorpse(char_id, glm::vec4(x, y, z, h)); quest_manager.summonburiedplayercorpse(char_id, glm::vec4(x, y, z, h));
} }
void lua_summon_all_player_corpses(uint32 char_id, float x, float y, float z, float h) { void lua_summon_all_player_corpses(uint32 char_id, float x, float y, float z, float h) {
quest_manager.summonallplayercorpses(char_id, glm::vec4(x, y, z, h)); quest_manager.summonallplayercorpses(char_id, glm::vec4(x, y, z, h));
} }
int lua_get_player_burried_corpse_count(uint32 char_id) { int lua_get_player_buried_corpse_count(uint32 char_id) {
return quest_manager.getplayerburriedcorpsecount(char_id); return quest_manager.getplayerburiedcorpsecount(char_id);
} }
bool lua_bury_player_corpse(uint32 char_id) { bool lua_bury_player_corpse(uint32 char_id) {
@ -1524,9 +1524,9 @@ luabind::scope lua_register_general() {
luabind::def("spawn_condition", &lua_spawn_condition), luabind::def("spawn_condition", &lua_spawn_condition),
luabind::def("get_spawn_condition", &lua_get_spawn_condition), luabind::def("get_spawn_condition", &lua_get_spawn_condition),
luabind::def("toggle_spawn_event", &lua_toggle_spawn_event), luabind::def("toggle_spawn_event", &lua_toggle_spawn_event),
luabind::def("summon_burried_player_corpse", &lua_summon_burried_player_corpse), luabind::def("summon_buried_player_corpse", &lua_summon_buried_player_corpse),
luabind::def("summon_all_player_corpses", &lua_summon_all_player_corpses), luabind::def("summon_all_player_corpses", &lua_summon_all_player_corpses),
luabind::def("get_player_burried_corpse_count", &lua_get_player_burried_corpse_count), luabind::def("get_player_buried_corpse_count", &lua_get_player_buried_corpse_count),
luabind::def("bury_player_corpse", &lua_bury_player_corpse), luabind::def("bury_player_corpse", &lua_bury_player_corpse),
luabind::def("task_selector", &lua_task_selector), luabind::def("task_selector", &lua_task_selector),
luabind::def("task_set_selector", &lua_task_set_selector), luabind::def("task_set_selector", &lua_task_set_selector),

View File

@ -1774,7 +1774,7 @@ void QuestManager::sethp(int hpperc) {
owner->Damage(owner, newhp, SPELL_UNKNOWN, SkillHandtoHand, false, 0, false); owner->Damage(owner, newhp, SPELL_UNKNOWN, SkillHandtoHand, false, 0, false);
} }
bool QuestManager::summonburriedplayercorpse(uint32 char_id, const glm::vec4& position) { bool QuestManager::summonburiedplayercorpse(uint32 char_id, const glm::vec4& position) {
bool Result = false; bool Result = false;
if(char_id <= 0) if(char_id <= 0)
@ -1798,7 +1798,7 @@ bool QuestManager::summonallplayercorpses(uint32 char_id, const glm::vec4& posit
return true; return true;
} }
uint32 QuestManager::getplayerburriedcorpsecount(uint32 char_id) { uint32 QuestManager::getplayerburiedcorpsecount(uint32 char_id) {
uint32 Result = 0; uint32 Result = 0;
if(char_id > 0) { if(char_id > 0) {

View File

@ -159,9 +159,9 @@ public:
void set_zone_flag(int zone_id); void set_zone_flag(int zone_id);
void clear_zone_flag(int zone_id); void clear_zone_flag(int zone_id);
void sethp(int hpperc); void sethp(int hpperc);
bool summonburriedplayercorpse(uint32 char_id, const glm::vec4& position); bool summonburiedplayercorpse(uint32 char_id, const glm::vec4& position);
bool summonallplayercorpses(uint32 char_id, const glm::vec4& position); bool summonallplayercorpses(uint32 char_id, const glm::vec4& position);
uint32 getplayerburriedcorpsecount(uint32 char_id); uint32 getplayerburiedcorpsecount(uint32 char_id);
bool buryplayercorpse(uint32 char_id); bool buryplayercorpse(uint32 char_id);
void forcedooropen(uint32 doorid, bool altmode); void forcedooropen(uint32 doorid, bool altmode);
void forcedoorclose(uint32 doorid, bool altmode); void forcedoorclose(uint32 doorid, bool altmode);