PDA

View Full Version : COMMITTED: Drakkin bots


Taurinus
03-29-2010, 01:48 AM
This enables the creation and spawning of a drakkin bot. I've tested this against Titanium, SoF, and SoD and all appears well.

Index: bot.cpp
================================================== =================
--- bot.cpp (revision 1319)
+++ bot.cpp (working copy)
@@ -3,7 +3,6 @@
#include "bot.h"
#include "object.h"
#include "doors.h"
-
// TODO: The following declarations are redudant to declarations made in MobAI.cpp. Best move both blocks to a common header file.


@@ -993,6 +992,25 @@
break;
}
break;
+ case 522: // Drakkin
+ switch(GetClass()) {
+ case 1: // Warrior
+ case 2: // Cleric
+ case 3: // Paladin
+ case 4: //Ranger
+ case 5: // Shadowknight
+ case 6: //Druid
+ case 7: //Monk
+ case 8: //Bard
+ case 9: // Rogue
+ case 11: // Necromancer
+ case 12: // Wizard
+ case 13: //Mage
+ case 14: //Enchanter
+ Result = true;
+ break;
+ }
+ break;
}

return Result;
@@ -9020,12 +9038,12 @@
c->Message(0, "Usage: #bot create [name] [class(id)] [race(id)] [gender (male/female)]");
return;
}
- else if(strcasecmp(sep->arg[4],"1") && strcasecmp(sep->arg[4],"2") && strcasecmp(sep->arg[4],"3") && strcasecmp(sep->arg[4],"4") && strcasecmp(sep->arg[4],"5") && strcasecmp(sep->arg[4],"6") && strcasecmp(sep->arg[4],"7") && strcasecmp(sep->arg[4],"8") && strcasecmp(sep->arg[4],"9") && strcasecmp(sep->arg[4],"10") && strcasecmp(sep->arg[4],"11") && strcasecmp(sep->arg[4],"12") && strcasecmp(sep->arg[4],"330") && strcasecmp(sep->arg[4],"128") && strcasecmp(sep->arg[4],"130")) {
- c->Message(0, "Usage: #bot create [name] [class(1-16)] [race(1-12,128,130,330)] [gender (male/female)]");
+ else if(strcasecmp(sep->arg[4],"1") && strcasecmp(sep->arg[4],"2") && strcasecmp(sep->arg[4],"3") && strcasecmp(sep->arg[4],"4") && strcasecmp(sep->arg[4],"5") && strcasecmp(sep->arg[4],"6") && strcasecmp(sep->arg[4],"7") && strcasecmp(sep->arg[4],"8") && strcasecmp(sep->arg[4],"9") && strcasecmp(sep->arg[4],"10") && strcasecmp(sep->arg[4],"11") && strcasecmp(sep->arg[4],"12") && strcasecmp(sep->arg[4],"330") && strcasecmp(sep->arg[4],"128") && strcasecmp(sep->arg[4],"130") && strcasecmp(sep->arg[4],"522")) {
+ c->Message(0, "Usage: #bot create [name] [class(1-16)] [race(1-12,128,130,330,522)] [gender (male/female)]");
return;
}
else if(strcasecmp(sep->arg[5],"male") && strcasecmp(sep->arg[5],"female")) {
- c->Message(0, "Usage: #bot create [name] [class(1-16)] [race(1-12,128,130,330)] [gender (male/female)]");
+ c->Message(0, "Usage: #bot create [name] [class(1-16)] [race(1-12,128,130,330,522)] [gender (male/female)]");
return;
}

@@ -9085,7 +9103,7 @@
if(!strcasecmp(sep->arg[1], "help") && !strcasecmp(sep->arg[2], "create") ){
c->Message(0, "Classes: 1(Warrior), 2(Cleric), 3(Paladin), 4(Ranger), 5(Sk), 6(Druid), 7(Monk), 8(Bard), 9(Rogue), 10(Shaman), 11(Necro), 12(Wiz), 13(Mag), 14(Ench), 15(Beast), 16(Bersek)");
c->Message(0, "------------------------------------------------------------------");
- c->Message(0, "Races: 1(Human), 2(Barb), 3(Erudit), 4(Wood elf), 5(High elf), 6(Dark elf), 7(Half elf), 8(Dwarf), 9(Troll), 10(Ogre), 11(Halfling), 12(Gnome), 330(Froglok), 128(Iksar), 130(Vah shir)");
+ c->Message(0, "Races: 1(Human), 2(Barb), 3(Erudit), 4(Wood elf), 5(High elf), 6(Dark elf), 7(Half elf), 8(Dwarf), 9(Troll), 10(Ogre), 11(Halfling), 12(Gnome), 330(Froglok), 128(Iksar), 130(Vah shir), 522(Drakkin)");
c->Message(0, "------------------------------------------------------------------");
c->Message(0, "Usage: #bot create [name] [class(1-16)] [race(1-12,128,130,330)] [gender(male/female)]");
c->Message(0, "Example: #bot create Jesuschrist 9 6 male");

Congdar
04-02-2010, 12:57 AM
Drakkin don't show in Titanium, they didn't get added until two expansions later. Missing are the starting racial stat bonuses and the permitted classes check and the appearance randomization plus a couple other things.

It was a good starting point though, and I've got it all working on my system. Just gotta figure out what to do about Titanium since they just appear as Human.

Taurinus
04-02-2010, 03:07 AM
With Titanium, the bots showing as human was intended as this is what happens with Drakkin PCs as well (really nothing else can be done about it).

The Drakkin do get class bonuses with this, and I saw them to be mostly human stat-wise, so I went with their racial profile (which is no racial bonus/handicap).

I'm pretty sure I am checking for permitted classes during creation unless you mean something else?:???:

Congdar
04-02-2010, 10:14 AM
yep, you did get the class check in. I'm working on the randomization a little bit still so that if you have a few drakkin bots they don't all look the same.

Congdar
04-03-2010, 12:32 AM
added with r1344