Recall Used NPC Bots

Issue #104 closed
Denis Roginskiy created an issue

A great added feature that can be incorporated very easily would be a "recall" feature for NPC Bots that the player has used before. Basically, a command like ".npcbot recall BotName" should bring back the bot "BotName" if the player has used it before.

I implemented this in my repack already (thus far just by using the creature id for the bot). I basically just modified your Player::CreateNPCBot() function, adding a new argument for botentry id defaulted to 0, so if no botentry id is supplied, the function executes as you designed. Otherwise, it checks the character_npcbot table for the specified bot, and if that bot exists (i.e., was previously used), it is recalled rather than creating a new random bot of a specified class. Hope I'm being clear enough. Also, happy to share my code modifications, which are quite light anyway.

Comments (2)

  1. trickerer repo owner

    Yeah, I'd like to see your code if you'll be so kind to provide a link.

    I understand clearly what is this feature about and it's not the first time I am asked for something like this (worths to mention that noone suggested anything particular before). But in my endeavors with bots I've gone much further trying to compose a new method of acquiring bots, so I made bots static creatures instead of temporary summons so this will solve the problem for good as players will be able to summon their bots right away after login (in fact bots themselves will be looking for their owner and join him automatically). And as my explanation slowly becomes a wall of text, I'll just say that I am looking forward for this new version myself (and for result of releasing it).

    There are not so many people ready to code something by themselves (even small things) so I am always ready for experience exchange with anyone ineterested in coding for entertainment and fun especially if it is related to my code.

    P.S. What is your native language?

  2. trickerer repo owner

    NPCBots v4.0.16a

    Make bots static in world (Closes #77, Closes #72, Closes #89, Closes #90, Closes #68, Closes #96, Closes #101, Closes #104). Drop 4.3.4 branch support (Closes #74, Closes #75, Closes #85, Closes #87) Add basic honor for bots (Closes #30). Bots' stats are no longer depend on players (Closes #83, Ref #97, Ref #98). Convert equips from ItemTemplate from Item and make bots use real items and benefit from all items properties except certain class ability improvements (increase damage, decrease cast time, etc.) (Closes #51). Add Auto-equip option, allows to quick-equip items with simple item comparison algorithm (item level) (Closes #63). Add 'Unequip all' option, allows to unequip all items (Closes #95). Make npcbots' stats fully player-like (Ref #97, Closes #98). Disable custom cooldowns (Closes #97, Closes #100). Modify bots' formation to never spread too much (Closes #99). Allow bots to attack neutral units (Closes #107). Allow npcbots to queue into Dungeon Finder with master (Closes #20). No manual yet

    → <<cset 82d2382ad8bd>>

  3. Log in to comment