:puPPeT:maSTeR: 2.20 - reworked some functions

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

:puPPeT:maSTeR: 2.20 - reworked some functions

Post by z-roice » Wed Sep 08, 2004 2:06 pm

:puPPeT-maSTeR: for Rogues
-=-=-=-=-=-=-=-=-=-=-=-=-


New Post - New Start (old was too small) delete it please or make it unsticky at least (dont make this sticky again to avoid any trouble hehe)

This is my :puPPeT-maSTeR: macro, I mainly develop it for myself so the support isnt that great. The "core" functionallity is very similar to Rogue Helper from Jerle69 and his macro gave me the start to write my own so credit also goes to him.

I'm still improving it like every day and I hate writing documentation
so it may take some while for all new commands and stuff to get documentated. But the code shouldnt be too hard to understand.

for maximum performance you should edit MQ2MoveUtils a bit:
if( fabs(angularDistance(psTarget->Heading,pChSpawn->Heading)) > 85.0 ) {
-- 85 instead of 45 causes moveutils to react a bit more reasonable--

and
if( mPause && strncmp(Name,"UNSTICK_STRAFE_RGT",12) && strncmp(Name,"UNSTICK_STRAFE_LFT",19) ) {
stickPaused = true;
prevMoveBehind = moveBehind || prevMoveBehind;
-- the last line was added so you stick behind your target again after manual movement.

You should also activate BreakOnWarp and set the distance to 50 in MQ2MoveUtils.ini

OK enuff said now lets get to the important Stuff:

Code: Select all

| -- PuppetMasterHelp.txt
| -- Version: 2.05
| -- Date: 9/12/2004

| ----------------------------------
| -- :puPPeT-maSTeR: Command Help --
| ----------------------------------

	-- /kill

		no argument: 			Engages auto combat on your target or tries to use your
								Strike Skill when :puPPeT-maSTeR: is in pause mode.

	-- /rangeattack

		no argument:			Toggles automatic range attack or performs a single range
								attack when :puPPeT-maSTeR: is in pause mode.

	-- /doassist

		no argument:			Assists the main assist and engages combat when not paused.

	-- /mainassist [<main assist>]

		<main assist>:			Sets the current main assist.
		no argument:			Displays the current main assist.

	-- /assistchange [on/off]

		on:						Enables automatically assist changing when raid/group assist is changed.
		off:					Disables automatically assist changing.
		no argument:			Toggles automatically assist changing.

	-- /assistmsg [on/off/<assist message>]

		on:						Enables reacting on assist messages from main assist.
		off:					Disables reacting on assist messages from main assist.
		<assist message>:		Sets the current assist message to be reacted on to <assist message>.
		no argument:			Toggles reacting on assist messages from main assist.

	-- /tankmode on/off

		on:						Disables moving behind mob on sticking.
								Disables auto evade.
								Disables aggro evasion.
								Enables auto disarm.
								Enables auto intimidate.
								Enables auto begging.

		off:					Enables moving behind mob on sticking.
								Enables auto evade.
								Enables aggro evasion.
								Disables auto disarm.
								Disables auto intimidate.
								Disables auto begging.

	-- /autostick [on/off]

		on:						Enables automatic sticking to mob (requires MQ2MoveUtils plugin).
		off:					Disables automatic sticking.
		no argument:			Toggles automatic sticking.

	-- /closeness [<% of max melee range>]

		<% of max melee range>:	Sets the % of melee range it should be sticked in.
		no argument:			Displays the current closeness setting.

	-- /loosestick [on/off]

		on:						Enables loose sticking.
		off:					Disables loose sticking.
		no argument:			Toggles loose sticking.

	-- /moveback [on/off]

		on:						Enables the "moveback" function on sticking. (Useful for AE Rampage)
		off:					Disables the "moveback" function.
		no argument:			Toggles if "moveback" function should be used on sticking.

	-- /movebehind [on/off]

		on:						Enables moving behind mob on sticking.
		off:					Disables moving behind mob on sticking.
		no argument:			Toggles moving behind mob on sticking.

	-- /autoevade [on/off]

		on:						Enables automatically evading from your target in combat.
		off:					Disables automatically evading from your target in combat.
		no argument:			Toggles the auto evade setting.

	-- /evadeaggro [on/off]

		on:						Enables automatically turning off attack for a moment if aggro is detected.
		off:					Disables turning off attack because of aggro.
		no argument:			Toggles the evade aggro setting.

	-- /autobs [on/off]

		on:						Enables automatically backstabbing in combat.
		off:					Disables automatically backstabbing.
		no argument:			Toggles the auto backstab setting.

	-- /autodisarm [on/off]

		on:						Enables automatically disarming in combat.
		off:					Disables automatically disarming.
		no argument:			Toggles the auto disarm setting.

	-- /autofear[on/off]

		on:						Enables automatically intimidating in combat.
		off:					Disables automatically intimidating.
		no argument:			Toggles the auto intimidate setting.

	-- /autopp [on/off]

		on:						Enables automatically pickpocketing in combat
		off:					Disables automatically pickpocketing
		no argument:			Toggles the auto pickpocket setting.

	-- /autobeg [on/off]

		on:						Enables automatically begging in combat
		off:					Disables automatically begging
		no argument:			Toggles the auto backstab setting.

	-- /autohide [on/off]

		on:						Enables automatically sneaking and hiding whenever possible.
		off:					Disables automatically sneaking and hiding.
		no argument:			Toggles the auto sneak and hide setting.

	-- /dropsneak [on/off]

		on:						Enables dropping sneak in combat for faster strafing.
		off:					Disables automatically dropping sneak
		no argument:			Toggles the drop sneak setting.
	
	-- /autotrapdisarm [on/off]

		on:						Enables automatic trap sensing and disarming.
		off:					Disables automatic trap sensing and disarming.
		no argument:			Toggles automatic trap sensing and disarming.	

	-- /strikeskill [<strike skill>]

		<strike skill>:			Sets the current strike skill to <strike skill>.
		no argument:			Displays the current strike skill setting.

	-- /minend [<min endurance %>]

		[<min endurance %>]:	Sets the minimum endurance to use the strike skill.
		no argument:			Displays the current minimum endurance setting.

	-- /autoescape [on/off/<% health to use it>]

		on:						Enables automatically escaping if your health is lower than "allowed".
		off:					Disables automatically escaping.
		<% health to use it>:	Sets the health % to use escape on.
		no argument:			Toggles the auto escape setting.

	-- /autonimble [on/off/<% health to use it>]

		on:						Enables automatically using nimble.
		off:					Disables automatically using nimble.
		<% health to use it>:	Sets the health % to use nimble on.
		no argument:			Toggles the auto nimble setting.

	-- /dynimble [on/off]

		on:						Enables dynamically reacting to damage taken and decide whether to go nimble.
		off:					Disables dynamic nimble.
		no argument:			Toggles dynamic nimble setting.

	-- /checkbuffs [on/off]

		on:						Enables warning about fading buffs.
		off:					Disables warning about fading buffs.
		no argument:			Toggles warning about fading buffs.

	-- /dropunwanted [on/off]

		on:						Enables automatically droping unwanted buffs.
		off:					Disables automatically droping unwanted buffs.
		no argument:			Toggles automatically droping unwanted buffs.

		NOTE:					Set unwanted Buffs manually into PuppetMaster.ini,
								can use short stuff like "Brell" or "Eagle" to
								block multiple buffs with same name.

	-- /autoillusion [on/off]

		on:						Enables automatic random illusion casting on zone or if it is about to fade.
		off:					Disables automatic illusion casting.
		no argument:			Toggles automatic illusion casting.

	-- /calldi [on/off]

		on:						Enables automatically calling for DI in guildchat when DI is used on someone.
		off:					Disables automatically DI calling.
		no argument:			Toggles the call DI setting.

	-- /autojoin [on/off]

		on:						Enables automatically joining group after you got an invite.
		off:					Disables automatically joining groups.
		no argument:			Toggles the auto join setting.

	-- /autogreet [on/off]

		on:						Enables automatically greeting when you join a group or someone else joins.
		off:					Disables automatically greeting.
		no argument:			Toggles the auto greet setting.

	-- /autoloot [on/off/<loot distance>]

		on:						Enables automatically looting after you killed something 
								(and gained exp from it).
		off:					Disables automatically looting.
		<loot distance>:		Sets the distance in which corpses must be for autoloot.
		no argument:			Toggles the auto loot setting.

	-- /collectitem [on/off/<no-drop item to collect>]

		on:						Enables collecting the specified item.
		off:					Disables collecting the specified item.
		<item to collect>:		Sets the item to collect.
		no argument:			Toggles the collect item setting.

	-- /semiafk [on/off]

		on:						Enables beeping whenever you receive a tell or if someone mentions your name.
		off:					Disables beeping.
		no argument:			Toggles semi afk setting.

	-- /pause [on/off]

		on:						Enabled pause mode. All automatic functions will be Disabled in that mode.
		off:					Disables pause mode.
		no argument:			Toggles pause mode setting.

	-- /autofollow [<distance> [<dist on move>]/off]

		<distance> <d on move>: Enables autofollowing your Target with the given parameters.
								(distance on move means distance when your follow target is moving around)
		off:					Disables autofollowing.
		no argument:			Enables autofollowing your current Target with the last used distance setting.

		Note:					You can change your Target once you activated autofollow on a Target.

	-- /leash [<distance>/off]

		<distance>:				Enables leashing while not in combat within the given distance from your current spot.
		off:					Disables leasing:
		no argument:			Enables leashing with the last used distance.

	-- /iclick <short name> [<count>]

		<short name>:			Equips the linked item and performs a right click on it.
		<short name> <count>:	Performs multiple right clicks.

	-- /iset <short name> "<full name>" [mustequip] [<slash command>]

		<short item name>:		Short name to use the item with with /iclick <short item name>.
		"<full item name>":		Full item name.
		mustequip:				Specifies that the item has to be equipped to click.
		<slash command>			Adds a slash command to use the item with.

		Example:				/iset DainBlessing "Ring of Dain Frostreaver IV" mustequip dain
								(will add /dain command to use it easy, or use /iclick DainBlessing)

	-- /autoheal [<target health %>]

		<target health %>:		Automatically uses the Mrylokar's Breastplate to heal up to <target health %>.
		no argument:			Automatically uses the Mrylokar's Breastplate to heal full.

	-- /autocure

		no argument:			Automatically uses the Shield of the Immaculate to cure diseases.

	-- /autoshrink

		no argument:			Automatically uses the item with the shortname "Shrink" to max shrink your
								Target if possible or shrinks yourself if an npc or nothing was targeted.

	-- /groupshrink

		no argument:			Automatically uses the item with the shortname "Shrink" to max shrink your
								Group.

	-- /lootmycorpse <slot to leave>

		<slot to leave>:		Automatically loots all but items which can be worn in <slot to leave>.
		no argument:			Automatically loots your own corpse.

	-- /drag <corpse1> [<corpse2>] ..

		<corpse1> <corpse2> ..:	Automatically drags the corpses.

	-- /illusion

		no argument:			Casts a random illusion. To work you have to add your illusions in the form:

								Example:
								/iset Illusion_DarkElf "Mask of Deception" darkelf

								(shortnames to use: Illusion_DarkElf, Illusion_Dwarf, Illusion_EarthElemental
								Illusion_Erudite, Illusion_Gnome, Illusion_Halfling, Illusion_HalfElf,
								Illusion_HighElf, Illusion_Human, Illusion_Iksar, Illusion_Ogre,
								Illusion_Skeleton, Illusion_VahShir, Illusion_WoodElf)

		Note:					Froglok left out to prevent accidently using the one charge.

	-- /horse

		no argument:			Automatically summons your horse. Shortname of /iclick link has to be "Horse".

	-- /inc

		no argument:			Sends one of the incoming messages specified in PuppetMaster.ini to the
								current incoming channel.

	-- /channel [<incoming channel>]

		<incoming channel>:		Sets the current incoming message channel.

		Note:					Use following channels: g for group, guildsay, raidsay, channel # for 
								chat channels.

	-- /buffcheck

		no argument:			Performs a manual buff check for fading and unwanted buffs depending on
								the current settings.

	-- /reload

		no argument:			Reloads the PuppetMaster.ini, perform this whenever you manually edit it
								while :puPPeT-maSTeR: is running and you want the changes to take effect.

	-- /status

		no argument:			Displays the status on all settings.

	-- /help
		no argument:			Displays a short syntax help for all commands.
	
| -----------------------------------------------
| -- :puPPeT-maSTeR: Additional Short Commands --
| -----------------------------------------------

	-- /buff1,/buff2,/buff#

		no argument:		Drops buff number #.

	Disciplines:

	-- /nimble
	-- /counter
	-- /duelist
	-- /kine
	-- /twisted
	-- /deadeye
	-- /deadly
	-- /blinding
	-- /healing
	-- /fearless
	-- /resistant
	-- /assassins
	-- /kyv
	-- /chaos
	-- /strike
Last edited by z-roice on Sun Sep 26, 2004 2:16 pm, edited 11 times in total.

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

Post by z-roice » Wed Sep 08, 2004 2:10 pm

Code: Select all

| -- PuppetMaster.mac
| -- Version: 2.20
| -- Date: 9/12/2004

			|>  <>+=-                                                    -=+<>  <|
			| <>  <>+=-                                                -=+<>  <> |
			|>  <>  <>+=- :puPPeT-maSTeR: (v. 2.20) by Z-Ro Ice (tm) -=+<>  <>  <|
			| <>  <>+=-                                                -=+<>  <> |
			|>  <>+=-                  -- For Rogues --                  -=+<>  <|

| ------------
| -- Events --
| ------------
#Chat say
#Chat tell

#Event ChatTrigger				"#1# tells the #2#,  '#3#'"
#Event ChatTrigger				"#1# tells the #2#, '#3#'"
#Event ChatChannelTrigger		"#1# tells #2#:#3#, '#4#'"

#Event EngageCombat				"[MQ2] Time to kick ass!!"
#Event ToggleAutoRangeAttack	"[MQ2] ToggleAutoRangeAttack"

#Event Assist					"[MQ2] Assist#1#"
#Event MainAssistChange			"#1# has been delegated #2# Main Assist."

#Event AttackOn					"Auto attack is on."
#Event AttackOff				"Auto attack is off."

|#Event GotHit					"#1#YOU for #2# points of damage."
#Event GotHit					"#1#for #2#"
|#Event GotMissed				"#1#tries to #*# you, but#*#"
#Event GotMissed				"#1#missed"

#Event ControlLoose				"You lose control of yourself!"
#Event ControlRegain			"You have control of yourself again."

#Event Death					"You died."
#Event Death					"You have been slain by #*#!"

#Event Exp						"You gain experience!!"
#Event Exp						"You gain party experience!!"
#Event Exp						"You gained raid experience!"

#Event Zoned					"You have entered #1#."

#Event InvisCloak				"You hide yourself from view."
#Event Appearing    			"You feel yourself starting to appear." 

#Event HideSuccess				"You have hidden yourself from view."
#Event HideStop					"You stop hiding."
#Event HideBreak				"You have moved and are no longer hidden!!"
#Event HideBreak				"You are no longer hidden."
#Event EvadeSuccess				"You have momentarily ducked away from the main combat."
#Event EvadeFail				"Your attempts at ducking clear of combat fail."

#Event Escape					"You escape from combat, hiding yourself from view."

#Event StrikeDiscSuccess		"You take careful aim at your opponent."
#Event StrikeDiscFail			"You can not use this ability because you have not been hidden for long enough."

#Event NimbleDisc				"You bounce about nimbly."
#Event NimbleDisc_Fade			"You movements return to normal."
#Event CounterattackDisc		"Your weapons move with uncanny grace."
#Event CounterattackDisc_Fade	"Your weapons lose their uncanny grace."
#Event DuelistDisc				"Your muscles quiver with power."
#Event DuelistDisc_Fade			"Your fury fades."
#Event KinestheticsDisc			"Your arms feel alive with mystic energy."
#Event KinestheticsDisc_Fade	"The mystic energy fades."
#Event TwistedChanceDisc		"Your attacks flow perfectly together."
#Event TwistedChanceDisc_Fade	"Your attacks return to normal."
#Event DeadeyeDisc				"You feel unstoppable."
#Event DeadeyeDisc_Fade			"Your confidence fades."
#Event DeadlyPrecisionDisc		"Your attacks take on deadly precision."
#Event DeadlyPrecisionDisc_Fade	"Your attacks return to their normal precision."
#Event BlindingSpeedDisc		"Your hands speed up."
#Event BlindingSpeedDisc_Fade	"Your attacks slow down."
#Event HealingWillDisc			"You will your wounds to close."
#Event HealingWillDisc_Fade		"Your will flatters."
#Event FearlessDisc				"Your will drives fear from your mind."
#Event FearlessDisc_Fade		"The specter of fear returns to your mind."
#Event Resistant_Disc			"You channel your will into magical resistance."
#Event Resistant_DiscFade		"Your resistance fades."

#Event DiscNotUp				"You can use the ability #1# again in #2# minute(s) #3# seconds."

#Event Enraged					"#1#has become ENRAGED." 
#Event NoLongerEnraged			"#1#is no longer enraged." 
#Event Infuriated				"#1#is infuriated!"
#Event NoLongerInfuriated		"#1#is no longer infuriated."

#Event Flurry					"#1#executes a FLURRY of attacks on |${Me.Name}|!"

#Event MobCompleteHealCast		"#1#begins to cast a spell. <Complete Healing>"
#Event MobGateCast				"#1#begins to cast the gate spell."
#Event MobGate					"#1#Gates."

#Event SnareOff					"#1#is no longer ensnared."

#Event SpellWorn				"Your #1# spell has worn off."

#Event ImmuneSlow 				"Your target is immune to changes in its attack speed."
#Event ImmuneRoot 				"Your target is immune to changes in its run speed." 

#Event BeenSummoned				"You have been summoned!"

#Event MezzBreak				"#1#has been awaked by #2#."

#Event TrapDetect				"You sense a trap in this direction."
#Event TrapNoDetect				"You do not sense any traps."

#Event DivineIntervention		"#1# has been rescued by divine intervention!"

#Event GroupInvite				"To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel."
#Event GroupJoinSelf			"You have joined the group."
#Event GroupJoinOther			"#1# has joined the group."

#Event IllusionFade				"You feel as if you are about to look like yourself again."

| --------------------
| -- Command Events --
| --------------------
#Event SetMainAssist			"[MQ2] SetMainAssist#1#"
#Event SetAutoAssistChange		"[MQ2] SetAutoAssistChange#1#"
#Event SetAssistMessage			"[MQ2] SetAssistMessage#1#"

#Event SetTankMode				"[MQ2] SetTankMode#1#"
#Event SetIncomingChannel		"[MQ2] SetIncomingChannel#1#"

#Event SetAutoStick				"[MQ2] SetAutoStick#1#"
#Event SetCloseness				"[MQ2] SetCloseness#1#"
#Event SetLooseStick			"[MQ2] SetLooseStick#1#"
#Event SetMoveBack				"[MQ2] SetMoveBack#1#"
#Event SetMoveBehind			"[MQ2] SetMoveBehind#1#"

#Event SetAutoEvade				"[MQ2] SetAutoEvade#1#"
#Event SetEvadeAggro			"[MQ2] SetEvadeAggro#1#"

#Event SetAutoBackstab			"[MQ2] SetAutoBackstab#1#"
#Event SetAutoStrike			"[MQ2] SetAutoStrike#1#"
#Event SetAutoDisarm			"[MQ2] SetAutoDisarm#1#"
#Event SetAutoIntimidate		"[MQ2] SetAutoIntimidate#1#"
#Event SetAutoPickpocket		"[MQ2] SetAutoPickpocket#1#"
#Event SetAutoBeg				"[MQ2] SetAutoBeg#1#"

#Event SetAutoSneakHide			"[MQ2] SetAutoSneakHide#1#"
#Event SetDropSneakInCombat		"[MQ2] SetDropSneakInCombat#1#"

#Event SetAutoTrapDisarm		"[MQ2] SetAutoTrapDisarm#1#"

#Event SetMaxRange				"[MQ2] SetMaxRange#1#"
#Event SetRangeType				"[MQ2] SetRangeType#1#"

#Event SetStrikeSkill			"[MQ2] SetStrikeSkill#1#"
#Event SetMinEndurance			"[MQ2] SetMinEndurance#1#"

#Event SetAutoEscape			"[MQ2] SetAutoEscape#1"

#Event SetAutoNimble			"[MQ2] SetAutoNimble#1#"
#Event SetDynamicNimble			"[MQ2] SetDynamicNimble#1#"

#Event SetCheckForFadingBuffs	"[MQ2] SetCheckForFadingBuffs#1#"
#Event SetDropUnwantedBuffs		"[MQ2] SetDropUnwantedBuffs#1#"

#Event SetAutoIllusion			"[MQ2] SetAutoIllusion#1#"
#Event SetCallDI				"[MQ2] SetCallDI#1#"

#Event SetAutoJoinGroups		"[MQ2] SetAutoJoinGroups#1#"
#Event SetAutoGreet				"[MQ2] SetAutoGreet#1#"

#Event SetAutoLoot				"[MQ2] SetAutoLoot#1#"
#Event SetMinLootValue			"[MQ2] SetMinLootValue#1#"
#Event SetCollectItem			"[MQ2] SetCollectItem#1#"

#Event SetSemiAfk				"[MQ2] SetSemiAfk#1#"
#Event SetPause					"[MQ2] SetPause#1#"

#Event AutoFollow				"[MQ2] AutoFollow#1#"
#Event Leash					"[MQ2] Leash#1#"

#Event ClickItem				"[MQ2] ClickItem#1#"
#Event SetClickItem				"[MQ2] SetClickItem#1#"

#Event AutoHeal					"[MQ2] AutoHeal#1#"
#Event AutoCure					"[MQ2] AutoCure"
#Event AutoShrink				"[MQ2] AutoShrink"
#Event GroupShrink				"[MQ2] GroupShrink"

#Event LootMyCorpse				"[MQ2] LootMyCorpse#1#"
#Event AutoLoot					"[MQ2] AutoLoot#1#"

#Event AutoDrag					"[MQ2] AutoDrag#1#"

#Event RandomIllusion			"[MQ2] RandomIllusion"
#Event SummonHorse				"[MQ2] SummonHorse"

#Event Incoming					"[MQ2] Incoming"

#Event CheckForFadingBuffs		"[MQ2] CheckForFadingBuffs"

#Event LoadAliases				"[MQ2] LoadAliases"
#Event ReloadIni				"[MQ2] ReloadIni"
#Event StatusReport				"[MQ2] StatusReport"
#Event DisplayHelp				"[MQ2] DisplayHelp"

| --------------
| -- Sub Main --
| --------------
Sub Main

	/echo · ··-~^vV - :puPPeT-maSTeR: (v. 2.20) by Z-Ro Ice™ - Loading ...
	/popup :puPPeT-maSTeR: loading ...
	
	|-- Global Variables--

	/declare autoRangeAttackOn		bool	outer	FALSE

	/declare mainAssist				string	outer	+Undefined+
	/declare autoAssistChange		bool	outer	TRUE
	/declare assistMessage			string	outer	+Undefined+
	/declare assistOnMessage		bool	outer	FALSE

	/declare incomingMessages[10]	string	outer	
	/declare incomingCount			int		outer	0
	/declare incomingChannel		string	outer	g

	/declare autoStick				bool	outer	TRUE
	/declare closeness				int		outer	70
	/declare looseStick				bool	outer	FALSE
	/declare moveBack				bool	outer	FALSE
	/declare moveBehind				bool	outer	TRUE

	/declare autoEvade				bool	outer	TRUE
	/declare evadeAggro				bool	outer	TRUE

	/declare autoBackstab			bool	outer	TRUE
	/declare autoStrike				bool	outer	TRUE
	/declare autoDisarm				bool	outer	FALSE
	/declare autoIntimidate			bool	outer	FALSE
	/declare autoPickpocket			bool	outer	FALSE
	/declare autoBeg				bool	outer	FALSE

	/declare autoSneakHide			bool	outer	TRUE
	/declare dropSneakInCombat		bool	outer	TRUE

	/declare autoTrapDisarm			bool	outer	TRUE

	/declare maxRange				int		outer	200
	/declare rangeType				string	outer	Throwing

	/declare strikeSkill			string	outer	Assassins
	/declare minEndurance			int		outer	30

	/declare autoEscape				bool	outer	TRUE
	/declare escapeHealth			int		outer	10

	/declare autoNimble				bool	outer	TRUE
	/declare nimbleHealth			int		outer	30
	/declare dynamicNimble			bool	outer	TRUE

	/declare checkForFadingBuffs	bool	outer	TRUE
	/declare dropUnwantedBuffs		bool	outer	TRUE
	/declare unwantedBuffsCount		int		outer	0
	/declare unwantedBuffs[10]		string	outer	

	/declare autoIllusion			bool	outer	TRUE
	/declare illusions[14]			string	outer
	/declare illusionCount			int		outer	0
	/declare callDI					bool	outer	TRUE

	/declare autoJoinGroups			bool	outer	TRUE
	/declare autoGreet				bool	outer	FALSE

	/declare autoLoot				bool	outer	FALSE
	/declare lootDistance			int		outer	50
	/declare minLootValue			int		outer	0
	/declare collectItem			bool	outer	FALSE
	/declare collectItemName		string	outer	+Undefined+

	/declare semiAfk				bool	outer	TRUE
	/declare isPaused				bool	outer	FALSE
	
	/declare autoFollowOn			bool	outer	FALSE
	/declare followDistance			int		outer	50
	/declare followDistance_OnMove  int		outer	100
	/declare followTargetID			int		outer	0

	/declare leashOn				bool	outer	FALSE
	/declare leashDistance			int		outer	50
	/declare stakeX					float	outer	0
	/declare stakeY					float	outer	0

	/declare lastEvent				string	outer	None

	/declare strikeTimer 			timer	outer	0
	/declare strikeReady 			bool	outer	FALSE
	/declare strikeReadyTimer		timer	outer	0

	/declare nimbleActive			bool	outer	FALSE
	/declare nimbleTimer			timer	outer	0
	/declare discUseTimer			timer	outer	0

	/declare isEnraged				bool	outer	FALSE
	/declare isInfuriated			bool	outer	FALSE
	/declare evadingEnrage			bool	outer	FALSE

	/declare aggroDetected			bool	outer	FALSE
	/declare evadingAggro			bool 	outer	FALSE

	/declare trapDetected			bool	outer	FALSE

	/declare reHideTimer			timer	outer	0

	/declare diedBeforeZone			bool	outer	FALSE
	/declare currentZone			string	outer	${Zone.Name}

	/declare autoGreetTimer			timer	outer	0

	/declare mapUpdateTimer			timer	outer	1m
	/declare buffCheckTimer			timer	outer	15s
	
	/declare behindTarget			bool	outer	FALSE
	/declare facingTarget			bool	outer	FALSE
	/declare inRange				bool	outer	FALSE

	/declare evadeFails				int		outer	0
	/declare hitsTaken				int		outer	0
	/declare maxHit					int		outer	0
	/declare multiDamage			int		outer	0

	/declare oldTargetID			int		outer	0
	/declare oldTargetName			string	outer	+Undefined+
	
	/declare hideButtonNumber		int		outer	0
	/declare sneakButtonNumber		int		outer	0

	/declare underControl			bool	outer	TRUE

	|-- Short Commands

	/if (${Ini[PuppetMaster.ini,Version,AliasVersion].NotEqual[NULL]} && ${Ini[PuppetMaster.ini,Version,AliasVersion].Equal[2.20]}) {
	} else {

		/call Event_LoadAliases

	}

	/squelch /alias /loadaliases /echo LoadAliases

	|-- Sneak & Hide Ability Button Number search
	
	/call SneakHideButtonFind

	|-- INI-Load

	/call Event_ReloadIni	
	
	|-- Info Display

	/call Event_StatusReport

	/echo · ··-~^vV - :puPPeT-maSTeR: (v. 2.20) by Z-Ro Ice™ - Loading Complete
	/popup :puPPeT-maSTeR: loading complete

	|-- Forever Loop

	:ForeverLoop

	/doevents

	/if (${isPaused} || !${underControl}) {
		/delay 2
		/goto :ForeverLoop
	}
	/if (${Me.State.Equal[STUN]} || ${Me.Casting.ID}) {
		/delay 2
		/goto :ForeverLoop
	}
	/if (${Me.State.Equal[FEIGNED]}) {
		/stand
	}
	/if (${Me.PctHPs} <= ${escapeHealth}) {
		/if (${autoEscape} && ${Me.AltAbilityReady["Escape"]}) {
			:makeSureAttackOff

			/varset autoRangeAttackOn FALSE
			/attack off
			/delay 1
			/if (${Me.Combat}) {
				/goto :makeSureAttackOff
			}		
			/alternateadv activate 102
			/delay 5
			/goto :ForeverLoop	
		}
	}
	/if (${Target.ID} && ${Target.Type.Equal[NPC]})  {
		/if (${Target.ID} != ${oldTargetID}) {
			/varset oldTargetID ${Target.ID}
			/if (${Target.CleanName.Left[1].Equal[#]}) {
				/varset oldTargetName ${Target.CleanName.Right[-1]}
			} else {
				/varset oldTargetName ${Target.CleanName}
			}
			/varset autoRangeAttackOn FALSE

			/varset isEnraged FALSE
			/varset isInfuriated FALSE
			/varset evadingEnrage FALSE
			/varset evadingAggro FALSE
			/varset aggroDetected FALSE

			/varset evadeFails 0
			/varset hitsTaken 0
			/varset maxHit 0
			/varset multiDamage 0
		} 
		/if (${Me.Combat}) {
			/varset strikeReady FALSE
			/varset autoRangeAttackOn FALSE
			/if ((${Me.TargetOfTarget.ID} == ${Me.ID}) && !${aggroDetected}) {
				/varset aggroDetected TRUE
				/if (${autoStick}) /call DoStick
			} else /if ((${Me.TargetOfTarget.ID} != ${Me.ID}) && ${aggroDetected}) {
				/varset aggroDetected FALSE
				/if (${autoStick}) /call DoStick				
			}
			/if (${Me.Sneaking} && ${dropSneakInCombat}) {
				/doability "Sneak"
			}
			/if (${isEnraged}) {
				/call Check_Behind
				/if (!${behindTarget}) {
					/varset evadingEnrage TRUE
					/attack off

					/echo · ··-~^vV - Enrage Risk! Attack turned off
					/popup Enrage Risk! Attack off

					/delay 2
					/goto :ForeverLoop
				}
			}
			/call Check_ViewDirection
			/call Check_Range
			/if (${facingTarget} && ${inRange}) {
				/if (${autoBackstab}) /call AutoBackstab
				/if (${autoDisarm}) /call AutoDisarm
				/if (${autoIntimidate}) /call AutoIntimidate
			}
			/if ((${autoEvade} && ${Me.AbilityReady["Hide"]}) || (${autoPickpocket} && ${Me.AbilityReady["Pickpocket"]}) || (${autoBeg} && ${Me.AbilityReady["Begging"]})) {
				/attack off
				/delay 1
				/if (${autoPickpocket}) {
					/call AutoPickpocket
				} else /if (${autoBeg}) {
					/call AutoBeg
				}
				/if (${autoEvade}) /call AutoEvade
				/attack on
			}
		} else {
			/if (${strikeReady} && ${autoStrike}) {
				/if (${Stick.Status.Equal[OFF]}) {
					/if (${autoStick}) /call DoStick

				}
				/call Check_ViewDirection
				/call Check_Range				
				/call Check_Behind
				/if (${facingTarget} && ${inRange} && ${behindTarget}) {
					/call AutoStrike
				}
			} else /if (${evadingEnrage}) {
				/if (${autoPickpocket}) /call AutoPickpocket
				/if (${autoBeg}) /call AutoBeg
				/if (${autoEvade}) /call AutoEvade
				/call Check_Behind
				/if (${behindTarget} || !${isEnraged}) {
					/if (!${evadingAggro}) {
						/varset evadingEnrage FALSE
						/attack on
					}
				}
			} else /if (${evadingAggro}) {
				/if (${Me.TargetOfTarget.ID} == ${Me.ID}) {
					/if (${autoBackstab}) /call AutoBackstab
					/if (${autoEvade}) /call AutoEvade
				} else {
					/varset evadingAggro FALSE
					/if (!${evadingEnrage}) {
						/echo · ··-~^vV - Aggro over! Attack back on.
						/popup Aggro over - Attack on
						/attack on
					}
				}
			} else /if (${autoRangeAttackOn}) {
				/if (${autoEvade}) /call AutoEvade
				/call Check_ViewDirection
				/if (${facingTarget}) {
					/call RangeAttack
				}
				/goto :ForeverLoop
			} else {
				/if (${Stick.Status.NotEqual[OFF]}) /squelch /stick off
				/if (${autoSneakHide}) /call autoSneakHide
			}
		}
	} else {
		/varset autoRangeAttackOn FALSE
		/if (${Stick.Status.NotEqual[OFF]}) /squelch /stick off
		/if (${Me.Combat}) {
			/varset strikeReady FALSE
			/attack off
		}
		/if (${autoSneakHide}) /call autoSneakHide
		/if (${autoFollowOn}) /call DoAutoFollow
		/if (${leashOn}) /call DoLeash
	}
	/if (${autoTrapDisarm}) {
		/call AutoSenseTraps
		/if (${trapDetected}) {
			/call AutoTrapDisarm
		}
	}
	/delay 2
	/goto :ForeverLoop
/return

| -----------------
| -- Event Timer --
| -----------------
Sub Event_Timer(string Timer, int OriginalValue) 
	/varset lastEvent Event_Timer

	/if (${Timer.Equal[buffCheckTimer]}) {
		/call Event_CheckForFadingBuffs
		/varset buffCheckTimer 15s
	} else /if (${Timer.Equal[mapUpdateTimer]}) {
		/squelch /maphide reset
		/varset mapUpdateTimer 1m
	} else /if (${Timer.Equal[strikeTimer]}) {
		/varset strikeReady FALSE
	} else /if (${Timer.Equal[nimbleTimer]}) {
		/echo · ··-~^vV - Nimble Discipline back up!
		/popup Nimble Discipline back up!
	}
/return

| ----------------
| -- Event Chat --
| ----------------
Sub Event_Chat(string ChatType, string Sender, string ChatText) 
	/varset lastEvent Event_Chat

	/if (${semiAfk} && !${Spawn[${Sender}].Type.Equal[NPC]}) {
		/if (${ChatType.Equal[tell]}) {
			/beep
		} else /if (${ChatText.Find[${Me.Name}]}) {
			/beep
		}
	}
	/if (!${isPaused} && ${assistOnMessage}) {
		/if (${Sender.Equal[${mainAssist}]}) {
			/if (${ChatText.Find[${assistMessage}]}) {
				/call Event_Assist "" ""
			}
		}
	}
/return

| -----------------------
| -- Event ChatTrigger --
| -----------------------
Sub Event_ChatTrigger(string Line, string Sender, string ChatType, string ChatText) 
	/varset lastEvent Event_Chat

	/if (${semiAfk} && !${Spawn[${Sender}].Type.Equal[NPC]}) {
		/if (${ChatText.Find[${Me.Name}]}) {
			/beep
		}
	}
	/if (!${isPaused} && ${assistOnMessage}) {
		/if (${Sender.Equal[${mainAssist}]}) {
			/if (${ChatText.Find[${assistMessage}]}) {
				/call Event_Assist "" ""
			}
		}
	}
/return

| ------------------------------
| -- Event ChatChannelTrigger --
| ------------------------------
Sub Event_ChatChannelTrigger(string Line, string Sender, string ChatChannel, int ChannelNumber, string ChatText)
	/varset lastEvent Event_Chat

	/if (${semiAfk}) {
		/if (${ChatText.Find[${Me.Name}]}) {
			/beep
		}
	}
	/if (!${isPaused} && ${assistOnMessage}) {
		/if (${Sender.Equal[${mainAssist}]}) {
			/if (${ChatText.Find[${assistMessage}]}) {
				/call Event_Assist "" ""
			}
		}
	}
/return

| ------------------------
| -- Event EngageCombat --
| ------------------------
Sub Event_EngageCombat
	/varset lastEvent Event_EngageCombat

	/if (!${isPaused}) {
		/if (${Me.Invis} && (${Me.PctEndurance} >= ${minEndurance}) && !${strikeTimer.Value} && (!${strikeReadyTimer.Value} && ${strikeReadyTimer.OriginalValue}) && ${InvSlot[mainhand].Item.Type.Equal[Piercing]}) {
			/disc ${strikeSkill}
		} else {
			/varset strikeReady FALSE
			/attack on
		}
		/if (${autoStick} && ${autoStrike}) /call DoStick		
	} else {
		/disc ${strikeSkill}
	}
/return

| ---------------------------------
| -- Event ToggleAutoRangeAttack --
| ---------------------------------
Sub Event_ToggleAutoRangeAttack
	/varset lastEvent Event_ToggleAutoRangeAttack

	/if (!${isPaused}) {
		/if (${autoRangeAttackOn}) {
			/varset autoRangeAttackOn FALSE
			/echo · ··-~^vV - Automatic Range Attack: OFF
		} else {
			/varset autoRangeAttackOn TRUE
			/echo · ··-~^vV - Automatic Range Attack: ON
		}
	} else {
		/ranged
	}
/return

| -------------------------
| -- Event AssistMessage --
| -------------------------
Sub Event_AssistMessage
	/varset lastEvent Event_AssistMessage

	/if (${assistOnMessage} && !${isPaused}) {
		/assist ${mainAssist}
		/timed 5 /echo Time to kick ass!!
	}
/return

| ------------------
| -- Event Assist --
| ------------------
Sub Event_Assist(string Line, string assistTarget)
	/varset lastEvent Event_Assist

	/varset assistTarget ${assistTarget.Right[-1]}
	/if (${assistTarget.Length}) {
		/assist ${assistTarget}
	} else {
		/assist ${mainAssist}
	}
	/if (!${isPaused}) {
		/timed 5 /echo Time to kick ass!!
	}
/return

| ----------------------------
| -- Event MainAssistChange --
| ----------------------------
Sub Event_MainAssistChange(string Line, string newMainAssist, string mainAssistType)
	/varset lastEvent Event_RaidMainAssist
	/if (${autoAssistChange}) {
		/varset mainAssist ${newMainAssist}
		/ini "PuppetMaster.ini" "Settings" "MainAssist" "${mainAssist}"
		/echo · ··-~^vV - New Main Assist: ${mainAssist}
		/popup MA Change: ${mainAssist}
	}
/return

| ---------------
| -- Event Exp --
| ---------------
Sub Event_Exp
	/varset lastEvent Event_Exp

	/if (!${Target.ID}) {
		/varset isEnraged FALSE
		/varset isInfuriated FALSE
		/varset evadingEnrage FALSE
		/varset evadingAggro FALSE
		/varset aggroDetected FALSE

		/varset evadeFails 0
		/varset hitsTaken 0
		/varset hitsTaken 0
		/varset maxHit 0
	}
	/if (${autoLoot} && !${isPaused}) /call Event_AutoLoot "" ""
/return

| -----------------
| -- Event Death --
| -----------------
Sub Event_Death
	/varset lastEvent Event_Death

	/varset diedBeforeZone TRUE
/return

| -----------------
| -- Event Zoned --
| -----------------
Sub Event_Zoned(string Line, string newZone)
	/varset lastEvent Event_Zoned

	/echo · ··-~^vV - Entered Zone: ${newZone}

	/varset isEnraged FALSE
	/varset isInfuriated FALSE
	/varset evadingEnrage FALSE
	/varset evadingAggro FALSE
	/varset aggroDetected FALSE

	/varset evadeFails 0
	/varset hitsTaken 0
	/varset maxHit 0
	/varset multiDamage 0
	/varset reHideTimer 0

	/varset nimbleActive FALSE
	/varset currentZone ${Zone.Name}

	/varset assistOnMessage FALSE
	/if (${diedBeforeZone}) {
		/consent guild
		/timed 25 /consent raid
		/timed 50 /consent group
		/varset diedBeforeZone FALSE
	} else 	/if (${autoIllusion} && !${isPaused}) {
		/if (${NearestSpawn[npc radius 50].ID}) {
			/echo · ··-~^vV - Possible Enemies nearby! Aborting Auto Illusion casting.
			/popup Possible Enemies nearby - Illusion hold
		} else {
			/delay 2s
			/call Event_RandomIllusion
		}
	}
/return

| --------------------
| -- Event AttackOn --
| --------------------
Sub Event_AttackOn
	/varset lastEvent Event_AttackOn

	/if (${autoStick} && !${isPaused}) /call DoStick
/return

| ---------------------
| -- Event AttackOff --
| ---------------------
Sub Event_AttackOff
	/varset lastEvent Event_AttackOff

	/varset evadingEnrage FALSE
	/varset evadingAggro FALSE
/return

| ------------------
| -- Event GotHit --
| ------------------
Sub Event_GotHit(string Line, string arguments, int damageTaken)
	/varset lastEvent Event_GotHit

	/varset strikeReady FALSE
	/if (!${isPaused}) {
		/if (${arguments.Arg[1].Equal[You]}) /return
		/if (${arguments.Arg[1].Equal[${Me.Name}]}) /return
		/if (${arguments.Arg[1].Equal[Pierce]}) /return
		/if (${arguments.Arg[1].Equal[Backstab]}) /return
		/if (${arguments.Arg[1].Equal[Slash]}) /return
		/if (${arguments.Arg[1].Equal[Crush]}) /return
		/if (${arguments.Arg[1].Equal[Kick]}) /return

		/declare attackerName string local
		/declare damageType string local
		/declare i int local 2

		:nextArgument

		/if (${arguments.Arg[${i}].Length}) {
			/varcalc i (${i} + 1)
			/goto :nextArgument
		}
		/varcalc i (${i} - 1)

		/varset damageType ${arguments.Arg[${i}]}

		/if (${damageType.Equal[non-melee]}) /return
		/if (${damageType.NotEqual[hits]} && ${damageType.NotEqual[kicks]} && ${damageType.NotEqual[bashes]} && ${damageType.NotEqual[slashes]} && ${damageType.NotEqual[crushes]} && ${damageType.NotEqual[pierces]} && ${damageType.NotEqual[bites]} && ${damageType.NotEqual[claws]} && ${damageType.NotEqual[backstabs]}) /return

		/varcalc i (${damageType.Length} + 2)

		/varset attackerName ${arguments.Left[-${i}]}

		/if (${attackerName.Equal[${oldTargetName}]}) {
			/if (${damageTaken} > ${maxHit}) {
				/varset maxHit ${damageTaken}
			}
			/if (${Me.TargetOfTarget.ID} == ${Me.ID}) {
				/if (${Me.Combat} && ${evadeAggro} && !${nimbleActive}) {
					/varset evadingAggro TRUE
					/attack off

					/echo · ··-~^vV - Aggro detected, turned attack off!
					/popup Aggro detected - Attack off!

				}
				/if  (${autoNimble}) {
					/if (${dynamicNimble}) {
						/varcalc multiDamage (${maxHit} * 4)
						/if (${Me.CurrentHPs} <= ${multiDamage}) {
							/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
								/disc nimble
								/varset discUseTimer 1s
								/return
							}
						}
					}
					/if (${Me.PctHPs} <= ${nimbleHealth}) {
						/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
							/disc nimble
							/varset discUseTimer 1s
							/return
						}
					}
				}
			} else 	/if  (${autoNimble}) {
				/if (${dynamicNimble}) {
					/varcalc multiDamage (${maxHit} * 2)
					/if (${Me.CurrentHPs} <= ${multiDamage}) {
						/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
							/disc nimble
							/varset discUseTimer 1s
							/return
						}
					}
				}
				/if (${Me.PctHPs} <= ${nimbleHealth}) {
					/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
						/disc nimble
						/varset discUseTimer 1s
						/return
					}
				}
			}	
		} else {
			/echo · ··-~^vV - Aggro detected on ${attackerName}
			/popup AGGRO on ${attackerName}

			/if (${autoNimble}) {
				/if (${dynamicNimble}) {
					/varcalc multiDamage (${damageTaken} * 6)

					/if (${Me.CurrentHPs} <= ${multiDamage}) {
						/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
							/disc nimble
							/varset discUseTimer 1s
							/return
						}
					}
				}
				/if (${Me.PctHPs} <= ${nimbleHealth}) {
					/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
						/disc nimble
						/varset discUseTimer 1s
					}
				}
			}
		}
	}
