View Single Post
  #12  
Old 07-10-2011, 03:14 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

Yea I tried to edit it, but the timer on this forum disallowed it.

Here are some small updates. Tightening the DB side.

UPDATE `npc_spells_entries` SET `priority`=1 WHERE `priority`=0 AND 'npc_spells_id' = 705;
UPDATE `npc_spells_entries` SET `priority`=8 WHERE `priority`=7 AND 'npc_spells_id' = 705;
UPDATE `npc_spells_entries` SET `priority`=7 WHERE `priority`=6 AND 'npc_spells_id' = 705;
UPDATE `npc_spells_entries` SET `priority`=6 WHERE `priority`=5 AND 'npc_spells_id' = 705;
UPDATE `npc_spells_entries` SET `priority`=5 WHERE `priority`=4 AND 'npc_spells_id' = 705;
UPDATE `npc_spells_entries` SET `priority`=4 WHERE `priority`=3 AND 'npc_spells_id' = 705;
UPDATE `npc_spells_entries` SET `priority`=3 WHERE `priority`=2 AND 'npc_spells_id' = 705;
UPDATE `npc_spells_entries` SET `priority`=2 WHERE `priority`=1 AND TYPE != 2048 AND 'npc_spells_id' = 705;

UPDATE `npc_spells_entries` SET `maxlevel`=12 WHERE `id`=8146 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=29 WHERE `id`=8147 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=51 WHERE `id`=8148 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=53 WHERE `id`=8149 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=58 WHERE `id`=8150 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=59 WHERE `id`=8151 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=60 WHERE `id`=8152 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=62 WHERE `id`=8153 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=63 WHERE `id`=8154 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=66 WHERE `id`=8155 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=67 WHERE `id`=8156 LIMIT 1;
UPDATE `npc_spells_entries` SET `maxlevel`=68 WHERE `id`=8157 LIMIT 1;


Unsure why but it seems debuffs are still given priority which is weird. Created a level 65 team (sk/cleric/and chanter) and the chanter only starts mezzing once it throws all of its debuffs. Rune line also can get priority sometimes it seems (at least at lower levels). When I type #bot debug spells it shows the spell priority listing and they all seem fine, but the weird part is: the only place I see a call to the spell priority column from the code is in that one debug statement. Probably missing it somewhere though.

If anyone has any ideas let me know

EDIT:
In the code:
Code:
else if(botClass == ENCHANTER) {
			if (!AICastSpell(GetTarget(), 100, SpellType_Mez)) {
				if (!AICastSpell(GetTarget(), 100, SpellType_Slow)) {
					if (!AICastSpell(GetTarget(), 50, SpellType_Debuff)) {
						if (!AICastSpell(this, 100, SpellType_Pet)) {
							if (!AICastSpell(GetTarget(), 25, SpellType_DOT)) {
								if (!AICastSpell(GetTarget(), 25, SpellType_Nuke)) {
									if(!AICastSpell(GetTarget(), 50, SpellType_Escape)) {
										//
									}
								}
							}
						}
					}
				}
			}

			result = true;
		}
Is there a reason that spells arent cast in the order listed in the code?
Reply With Quote