Necro Script / Pet Class Update

grommish

Active Member
If you need to remove this because it makes some slight changes to EQ2Bot.iss and EQ2BotLib.iss I understand, as well as Necromancer.iss and UI files

This Enhancement allows the Caster to select the Pet's Stance (Offensive, Defensive or Default Choosen by EQ2Bot). I've found times when I'm soloing that I'll make the pet the tank, but in doing so, it sets the stance to Offensive. The changes to EQ2Bot.iss allow for the selection or LACK of the var in the script (Scripts that don't use the choice) and run normally as intended without. This, of course, is probably a bad hack.. If so, feel free to ignore, discard or make it cleaner (it WORKS at least..)

In EQ2Bot.Iss;

Code:
					case mage
						if ${MainTank} && ${Actor[MyPet](exists)} && ${PetStance}==3 || ${Actor[MyPet](exists)} && ${PetStance}==1 || ${MainTank} && ${Actor[MyPet](exists)} && !${PetStance}
						{
							if ${Me.Maintained[${SpellType[290]}](exists)}
							{
								Me.Maintained[${SpellType[290]}]:Cancel
							}
							call CastSpellRange 295
						}
						elseif ${Actor[MyPet](exists)}
						{
							if ${Me.Maintained[${SpellType[295]}](exists)}
							{
								Me.Maintained[${SpellType[295]}]:Cancel
							}

							call CastSpellRange 290
						}

						break
This adds the ability to parse PetStance (defined in Necromancer.iss).

In Necromancer.iss:

Code:
	declare PetStance int script 3
and

Code:
	PetStance:Set[${SettingXML[${charfile}].Set[${Me.SubClass}].GetString[Pet Stance,2]}]
In Necromancer.xml (UI file):

Code:
<Text Name='lblPetStance' Template='EQ2.text'>
		<X>160</X>
		<Y>130</Y>
		<Width>70</Width>
		<Height>20</Height>
		<Alignment>Left</Alignment>
		<Text>Pet Stance:</Text>
	</Text>
	<combobox name='cbPetStance' Template='EQ2.Combobox'>
		<x>235</x>
		<y>130</y>
		<width>100</width>
		<height>20</height>
		<items>
			<Item Value='1'>Defensive</Item>
			<Item Value='2'>Offensive</Item>
			<Item Value='3'>Default</Item>
		</items>
		<OnSelect>
			Script[EQ2Bot].Variable[PetStance]:Set[${This.SelectedItem.ID}]
			SettingXML[Scripts/EQ2Bot/Character Config/${Me.Name}.xml].Set[${Me.SubClass}]:Set["Pet Stance",${This.SelectedItem.ID}]:Save
		</OnSelect>
		<OnLoad>This.Item[${SettingXML[Scripts/EQ2Bot/Character Config/${Me.Name}.xml].Set[${Me.SubClass}].GetString[Pet Stance]}]:Select
		</OnLoad>
	</combobox>

I also made a small change to EQ2BotLib.Iss to fix the Pet Guard bug.

Code:
			EQ2Execute /pet preserve_self
			EQ2Execute /pet preserve_master
(Was missing the /'s)

Also, fixed positioning of the Lifeburn section on the UI in Necro UI:

Code:
	<Commandcheckbox Name='LifeburnMode' Template='EQ2.Commandcheckbox'>
		<X>180</X>
		<Y>30</Y>
		<Width>30</Width>
		<Height>20</Height>
		<Text>Use Lifeburn</Text>
		<OnLeftClick>
			if ${This.Checked}
			{
				Script[EQ2Bot].Variable[LifeburnMode]:Set[TRUE]
				SettingXML[Scripts/EQ2Bot/Character Config/${Me.Name}.xml].Set[${Me.SubClass}]:Set["Use Lifeburn",TRUE]:Save
			}
			else
			{
				Script[EQ2Bot].Variable[LifeburnMode]:Set[FALSE]
				SettingXML[Scripts/EQ2Bot/Character Config/${Me.Name}.xml].Set[${Me.SubClass}]:Set["Use Lifeburn",FALSE]:Save
			}
		</OnLeftClick>
		<Data>${SettingXML[Scripts/EQ2Bot/Character Config/${Me.Name}.xml].Set[${Me.SubClass}].GetString[Use Lifeburn]}</Data>
	</Commandcheckbox>
 

Pygar

EQ2Bot Specialist
Thanks for the update.

Just FYI, but...

1. Next release (currently in the experimental tree on svn) of eq2bot allows setting the boolean NoEQ2BotStance in Buff_Init. If set true eq2bot will not interfere with stances as it does now.

I added this as an over-ride to provide backwards compatibility to current class files.

2. I updated EQ2BotLib with the bug fix you listed

3. I also updated the Necro UI with the fix you listed.

Anyone wanting to make the stance changes to the class file or eq2bot will have to do that themselves until such time as the next version is released.

Thanks!

Pygar
 
Top Bottom