I'm working on an instance party script and I'm having issues with looting the boss when he's down. Other partychat commands work so I know that's not the issue. Neither my main character nor the following bot will loot. Here's the waypoints just prior, during, and just after the boss:
Code: Select all
<!-- #  6 --><waypoint x="-50" z="-996" y="1255"> 
		repeat
			yrest(500)
		until checkparty(200) == true
		sendPartyChat('code"changeProfileOption("LOOT", "true")"')
		changeProfileOption("LOOT", "true")
		--=================== cast buffs for boss fight HERE ========================
		sendMacro("/cast Essence of Magic")
		yrest(1000)
		sendMacro("/cast Magic Barrier")
		yrest(1000)
		sendMacro("/cast Energy Influx")
		yrest(1000)
		sendMacro("/cast Intensification")
		yrest(1000)
		sendMacro("/cast Elemental Catalysis")
		bossskills(true)
		sendPartyChat('com"nofollow"')
		sendPartyChat('code"changeProfileOption("LOOT", "true")"')
	</waypoint>
	<!-- #  7 --><waypoint x="-234" z="-995" y="1254">    
		--============================ IS THIS THE FIGHT BOSS WAYPOINT? ========================
		local badguy = player:findNearestNameOrId("Cayus")
		player:target(badguy)
		myTarget = player:getTarget();
		if myTarget.Name == "Cayus" then
			sendMacro("/cast Flame")
		end
		player:fight()
		yrest(2000)
		print("resting after fight before looting")
		player:lootAll() --party lead should loot here
		yrest(2000)
	</waypoint>
	<!-- #  8 --><waypoint x="-215" z="-1013" y="1254">
		
		sendPartyChat('code"player:lootAll()"') -- party member should loot here.
		print("told party to lootAll... waiting 3 seconds")
		yrest(3000)
		sendPartyChat('com"follow"')
		changeProfileOption("LOOT", "false")
		yrest(2000)
		bossskills(false)
		
	</waypoint>Any ideas? Thanks in advance for the help.