/return

| ---------------------
| -- Event GotMissed --
| ---------------------
Sub Event_GotMissed(string Line, string attackerName)
	/varset lastEvent Event_GotMissed

	/if (!${isPaused}) {
		/varset attackerName ${attackerName.Left[-1]}

		/if (${attackerName.Equal[${oldTargetName}]}) {
			/if (${Me.TargetOfTarget.ID} == ${Me.ID}) {
				/if (${Me.Combat} && ${evadeAggro} && !${nimbleActive}) {
					/varset evadingAggro TRUE
					/attack off

					/echo · ··-~^vV - Aggro detected, turned attack off!
					/popup Aggro detected - Attack off!
				}
				/if  (${autoNimble}) {
					/if (${dynamicNimble}) {
						/varcalc multiDamage (${maxHit} * 4)

						/if (${Me.CurrentHPs} <= ${multiDamage}) {
							/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
								/disc nimble
								/varset discUseTimer 1s
								/return
							}
						}
					}
					/if (${Me.PctHPs} <= ${nimbleHealth}) {
						/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
							/disc nimble
							/varset discUseTimer 1s
							/return
						}
					}
				}
			} else /if  (${autoNimble}) {
				/if (${dynamicNimble}) {
					/varcalc multiDamage (${maxHit} * 2)
					/if (${Me.CurrentHPs} <= ${multiDamage}) {
						/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
							/disc nimble
							/varset discUseTimer 1s
							/return
						}
					}
				}
				/if (${Me.PctHPs} <= ${nimbleHealth}) {
					/if (!${nimbleTimer.Value} && !${discUseTimer.Value}) {
						/disc nimble
						/varset discUseTimer 1s
						/return
					}
				}
			}
		} else {
			/echo · ··-~^vV - Aggro detected on ${attackerName}
			/popup AGGRO on ${attackerName}

			/if (${autoNimble}) {
				/if (${Me.PctHPs} <= ${nimbleHealth} && !${discUseTimer.Value}) {
					/if (!${nimbleTimer.Value}) {
						/disc nimble
						/varset discUseTimer 1s
					}
				}
			}
		}
	}
/return

| ------------------------
| -- Event ControlLoose --
| ------------------------
Sub Event_ControlLoose
	/varset lastEvent Event_ControlLoose

	/varset underControl FALSE
	/echo · ··-~^vV - You lost control over yourself!
	/popup You lost control!
/return


| -------------------------
| -- Event ControlRegain --
| -------------------------
Sub Event_ControlRegain
	/varset lastEvent Event_ControlRegain

	/varset underControl TRUE
	/echo · ··-~^vV - You gained your control back!
	/popup You gained your control back!
/return

| ----------------------
| -- Event InvisCloak --
| ----------------------
Sub Event_InvisCloak
	/varset lastEvent Event_InvisCloak

	/varset strikeReadyTimer 4s
	/varset reHideTimer 0
/return

| ---------------------
| -- Event Appearing --
| ---------------------
Sub Event_Appearing
	/varset lastEvent Event_Appearing

	/echo · ··-~^vV - You start to appear!
	/popup You start to APPEAR!
/return

| -----------------------
| -- Event HideSuccess --
| -----------------------
Sub Event_HideSuccess
	/varset lastEvent Event_HideSuccess

	/varset strikeReadyTimer 4s
	/varset reHideTimer 0
/return

| --------------------
| -- Event HideStop --
| --------------------
Sub Event_HideStop
	/varset lastEvent Event_HideStop

	/varset strikeReadyTimer 0
	/varset reHideTimer 2s
	/varset strikeReady FALSE
/return

| ---------------------
| -- Event HideBreak --
|----------------------
Sub Event_HideBreak
	/varset lastEvent Event_HideBreak

	/varset strikeReadyTimer 0
	/varset reHideTimer 0
	/varset strikeReady FALSE
/return

| ------------------------
| -- Event EvadeSuccess --
| ------------------------
Sub Event_EvadeSuccess
	/varset lastEvent Event_EvadeSuccess

	/varset strikeReadyTimer 0
	/varset reHideTimer 0
	/varset evadeFails 0
/return

| ---------------------
| -- Event EvadeFail --
| ---------------------
Sub Event_EvadeFail
	/varset lastEvent Event_EvadeSuccess

	/varset strikeReadyTimer 0
	/varset reHideTimer 0
	/varcalc evadeFails ${evadeFails}+1
/return

| ------------------
| -- Event Escape --
| ------------------
Sub Event_Escape
	/varset lastEvent Event_Escape

	/varset autoRangeAttackOn FALSE
	/varset evadingEnrage FALSE
	/varset evadingAggro FALSE
	/varset strikeReady FALSE
	/echo · ··-~^vV - You have escaped!
	/popup You have escaped!
/return

| -----------------------------
| -- Event StrikeDiscSuccess --
| -----------------------------
Sub Event_StrikeDiscSuccess
	/varset lastEvent Event_StrikeDiscSuccess

	/varset strikeTimer 30s
	/varset strikeReady TRUE
	/echo · ··-~^vV - Strike Ready!
	/popup Strike Ready!
/return

| --------------------------
| -- Event StrikeDiscFail --
| --------------------------
Sub Event_StrikeDiscFail
	/varset lastEvent Event_StrikeDiscFail

	/varset strikeReady FALSE
	/if (${autoStrike} && !${isPaused}) {
		/attack on
	}
/return

| ----------------------
| -- Event NimbleDisc --
| ----------------------
Sub Event_NimbleDisc
	/varset lastEvent Event_NimbleDisc

	/varset nimbleTimer 22m
	/varset nimbleActive TRUE

	/echo · ··-~^vV - Nimble Discipline active!
	/popup Nimble is active!
/return

| ---------------------------
| -- Event NimbleDisc_Fade --
| ---------------------------
Sub Event_NimbleDisc_Fade
	/varset lastEvent Event_NimbleDisc_Fade

	/varset nimbleActive FALSE

	/echo · ··-~^vV - Nimble Discipline no longer active!
	/popup Nimble is OVER!
/return

| -----------------------------
| -- Event CounterattackDisc --
| -----------------------------
Sub Event_CounterattackDisc
	/varset lastEvent Event_CounterattackDisc

	/varset nimbleTimer 40m
	/varset nimbleActive TRUE

	/echo · ··-~^vV - Counterattack Discipline active!
	/popup Counterattack is active!
/return

| ----------------------------------
| -- Event CounterattackDisc_Fade --
| ----------------------------------
Sub Event_CounterattackDisc_Fade
	/varset lastEvent Event_CounterattackDisc_Fade

	/varset nimbleActive FALSE

	/echo · ··-~^vV - Counterattack Discipline no longer active!
	/popup Counterattack is OVER!
/return

| -----------------------
| -- Event DuelistDisc --
| -----------------------
Sub Event_DuelistDisc
	/varset lastEvent Event_DuelistDisc

	/echo · ··-~^vV - Duelist Discipline active!
	/popup Duelist is active!
/return

| ---------------------------
| -- Event DuelistDisc_Fade --
| ---------------------------
Sub Event_DuelistDisc_Fade
	/varset lastEvent Event_DuelistDisc_Fade

	/echo · ··-~^vV - Duelist Discipline no longer active!
	/popup Duelist is OVER!
/return

| ----------------------------
| -- Event KinestheticsDisc --
| ----------------------------
Sub Event_KinestheticsDisc
	/varset lastEvent Event_KinestheticsDisc

	/echo · ··-~^vV - Kinesthetics Discipline active!
	/popup Kinesthetics is active!
/return

| ---------------------------------
| -- Event KinestheticsDisc_Fade --
| ---------------------------------
Sub Event_KinestheticsDisc_Fade
	/varset lastEvent Event_KinestheticsDisc_Fade

	/echo · ··-~^vV - Kinesthetics Discipline no longer active!
	/popup Kinesthetics is OVER!
/return

| -----------------------------
| -- Event TwistedChanceDisc --
| -----------------------------
Sub Event_TwistedChanceDisc
	/varset lastEvent Event_TwistedChanceDisc

	/echo · ··-~^vV - Twisted Chance Discipline active!
	/popup Twisted Chance is active!
/return

| ----------------------------------
| -- Event TwistedChanceDisc_Fade --
| ----------------------------------
Sub Event_TwistedChanceDisc_Fade
	/varset lastEvent Event_TwistedChanceDisc_Fade

	/echo · ··-~^vV - Twisted Chance Discipline no longer active!
	/popup Twisted Chance is OVER!
/return

| -----------------------
| -- Event DeadeyeDisc --
| -----------------------
Sub Event_DeadeyeDisc
	/varset lastEvent Event_DeadeyeDisc

	/echo · ··-~^vV - Deadeye Discipline active!
	/popup Deadeye is active!
/return

| ----------------------------
| -- Event DeadeyeDisc_Fade --
| ----------------------------

Sub Event_DeadeyeDisc_Fade
	/varset lastEvent Event_DeadeyeDisc_Fade

	/echo · ··-~^vV - Deadeye Discipline no longer active!
	/popup Deadeye is OVER!
/return

| -------------------------------
| -- Event DeadlyPrecisionDisc --
| -------------------------------
Sub Event_DeadlyPrecisionDisc
	/varset lastEvent Event_DeadlyPrecisionDisc

	/echo · ··-~^vV - Deadly Precision Discipline active!
	/popup Deadly Precision is active!
/return

| ------------------------------------
| -- Event DeadlyPrecisionDisc_Fade --
| ------------------------------------
Sub Event_DeadlyPrecisionDisc_Fade
	/varset lastEvent Event_DeadlyPrecisionDisc_Fade

	/echo · ··-~^vV - Deadly Precision Discipline no longer active!
	/popup Deadly Precision is OVER!
/return

| -----------------------------
| -- Event BlindingSpeedDisc --
| -----------------------------
Sub Event_BlindingSpeedDisc
	/varset lastEvent Event_BlindingSpeedDisc

	/echo · ··-~^vV - Blinding Speed Discipline active!
	/popup Blinding Speed is active!
/return

| ----------------------------------
| -- Event BlindingSpeedDisc_Fade --
| ----------------------------------
Sub Event_BlindingSpeedDisc_Fade
	/varset lastEvent Event_BlindingSpeedDisc_Fade

	/echo · ··-~^vV - Blinding Speed Discipline no longer active!
	/popup Blinding Speed is OVER!
/return

| ---------------------------
| -- Event HealingWillDisc --
|----------------------------
Sub Event_HealingWillDisc
	/varset lastEvent Event_HealingWillDisc

	/echo · ··-~^vV - Healing Will Discipline active!
	/popup Healing Will is active!
/return

| --------------------------------
| -- Event HealingWillDisc_Fade --
| --------------------------------
Sub Event_HealingWillDisc_Fade
	/varset lastEvent Event_HealingWillDisc_Fade

	/echo · ··-~^vV - Healing Will Discipline no longer active!
	/popup Healing Will is OVER!
/return

| -----------------------------
| -- Event BlindingSpeedDisc --
| -----------------------------
Sub Event_FearlessDisc
	/varset lastEvent Event_FearlessDisc

	/echo · ··-~^vV - Fearless Discipline active!
	/popup Fearless is active!
/return

| ----------------------------------
| -- Event FearlessDisc_Fade --
| ----------------------------------
Sub Event_FearlessDisc_Fade
	/varset lastEvent Event_FearlessDisc_Fade

	/echo · ··-~^vV - Fearless Discipline no longer active!
	/popup Fearless is OVER!
/return

| -----------------------------
| -- Event ResistantDisc --
| -----------------------------
Sub Event_ResistantDisc
	/varset lastEvent Event_ResistantDisc

	/echo · ··-~^vV - Resistant Discipline active!
	/popup Resistant is active!
/return

| ------------------------------
| -- Event ResistantDisc_Fade --
| ------------------------------
Sub Event_BlindingSpeedDisc_Fade
	/varset lastEvent Event_ResistantDisc_Fade

	/echo · ··-~^vV - Resistant Discipline no longer active!
	/popup Resistant is OVER!
/return

| ---------------------
| -- Event DiscNotUp --
| ---------------------
Sub Event_DiscNotUp(string Line, string discipline, int reUseMinutes, int reUseSeconds)
	/varset lastEvent Event_DiscNotUp

	/if (${discipline.Equal[Nimble Discipline]}) {
		/varcalc nimbleTimer ((${reUseMinutes} * 600) + (${reUseSeconds} * 10))
	} else /if (${discipline.Equal[${strikeSkill} Strike]}) {
		/varset strikeTimer ${reUseSeconds}s
	}
/return

| -------------------
| -- Event Enraged --
| -------------------
Sub Event_Enraged(string Line, string enrageTarget)
	/varset lastEvent Event_Enraged
	
	/varset enrageTarget ${enrageTarget.Left[-1]}
	/if (${enrageTarget.Equal[${oldTargetName}]}) {
		/varset isEnraged TRUE

		/echo · ··-~^vV - Enrage detected!
		/popup ENRAGE detected!
	} else {
		/echo · ··-~^vV - Enrage detected: ${enrageTarget}!
		/popup ENRAGE detected: ${enrageTarget}!
	}
/return

| ---------------------------
| -- Event NoLongerEnraged --
| ---------------------------
Sub Event_NoLongerEnraged(string Line, string enrageTarget)
	/varset lastEvent Event_NoLongerEnraged

	/varset enrageTarget ${enrageTarget.Left[-1]}
	/if (${enrageTarget.Equal[${oldTargetName}]}) {
		/varset isEnraged FALSE

		/echo · ··-~^vV - Enrage done!
		/popup Enrage over!
	} else {
		/echo · ··-~^vV - Enrage done: ${enrageTarget}
		/popup Enrage over: ${enrageTarget}
	}
/return

| ----------------------
| -- Event Infuriated --
| ----------------------
Sub Event_Infuriated(string Line, string infuriateTarget)
	/varset lastEvent Event_Infuriated

	/varset infuriateTarget ${infuriateTarget.Left[-1]}
	/if (${infuriateTarget.Equal[${oldTargetName}]}) {
		/varset isInfuriated TRUE
		
		/echo · ··-~^vV - Infuriate detected!
		/popup INFURIATE detected!
		/if (${autoStick}) /call DoStick
	} else {
		/echo · ··-~^vV - Infuriate detected: ${infuriateTarget}
		/popup INFURIATE detected: ${infuriateTarget}
	}	
/return

| ------------------------------
| -- Event NoLongerInfuriated --
| ------------------------------
Sub Event_NoLongerInfuriated(string Line, string infuriateTarget)
	/varset lastEvent Event_NoLongerInfuriated

	/varset infuriateTarget ${infuriateTarget.Left[-1]}
	/if (${infuriateTarget.Equal[${oldTargetName}]}) {
		/varset isInfuriated FALSE

		/echo · ··-~^vV - Infuriate done!
		/popup Infuriate over!
		/if (${autoStick}) /call DoStick
	} else {
		/echo · ··-~^vV - Infuriate done: ${infuriateTarget}
		/popup Infuriate over: ${infuriateTarget}
	}
/return

| ------------------
| -- Event Flurry --
| ------------------
Sub Event_Flurry(string Line, string flurryTarget)
	/varset lastEvent Event_Flurry

	/varset flurryTarget ${flurryTarget.Left[-1]}
	/if (${flurryTarget.Equal[${oldTargetName}]}) {
		/if (${Me.Combat} && ${evadeAggro} && !${nimbleActive}) {
			/varset evadingAggro TRUE
			/attack off

			/echo · ··-~^vV - Got FLURRIED on, turned attack off!
			/popup Got FLURRIED - Attack off!
		} else {

			/echo · ··-~^vV - Got FLURRIED on!
			/popup Got FLURRIED!
		}	
	} else {
		/echo · ··-~^vV - Got FLURRIED on: ${flurryTarget}
		/popup Got FLURRIED: ${flurryTarget}		
	}	
/return

| -------------------------------
| -- Event MobCompleteHealCast --
| -------------------------------
Sub Event_MobCompleteHealCast(string Line, string castTarget)
	/varset lastEvent Event_MobCompleteHealCast

	/varset castTarget ${castTarget.Left[-1]}
	/if (${Spawn[${castTarget}].Type.Equal[NPC]}) {
		/echo · ··-~^vV - ${castTarget} tries to Complete Heal!
		/popup ${castTarget} tries to Complete Heal!
	}
/return

| -----------------------
| -- Event MobGateCast --
| -----------------------

Sub Event_MobGateCast(string Line, string gateTarget)
	/varset lastEvent Event_MobGateCast

	/varset gateTarget ${gateTarget.Left[-1]}
	/echo · ··-~^vV - ${gateTarget} tries to gate!
	/popup ${gateTarget} tries to gate!
/return

| -------------------
| -- Event MobGate --
| -------------------
Sub Event_MobGate(string Line, string gateTarget)
	/varset lastEvent Event_MobGate

	/varset gateTarget ${gateTarget.Left[-1]}
	/if (${gateTarget.Equal[${oldTargetName}]} && (${Target.Distance} > 50)) {
		/if (${Me.Combat}) {
			/attack off
		}
		
		/if (${Stick.Status.NotEqual[OFF]}) /squelch /stick off
		/varset evadingEnrage FALSE
		/varset evadingAggro FALSE
		/varset aggroDetected FALSE
		/varset strikeReady FALSE
	}
	/echo · ··-~^vV - ${gateTarget} has gated!
	/popup ${gateTarget} has gated!
/return

| ----------------
| -- Event Slow --
| ----------------
Sub Event_Slow(string Line, string slowTarget)
	/varset lastEvent Event_Slow

	/varset slowTarget ${slowTarget.Left[-1]}
	/echo · ··-~^vV - ${slowTarget} has been slowed!
	/popup ${slowTarget} has been slowed!
/return

| -----------------
| -- Event Snare --
| -----------------
Sub Event_Snare(string Line, string snareTarget)
	/varset lastEvent Event_Snare

	/varset snareTarget ${snareTarget.Left[-1]}
	/echo · ··-~^vV - ${snareTarget} has been snared!
	/popup ${snareTarget} has been snared!
/return

| ---------------------
| -- Event SpellWorn --
| ---------------------
Sub Event_SpellWorn(string Line, string spellName)
	/varset lastEvent Event_SpellWorn

/return

| ----------------------
| -- Event ImmuneSlow --
| ----------------------
Sub Event_ImmuneSlow
	/varset lastEvent Event_ImmuneSlow

	/echo · ··-~^vV - ${oldTargetName} is immune to slow!
	/popup ${oldTargetName} is immune to slow!
/return

| ----------------------
| -- Event ImmuneRoot --
| ----------------------
Sub Event_ImmuneRoot
	/varset lastEvent Event_ImmuneRoot

	/echo · ··-~^vV - ${oldTargetName} is immune to root/snare!
	/popup ${oldTargetName} is immune to root/snare!
/return

| ------------------------
| -- Event BeenSummoned --
| ------------------------
Sub Event_BeenSummoned
	/varset lastEvent Event_BeenSummoned

	/if (${Target.ID} && (${Target.Distance} > 50)) {
		/if (${Me.Combat}) {
			/attack off
		}
		/if (${Stick.Status.NotEqual[OFF]}) /squelch /stick off
		/varset evadingEnrage FALSE
		/varset evadingAggro FALSE
		/varset aggroDetected FALSE
		/varset strikeReady FALSE
	}
	/echo · ··-~^vV - You have been Summoned!
	/popup You have been Summoned!
/return

| ---------------------
| -- Event MezzBreak --
| ---------------------
Sub Event_MezzBreak(string Line, string mezzBreakTarget, string mezzBreaker)
	/varset lastEvent Event_MezzBreak

	/varset mezzBreakTarget ${mezzBreakTarget.Left[-1]}
/return

| ----------------------
| -- Event TrapDetect --
| ----------------------
Sub Event_TrapDetect

	/varset trapDetected TRUE
/return

| ------------------------
| -- Event TrapNoDetect --
| ------------------------
Sub Event_TrapNoDetect

	/varset trapDetected FALSE
/return

| ------------------------------
| -- Event DivineIntervention --
| ------------------------------
Sub Event_DivineIntervention(string Line, string DITarget)
	/varset lastEvent Event_DivineIntervention

	/echo DI used up on: ${DITarget}
	/popup DI used on: ${DITarget}
	/if (${callDI} && (${Raid.Members} > 0) && ${currentZone.Equal[${Zone.Name}]}) {
		/varset DITarget ${DITarget.Lower}
		/timed 20 /guildsay di ${If[${Math.Rand[2]},${DITarget},${DITarget.Left[4]}]}
	}
/return

| -----------------------
| -- Event GroupInvite --
| -----------------------
Sub Event_GroupInvite
	/varset lastEvent Event_GroupInvite

	/if (${autoJoinGroups} && !${isPaused}) {
		/delay 2s
		/invite
	}
/return

| -------------------------
| -- Event GroupJoinSelf --
| -------------------------
Sub Event_GroupJoinSelf
	/varset lastEvent Event_GroupJoinSelf

	/if (${autoGreet} && !${isPaused}) {
		/declare messageNumber int local ${Math.Rand[5]}

		/if (${messageNumber} == 0) {
			/timed 30 /g hey
		} else /if (${messageNumber} == 1) {
			/timed 30 /g hi
		} else /if (${messageNumber} == 2) {
			/timed 30 /g sup
		} else /if (${messageNumber} == 3) {
			/timed 30 /g heya
		} else /if (${messageNumber} == 4) {
			/timed 30 /g ello
		}
		/varset autoGreetTimer 10s
	}
/return

| --------------------------
| -- Event GroupJoinOther --
| --------------------------
Sub Event_GroupJoinOther(string Line, string newGroupmember)
	/varset lastEvent Event_GroupJoinOther

	/if (${autoGreet} && !${autoGreetTimer} && !${isPaused}) {
		/varset newGroupmember ${newGroupmember.Lower}

		/declare messageNumber int local ${Math.Rand[5]}
		/if (${messageNumber} == 0) {
			/timed 30 /g hey ${If[${Math.Rand[2]},${newGroupmember},${newGroupmember.Left[4]}]}
		} else /if (${messageNumber} == 1) {
			/timed 30 /g hi ${If[${Math.Rand[2]},${newGroupmember},${newGroupmember.Left[4]}]}
		} else /if (${messageNumber} == 2) {
			/timed 30 /g sup ${If[${Math.Rand[2]},${newGroupmember},${newGroupmember.Left[4]}]}
		} else /if (${messageNumber} == 3) {
			/timed 30 /g heya ${If[${Math.Rand[2]},${newGroupmember},${newGroupmember.Left[4]}]}
		} else /if (${messageNumber} == 4) {
			/timed 30 /g ello ${If[${Math.Rand[2]},${newGroupmember},${newGroupmember.Left[4]}]}
		}
		/varset autoGreetTimer 10s
	}
/return

| ------------------------
| -- Event IllusionFade --
| ------------------------
Sub Event_IllusionFade
	/varset lastEvent Event_IllusionFade

	/if (${autoIllusion}) {
		/if (${Me.Invis}) {
			/echo Your illusion is about to fade!
			/popup Illusion about to fade!
		} else {
			/illusion
		}
	}
/return

| -------------------------
| -- Event SetMainAssist --
| -------------------------
Sub Event_SetMainAssist(string Line, string newMainAssist)
	/varset lastEvent Event_SetMainAssist

	/varset newMainAssist ${newMainAssist.Right[-1]}
	/if (${newMainAssist.Length}) {
		/varset mainAssist ${newMainAssist}
		/ini "PuppetMaster.ini" "Settings" "MainAssist" "${mainAssist}"
	}
	/echo · ··-~^vV - Current MainAssist: ${mainAssist}
/return

| -------------------------------
| -- Event SetAutoAssistChange --
| -------------------------------
Sub Event_SetAutoAssistChange(string Line, string newAutoAssistChange)
	/varset lastEvent Event_SetAutoAssistChange

	/varset newAutoAssistChange ${newAutoAssistChange.Right[-1]}
	/if (${newAutoAssistChange.Length}) {
		/if (${newAutoAssistChange.Equal[ON]}) {
			/varset autoAssistChange TRUE
		} else /if (${newAutoAssistChange.Equal[OFF]}) {
			/varset autoAssistChange FALSE
		}
	} else {
		/if (${autoAssistChange}) {
			/varset autoAssistChange FALSE
		} else {
			/varset autoAssistChange TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoAssistChange" "${autoAssistChange}"
	/echo · ··-~^vV - Automatic MainAssist-Change: ${If[${autoAssistChange},ON,OFF]}
/return

| ----------------------------
| -- Event SetAssistMessage --
| ----------------------------
Sub Event_SetAssistMessage(string Line, string newAssistMessage)
	/varset lastEvent Event_SetAssistMessage

	/varset newAssistMessage ${newAssistMessage.Right[-1]}
	/if (${newAssistMessage.Length}) {
		/if (${newAssistMessage.Equal[ON]}) {
			/varset assistOnMessage TRUE
		} else /if (${newAssistMessage.Equal[OFF]}) {
			/varset assistOnMessage FALSE
		} else {
			/varset assistMessage ${newAssistMessage}
			/ini "PuppetMaster.ini" "Settings" "AssistMessage" "${assistMessage}"
		}
	}
	/echo · ··-~^vV - MainAssist: ${mainAssist}
	/echo · ··-~^vV - Assist Message: ${assistMessage}
	/echo · ··-~^vV - Assist on Message: ${If[${assistOnMessage},ON,OFF]}
/return

| -----------------------
| -- Event SetTankMode --
| -----------------------
Sub Event_SetTankMode(string Line, string newTankMode)
	/varset lastEvent Event_SetTankMode

	/varset newTankMode ${newTankMode.Right[-1]}
	/if (${newTankMode.Length}) {
		/if (${newTankMode.Equal[ON]}) {
			/varset moveBack FALSE
			/varset moveBehind FALSE
			/varset autoEvade FALSE
			/varset evadeAggro FALSE
			/varset autoDisarm TRUE
			/varset autoIntimidate TRUE
			/varset autoBeg TRUE

			/ini "PuppetMaster.ini" "Settings" "MoveBack" "${moveBack}"
			/ini "PuppetMaster.ini" "Settings" "MoveBehind" "${moveBehind}"
			/ini "PuppetMaster.ini" "Settings" "AutoEvade" "${autoEvade}"
			/ini "PuppetMaster.ini" "Settings" "EvadeAggro" "${evadeAggro}"
			/ini "PuppetMaster.ini" "Settings" "AutoDisarm" "${autoDisarm}"
			/ini "PuppetMaster.ini" "Settings" "AutoIntimidate" "${autoIntimidate}"
			/ini "PuppetMaster.ini" "Settings" "AutoBeg" "${autoBeg}"
			/echo · ··-~^vV - TankMode: ON
		} else /if (${newTankMode.Equal[OFF]}) {
			/varset moveBehind TRUE
			/varset evadeAggro TRUE
			/varset autoEvade TRUE
			/varset autoDisarm FALSE
			/varset autoIntimidate FALSE
			/varset autoBeg FALSE

			/ini "PuppetMaster.ini" "Settings" "MoveBehind" "${moveBehind}"
			/ini "PuppetMaster.ini" "Settings" "AutoEvade" "${autoEvade}"
			/ini "PuppetMaster.ini" "Settings" "EvadeAggro" "${evadeAggro}"
			/ini "PuppetMaster.ini" "Settings" "AutoDisarm" "${autoDisarm}"
			/ini "PuppetMaster.ini" "Settings" "AutoIntimidate" "${autoIntimidate}"
			/ini "PuppetMaster.ini" "Settings" "AutoBeg" "${autoBeg}"
			/echo · ··-~^vV - TankMode: OFF
		}
	}
/return

| ------------------------
| -- Event SetAutoStick --
| ------------------------
Sub Event_SetAutoStick(string Line, string newAutoStick)
	/varset lastEvent Event_SetAutoStick

	/varset newAutoStick ${newAutoStick.Right[-1]}
	/if (${newAutoStick.Length}) {
		/if (${newAutoStick.Equal[ON]}) {
			/varset autoStick TRUE
		} else /if (${newAutoStick.Equal[OFF]}) {
			/varset autoStick FALSE
		} 
	} else {
		/if (${autoStick}) { 
			/varset autoStick FALSE
		} else {
			/varset autoStick TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoStick" "${autoStick}"
	/echo · ··-~^vV - Automatically stick to your Target: ${If[${autoStick},ON,OFF]}
/return

| ------------------------
| -- Event SetCloseness --
| ------------------------
Sub Event_SetCloseness(string Line, string newCloseness)
	/varset lastEvent Event_SetCloseness

	/varset newCloseness ${newCloseness.Right[-1]}
	/if (${newCloseness} > 0) {
		/varset closeness ${newCloseness}
		/ini "PuppetMaster.ini" "Settings" "Closeness" "${closeness}"
	}
	/echo · ··-~^vV - Closeness on sticking: ${closeness}% of max melee range
/return
Last edited by z-roice on Sun Sep 26, 2004 2:11 pm, edited 19 times in total.

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

Post by z-roice » Wed Sep 08, 2004 2:12 pm

Code: Select all

| -------------------------
| -- Event SetLooseStick --
| -------------------------
Sub Event_SetLooseStick(string Line, string newLooseStick)
	/varset lastEvent Event_SetLooseStick

	/varset newLooseStick ${newLooseStick.Right[-1]}
	/if (${newLooseStick.Length}) {
		/if (${newLooseStick.Equal[ON]}) {
			/varset looseStick TRUE
		} else /if (${newLooseStick.Equal[OFF]}) {
			/varset looseStick FALSE
		}
	} else {
		/if (${looseStick}) { 
			/varset looseStick FALSE
		} else {
			/varset looseStick TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "LooseStick" "${looseStick}"
	/echo · ··-~^vV - Loose sticking: ${If[${looseStick},ON,OFF]}
/return

| -----------------------
| -- Event SetMoveBack --
| -----------------------
Sub Event_SetMoveBack(string Line, string newMoveBack)
	/varset lastEvent Event_SetMoveBack

	/varset newMoveBack ${newMoveBack.Right[-1]}
	/if (${newMoveBack.Length}) {
		/if (${newMoveBack.Equal[ON]}) {
			/varset moveBack TRUE
		} else /if (${newMoveBack.Equal[OFF]}) {
			/varset moveBack FALSE
		} 
	} else {
		/if (${moveBack}) { 
			/varset moveBack FALSE
		} else {
			/varset moveBack TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "MoveBack" "${moveBack}"
	/echo · ··-~^vV - Move back on sticking: ${If[${moveBack},ON,OFF]}
/return

| -------------------------
| -- Event SetMoveBehind --
| -------------------------
Sub Event_SetMoveBehind(string Line, string newMoveBehind)
	/varset lastEvent Event_SetMoveBehind

	/varset newMoveBehind ${newMoveBehind.Right[-1]}
	/if (${newMoveBehind.Length}) {
		/if (${newMoveBehind.Equal[ON]}) {
			/varset moveBehind TRUE
		} else /if (${newMoveBehind.Equal[OFF]}) {
			/varset moveBehind FALSE
		} 
	} else {
		/if (${moveBehind}) { 
			/varset moveBehind FALSE
		} else {
			/varset moveBehind TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "MoveBehind" "${moveBehind}"
	/echo · ··-~^vV - Move Behind on sticking: ${If[${moveBehind},ON,OFF]}
/return

| ------------------------
| -- Event SetAutoEvade --
| ------------------------
Sub Event_SetAutoEvade(string Line, string newAutoEvade)
	/varset lastEvent Event_SetAutoEvade

	/varset newAutoEvade ${newAutoEvade.Right[-1]}
	/if (${newAutoEvade.Length}) {
		/if (${newAutoEvade.Equal[ON]}) {
			/varset autoEvade TRUE
		} else /if (${newAutoEvade.Equal[OFF]}) {
			/varset autoEvade FALSE
		} 
	} else {
		/if (${autoEvade}) { 
			/varset autoEvade FALSE
		} else {
			/varset autoEvade TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoEvade" "${autoEvade}"
	/echo · ··-~^vV - Automatically evade in Combat: ${If[${autoEvade},ON,OFF]}
/return

| -------------------------
| -- Event SetEvadeAggro --
| -------------------------
Sub Event_SetEvadeAggro(string Line, string newEvadeAggro)
	/varset lastEvent Event_SetEvadeAggro

	/varset newEvadeAggro ${newEvadeAggro.Right[-1]}
	/if (${newEvadeAggro.Length}) {
		/if (${newEvadeAggro.Equal[ON]}) {
			/varset evadeAggro TRUE
		} else /if (${newEvadeAggro.Equal[OFF]}) {
			/varset evadeAggro FALSE
		} 
	} else {
		/if (${evadeAggro}) { 
			/varset evadeAggro FALSE
		} else {
			/varset evadeAggro TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "EvadeAggro" "${evadeAggro}"
	/echo · ··-~^vV - Move behind mob on sticking: ${If[${evadeAggro},ON,OFF]}
/return

| ---------------------------
| -- Event SetAutoBackstab --
| ---------------------------
Sub Event_SetAutoBackstab(string Line, string newAutoBackstab)
	/varset lastEvent Event_SetAutoBackstab

	/varset newAutoBackstab ${newAutoBackstab.Right[-1]}
	/if (${newAutoBackstab.Length}) {
		/if (${newAutoBackstab.Equal[ON]}) {
			/varset autoBackstab TRUE
		} else /if (${newAutoBackstab.Equal[OFF]}) {
			/varset autoBackstab FALSE
		} 
	} else {
		/if (${autoBackstab}) { 
			/varset autoBackstab FALSE
		} else {
			/varset autoBackstab TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoBackstab" "${autoBackstab}"
	/echo · ··-~^vV - Automatically backstabbing in Combat: ${If[${autoBackstab},ON,OFF]}
/return

| -------------------------
| -- Event SetAutoStrike --
| -------------------------
Sub Event_SetAutoStrike(string Line, string newAutoStrike)
	/varset lastEvent Event_SetAutoStrike

	/varset newAutoStrike ${newAutoStrike.Right[-1]}
	/if (${newAutoStrike.Length}) {
		/if (${newAutoStrike.Equal[ON]}) {
			/varset autoStrike TRUE
		} else /if (${newAutoStrike.Equal[OFF]}) {
			/varset autoStrike FALSE
		} 
	} else {
		/if (${autoStrike}) { 
			/varset autoStrike FALSE
		} else {
			/varset autoStrike TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoStrike" "${autoStrike}"
	/echo · ··-~^vV - Automatically Strikebing in Combat: ${If[${autoStrike},ON,OFF]}
/return

| -------------------------
| -- Event SetAutoDisarm --
| -------------------------
Sub Event_SetAutoDisarm(string Line, string newAutoDisarm)
	/varset lastEvent Event_SetAutoDisarm

	/varset newAutoDisarm ${newAutoDisarm.Right[-1]}
	/if (${newAutoDisarm.Length}) {
		/if (${newAutoDisarm.Equal[ON]}) {
			/varset autoDisarm TRUE
		} else /if (${newAutoDisarm.Equal[OFF]}) {
			/varset autoDisarm FALSE
		} 
	} else {
		/if (${autoDisarm}) { 
			/varset autoDisarm FALSE
		} else {
			/varset autoDisarm TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoDisarm" "${autoDisarm}"
	/echo · ··-~^vV - Automatically disarming in Combat: ${If[${autoDisarm},ON,OFF]}
/return

| -----------------------------
| -- Event SetAutoIntimidate --
| -----------------------------
Sub Event_SetAutoIntimidate(string Line, string newAutoIntimidate)
	/varset lastEvent Event_SetAutoIntimidate
	
	/varset newAutoIntimidate ${newAutoIntimidate.Right[-1]}
	/if (${newAutoIntimidate.Length}) {
		/if (${newAutoIntimidate.Equal[ON]}) {
			/varset autoIntimidate TRUE
		} else /if (${newAutoIntimidate.Equal[OFF]}) {
			/varset autoIntimidate FALSE
		}
	} else {
		/if (${autoIntimidate}) {
			/varset autoIntimidate FALSE
		} else {
			/varset autoIntimidate TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoIntimidate" "${autoIntimidate}"
	/echo · ··-~^vV - Automatically intimidating in Combat: ${If[${autoIntimidate},ON,OFF]}
/return

| -----------------------------
| -- Event SetAutoPickpocket --
| -----------------------------
Sub Event_SetAutoPickpocket(string Line, string newAutoPickpocket)
	/varset lastEvent Event_SetAutoPickpocket

	/varset newAutoPickpocket ${newAutoPickpocket.Right[-1]}
	/if (${newAutoPickpocket.Length}) {
		/if (${newAutoPickpocket.Equal[ON]}) {
			/varset autoPickpocket TRUE
		} else /if (${newAutoPickpocket.Equal[OFF]}) {
			/varset autoPickpocket FALSE
		}
	} else {
		/if (${autoPickpocket}) {
			/varset autoPickpocket FALSE
		} else {
			/varset autoPickpocket TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoPickpocket" "${autoPickpocket}"
	/echo · ··-~^vV - Automatically pickpocket in Combat: ${If[${autoPickpocket},ON,OFF]}
/return

| ----------------------
| -- Event SetAutoBeg --
| ----------------------
Sub Event_SetAutoBeg(string Line, string newAutoBeg)
	/varset lastEvent Event_SetAutoBeg

	/varset newAutoBeg ${newAutoBeg.Right[-1]}
	/if (${newAutoBeg.Length}) {
		/if (${newAutoBeg.Equal[ON]}) {
			/varset autoBeg TRUE
		} else /if (${newAutoBeg.Equal[OFF]}) {
			/varset autoBeg FALSE
		}
	} else {
		/if (${autoBeg}) {
			/varset autoBeg FALSE
		} else {
			/varset autoBeg TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoBeg" "${autoBeg}"
	/echo · ··-~^vV - Automatically begging in Combat: ${If[${autoBeg},ON,OFF]}
/return

| ----------------------------
| -- Event SetAutoSneakHide --
| ----------------------------
Sub Event_SetAutoSneakHide(string Line, string newAutoSneakHide)
	/varset lastEvent Event_SetAutoSneakHide

	/varset newAutoSneakHide ${newAutoSneakHide.Right[-1]}
	/if (${newAutoSneakHide.Length}) {
		/if (${newAutoSneakHide.Equal[ON]}) {
			/varset autoSneakHide TRUE
		} else /if (${newAutoSneakHide.Equal[OFF]}) {
			/varset autoSneakHide FALSE
		}
	} else {
		/if (${autoSneakHide}) {
			/varset autoSneakHide FALSE
		} else {
			/varset autoSneakHide TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoSneakHide" "${autoSneakHide}"
	/echo · ··-~^vV - Automatically Sneak/Hide: ${If[${autoSneakHide},ON,OFF]}
/return

| --------------------------------
| -- Event SetDropSneakInCombat --
| --------------------------------
Sub Event_SetDropSneakInCombat(string Line, string newDropSneakInCombat)
	/varset lastEvent Event_SetDropSneakInCombat

	/varset newDropSneakInCombat ${newDropSneakInCombat.Right[-1]}
	/if (${newDropSneakInCombat.Length}) {
		/if (${newDropSneakInCombat.Equal[ON]}) {
			/varset dropSneakInCombat TRUE
		} else /if (${newDropSneakInCombat.Equal[OFF]}) {
			/varset dropSneakInCombat FALSE
		}
	} else {
		/if (${dropSneakInCombat}) {
			/varset dropSneakInCombat FALSE
		} else {
			/varset dropSneakInCombat TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "DropSneakInCombat" "${dropSneakInCombat}"
	/echo · ··-~^vV - Drop sneak in combat: ${If[${dropSneakInCombat},ON,OFF]}
/return

| -----------------------------
| -- Event SetAutoTrapDisarm --
| -----------------------------
Sub Event_SetAutoTrapDisarm(string Line, string newAutoTrapDisarm)
	/varset lastEvent Event_SetAutoTrapDisarm

	/varset newAutoTrapDisarm ${newAutoTrapDisarm.Right[-1]}
	/if (${newAutoTrapDisarm.Length}) {
		/if (${newAutoTrapDisarm.Equal[ON]}) {
			/varset autoTrapDisarm TRUE
		} else /if (${newAutoTrapDisarm.Equal[OFF]}) {
			/varset autoTrapDisarm FALSE
		}
	} else {
		/if (${autoTrapDisarm}) {
			/varset autoTrapDisarm FALSE
		} else {
			/varset autoTrapDisarm TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoTrapDisarm" "${autoTrapDisarm}"
	/echo · ··-~^vV - Automatic trap sensing and disarming: ${If[${autoTrapDisarm},ON,OFF]}
/return

| ------------------------
| -- Event SetRangeType --
| ------------------------
Sub Event_SetRangeType(string Line, string newRangeType)
	/varset lastEvent Event_SetRangeType

	/varset newRangeType ${newRangeType.Right[-1]}
	/if (${newRangeType.Length}) {
		/varset rangeType ${newRangeType}
		/ini "PuppetMaster.ini" "Settings" "RangeType" "${rangeType}"
	}
	/echo · ··-~^vV - Type of Rangeitem: ${rangeType}
/return

| -----------------------
| -- Event SetMaxRange --
| -----------------------
Sub Event_SetMaxRange(string Line, string newMaxRange)
	/varset lastEvent Event_SetMaxRange

	/varset newMaxRange ${newMaxRange.Right[-1]}
	/if (${newMaxRange.Length} && (${newMaxRange} > 0)) {
		/varset maxRange ${newMaxRange}
		/ini "PuppetMaster.ini" "Settings" "MaxRange" "${maxRange}"
	}
	/echo · ··-~^vV - Max range of Rangeitem: ${maxRange}
/return

| --------------------------
| -- Event SetStrikeSkill --
| --------------------------
Sub Event_SetStrikeSkill(string Line, string newStrikeSkill)
	/varset lastEvent Event_SetStrikeSkill

	/varset newStrikeSkill ${newStrikeSkill.Right[-1]}
	/if (${newStrikeSkill.Length}) {
		/varset strikeSkill ${newStrikeSkill}
		/ini "PuppetMaster.ini" "Settings" "StrikeSkill" "${strikeSkill}"
	}
	/echo · ··-~^vV - Current Strike Skill to use: ${strikeSkill}
/return

| ---------------------------
| -- Event SetMinEndurance --
| ---------------------------
Sub Event_SetMinEndurance(string Line, string newMinEndurance)
	/varset lastEvent Event_SetMinEndurance

	/varset newMinEndurance ${newMinEndurance.Right[-1]}
	/if (${newMinEndurance.Length} && ({newMinEndurance} > 0)) {
		/varset minEndurance ${newMinEndurance}
		/ini "PuppetMaster.ini" "Settings" "MinEndurance" "${minEndurance}"
	}
	/echo · ··-~^vV - Minimal Endurance to strike: ${minEndurance}%
/return

| -------------------------
| -- Event SetAutoEscape --
| -------------------------
Sub Event_SetAutoEscape(string Line, string newAutoEscape)
	/varset lastEvent Event_SetAutoEscape

	/varset newAutoEscape ${newAutoEscape.Right[-1]}
	/if (${newAutoEscape.Length}) {
		/if (${newAutoEscape.Equal[ON]}) {
			/varset autoEscape TRUE
		} else /if (${newEvadeAggro.Equal[OFF]}) {
			/varset autoEscape FALSE
		} else /if (${newAutoEscape} > 0) {
			/varset escapeHealth ${newAutoEscape}
		}
	} else {
		/if (${${autoEscape}) {
			/varset autoEscape FALSE
		} else {
			/varset autoEscape TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoEscape" "${autoEscape}"
	/ini "PuppetMaster.ini" "Settings" "EscapeHealth" "${escapeHealth}"
	/echo · ··-~^vV - Automatically Escape: ${If[${autoEscape},ON,OFF]}
	/echo · ··-~^vV - Escape Health: ${escapeHealth}%
/return

| -------------------------
| -- Event SetAutoNimble --
| -------------------------
Sub Event_SetAutoNimble(string Line, string newAutoNimble)
	/varset lastEvent Event_SetAutoNimble

	/varset newAutoNimble ${newAutoNimble.Right[-1]}
	/if (${newAutoNimble.Length}) {
		/if (${newAutoNimble.Equal[ON]}) {
			/varset autoNimble TRUE
		} else /if (${newAutoNimble.Equal[OFF]}) {
			/varset autoNimble FALSE
		} else /if (${newAutoNimble} > 0) {
			/varset nimbleHealth ${arguments.Arg[1]}
		}
	} else {
		/if (${autoNimble}) {
			/varset autoNimble FALSE
		} else {
			/varset autoNimble TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoNimble" "${autoNimble}"
	/ini "PuppetMaster.ini" "Settings" "NimbleHealth" "${nimbleHealth}"
	/echo · ··-~^vV - Automatically use Nimble: ${If[${autoNimble},ON,OFF]}
	/echo · ··-~^vV - Nimble Health: ${nimbleHealth}%
	/echo · ··-~^vV - Dynamic Nimble Control: ${If[${dynamicNimble},ON,OFF]}
/return

| ----------------------------
| -- Event SetDynamicNimble --
| ----------------------------
Sub Event_SetDynamicNimble(string Line, string newDynamicNimble)
	/varset lastEvent Event_SetAutoNimble

	/varset newDynamicNimble ${newDynamicNimble.Right[-1]}
	/if (${newDynamicNimble.Length}) {
		/if (${newDynamicNimble.Equal[ON]}) {
			/varset dynamicNimble TRUE
		} else /if (${newDynamicNimble.Equal[OFF]}) {
			/varset dynamicNimble FALSE
		}
	} else {
		/if (${dynamicNimble}) {
			/varset dynamicNimble FALSE
		} else {
			/varset dynamicNimble TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "DynamicNimble" "${dynamicNimble}"
	/echo · ··-~^vV - Automatically use Nimble: ${If[${autoNimble},ON,OFF]}
	/echo · ··-~^vV - Nimble Health: ${nimbleHealth}%
	/echo · ··-~^vV - Dynamic Nimble Control: ${If[${dynamicNimble},ON,OFF]}
/return

| ----------------------------------
| -- Event SetCheckForFadingBuffs --
| ----------------------------------
Sub Event_SetCheckForFadingBuffs(string Line, string newCheckForFadingBuffs)
	/varset lastEvent Event_SetCheckForFadingBuffs

	/varset newCheckForFadingBuffs ${newCheckForFadingBuffs.Right[-1]}
	/if (${newCheckForFadingBuffs.Length}) {
		/if (${newCheckForFadingBuffs.Equal[ON]}) {
			/varset checkForFadingBuffs TRUE
		} else /if (${newCheckForFadingBuffs.Equal[OFF]}) {
			/varset checkForFadingBuffs FALSE
		}
	} else {
		/if (${checkForFadingBuffs}) {
			/varset checkForFadingBuffs FALSE
		} else {
			/varset checkForFadingBuffs TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "CheckForFadingBuffs" "${checkForFadingBuffs}"
	/echo · ··-~^vV - Warn about fading Buffs: ${If[${checkForFadingBuffs},ON,OFF]}
/return

| --------------------------------
| -- Event SetDropUnwantedBuffs --
| --------------------------------
Sub Event_SetDropUnwantedBuffs(string Line, string newDropUnwantedBuffs)
	/varset lastEvent Event_SetDropUnwantedBuffs

	/varset newDropUnwantedBuffs ${newDropUnwantedBuffs.Right[-1]}
	/if (${newDropUnwantedBuffs.Length}) {
		/if (${newDropUnwantedBuffs.Equal[ON]}) {
			/varset dropUnwantedBuffs TRUE
		} else /if (${newDropUnwantedBuffs.Equal[OFF]}) {
			/varset dropUnwantedBuffs FALSE
		}
	} else {
		/if (${dropUnwantedBuffs}) {
			/varset dropUnwantedBuffs FALSE
		} else {
			/varset dropUnwantedBuffs TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "DropUnwantedBuffs" "${dropUnwantedBuffs}"
	/echo · ··-~^vV - Automatically drop unwanted Buffs: ${If[${dropUnwantedBuffs},ON,OFF]}
/return

| ---------------------------
| -- Event SetAutoIllusion --
| ---------------------------
Sub Event_SetAutoIllusion(string Line, string newAutoIllusion)
	/varset lastEvent Event_SetAutoIllusion

	/varset newAutoIllusion ${newAutoIllusion.Right[-1]}
	/if (${newAutoIllusion.Length}) {
		/if (${newAutoIllusion.Equal[ON]}) {
			/varset autoIllusion TRUE
		} else /if (${newAutoIllusion.Equal[OFF]}) {
			/varset autoIllusion FALSE
		}
	} else {
		/if (${autoIllusion}) {
			/varset autoIllusion FALSE
		} else {
			/varset autoIllusion TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoIllusion" "${autoIllusion}"
	/echo · ··-~^vV - Automatically cast random Illusion on Zone or Fade: ${If[${autoIllusion},ON,OFF]}
/return

| ---------------------
| -- Event SetCallDI --
| ---------------------
Sub Event_SetCallDI(string Line, string newCallDI)
	/varset lastEvent Event_SetCallDI

	/varset newCallDI ${newCallDI.Right[-1]}
	/if (${newCallDI.Length}) {
		/if (${newCallDI.Equal[ON]}) {
			/varset callDI TRUE
		} else /if (${newCallDI.Equal[OFF]}) {
			/varset callDI FALSE
		}
	} else {
		/if (${callDI}) {
			/varset callDI FALSE
		} else {
			/varset callDI TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "CallDI" "${callDI}"
	/echo · ··-~^vV - Call DI while on raid: ${If[${callDI},ON,OFF]}
/return

| -----------------------------
| -- Event SetAutoJoinGroups --
| -----------------------------
Sub Event_SetAutoJoinGroups(string Line, string newAutoJoinGroups)
	/varset lastEvent Event_SetAutoJoinGroups

	/varset newAutoJoinGroups ${newAutoJoinGroups.Right[-1]}
	/if (${newAutoJoinGroups.Length}) {
		/if (${newAutoJoinGroups.Equal[ON]}) {
			/varset autoJoinGroups TRUE
		} else /if (${newAutoJoinGroups.Equal[OFF]}) {
			/varset autoJoinGroups FALSE
		}
	} else {
		/if (${autoJoinGroups}) {
			/varset autoJoinGroups FALSE
		} else {
			/varset autoJoinGroups TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoJoinGroups" "${autoJoinGroups}"
	/echo · ··-~^vV - Automatically join Groups: ${If[${autoJoinGroups},ON,OFF]}
/return

| ------------------------
| -- Event SetAutoGreet --
| ------------------------
Sub Event_SetAutoGreet(string Line, string newAutoGreet)
	/varset lastEvent Event_SetAutoGreet
	
	/varset newAutoGreet ${newAutoGreet.Right[-1]}
	/if (${newAutoGreet.Length}) {
		/if (${newAutoGreet.Equal[ON]}) {
			/varset autoGreet TRUE
		} else /if (${newAutoGreet.Equal[OFF]}) {
			/varset autoGreet FALSE
		}
	} else {
		/if (${autoGreet}) {
			/varset autoGreet FALSE
		} else {
			/varset autoGreet TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoGreet" "${autoGreet}"
	/echo · ··-~^vV - Automatically greet new Groupmembers: ${If[${autoGreet},ON,OFF]}
/return

| -----------------------
| -- Event SetAutoLoot --
| -----------------------
Sub Event_SetAutoLoot(string Line, string newAutoLoot)
	/varset lastEvent Event_SetAutoLoot

	/varset newAutoLoot ${newAutoLoot.Right[-1]}
	/if (${newAutoLoot.Length}) {
		/if (${newAutoLoot.Equal[ON]}) {
			/varset autoLoot TRUE
		} else /if (${newAutoLoot.Equal[OFF]}) {
			/varset autoLoot FALSE
		} else /if (${newAutoLoot} > 0) {
			/varset lootDistance ${newAutoLoot}
		}
	} else {
		/if (${autoLoot}) {
			/varset autoLoot FALSE
		} else {
			/varset autoLoot TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "AutoLoot" "${autoLoot}"
	/ini "PuppetMaster.ini" "Settings" "LootDistance" "${lootDistance}"
	/echo · ··-~^vV - Automatically Loot: ${If[${autoLoot},ON,OFF]}
	/echo · ··-~^vV - Loot Distance: ${lootDistance}
/return

| ---------------------------
| -- Event SetMinLootValue --
| ---------------------------
Sub Event_SetMinLootValue(string Line, string newMinLootValue)
	/varset lastEvent Event_SetMinLootValue

	/varset newMinLootValue ${newMinLootValue.Right[-1]}
	/if (${newMinLootValue.Length}) {
		/varcalc minLootValue ${newMinLootValue}
	}

	/ini "PuppetMaster.ini" "Settings" "MinLootValue" "${minLootValue}"
	/echo · ··-~^vV - Minimum Loot Value: ${Math.Calc[${minLootValue}/1000]}pp
/return

| --------------------------
| -- Event SetCollectItem --
| --------------------------
Sub Event_SetCollectItem(string Line, string newCollectItem)
	/varset lastEvent Event_SetCollectItem

	/varset newCollectItem ${newCollectItem.Right[-1]}
	/if (${newCollectItem.Length}) {
		/if (${newCollectItem.Equal[ON]}) {
			/varset collectItem TRUE
		} else /if (${newCollectItem.Equal[OFF]}) {
			/varset collectItem FALSE
		} else {
			/varset collectItemName ${newCollectItem}
		}
	} else {
		/if (${collectItem}) {
			/varset collectItem FALSE
		} else {
			/varset collectItem TRUE
		}
	}
	/ini "PuppetMaster.ini" "Settings" "CollectItem" "${collectItem}"
	/ini "PuppetMaster.ini" "Settings" "CollectItemName" "${collectItemName}"
	/echo · ··-~^vV - Collect Item: ${If[${collectItem},ON,OFF]}
	/echo · ··-~^vV - Collect Item Name: ${collectItemName}
/return

| ----------------------
| -- Event AutoFollow --
| ----------------------
Sub Event_AutoFollow(string Line, string argument)
	/varset lastEvent Event_SetAutoFollow

	/varset argument ${argument.Right[-1]}
	/if (${argument.Length}) {
		/if (${argument.Equal[OFF]}) {
			/varset autoFollowOn FALSE
			/echo · ··-~^vV - AutoFollow OFF!
		} else {
			/if (${Target.ID}) {
				/declare newFollowDistance int ${argument.Arg[1]}
				/declare newFollowDistance_OnMove int ${argument.Arg[2]}
				/if (${newFollowDistance} > 0) {
					/varset followDistance ${newFollowDistance}
				}
				/if (${newFollowDistance_OnMove} > 0) {
					/varset followDistance_OnMove ${newFollowDistance_OnMove}
				} else {
					/varcalc followDistance_OnMove (${newFollowDistance} * 2)
				}
				/varset followTargetID ${Target.ID}
				/varset autoFollowOn TRUE
				/echo · ··-~^vV - Automatically Following: ${Target.CleanName}
				/echo · ··-~^vV - Follow Distance: ${followDistance}(${followDistance_OnMove} on move)
			}

		}
	} else {
		/if $({autoFollowOn}) {
			/varset autoFollowOn FALSE
			/echo · ··-~^vV - AutoFollow OFF!			
		} else {
			/if (${Target.ID}) {
				/declare newFollowDistance int ${argument.Arg[1]}
				/declare newFollowDistance_OnMove int ${argument.Arg[2]}
				/if (${newFollowDistance} > 0) {
					/varset followDistance ${newFollowDistance}
				}
				/if (${newFollowDistance_OnMove} > 0) {
					/varset followDistance_OnMove ${newFollowDistance_OnMove}
				} else {
					/varcalc followDistance_OnMove (${newFollowDistance} * 2)
				}
				/varset followTargetID ${Target.ID}
				/varset autoFollowOn TRUE
				/echo · ··-~^vV - Automatically Following: ${Target.CleanName}
				/echo · ··-~^vV - Follow Distance: ${followDistance}(${followDistance_OnMove} on move)
			}
		}
	}	
/return

| -----------------
| -- Event Leash --
| -----------------
Sub Event_Leash(string Line, string argument)
	/varset lastEvent Event_SetLeash

	/varset argument ${argument.Right[-1]}
	/if (${argument.Length}) {
		/if (${argument.Equal[OFF]}) {
			/varset leashOn FALSE
			/echo · ··-~^vV - Leash: OFF
		} else {
			/declare newLeashDistance int ${argument}
			/if (${newLeashDistance} > 0) {
				/varset leashDistance ${newLeashDistance}
			}
			/varset leashOn TRUE
			/varset stakeX ${Me.X}
			/varset stakeY ${Me.Y}
			/echo · ··-~^vV - Leash: ON x: ${stakeX} y: ${stakeY}
		}
	} else {
		/if ($(leashOn}) {
			/varset leashOn FALSE
			/echo · ··-~^vV - Leash: OFF			
		} else { 
			/varset leashOn TRUE
			/varset stakeX ${Me.X}
			/varset stakeY ${Me.Y}
			/echo · ··-~^vV - Leash: ON x: ${stakeX} y: ${stakeY}
		}
	}
/return

| ----------------------
| -- Event SetSemiAfk --
| ----------------------
Sub Event_SetSemiAfk(string Line, string newSemiAfk)
	/varset lastEvent Event_SetSemiAfk

	/varset newSemiAfk ${newSemiAfk.Right[-1]}
	/if (${newSemiAfk.Length}) {
		/if (${newSemiAfk.Equal[ON]}) {
			/varset semiAfk TRUE
		} else /if (${newSemiAfk.Equal[OFF]}) {
			/varset semiAfk FALSE
		}
	} else {
		/if (${semiAfk}) {
			/varset semiAfk FALSE
		} else {
			/varset semiAfk TRUE
		}
	}
	/echo · ··-~^vV - Semi-Afk: ${If[${semiAfk},ON,OFF]}
/return

| --------------------
| -- Event SetPause --
| --------------------
Sub Event_SetPause(string Line, string newPause)
	/varset lastEvent Event_SetPause

	/varset newPause ${newPause.Right[-1]}
	/if (${newPause.Length}) {
		/if (${newPause.Equal[ON]}) {
			/varset isPaused TRUE
			/if (${Stick.Status.NotEqual[OFF]}) /squelch /stick off
		} else /if (${newPause.Equal[OFF]}) {
			/varset isPaused FALSE
		}
	} else {
		/if (${isPaused}) {
			/varset isPaused FALSE
		} else {
			/varset isPaused TRUE
			/if (${Stick.Status.NotEqual[OFF]}) /squelch /stick off
		}
	}
	/echo · ··-~^vV - Status: ${If[${isPaused},PAUSED,RUNNING]}
	/popup ${If[${isPaused},PAUSED,RESUMED]}
/return

| ---------------------
| -- Event ClickItem --
| ---------------------
Sub Event_ClickItem(string Line, string arguments)
	/varset lastEvent Event_ClickItem

	/varset arguments ${arguments.Right[-1]}
	/if (${arguments.Length}) {
		/declare fullName string local ${Ini[PuppetMaster.ini,ClickItems,${arguments.Arg[1]}_FullName]}
		/if (${fullName.Equal[NULL]}) {
			/echo · ··-~^vV - [${arguments.Arg[1]}] not in INI file!
			/return
		}
		/declare castCount int local 1
		/if (${arguments.Arg[2].Length} && (${arguments.Arg[2]} > 0)) {
			/varset castCount ${arguments.Arg[2]}
		}
		/declare mustEquip string local ${Ini[PuppetMaster.ini,ClickItems,${arguments.Arg[1]}_MustEquip]}
		/if (${FindItem[${fullName}].InvSlot.Pack}) {
			/declare wasOpen bool local TRUE

			:openPack
			/if (!${Window[${FindItem[${fullName}].InvSlot.Pack.Name}].Open}) {
				/varset wasOpen FALSE
				/itemnotify ${FindItem[${fullName}].InvSlot.Pack.Name} rightmouseup
				/delay 2
				/goto :openPack
			}
			/declare cameFrom ${FindItem[${fullName}].InvSlot}
			
			:grabItem
			/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
			/delay 2
			/if (!${Cursor.ID}) {
				/goto :grabItem
			}
			/declare clickItemID ${Cursor.ID}
			/if (${mustEquip}) {
				/declare wornAt ${Cursor.WornSlot[1]}
			} else {
				/declare wornAt	pack1
				/declare pack1WasOpen ${Window[pack1].Open}
			}

			:swapIn
			/itemnotify ${InvSlot[${wornAt}]} leftmouseup
			/delay 2
			/if (${Cursor.ID} == ${clickItemID}) {
				/goto :swapIn
			}
			/declare swappedOutItemID ${Cursor.ID}

			:clickIt
			/if (${Me.Ducking}) {
				/goto :swapOut
			}
			/if (${Me.Casting.ID}) {
				/delay 2
				/goto :clickIt
			}
			/if (${castCount} >= 1) {
				/varcalc castCount ${castCount}-1
				/echo · ··-~^vV - Clicking: ${fullName}

				/itemnotify ${InvSlot[${wornAt}]} rightmouseup
				/goto :clickIt
			}

			:swapOut
			/itemnotify ${InvSlot[${wornAt}]} leftmouseup
			/delay 2
			/if (${Cursor.ID} == ${swappedOutItemID}) {
				/goto :swapOut
			}
			/if (!${mustEquip}) {
				/if (${pack1WasOpen} && !${Window.[pack1].Open}) {
					/itemnotify ${InvSlot[pack1]} rightmouseup
				}
			}

			:putBack
			/if (${Cursor.ID} == ${clickItemID}) {
				/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
				/delay 2
				/goto :putBack
			}

			:SummonedCheck
			/if (${Cursor.ID}) {
				/if (!${Me.FreeInventory}) {
					/echo · ··-~^vV - Inventory Full !
					/popup Inventory Full !
					/return
				}
				/autoinv
				/delay 2
				/goto :SummonedCheck
			}

			:closePack
			/if (${Window[${InvSlot[${cameFrom}].Pack.Name}].Open} && !${wasOpen}) {
				/itemnotify ${InvSlot[${cameFrom}].Pack.Name} rightmouseup
				/delay 2
				/goto :closePack
			}
		} else /if (${FindItem[${fullName}].InvSlot}) {
			/declare wornAt ${FindItem[${fullName}].InvSlot}

			:clickIt2
			/if (${Me.Ducking}) {
				/goto :stopCast2
			}
			/if (${Me.Casting.ID}) {
				/delay 2
				/goto :clickIt2
			}
			/if (${castCount} >= 1) {
				/varcalc castCount ${castCount}-1
				/echo · ··-~^vV - Clicking: ${fullName}
				/itemnotify ${InvSlot[${wornAt}]} rightmouseup
				/goto :clickIt2
			}

			:stopCast2
			:SummonedCheck2

			/if (${Cursor.ID}) {
				/if (!${Me.FreeInventory}) {
					/echo · ··-~^vV - Inventory Full !
					/popup Inventory Full !
					/return
				}
				/autoinv
				/delay 2
				/goto :SummonedCheck2
			}
		} else {
			/echo · ··-~^vV - ${fullName} not found!			
		}
	} else {
		/echo · ··-~^vV - Usage: /iclick <Short_Name> [<Count>]
	}
/return

| ------------------------
| -- Event SetClickItem --
| ------------------------
Sub Event_SetClickItem(string Line, string arguments)
	/varset lastEvent Event_SetClickItem

	/varset arguments ${arguments.Right[-1]}
	/if (${arguments.Arg[2].Length}) {
		/ini "PuppetMaster.ini" "ClickItems" "${arguments.Arg[1]}_FullName" "${arguments.Arg[2]}"
		/if (${arguments.Arg[3].Equal[MustEquip]}) {
			/ini "PuppetMaster.ini" "ClickItems" "${arguments.Arg[1]}_MustEquip" "TRUE"
			/if (${arguments.Arg[4].Length}) {
				/squelch /alias /${arguments.Arg[4]} /echo ClickItem ${arguments.Arg[1]}
			}
		} else {
			/ini "PuppetMaster.ini" "ClickItems" "${arguments.Arg[1]}_MustEquip" "FALSE"
			/if (${arguments.Arg[3].Length}) {
				/squelch /alias /${arguments.Arg[3]} /echo ClickItem ${arguments.Arg[1]}
			}
		}
		/echo · ··-~^vV - Click-Item added.
	} else {
		/echo · ··-~^vV - Usage: /setclickitem <Short_Name> "<Full_Name>" [MustEquip] [<Slash_Command>]
	}
/return

| --------------------
| -- Event AutoHeal --
| --------------------
Sub Event_AutoHeal(string Line, string newTargetHealth)
	/varset lastEvent Event_AutoHeal

	/varset newTargetHealth ${newTargetHealth.Right[-1]}
	/declare targetHealth int local 100

	/if (${newTargetHealth.Length} && (${newTargetHealth} > 0)) {
		/varset targetHealth ${newTargetHealth}
	}
	/declare fullName string local "Mrylokar's Breastplate"

	/if (${FindItem[${fullName}].InvSlot.Pack}) {
		/declare wasOpen bool local TRUE

		:openPack
		/if (!${Window[${FindItem[${fullName}].InvSlot.Pack.Name}].Open}) {
			/varset wasOpen FALSE
			/itemnotify ${FindItem[${fullName}].InvSlot.Pack.Name} rightmouseup
			/delay 2
			/goto :openPack
		}
		/declare cameFrom ${FindItem[${fullName}].InvSlot}

		:grabItem
		/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
		/delay 2
		/if (!${Cursor.ID}) {
			/goto :grabItem
		}
		/declare clickItemID ${Cursor.ID}
		/declare wornAt ${Cursor.WornSlot[1]}

		:swapIn
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${clickItemID}) {
			/goto :swapIn
		}
		/declare swappedOutItemID ${Cursor.ID}

		:clickIt
		/if (${Me.Ducking}) {
			/goto :swapOut
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt
		}

		/if (${Me.PctHPs} < ${targetHealth}) {
			/echo · ··-~^vV - Healing self.
			/itemnotify ${InvSlot[${wornAt}]} rightmouseup
			/goto :clickIt
		}

		:swapOut
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${swappedOutItemID}) {
			/goto :swapOut
		}

		:putBack
		/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${clickItemID}) {
			/goto :putBack
		}

		:closePack
		/if (${Window[${InvSlot[${cameFrom}].Pack.Name}].Open} && !${wasOpen}) {
			/itemnotify ${InvSlot[${cameFrom}].Pack.Name} rightmouseup
			/delay 2
			/goto :closePack
		}
	} else /if (${FindItem[${fullName}].InvSlot}) {
		/declare wornAt ${FindItem[${fullName}].InvSlot}

		:clickIt2
		/if (${Me.Ducking}) {
			/goto :stopCast
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt2
		}
		/if (${Me.PctHPs}<${targetHealth}) {
			/echo · ··-~^vV - Healing self.
			/itemnotify ${InvSlot[${wornAt}]} rightmouseup
			/goto :clickIt2
		}
		:stopCast
	}
/return

| --------------------
| -- Event AutoCure --
| --------------------
Sub Event_AutoCure
	/varset lastEvent Event_AutoCure

	/declare fullName string local "Shield of the Immaculate"
	/declare beforeCureTargetID int local ${Target.ID}
	/declare buffNumber int local 0

	/for buffNumber 1 to 15
		/if (${Me.Buff[${buffNumber}].Spell.ResistType.Equal[Disease]}) {
			/goto :diseased
		}
	/next buffNumber
	
	/echo · ··-~^vV - Not diseased at the moment. Aborting.
	/return

	:diseased
	/if (${FindItem[${fullName}].InvSlot.Pack}) {
		/declare wasOpen bool local TRUE
	
		:openPack
		/if (!${Window[${FindItem[${fullName}].InvSlot.Pack.Name}].Open}) {
			/varset wasOpen FALSE
			/itemnotify ${FindItem[${fullName}].InvSlot.Pack.Name} rightmouseup
			/delay 2
			/goto :openPack
		}
		/declare cameFrom ${FindItem[${fullName}].InvSlot}

		:grabItem
		/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
		/delay 2
		/if (!${Cursor.ID}) {
			/goto :grabItem
		}
		/declare clickItemID ${Cursor.ID}
		/declare wornAt pack1
		/declare pack1WasOpen ${Window[pack1].Open}

		:swapIn
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${clickItemID}) {
			/goto :swapIn
		}
		/declare swappedOutItemID ${Cursor.ID}

		:clickIt
		/if (${Me.Ducking}) {
			/goto :swapOut
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt
		}
		/for buffNumber 1 to 15
			/if (${Me.Buff[${buffNumber}].Spell.ResistType.Equal[Disease]}) {
				/squelch /target myself
				/echo · ··-~^vV - Trying to Cure: ${Me.Buff[${buffNumber}].Spell.Name}
				/itemnotify ${InvSlot[${wornAt}]} rightmouseup
				/goto :clickIt
			}
		/next buffNumber
		/echo · ··-~^vV - All Diseases Cured!

		:swapOut
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${swappedOutItemID}) {
			/goto :swapOut
		}
		/if (!${mustEquip}) {
			/if (${pack1WasOpen} && !${Window.[pack1].Open}) {
				/itemnotify ${InvSlot[pack1]} rightmouseup
			}
		}

		:putBack
		/if (${Cursor.ID} == ${clickItemID}) {
			/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
			/delay 2
			/goto :putBack
		}

		:closePack
		/if (${Window[${InvSlot[${cameFrom}].Pack.Name}].Open} && !${wasOpen}) {
			/itemnotify ${InvSlot[${cameFrom}].Pack.Name} rightmouseup
			/delay 2
			/goto :closePack
		}
	} else /if (${FindItem[${fullName}].InvSlot}) {
		/declare wornAt ${FindItem[${fullName}].InvSlot}

		:clickIt2
		/if (${Me.Ducking}) {
			/goto :stopCast
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt2
		}

		/for buffNumber 1 to 15
			/if (${Me.Buff[i].Spell.ResistType.Equal[Disease]} && ${Me.Buff[i].Spell.SpellType.Equal[Detrimental]}) {
				/squelch /target myself
				/echo · ··-~^vV - Trying to Cure: ${Me.Buff[i].Spell.Name}
				/itemnotify ${InvSlot[${wornAt}]} rightmouseup
				/goto :clickIt2
			}
		/next buffNumber
		/echo · ··-~^vV - All Diseases Cured!

		:stopCast
	} else {
		/echo · ··-~^vV - ${fullName} not found!			
	}
	/squelch /target id ${beforeCureTargetID}
/return

| ----------------------
| -- Event AutoShrink --
| ----------------------
Sub Event_AutoShrink
	/varset lastEvent Event_AutoShrink
	/declare beforeShrinkTargetID int ${Target.ID}
	/if (${Target.ID} == ${Me.ID}) {
		/if (${Me.Height} <= 3.00) {
			/echo · ··-~^vV - You dont need to be shrinked!
			/return
		}
	} else /if (${Me.Grouped} && ${Target.Type.Equal[PC]}) {
		/declare groupMember int 0

		/for groupMember 1 to ${Group}
			/if (${Group[${groupMember}].ID} == ${Target.ID}) /goto :canShrink
		/next groupMember

		/if (${Me.Height} <= 3.00) {
			/echo · ··-~^vV - You dont need to be shrinked!
			/return
		}
		/squelch /target myself
		/goto :doShrink

		:canShrink
		/if (${Target.Height} <= 3.00) {
			/echo · ··-~^vV - ${Target.CleanName} doesnt need to be shrinked!
			/return
		}
	} else {
		/if (${Me.Height} <= 3.00) {
			/echo · ··-~^vV - You dont need to be shrinked!
			/return
		}
		/squelch /target myself
	}
	
	:doShrink
	/declare fullName string local ${Ini[PuppetMaster.ini,ClickItems,Shrink_FullName]}

	/if (${fullName.Equal[NULL]}) {
		/echo · ··-~^vV - [Shrink] not in INI file!
		/return
	}
	/declare mustEquip string local ${Ini[PuppetMaster.ini,ClickItems,Shrink_MustEquip]}

	/if (${FindItem[${fullName}].InvSlot.Pack}) {
		/declare wasOpen bool local TRUE

		:openPack
		/if (!${Window[${FindItem[${fullName}].InvSlot.Pack.Name}].Open}) {
			/varset wasOpen FALSE
			/itemnotify ${FindItem[${fullName}].InvSlot.Pack.Name} rightmouseup
			/delay 2
			/goto :openPack
		}
		/declare cameFrom ${FindItem[${fullName}].InvSlot}

		:grabItem
		/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
		/delay 2
		/if (!${Cursor.ID}) {
			/goto :grabItem
		}
		/declare clickItemID ${Cursor.ID}

		/if (${mustEquip}) {
			/declare wornAt ${Cursor.WornSlot[1]}
		} else {
			/declare wornAt	pack1
			/declare pack1WasOpen ${Window[pack1].Open}
		}

		:swapIn
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${clickItemID}) {
			/goto :swapIn
		}
		/declare swappedOutItemID ${Cursor.ID}

		:clickIt
		/if (${Me.Ducking}) {
			/goto :swapOut
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt
		}
		/if (${Target.Height} > 3.00) {
			/echo · ··-~^vV - Shrinking: ${Target.CleanName}
			/itemnotify ${InvSlot[${wornAt}]} rightmouseup
			/goto :clickIt
		}

		:swapOut
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${swappedOutItemID}) {
			/goto :swapOut
		}
		/if (!${mustEquip}) {
			/if (${pack1WasOpen} && !${Window.[pack1].Open}) {
				/itemnotify ${InvSlot[pack1]} rightmouseup
			}
		}

		:putBack
		/if (${Cursor.ID} == ${clickItemID}) {
			/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
			/delay 2
			/goto :putBack
		}

		:closePack
		/if (${Window[${InvSlot[${cameFrom}].Pack.Name}].Open} && !${wasOpen}) {
			/itemnotify ${InvSlot[${cameFrom}].Pack.Name} rightmouseup
			/delay 2
			/goto :closePack
		}
	} else /if (${FindItem[${fullName}].InvSlot}) {
		/declare wornAt ${FindItem[${fullName}].InvSlot}

		:clickIt2
		/if (${Me.Ducking}) {
			/goto :stopCast2
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt2
		}
		/if (${castCount} >= 1) {
			/varcalc castCount ${castCount}-1
			/echo · ··-~^vV - Clicking: ${fullName}
			/itemnotify ${InvSlot[${wornAt}]} rightmouseup
			/goto :clickIt2
		}
		:stopCast2
	} else {
		/echo · ··-~^vV - ${fullName} not found!			
	}
	/squelch /target id ${beforeShrinkTargetID}
/return

| -----------------------
| -- Event GroupShrink --
| -----------------------
Sub Event_GroupShrink
	/varset lastEvent Event_GroupShrink
	
	/declare beforeShrinkTargetID int ${Target.ID}
	/declare groupMember int 0

	/for groupMember 1 to ${Group}
		/if (${Group[${groupMember}].Height} > 3.00) /goto :doShrink
	/next groupMember
	
	/if (${Me.Height} > 3.00) {
		/squelch /target myself
		/call Event_AutoShrink
	}

	/goto :doneShrinking
	
	:doShrink

	/declare fullName string local ${Ini[PuppetMaster.ini,ClickItems,Shrink_FullName]}

	/if (${fullName.Equal[NULL]}) {
		/echo · ··-~^vV - [Shrink] not in INI file!
		/return
	}
	/declare mustEquip string local ${Ini[PuppetMaster.ini,ClickItems,Shrink_MustEquip]}

	/if (${FindItem[${fullName}].InvSlot.Pack}) {
		/declare wasOpen bool local TRUE

		:openPack
		/if (!${Window[${FindItem[${fullName}].InvSlot.Pack.Name}].Open}) {
			/varset wasOpen FALSE
			/itemnotify ${FindItem[${fullName}].InvSlot.Pack.Name} rightmouseup
			/delay 2
			/goto :openPack
		}
		/declare cameFrom ${FindItem[${fullName}].InvSlot}

		:grabItem
		/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
		/delay 2
		/if (!${Cursor.ID}) {
			/goto :grabItem
		}
		/declare clickItemID ${Cursor.ID}

		/if (${mustEquip}) {
			/declare wornAt ${Cursor.WornSlot[1]}
		} else {
			/declare wornAt	pack1
			/declare pack1WasOpen ${Window[pack1].Open}
		}

		:swapIn
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${clickItemID}) {
			/goto :swapIn
		}
		/declare swappedOutItemID ${Cursor.ID}

		/for groupMember 1 to ${Group}
			/if (${Group[${groupMember}].ID}) {
				/squelch /target id ${Group[${groupMember}].ID}
			} else {
				/next groupMember
			}
		:clickIt
		/if (${Me.Ducking}) {
			/goto :swapOut
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt
		}
		/if (${Target.Height} > 3.00) {
			/echo · ··-~^vV - Shrinking: ${Target.CleanName}
			/itemnotify ${InvSlot[${wornAt}]} rightmouseup
			/goto :clickIt
		}
		/next groupMember
		/if (${Me.Height} > 3.00) {
			/squelch /target myself
			/goto :clickIt
		}
		:swapOut
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${swappedOutItemID}) {
			/goto :swapOut
		}
		/if (!${mustEquip}) {
			/if (${pack1WasOpen} && !${Window.[pack1].Open}) {
				/itemnotify ${InvSlot[pack1]} rightmouseup
			}
		}

		:putBack
		/if (${Cursor.ID} == ${clickItemID}) {
			/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
			/delay 2
			/goto :putBack
		}

		:closePack
		/if (${Window[${InvSlot[${cameFrom}].Pack.Name}].Open} && !${wasOpen}) {
			/itemnotify ${InvSlot[${cameFrom}].Pack.Name} rightmouseup
			/delay 2
			/goto :closePack
		}
	} else /if (${FindItem[${fullName}].InvSlot}) {
		/declare wornAt ${FindItem[${fullName}].InvSlot}

		/for groupMember 1 to ${Group}
			/if (${Group[${groupMember}].ID}) {
				/squelch /target id ${Group[${groupMember}].ID}
			} else {
				/next groupMember
			}
		:clickIt2
		/if (${Me.Ducking}) {
			/goto :swapOut
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt2
		}
		/if (${Target.Height} > 3.00) {
			/echo · ··-~^vV - Shrinking: ${Target.CleanName}
			/itemnotify ${InvSlot[${wornAt}]} rightmouseup
			/goto :clickIt2
		}
		/next groupMember
		/if (${Me.Height} > 3.00) {
			/squelch /target myself
			/goto :clickIt2
		}
		:stopCast2
	} else {
		/echo · ··-~^vV - ${fullName} not found!			
	}

	:doneShrinking
	/squelch /target id ${beforeShrinkTargetID}
/return

| ------------------------
| -- Event LootMyCorpse --
| ------------------------
Sub Event_LootMyCorpse(string Line, string leaveSlot)
	/varset lastEvent Event_LootMyCorpse

	/varset leaveSlot ${leaveSlot.Right[-1]}
	/declare lootTotal int local 0
	/declare lootSlot int local 0
	/declare skippedCount int local 0
	/declare wornSlotNumber int local 0
	/squelch /target mycorpse

	/if (!${Target.Type.Equal[CORPSE]}) {
		/echo · ··-~^vV - Can't target my corpse.
		/return
	}
	/corpse
	/delay 1s
	/loot
	/delay 1s
	/if (${Me.State.NotEqual[BIND]}) {
		/echo · ··-~^vV - Error in getting onto corpse! Aborting.
		/return
	}

	:lootLag
	/varset lootTotal ${Corpse.Items}	
	/delay 2
	/if (${lootTotal}!=${Corpse.Items}) {
		/goto :lootLag
	}

	:doAgain
	/for lootSlot 1 to ${lootTotal}
		/if (${leaveSlot.Length}) {
			/for wornSlotNumber 1 to ${Corpse.Item[${lootSlot}].WornSlots}
				/if (${Corpse.Item[${lootSlot}].WornSlot[${wornSlotNumber}]} == ${InvSlot[${leaveSlot}].ID}) {
					/varcalc skippedCount (${skippedCount} + 1)
					/next lootSlot
				}
			/next wornSlotNumber
		}

		:lootItem
		/if (${Corpse.Item[${lootSlot}].ID}) {
			/itemnotify loot${lootSlot} rightmouseup
			/delay 2
			/goto :lootItem
		}
		/delay 2
	/next lootSlot
	/if (${Corpse.Items} > ${skippedCount}) /goto :doAgain
	/delay 5
	/echo · ··-~^vV - Done looting my corpse.
	/notify LootWnd DoneButton leftmouseup
/return

| --------------------
| -- Event AutoLoot --
| --------------------
Sub Event_AutoLoot(string Line, string nodropItemToLoot)
	/varset lastEvent Event_AutoLoot

	/varset nodropItemToLoot ${nodropItemToLoot.Right[-1]}
	/if (!${nodropItemToLoot.Length}) {
		/if (${collectItem}) {
			/varset nodropItemToLoot ${collectItemName}
		}
	}
	/declare lootTotal int local -1
	/declare lootSlot int local 0
	/declare skippedCount int local 0

	/if (!${Target.Type.Equal[CORPSE]}) {
		/squelch /target corpse radius ${lootDistance}
		/delay 2
	}
	/if (!${Target.Type.Equal[CORPSE]}) {
		/echo · ··-~^vV - Cannot find corpse. Aborting!
		/return
	}
	/face ${If[${Me.Swimming},,nolook]} fast
	/keypress forward hold
	/delay 5s (${Target.Distance} < 5)
	/keypress forward
	/loot
	/delay 1s
	/if (${Me.State.NotEqual[BIND]}) {
		/echo · ··-~^vV - Error getting to corpse! Aborting.
		/return
	}
	/echo · ··-~^vV - Looting ${Target.CleanName}

	:lootLag
	 /varset lootTotal ${Corpse.Items}
	/delay 5
	/if (${lootTotal} != ${Corpse.Items}) {
		/goto :lootLag
		 }
	/if (!${lootTotal}) {
		/echo · ··-~^vV - Empty corpse!
		/goto :doneLooting
	}
	
	:doAgain
	/for lootSlot 1 to ${lootTotal}
		/if (!${Me.FreeInventory}) {
			/echo · ··-~^vV - Inventory Full !
			/popup Inventory Full !
			/varset autoLoot FALSE
			/ini "PuppetMaster.ini" "Settings" "AutoLoot" "FALSE"
			/echo · ··-~^vV - Auto-Loot: OFF
			/goto :doneLooting
		}
		/if (${Corpse.Item[${lootSlot}].ID}) {
			/if (!${Corpse.Item[${lootSlot}].NoDrop} && ((${Corpse.Item[${lootSlot}].Value} >= ${minLootValue}) || ${Corpse.Item[${lootSlot}].Type.Equal[Combinable]})) {
				:lootItem
				/if (${Corpse.Item[${lootSlot}].ID}) {
					/itemnotify loot${lootSlot} rightmouseup
					/delay 2
					/goto :lootItem
				}
			} else /if (${nodropItemToLoot.Length} && ${Corpse.Item[${lootSlot}].Name.Equal[${nodropItemToLoot}]}) {
				/echo · ··-~^vV - Looting NODROP Item: ${Corpse.Item[${lootSlot}].Name}
				
				:lootNodropItem
				/if (${Corpse.Item[${lootSlot}].ID}) {
					/itemnotify loot${lootSlot} rightmouseup
					/delay 2
					/if (!${Window[ConfirmationDialogBox.Open]}) /goto :lootNodropItem

					:nodropConfirm
					/notify ConfirmationDialogBox Yes_Button leftmouseup
					/delay 2
					/if (${Window[ConfirmationDialogBox.Open]}) /goto :nodropConfirm
					/goto :lootNodropItem
				}
			} else {
				/varcalc skippedCount (${skippedCount} + 1)
				/echo · ··-~^vV - Skipping Item: ${Corpse.Item[${lootSlot}].Name}
			}
		}
		/delay 2
	/next lootSlot
	/if (${Corpse.Items} > ${skippedCount}) /goto :doAgain
	/echo · ··-~^vV - Done looting ${Target.CleanName}

	:doneLooting
	/delay 5
	/notify LootWnd DoneButton leftmouseup
/return
Last edited by z-roice on Sun Sep 26, 2004 2:13 pm, edited 12 times in total.

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

Post by z-roice » Wed Sep 08, 2004 2:15 pm

Code: Select all

| --------------------
| -- Event AutoDrag --
| --------------------
Sub Event_AutoDrag(string Line, string corpseNames)
	/varset lastEvent Event_AutoDrag

	/varset corpseNames ${corpseNames.Right[-1]}
	/declare corpseCount int local 1
	/declare corpseNumber int local 0

	:countCorpses
	/if (${corpseNames.Arg[${corpseCount}].Length}) {
		/varcalc corpseCount (${corpseCount} + 1)
		/goto :countCorpses
	}
	/varcalc corpseCount (${corpseCount} - 1)
	/if (${corpseCount} == 0) {
		/echo · ··-~^vV - No corpse names supplied!
		/return
	} else {
		/echo · ··-~^vV - Target self (F1) to stop dragging!
	}

	:dragLoop
	/for corpseNumber 1 to ${corpseCount}
		/if (${Target.ID} == ${Me.ID}) {
			/echo · ··-~^vV - Body dragging ceased.
			/return
		}
		/squelch /target "${corpseNames.Arg[${corpseNumber}]}'s corpse"
		/corpse
		/delay 3
	/next corpseNumber
	/goto :dragLoop
/return

| --------------------------
| -- Event RandomIllusion --
| --------------------------
Sub Event_RandomIllusion
	/varset lastEvent Event_RandomIllusion

	/if (${illusionCount} > 0) {
		/declare buffNumber int local 0

		/for buffNumber 1 to 15
			/if (${Me.Buff[${buffNumber}].Spell.Name.Find[Illusion]}) {
				/varcalc buffNumber (${buffNumber} - 1)
				/notify BuffWindow Buff${buffNumber} leftmouseup
				/delay 1
				/goto :illusionDropped
			}
		/next buffNumber

		:illusionDropped
		/varcalc buffNumber ${Math.Rand[${illusionCount}]}+1
		/echo · ··-~^vV - Casting Illusion: ${illusions[${buffNumber}]}
		/popup Casting Illusion: ${illusions[${buffNumber}]}
		/call Event_ClickItem "" " Illusion_${illusions[${buffNumber}]}"
		/declare beforeShrinkTargetID ${Target.ID}
		/squelch /target myself
		/call Event_AutoShrink
		/squelch /target id ${beforeShrinkTargetID}
		}
	}
/return

| -----------------------
| -- Event SummonHorse --
| -----------------------
Sub Event_SummonHorse
	/varset lastEvent Event_SummonHorse

	/declare fullName string local ${Ini[PuppetMaster.ini,ClickItems,Horse_FullName]}

	/if (${fullName.Equal[NULL]}) {
		/echo · ··-~^vV - [Horse] not in INI file!
		/return
	}
	/declare buffNumber int local 0

	/for buffNumber 1 to 15
		/if (${Me.Buff[${buffNumber}].Spell.Name.Equal[Summon Horse]}) {
			/varcalc buffNumber (${buffNumber} - 1)
			/notify BuffWindow Buff${buffNumber} leftmouseup
			/delay 1
			/goto :horseDropped
		}
	/next buffNumber

	:horseDropped
	/if (${FindItem[${fullName}].InvSlot.Pack}) {
		/declare wasOpen bool local TRUE
		:openPack
		/if (!${Window[${FindItem[${fullName}].InvSlot.Pack.Name}].Open}) {
			/varset wasOpen FALSE
			/itemnotify ${FindItem[${fullName}].InvSlot.Pack.Name} rightmouseup
			/delay 2
			/goto :openPack
		}
		/declare cameFrom ${FindItem[${fullName}].InvSlot}

		:grabItem
		/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
		/delay 2
		/if (!${Cursor.ID}) {
			/goto :grabItem
		}
		/declare clickItemID ${Cursor.ID}
		/declare wornAt pack1
		/declare pack1WasOpen ${Window[pack1].Open}

		:swapIn
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${clickItemID}) {
			/goto :swapIn
		}
		/declare swappedOutItemID ${Cursor.ID}
		/echo · ··-~^vV - Summoning Horse
		/itemnotify ${InvSlot[${wornAt}]} rightmouseup

		:clickIt
		/if (${Me.Ducking}) {
			/goto :swapOut
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt
		}

		:swapOut
		/itemnotify ${InvSlot[${wornAt}]} leftmouseup
		/delay 2
		/if (${Cursor.ID} == ${swappedOutItemID}) {
			/goto :swapOut
		}
		/if (!${mustEquip}) {
			/if (${pack1WasOpen} && !${Window.[pack1].Open}) {
				/itemnotify ${InvSlot[pack1]} rightmouseup
			}
		}

		:putBack
		/if (${Cursor.ID} == ${clickItemID}) {
			/itemnotify ${InvSlot[${cameFrom}]} leftmouseup
			/delay 2
			/goto :putBack
		}
		:closePack
		/if (${Window[${InvSlot[${cameFrom}].Pack.Name}].Open} && !${wasOpen}) {
			/itemnotify ${InvSlot[${cameFrom}].Pack.Name} rightmouseup
			/delay 2
			/goto :closePack
		}
	} else /if (${FindItem[${fullName}].InvSlot}) {
		/declare wornAt ${FindItem[${fullName}].InvSlot}

		/echo · ··-~^vV - Summoning Horse
		/itemnotify ${InvSlot[${wornAt}]} rightmouseup

		:clickIt2
		/if (${Me.Ducking}) {
			/goto :stopCast
		}
		/if (${Me.Casting.ID}) {
			/delay 2
			/goto :clickIt2
		}
		:stopCast
	} else {
		/echo · ··-~^vV - ${fullName} not found!			
	}
/return

| --------------------
| -- Event Incoming --
| --------------------
Sub Event_Incoming
	/varset lastEvent Event_Incoming

	/if (${incomingCount} > 0) {
		/declare messageNumber int local 0
		/varcalc messageNumber (${Math.Rand[${incomingCount}]} + 1)

		/docommand /${incomingChannel} ${incomingMessages[${messageNumber}]}
	}
/return

| ------------------------------
| -- Event SetIncomingChannel --
| ------------------------------
Sub Event_SetIncomingChannel(string Line, string newIncomingChannel)
	/varset lastEvent Event_SetIncomingChannel

	/varset newIncomingChannel ${newIncomingChannel.Right[-1]}
	/if (${newIncomingChannel.Length}) {
		/varset incomingChannel ${newIncomingChannel}
	}
	/echo · ··-~^vV - Incoming Message Channel: ${incomingChannel}
/return

| -------------------------------
| -- Event CheckForFadingBuffs --
| -------------------------------
Sub Event_CheckForFadingBuffs
	/if (${checkForFadingBuffs} && ${dropUnwantedBuffs}) {
		/declare buffNumber int local 0
		/declare unwantedBuff int local 0

		/for buffNumber 1 to 15
			/if (${Me.Buff[${buffNumber}].Spell.ID} && ${Me.Buff[${buffNumber}].Spell.SpellType.NotEqual[Detrimental]}) {
				/for unwantedBuff 1 to ${unwantedBuffsCount}
					/if (${Me.Buff[${buffNumber}].Spell.Name.Find[${unwantedBuffs[${unwantedBuff}]}]}) {
						/varcalc buffNumber (${buffNumber} - 1)
						/notify BuffWindow Buff${buffNumber} leftmouseup
						/varcalc buffNumber (${buffNumber} + 1)
						/delay 1
						/next buffNumber
					}
				/next unwantedBuff
				/if (${Me.Buff[${buffNumber}].Duration.TotalSeconds} <= 120) {
					/echo · ··-~^vV - ${Me.Buff[${buffNumber}].Spell.Name} is about to fade!
					/popup ${Me.Buff[${buffNumber}].Spell.Name} is about to fade!
				}
			}
		/next buffNumber
	} else /if (${checkForFadingBuffs}) {
		/declare buffNumber int local 0
	
		/for buffNumber 1 to 15
			/if (${Me.Buff[${buffNumber}].Spell.ID} && ${Me.Buff[${buffNumber}].Spell.SpellType.NotEqual[Detrimental]}) {
				/if (${Me.Buff[${buffNumber}].Duration.TotalSeconds} <= 120) {
					/echo · ··-~^vV - ${Me.Buff[${buffNumber}].Spell.Name} is about to fade!
					/popup ${Me.Buff[${buffNumber}].Spell.Name} is about to fade!
				}
			}
		/next buffNumber
	} else /if (${dropUnwantedBuffs}) {
		/declare buffNumber int local 0
		/declare unwantedBuff int local 0

		/for buffNumber 1 to 15
			/if (${Me.Buff[${buffNumber}].Spell.ID} && ${Me.Buff[${buffNumber}].Spell.SpellType.NotEqual[Detrimental]}) {
				/for unwantedBuff 1 to ${unwantedBuffsCount}
					/if (${Me.Buff[${buffNumber}].Spell.Name.Find[${unwantedBuffs[${unwantedBuff}]}]}) {
						/varcalc buffNumber (${buffNumber} - 1)
						/notify BuffWindow Buff${buffNumber} leftmouseup
						/varcalc buffNumber (${buffNumber} + 1)
						/delay 1
						/next buffNumber
					}
				/next unwantedBuff
			}
		/next buffNumber
	}
/return

| -----------------------
| -- Event LoadAliases --
| -----------------------
Sub Event_LoadAliases
	/varset lastEvent Event_LoadAliases

	/squelch /alias /kill /echo Time to kick ass!!
	/squelch /alias /rangeattack /echo ToggleAutoRangeAttack
	/squelch /alias /doassist /echo Assist

	/squelch /alias /mainassist /echo SetMainAssist
	/squelch /alias /assistchange /echo SetAutoAssistChange
	/squelch /alias /assistmsg /echo SetAssistMessage

	/squelch /alias /tankmode /echo SetTankMode

	/squelch /alias /autostick /echo SetAutoStick
	/squelch /alias /closeness /echo SetCloseness
	/squelch /alias /loosestick /echo SetLooseStick
	/squelch /alias /moveback /echo SetMoveBack
	/squelch /alias /movebehind /echo SetMoveBehind

	/squelch /alias /autoevade /echo SetAutoEvade
	/squelch /alias /evadeaggro /echo SetEvadeAggro

	/squelch /alias /autobs /echo SetAutoBackstab
	/squelch /alias /autostrike /echo SetAutoStrike
	/squelch /alias /autodisarm /echo SetAutoDisarm
	/squelch /alias /autofear /echo SetAutoIntimidate
	/squelch /alias /autopp /echo SetAutoPickpocket
	/squelch /alias /autobeg /echo SetAutoBeg

	/squelch /alias /autohide /echo SetAutoSneakHide
	/squelch /alias /dropsneak /echo SetDropSneakInCombat

	/squelch /alias /autotrapdisarm /echo SetAutoTrapDisarm

	/squelch /alias /rangetype /echo SetRangeType
	/squelch /alias /maxrange /echo SetMaxRange

	/squelch /alias /strikeskill /echo SetStrikeSkill
	/squelch /alias /minend /echo SetMinEndurance

	/squelch /alias /autoescape /echo SetAutoEscape

	/squelch /alias /autonimble /echo SetAutoNimble
	/squelch /alias /dynimble /echo SetDynamicNimble

	/squelch /alias /checkbuffs /echo SetCheckForFadingBuffs
	/squelch /alias /dropunwanted /echo SetDropUnwantedBuffs

	/squelch /alias /autoillusion /echo SetAutoIllusion

	/squelch /alias /calldi /echo SetCallDI

	/squelch /alias /autojoin /echo SetAutoJoinGroups
	/squelch /alias /autogreet /echo SetAutoGreet

	/squelch /alias /autoloot /echo SetAutoLoot
	/squelch /alias /minvalue /echo SetMinLootValue
	/squelch /alias /collectitem /echo SetCollectItem

	/squelch /alias /semiafk /echo SetSemiAfk
	/squelch /alias /pause /echo SetPause

	/squelch /alias /autofollow /echo AutoFollow
	/squelch /alias /leash /echo Leash

	/squelch /alias /iclick /echo ClickItem
	/squelch /alias /iset /echo SetClickItem

	/squelch /alias /autoheal /echo AutoHeal
	/squelch /alias /autocure /echo AutoCure
	/squelch /alias /autoshrink /echo AutoShrink
	/squelch /alias /groupshrink /echo GroupShrink

	/squelch /alias /lootmycorpse /echo LootMyCorpse
	/squelch /alias /lootcorpse /echo AutoLoot

	/squelch /alias /drag /echo AutoDrag

	/squelch /alias /illusion /echo RandomIllusion
	/squelch /alias /horse /echo SummonHorse

	/squelch /alias /inc /echo Incoming
	/squelch /alias /channel /echo SetIncomingChannel

	/squelch /alias /buffcheck /echo CheckForFadingBuffs

	/squelch /alias /reload /echo ReloadIni
	/squelch /alias /status /echo StatusReport
	/squelch /alias /pmhelp /echo DisplayHelp

	|-- Drop-Buff Short Commands
	
	/squelch /alias /buff1 /notify BuffWindow Buff0 leftmouseup
	/squelch /alias /buff2 /notify BuffWindow Buff1 leftmouseup
	/squelch /alias /buff3 /notify BuffWindow Buff2 leftmouseup
	/squelch /alias /buff4 /notify BuffWindow Buff3 leftmouseup
	/squelch /alias /buff5 /notify BuffWindow Buff4 leftmouseup
	/squelch /alias /buff6 /notify BuffWindow Buff5 leftmouseup
	/squelch /alias /buff7 /notify BuffWindow Buff6 leftmouseup
	/squelch /alias /buff8 /notify BuffWindow Buff7 leftmouseup
	/squelch /alias /buff9 /notify BuffWindow Buff8 leftmouseup
	/squelch /alias /buff10 /notify BuffWindow Buff9 leftmouseup
	/squelch /alias /buff11 /notify BuffWindow Buff10 leftmouseup
	/squelch /alias /buff12 /notify BuffWindow Buff11 leftmouseup
	/squelch /alias /buff13 /notify BuffWindow Buff12 leftmouseup
	/squelch /alias /buff14 /notify BuffWindow Buff13 leftmouseup
	/squelch /alias /buff15 /notify BuffWindow Buff14 leftmouseup

	|-- Discipline Short Commands

	/squelch /alias /nimble /disc nimble
	/squelch /alias /counter /disc counterattack
	/squelch /alias /duelist /disc duelist
	/squelch /alias /kine /disc kinesthetics
	/squelch /alias /twisted /disc twisted chance
	/squelch /alias /deadeye /disc deadeye
	/squelch /alias /deadly /disc deadly precision
	/squelch /alias /blinding /disc blinding speed
	/squelch /alias /healing /disc healing will
	/squelch /alias /fearless /disc fearless
	/squelch /alias /resistant /disc resistant

	/squelch /alias /assassins /disc assassins strike
	/squelch /alias /kyv /disc kyv strike
	/squelch /alias /chaos /disc chaos strike
	
	/ini "PuppetMaster.ini" "Version" "AliasVersion" "2.20"
	
	/echo · ··-~^vV - Commands loaded.
/return

| ---------------------
| -- Event ReloadIni --
| ---------------------
Sub Event_ReloadIni
	/varset lastEvent Event_ReloadIni

	/call IniLoad
	/call IllusionCheck
	/call IncomingMessageLoad
	/call UnwantedBuffsLoad
	/echo · ··-~^vV - Ini loaded
/return

| ------------------------
| -- Event StatusReport --
| ------------------------
Sub Event_StatusReport
	/varset lastEvent Event_DisplayHelp

	/echo · ··-~^vV - -=-=[ Current Settings ]=-=-
	/echo · ··-~^vV - Current MainAssist: ${mainAssist}
	/echo · ··-~^vV - Automatic MainAssist-Change: ${If[${autoAssistChange},ON,OFF]}
	/echo · ··-~^vV - Assist Message: ${assistMessage}
	/echo · ··-~^vV - Assist on Message: ${If[${assistOnMessage},ON,OFF]}
	/echo · ··-~^vV - Automatically stick to your Target: ${If[${autoStick},ON,OFF]}
	/echo · ··-~^vV - Closeness on sticking: ${closeness}% of max melee range
	/echo · ··-~^vV - Loose sticking: ${If[${looseStick},ON,OFF]}
	/echo · ··-~^vV - Move back on sticking: ${If[${moveBack},ON,OFF]}
	/echo · ··-~^vV - Move Behind on sticking: ${If[${moveBehind},ON,OFF]}
	/echo · ··-~^vV - Automatically evading in Combat: ${If[${autoEvade},ON,OFF]}
	/echo · ··-~^vV - Automatic Aggro-Evasion: ${If[${evadeAggro},ON,OFF]}
	/echo · ··-~^vV - Automatically backstabbing in Combat: ${If[${autoBackstab},ON,OFF]}
	/echo · ··-~^vV - Automatically disarming in Combat: ${If[${autoDisarm},ON,OFF]}
	/echo · ··-~^vV - Automatically intimidating in Combat: ${If[${autoIntimidate},ON,OFF]}
	/echo · ··-~^vV - Automatically pickpocket in Combat: ${If[${autoPickpocket},ON,OFF]}
	/echo · ··-~^vV - Automatically begging in Combat: ${If[${autoBeg},ON,OFF]}
	/echo · ··-~^vV - Automatically Sneaking/Hiding: ${If[${autoSneakHide},ON,OFF]}
	/echo · ··-~^vV - Drop sneak in combat: ${If[${dropSneakInCombat},ON,OFF]}
	/echo · ··-~^vV - Current Strike Skill to use: ${strikeSkill}
	/echo · ··-~^vV - Minimal Endurance to strike: ${minEndurance}%
	/echo · ··-~^vV - Automatically Escape: ${If[${autoEscape},ON,OFF]}
	/echo · ··-~^vV - Escape Health: ${escapeHealth}%
	/echo · ··-~^vV - Automatically use Nimble: ${If[${autoNimble},ON,OFF]}
	/echo · ··-~^vV - Nimble Health: ${nimbleHealth}%
	/echo · ··-~^vV - Dynamic Nimble Control: ${If[${dynamicNimble},ON,OFF]}
	/echo · ··-~^vV - Warn about fading Buffs: ${If[${checkForFadingBuffs},ON,OFF]}
	/echo · ··-~^vV - Automatically drop unwanted Buffs: ${If[${dropUnwantedBuffs},ON,OFF]}
	/echo · ··-~^vV - Automatically cast random Illusion on Zone or Fade: ${If[${autoIllusion},ON,OFF]}
	/echo · ··-~^vV - Call DI while on raid: ${If[${callDI},ON,OFF]}
	/echo · ··-~^vV - Automatically join Groups: ${If[${autoJoinGroups},ON,OFF]}
	/echo · ··-~^vV - Automatically greet new Groupmembers: ${If[${autoGreet},ON,OFF]}
	/echo · ··-~^vV - Minimum Loot Value: ${Math.Calc[${minLootValue}/1000]}pp
	/echo · ··-~^vV - Automatically Loot: ${If[${autoLoot},ON,OFF]}
	/echo · ··-~^vV - Loot Distance: ${lootDistance}
	/echo · ··-~^vV - Collect Item: ${If[${collectItem},ON,OFF]}
	/echo · ··-~^vV - Collect Item Name: ${collectItemName}
/return

| -----------------------
| -- Event DisplayHelp --
| -----------------------
Sub Event_DisplayHelp
	/varset lastEvent Event_DisplayHelp

	/echo · ··-~^vV - -=-=[ Help ]=-=-
	/echo · ··-~^vV - /kill
	/echo · ··-~^vV - /rangeattack
	/echo · ··-~^vV - /doassist
	/echo · ··-~^vV - /mainassist [<main assist>]
	/echo · ··-~^vV - /assistmsg [on/off/<assist message>]
	/echo · ··-~^vV - /tankmode on/off
	/echo · ··-~^vV - /autostick [on/off]
	/echo · ··-~^vV - /closeness [<% of max melee range>]
	/echo · ··-~^vV - /loosestick [on/off]
	/echo · ··-~^vV - /moveback [on/off]
	/echo · ··-~^vV - /movebehind [on/off]
	/echo · ··-~^vV - /autoevade [on/off]
	/echo · ··-~^vV - /evadeaggro [on/off]
	/echo · ··-~^vV - /autobs [on/off]
	/echo · ··-~^vV - /autodisarm [on/off]
	/echo · ··-~^vV - /autofear[on/off]
	/echo · ··-~^vV - /autopp [on/off]
	/echo · ··-~^vV - /autobeg [on/off]
	/echo · ··-~^vV - /autohide [on/off]
	/echo · ··-~^vV - /dropsneak [on/off]
	/echo · ··-~^vV - /strikeskill [<strike skill>]
	/echo · ··-~^vV - /minend [<minimal endurance %>]
	/echo · ··-~^vV - /autoescape [on/off/<% health to use it>]
	/echo · ··-~^vV - /autonimble [on/off/<% health to use it> [<% health to use it on hit>]]
	/echo · ··-~^vV - /dynimble [on/off]
	/echo · ··-~^vV - /checkbuffs [on/off]
	/echo · ··-~^vV - /dropunwanted [on/off]
	/echo · ··-~^vV - /autoillusion [on/off]	
	/echo · ··-~^vV - /calldi [on/off]
	/echo · ··-~^vV - /autojoin [on/off]
	/echo · ··-~^vV - /autogreet [on/off]
	/echo · ··-~^vV - /autoloot [on/off]
	/echo · ··-~^vV - /collectitem [on/off/<item to collect>]
	/echo · ··-~^vV - /semiafk [on/off]
	/echo · ··-~^vV - /pause [on/off]
	/echo · ··-~^vV - /autofollow [<distance> [<distance on move>]/off]
	/echo · ··-~^vV - /leash [<distance>/off]
	/echo · ··-~^vV - /iclick <short item name> [<cast count>]
	/echo · ··-~^vV - /iset <short item name> "<full item name>" [mustequip] [<slash command>]
	/echo · ··-~^vV - /autoheal [<target health %>]
	/echo · ··-~^vV - /autocure
	/echo · ··-~^vV - /autoshrink
	/echo · ··-~^vV - /groupshrink
	/echo · ··-~^vV - /lootmycorpse
	/echo · ··-~^vV - /drag <corpse1> [<corpse2>] ..
	/echo · ··-~^vV - /illusion
	/echo · ··-~^vV - /horse
	/echo · ··-~^vV - /inc
	/echo · ··-~^vV - /channel
	/echo · ··-~^vV - /buffcheck
	/echo · ··-~^vV - /reload
	/echo · ··-~^vV - /status
	/echo · ··-~^vV - /help
/return

| ----------------------
| -- Sub Check_Behind --
| ----------------------
Sub Check_Behind
	/varset behindTarget FALSE

	/if ((${Target.Heading.DegreesCCW} > 90.0) && (${Target.Heading.DegreesCCW} <= 270.0)) {
		/if (${Target.Heading.DegreesCCW} == 270.0) {
			/if (${Me.E} < ${Target.E}) {
				/varset behindTarget TRUE	
			}
		} else {
			/declare m float ${Math.Tan[${Target.Heading.DegreesCCW}]}
			/declare n float ${Math.Calc[${Target.N} - (${m} * ${Target.E})]}
			/if (${Me.N} > ${Math.Calc[(${m} * ${Me.E}) + ${n}]}) {
				/varset behindTarget TRUE
			}
			
		}
	} else { 
		/if (${Target.Heading.DegreesCCW} == 90.0) {
			/if (${Me.E} > ${Target.E}) {
				/varset behindTarget TRUE
			}
 		} else {
			/declare m float ${Math.Tan[${Target.Heading.DegreesCCW}]}
			/declare n float ${Math.Calc[${Target.N} - (${m} * ${Target.E})]}
			/if (${Me.N} < ${Math.Calc[(${m} * ${Me.E}) + ${n}]}) {
				/varset behindTarget TRUE
			}
			
		}
	}
/return

| -----------------------------
| -- Sub Check_ViewDirection --
| -----------------------------
Sub Check_ViewDirection	
	/varset facingTarget FALSE

	/if (${Math.Abs[${Target.HeadingTo.DegreesCCW} - ${Me.Heading.DegreesCCW}]} <= 55.0) {
		/varset facingTarget TRUE
	}
/return

| ---------------------
| -- Sub Check_Range --
| ---------------------
Sub Check_Range
	/varset inRange ${If[(${Target.Distance} < ${Target.MaxRangeTo}),TRUE,FALSE]}
/return

| -----------------
| -- Sub DoStick --
| -----------------
Sub DoStick
	/squelch /stick off
	/if (${isInfuriated}) {
		/squelch /stick ${Target.MaxRangeTo} 200% mpause moveback ${If[${Me.Swimming},uw,]} ${If[${looseStick},loose,]}
	} else {
		/squelch /stick ${Target.MaxRangeTo} ${closeness}% ${If[(!${moveBehind} || ${aggroDetected}),,behind]} mpause ${If[${moveBack},moveback,]} ${If[${Me.Swimming},uw,]} ${If[${looseStick},loose,]}
	}
/return

| ------------------
| -- Sub DoStick2 --
| ------------------
Sub DoStick2
	/if (${isInfuriated}) {
	} else {
		/face
	}

/return

| ----------------------
| -- Sub DoAutoFollow --
| ----------------------
Sub DoAutoFollow
	/if ((${Spawn[${followTargetID}].Speed} > 100.00) && (${Spawn[${followTargetID}].Distance} > ${followDistance_OnMove})) {
		/face ${If[${Me.Swimming},,nolook]} id ${followTargetID}

		/declare oldX float ${Me.X}
		/declare oldY float ${Me.Y}

		/keypress FORWARD hold
		/delay 1s (${Spawn[${followTargetID}].Distance} <= ${followDistance})
		/keypress FORWARD
		/if ((${oldX} <= ${Me.X} + 2) && (${oldX} >= ${Me.X} - 2) && (${oldY} <= ${Me.Y} + 2) && (${oldY} >= ${Me.Y} - 2)) {
			/if (${Math.Rand[2]}) {
				/keypress STRAFE_LEFT hold
				/delay 5
				/keypress STRAFE_LEFT
			} else {
				/keypress STRAFE_RIGHT hold
				/delay 5
				/keypress STRAFE_RIGHT
			}
		}
	} else /if (${Spawn[${followTargetID}].Distance} > ${followDistance}) {
		/if (${Math.Rand[2]}) {
			/face ${If[${Me.Swimming},,nolook]} heading ${Math.Calc[(${Spawn[${followTargetID}].HeadingTo.DegreesCCW} + ${Math.Rand[30]} + 360) % 360]}
		} else {
			/face ${If[${Me.Swimming},,nolook]} heading ${Math.Calc[(${Spawn[${followTargetID}].HeadingTo.DegreesCCW} - ${Math.Rand[30]} + 360) % 360]}

		}

		/keypress FORWARD hold
		/delay 1s (${Spawn[${followTargetID}].Distance} <= ${followDistance})
		/keypress FORWARD
		/if ((${oldX} <= ${Me.X} + 2) && (${oldX} >= ${Me.X} - 2) && (${oldY} <= ${Me.Y} + 2) && (${oldY} >= ${Me.Y} - 2)) {
			/if (${Math.Rand[2]}) {
				/keypress STRAFE_LEFT hold
				/delay 2s
				/keypress STRAFE_LEFT
			} else {
				/keypress STRAFE_RIGHT hold
				/delay 2s
				/keypress STRAFE_RIGHT
			}
		}
	}
/return

| -----------------
| -- Sub DoLeash --
| -----------------
Sub DoLeash
	/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]} > ${leashDistance}) {
		/face ${If[${Me.Swimming},,nolook]} heading ${Math.Calc[(${Heading[${stakeY},${stakeX}].DegreesCCW} + 180) % 360]}

		/declare oldX float ${Me.X}
		/declare oldY float ${Me.Y}

		/keypress BACK hold
		/delay 1s (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]} <= ${Math.Calc[${leashDistance} * 0.75]})
		/keypress BACK

		/if ((${oldX} <= ${Me.X} + 2) && (${oldX} >= ${Me.X} - 2) && (${oldY} <= ${Me.Y} + 2) && (${oldY} >= ${Me.Y} - 2)) {
			/if (${Math.Rand[2]}) {
				/keypress STRAFE_LEFT hold
				/delay 2s
				/keypress STRAFE_LEFT
			} else {
				/keypress STRAFE_RIGHT hold
				/delay 2s
				/keypress STRAFE_RIGHT
			}
			
		}
	}
/return

| --------------------
| -- Sub AutoStrike --
| --------------------
Sub AutoStrike
	/if (${Me.AbilityReady["Backstab"]} && ${InvSlot[mainhand].Item.Type.Equal[Piercing]}) {
		/echo · ··-~^vV - Executing Strike on: ${oldTargetName}
		/doability "Backstab"
		/attack on
	}
/return

| ----------------------
| -- Sub AutoBackstab --
| ----------------------
Sub AutoBackstab
	/if (${Me.AbilityReady["Backstab"]} && ${InvSlot[mainhand].Item.Type.Equal[Piercing]}) {
		/echo · ··-~^vV - Backstabbing: ${oldTargetName}
		/doability "Backstab"

	}
/return

| --------------------
| -- Sub AutoDisarm --
| --------------------
Sub AutoDisarm
	/if (${Me.AbilityReady["Disarm"]}) {
		/echo · ··-~^vV - Trying to disarm: ${oldTargetName}
		/doability "Disarm"
	}
/return

| ------------------------
| -- Sub AutoIntimidate --
| ------------------------
Sub AutoIntimidate
	/if (${Me.AbilityReady["Intimidation"]}) {
		/echo · ··-~^vV - Trying to intimidate: ${oldTargetName}
		/doability "Intimidation"
	}
/return

| ------------------------
| -- Sub AutoPickpocket --
| ------------------------
Sub AutoPickpocket
	/if (${Me.AbilityReady["Pick Pockets"]}) {
		/if ((${Target.Distance} <= 15)) {
			/echo · ··-~^vV - Trying to Pick Pockets of: ${oldTargetName}
			/doability "Pick Pockets"
		}
	}
/return

| -----------------
| -- Sub AutoBeg --
| -----------------
Sub AutoBeg
	/if (${Me.AbilityReady["Begging"]}) {
		/if ((${Target.Distance} <= 15)) {
			/echo · ··-~^vV - Begging from: ${oldTargetName}
			/doability "Begging"
		}
	}
/return

| -------------------
| -- Sub AutoEvade --
| -------------------
Sub AutoEvade
	/if (${Me.AbilityReady["Hide"]}) {
		/echo · ··-~^vV - Trying to evade from: ${oldTargetName}
		/doability "Hide"
	}
/return

| ---------------------
| -- Sub RangeAttack --
| ---------------------
Sub RangeAttack
	/if (${Me.RangedReady} && (${Target.Distance} >= 30) && ${Target.LineOfSight} && (${Target.Distance} <= ${maxRange}) && ${InvSlot[ranged].Item.Type.Equal[${rangeType}]}) {
		/ranged
	}
/return

| -----------------------
| -- Sub AutoSneakHide --
| -----------------------
Sub AutoSneakHide
	/if (!${Me.Mount.ID} && !${reHideTimer.Value}) {
		/if (${Me.AbilityReady["Sneak"]}) {
			/doability "Sneak"
		}
		/if (${Me.AbilityReady["Hide"]} && (${Me.Sneaking} && !${Me.AbilityReady["Sneak"]}) && !${Me.Buff[Shroud of Stealth].Duration}) /doability "Hide"
	}
/return

| ------------------------
| -- Sub AutoSenseTraps --
| ------------------------
Sub AutoSenseTraps
	/if (${Me.AbilityReady["Sense Traps"]}) {
		/declare oldHeading float local ${Me.Heading.DegreesCCW}
		/doability "Sense Traps"
		/face heading ${oldHeading} fast
	}
/return

| ------------------------
| -- Sub AutoTrapDisarm --
| ------------------------
Sub AutoTrapDisarm
	/if (${Me.AbilityReady["Disarm Traps"]}) {
		/doability "Disarm Traps"
	}
/return

| -----------------------------
| -- Sub SneakHideButtonFind --
| -----------------------------
Sub SneakHideButtonFind
	/if (${Window[ActionsWindow].Child[AAP_FirstAbilityButton].Text.Equal[Hide]}) {
		/varset hideButtonNumber 1
	} else /if (${Window[ActionsWindow].Child[AAP_FirstAbilityButton].Text.Equal[Sneak]}) {
		/varset sneakButtonNumber 1
	}
	/if (${Window[ActionsWindow].Child[AAP_SecondAbilityButton].Text.Equal[Hide]}) {
		/varset hideButtonNumber 2
	} else /if (${Window[ActionsWindow].Child[AAP_SecondAbilityButton].Text.Equal[Sneak]}) {
		/varset sneakButtonNumber 2
	}
	/if (${Window[ActionsWindow].Child[AAP_ThirdAbilityButton].Text.Equal[Hide]}) {
		/varset hideButtonNumber 3
	} else /if (${Window[ActionsWindow].Child[AAP_ThirdAbilityButton].Text.Equal[Sneak]}) {
		/varset sneakButtonNumber 3
	}
	/if (${Window[ActionsWindow].Child[AAP_FourthAbilityButton].Text.Equal[Hide]}) {
		/varset hideButtonNumber 4
	} else /if (${Window[ActionsWindow].Child[AAP_FourthAbilityButton].Text.Equal[Sneak]}) {
		/varset sneakButtonNumber 4
	}
	/if (${Window[ActionsWindow].Child[AAP_FifthAbilityButton].Text.Equal[Hide]}) {
		/varset hideButtonNumber 5
	} else /if (${Window[ActionsWindow].Child[AAP_FifthAbilityButton].Text.Equal[Sneak]}) {
		/varset sneakButtonNumber 5
	}
	/if (${Window[ActionsWindow].Child[AAP_SixthAbilityButton].Text.Equal[Hide]}) {
		/varset hideButtonNumber 6
	} else /if (${Window[ActionsWindow].Child[AAP_SixthAbilityButton].Text.Equal[Sneak]}) {
		/varset sneakButtonNumber 6
	}
/return

| -----------------------------
| -- Sub IncomingMessageLoad --
| -----------------------------
Sub IncomingMessageLoad
	/varset incomingCount 0
	/declare messageNumber int local 0

	/for messageNumber 1 to 10
		/if (${Ini[PuppetMaster.ini,IncomingMessages,Message_${messageNumber}].NotEqual[NULL]} && ${Ini[PuppetMaster.ini,IncomingMessages,Message_${messageNumber}].Length}) {
			/varcalc incomingCount (${incomingCount} + 1)
			/varset incomingMessages[${incomingCount}] ${Ini[PuppetMaster.ini,IncomingMessages,Message_${messageNumber}]}
		} else {
			/ini "PuppetMaster.ini" "IncomingMessages" "Message_${messageNumber}" ""
		}

	/next messageNumber
/return

| ---------------------------
| -- Sub UnwantedBuffsLoad --
| ---------------------------
Sub UnwantedBuffsLoad
	/varset unwantedBuffsCount 0
	/declare unwantedBuffNumber int local 0

	/for unwantedBuffNumber 1 to 10
		/if (${Ini[PuppetMaster.ini,UnwantedBuffs,UnwantedBuff_${unwantedBuffNumber}].NotEqual[NULL]} && ${Ini[PuppetMaster.ini,UnwantedBuffs,UnwantedBuff_${unwantedBuffNumber}].Length}) {
			/varcalc unwantedBuffsCount (${unwantedBuffsCount} + 1)
			/varset unwantedBuffs[${unwantedBuffsCount}] ${Ini[PuppetMaster.ini,UnwantedBuffs,UnwantedBuff_${unwantedBuffNumber}]}
		} else {
			/ini "PuppetMaster.ini" "UnwantedBuffs" "UnwantedBuff_${unwantedBuffNumber}" ""
		}

	/next unwantedBuffNumber
/return

| -----------------------
| -- Sub IllusionCheck --
| -----------------------
Sub IllusionCheck
	/varset illusionCount 0

	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_DarkElf_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount (${illusionCount} + 1)
		/varset illusions[${illusionCount}] DarkElf
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_EarthElemental_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] EarthElemental
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_Erudite_FullName].NotEqual[NULL]}) { 
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] Erudite
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_FireElemetal_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] FireElemetal
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_Gnome_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] Gnome
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_HalfElf_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] HalfElf
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_Halfling_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] Halfling
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_HighElf_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] HighElf
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_Human_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] Human
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_Iksar_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] Iksar
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_Ogre_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] Ogre
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_Skeleton_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] Skeleton
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_VahShir_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] VahShir
	}
	/if (${Ini[PuppetMaster.ini,ClickItems,Illusion_WoodElf_FullName].NotEqual[NULL]}) {
		/varcalc illusionCount ${illusionCount}+1
		/varset illusions[${illusionCount}] WoodElf
	}
/return

| -----------------
| -- Sub IniLoad --
| -----------------
Sub IniLoad
	/if (${Ini[PuppetMaster.ini,Settings,MainAssist].NotEqual[NULL]}) {
		/varset mainAssist ${Ini[PuppetMaster.ini,Settings,MainAssist]}
	} else {
		/ini "PuppetMaster" "Settings" "MainAssist" "${mainAssist}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoAssistChange].NotEqual[NULL]}) {
		/varset autoAssistChange ${Ini[PuppetMaster.ini,Settings,AutoAssistChange]}
	} else {
		/ini "PuppetMaster.ini" "Settings" "AutoAssistChange" "${autoAssistChange}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AssistMessage].NotEqual[NULL]}) {
		/varset assistMessage ${Ini[PuppetMaster.ini,Settings,AssistMessage]}
	} else {
		/ini "PuppetMaster" "Settings" "AssistMessage" "${assistMessage}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoStick].NotEqual[NULL]}) {

		/varset autoStick ${Ini[PuppetMaster.ini,Settings,AutoStick]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoStick" "${autoStick}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,Closeness].NotEqual[NULL]}) {
		/varset closeness ${Ini[PuppetMaster.ini,Settings,Closeness]}
	} else {
		/ini "PuppetMaster" "Settings" "Closeness" "${closeness}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,LooseStick].NotEqual[NULL]}) {
		/varset looseStick ${Ini[PuppetMaster.ini,Settings,LooseStick]}
	} else {
		/ini "PuppetMaster" "Settings" "LooseStick" "${looseStick}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,MoveBack].NotEqual[NULL]}) {
		/varset moveBack ${Ini[PuppetMaster.ini,Settings,MoveBack]}
	} else {
		/ini "PuppetMaster" "Settings" "MoveBack" "${moveBack}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,MoveBehind].NotEqual[NULL]}) {
		/varset moveBehind ${Ini[PuppetMaster.ini,Settings,MoveBehind]}
	} else {
		/ini "PuppetMaster" "Settings" "MoveBehind" "${moveBehind}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoEvade].NotEqual[NULL]}) {
		/varset autoEvade ${Ini[PuppetMaster.ini,Settings,AutoEvade]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoEvade" "${autoEvade}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,EvadeAggro].NotEqual[NULL]}) {
		/varset evadeAggro ${Ini[PuppetMaster.ini,Settings,EvadeAggro]}
	} else {
		/ini "PuppetMaster" "Settings" "EvadeAggro" "${evadeAggro}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoBackstab].NotEqual[NULL]}) {
		/varset autoBackstab ${Ini[PuppetMaster.ini,Settings,AutoBackstab]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoBackstab" "${autoBackstab}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoStrike].NotEqual[NULL]}) {
		/varset autoStrike ${Ini[PuppetMaster.ini,Settings,AutoStrike]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoStrike" "${autoStrike}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoDisarm].NotEqual[NULL]}) {
		/varset autoDisarm ${Ini[PuppetMaster.ini,Settings,AutoDisarm]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoDisarm" "${autoDisarm}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoIntimidate].NotEqual[NULL]}) {
		/varset autoIntimidate ${Ini[PuppetMaster.ini,Settings,AutoIntimidate]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoIntimidate" "${autoIntimidate}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoPickpocket].NotEqual[NULL]}) {
		/varset autoPickpocket ${Ini[PuppetMaster.ini,Settings,AutoPickpocket]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoPickpocket" "${autoPickpocket}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoBeg].NotEqual[NULL]}) {
		/varset autoBeg ${Ini[PuppetMaster.ini,Settings,AutoBeg]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoBeg" "${autoBeg}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoSneakHide].NotEqual[NULL]}) {
		/varset autoSneakHide ${Ini[PuppetMaster.ini,Settings,AutoSneakHide]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoSneakHide" "${autoSneakHide}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,DropSneakInCombat].NotEqual[NULL]}) {
		/varset dropSneakInCombat ${Ini[PuppetMaster.ini,Settings,DropSneakInCombat]}
	} else {
		/ini "PuppetMaster" "Settings" "DropSneakInCombat" "${dropSneakInCombat}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoTrapDisarm].NotEqual[NULL]}) {
		/varset autoTrapDisarm ${Ini[PuppetMaster.ini,Settings,AutoTrapDisarm]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoTrapDisarm" "${autoTrapDisarm}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,RangeType].NotEqual[NULL]}) {
		/varset rangeType ${Ini[PuppetMaster.ini,Settings,RangeType]}
	} else {
		/ini "PuppetMaster" "Settings" "RangeType" "${rangeType}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,MaxRange].NotEqual[NULL]}) {
		/varset maxRange ${Ini[PuppetMaster.ini,Settings,MaxRange]}
	} else {
		/ini "PuppetMaster" "Settings" "MaxRange" "${maxRange}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,StrikeSkill].NotEqual[NULL]}) {
		/varset strikeSkill ${Ini[PuppetMaster.ini,Settings,StrikeSkill]}
	} else {
		/ini "PuppetMaster" "Settings" "StrikeSkill" "${strikeSkill}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,MinEndurance].NotEqual[NULL]}) {
		/varset minEndurance ${Ini[PuppetMaster.ini,Settings,MinEndurance]}
	} else {
		/ini "PuppetMaster" "Settings" "MinEndurance" "${minEndurance}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoEscape].NotEqual[NULL]}) {
		/varset autoEscape ${Ini[PuppetMaster.ini,Settings,AutoEscape]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoEscape" "${autoEscape}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,EscapeHealth].NotEqual[NULL]}) {
		/varset escapeHealth ${Ini[PuppetMaster.ini,Settings,EscapeHealth]}
	} else {
		/ini "PuppetMaster" "Settings" "EscapeHealth" "${escapeHealth}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoNimble].NotEqual[NULL]}) {
		/varset autoNimble ${Ini[PuppetMaster.ini,Settings,AutoNimble]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoNimble" "${autoNimble}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,NimbleHealth].NotEqual[NULL]}) {
		/varset nimbleHealth ${Ini[PuppetMaster.ini,Settings,NimbleHealth]}
	} else {
		/ini "PuppetMaster" "Settings" "NimbleHealth" "${nimbleHealth}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,DynamicNimble].NotEqual[NULL]}) {
		/varset dynamicNimble ${Ini[PuppetMaster.ini,Settings,DynamicNimble]}
	} else {
		/ini "PuppetMaster" "Settings" "DynamicNimble" "${dynamicNimble}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoIllusion].NotEqual[NULL]}) {
		/varset autoIllusion ${Ini[PuppetMaster.ini,Settings,AutoIllusion]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoIllusion" "${autoIllusion}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,CheckForFadingBuffs].NotEqual[NULL]}) {
		/varset checkForFadingBuffs ${Ini[PuppetMaster.ini,Settings,CheckForFadingBuffs]}
	} else {
		/ini "PuppetMaster" "Settings" "CheckForFadingBuffs" "${checkForFadingBuffs}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,DropUnwantedBuffs].NotEqual[NULL]}) {
		/varset dropUnwantedBuffs ${Ini[PuppetMaster.ini,Settings,DropUnwantedBuffs]}
	} else {
		/ini "PuppetMaster" "Settings" "DropUnwantedBuffs" "${dropUnwantedBuffs}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,CallDI].NotEqual[NULL]}) {
		/varset callDI ${Ini[PuppetMaster.ini,Settings,CallDI]}
	} else {
		/ini "PuppetMaster" "Settings" "CallDI" "${callDI}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoJoinGroups].NotEqual[NULL]}) {
		/varset autoJoinGroups ${Ini[PuppetMaster.ini,Settings,AutoJoinGroups]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoJoinGroups" "${autoJoinGroups}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoGreet].NotEqual[NULL]}) {
		/varset autoGreet ${Ini[PuppetMaster.ini,Settings,AutoGreet]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoGreet" "${autoGreet}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,AutoLoot].NotEqual[NULL]}) {
		/varset autoLoot ${Ini[PuppetMaster.ini,Settings,AutoLoot]}
	} else {
		/ini "PuppetMaster" "Settings" "AutoLoot" "${autoLoot}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,MinLootValue].NotEqual[NULL]}) {
		/varset minLootValue ${Ini[PuppetMaster.ini,Settings,MinLootValue]}
	} else {
		/ini "PuppetMaster.ini" "Settings" "MinLootValue" "${minLootValue}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,LootDistance].NotEqual[NULL]}) {
		/varset lootDistance ${Ini[PuppetMaster.ini,Settings,LootDistance]}
	} else {
		/ini "PuppetMaster" "Settings" "LootDistance" "${lootDistance}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,CollectItem].NotEqual[NULL]}) {
		/varset collectItem ${Ini[PuppetMaster.ini,Settings,CollectItem]}
	} else {
		/ini "PuppetMaster" "Settings" "CollectItem" "${collectItem}"
	}
	/if (${Ini[PuppetMaster.ini,Settings,CollectItemName].NotEqual[NULL]}) {
		/varset collectItemName ${Ini[PuppetMaster.ini,Settings,CollectItemName]}
	} else {
		/ini "PuppetMaster" "Settings" "CollectItemName" "${collectItemName}"
	}
/return
Last edited by z-roice on Sun Sep 26, 2004 2:15 pm, edited 8 times in total.

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

Post by z-roice » Wed Sep 08, 2004 2:15 pm

saved

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Wed Sep 08, 2004 2:27 pm

Why couldn't you just replace your old macro with the new macro on the same old thread? I don't understand why you needed a new thread if it's doing the same thing.

And, I don't understand all the spaces in the macro.

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

Post by z-roice » Wed Sep 08, 2004 2:40 pm

delete the old post i had to few space there to post.. or make it unsticky so it
"despawns" with the time

and the spaces are for me to edit easier .. alrdy deleted alot spaces.. if you dont like em feel free to delete

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Wed Sep 08, 2004 8:26 pm

We're talking about the spaces in the 'commented' part of your macro (ie, the instructions).

It's impossible to read that way. The rest of the macro is fine.

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

Post by z-roice » Wed Sep 08, 2004 8:42 pm

will change that.. when i finally update the doc someday hehe

El
a ghoul
a ghoul
Posts: 108
Joined: Mon Dec 29, 2003 12:34 pm

Post by El » Thu Sep 09, 2004 12:20 pm

Nice macro. I'm testing it out this morning, so here's my results so far.

One question... I noticed in the stickied macro that you couldn't use /autopp in combat... it wouldn't drop combat, attempt the pick, and restart. Is that by design? I added it in, so not a big deal, but your doc seemed to indicate that combat pp was what you were after.

Autobeg has the same problem.

Autoloot has some issues as well. It bombs unless you set nodropItemToLoot and that doesn't appear to get set anywhere. Past that, it loses the target and doesn't seem to find the corpse.

In Healing Will discipline, your event message is wrong. Should be "Your will falters", not "flatters".

As far as spam goes, it would be useful to include a verbose option to turn off many, if not all, of the /echo's. And, although I realize it's in keeping with your theme, the /echo . ..~^Vv in every echo gets old very fast.

loadingpleasewait
a snow griffon
a snow griffon
Posts: 332
Joined: Sat Sep 14, 2002 8:46 am

Post by loadingpleasewait » Thu Sep 09, 2004 3:39 pm

Your autoloot code is BoRKeD.. seems like its missing a declare or somthing.. this is using autoloot, without ldonlooting.. also, your pickpocketing needs an /attack off /delay 1 then do the ability, then attack back on..
LOADING PLEASE WAIT...

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

Post by z-roice » Sat Sep 11, 2004 11:48 am

bugfixed version incoming - i noticed that too.. totally forgot about drop attack to pick and beg and i changed some variable names from i to something better understandable and forgot to edit some occurences it seems

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

Post by z-roice » Sat Sep 11, 2004 12:10 pm

all should be working now... try out some with the delay in autopocket_incombat and autobeg_incombat subs if they still dont work =)


peace

Z-Ro
Last edited by z-roice on Sun Sep 12, 2004 2:26 pm, edited 2 times in total.

loadingpleasewait
a snow griffon
a snow griffon
Posts: 332
Joined: Sat Sep 14, 2002 8:46 am

Post by loadingpleasewait » Sat Sep 11, 2004 2:10 pm

Thank you for editing the readme.. = ) much easier to read..

question: does this macro have an autoassist function? if so, how exactly does it work? or is the only assist function /doassist? Also, do you have plans to include a trap senseing/disarming function?
LOADING PLEASE WAIT...

z-roice
a lesser mummy
a lesser mummy
Posts: 62
Joined: Sun Aug 08, 2004 5:25 am

Post by z-roice » Sat Sep 11, 2004 2:53 pm

will add automatic trap disarm soon..

autoassist isnt implemented yet ... dont really wanna make an afk bot and if i wanna make it safe so you arent breaking mezzes etc. but didnt think too much about it yet.. the only thing that autoassist is assistmessage from ma atm cuz u can be quite sure you may attack by then (im mainly raiding so mezz breaks are really bad)

Z-Ro