Download
(708 b)
Download
Updated: 03/17/15 04:18 PM
Compatibility:
Update 6 (1.6.5)
Updated:03/17/15 04:18 PM
Created:03/15/15 09:31 PM
Monthly downloads:51
Total downloads:13,522
Favorites:18
MD5:
Categories:RolePlay, Chat Mods, Graphic UI Mods, Miscellaneous, Utility Mods
Looping Emotes  Popular! (More than 5000 hits)
Version: 1.0.1
by: YayRP [More]
Ever wanted to have your mage stand around taking notes for a whole magic lesson, rather than just three fleeting seconds? You need Looping Emotes!

/loop [emote] - Loops an emote 20 times
/startloop [emote] - Starts permanent emote looping with a given emote
/stoploop - Ends permanent emote looping for all emotes

E.g. /loop write, etc.
1.0.1
- Made permanent looping truly endless, thanks to a useful tip from votan.
- Fixed a bug dominoid reported where multiple endless emote loops would conflict.
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Uploader
Date
1.0.0
645B
03/15/15 09:31 PM


Post A Reply Comment Options
Unread 12/12/22, 08:37 PM  
Cheshire_Cat

Forum posts: 0
File comments: 29
Uploads: 0
Not working

Trying to use this with the /palelord emote doesn't work at all.
Doesn't work with ANY emote.

Also found, that when trying to use an emote normally with no loop command, it cuts the emote short/interrupts it.
Report comment to moderator  
Reply With Quote
Unread 03/17/15, 04:19 PM  
YayRP
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 9
Uploads: 5
Fixed dominoid's bug report and used votan's suggestion to perma-loop the emote on /startloop.
Report comment to moderator  
Reply With Quote
Unread 03/16/15, 11:53 AM  
YayRP
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 9
Uploads: 5
Thanks for the suggestions - in particular EVENT_MANAGER:UnregisterForUpdate; that's exactly what I needed to avoid the issue caused by starting a second "endless" loop after the first was canceled.

I'll work on a solution soon!
Report comment to moderator  
Reply With Quote
Unread 03/16/15, 07:34 AM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 577
File comments: 1667
Uploads: 40
In your case, I would not work with zo_callLater. Instead use EVENT_MANAGER:RegisterForUpdate("LoopEmotePlaying", ourPeriod, callback)

EVENT_MANAGER:RegisterForUpdate is what zo_callLater is using internal.
callback is periodically called and you can stop this with EVENT_MANAGER:UnregisterForUpdate("LoopEmotePlaying") anytime.
Report comment to moderator  
Reply With Quote
Unread 03/16/15, 07:13 AM  
dominoid
AddOn Author - Click to view AddOns

Forum posts: 34
File comments: 276
Uploads: 2
This is untested, but I think this will get the same effect with a single Call Later instead of literally 2,000 that HAVE to run to completion. This also ends nicely when shouldLoop = false or the max number of loops has been reached.

Code:
ELM = {}
ELM.Name = "EmoteLoop"
ELM.Version = "1.00"

shouldLoop = false
loopCount = 0
maxLoop = 1

function PerformEmote(emote)

  if shouldLoop == true
	
	if loopCount <= maxLoop then
		ELMcommand = table.concat({"/", emote}, "")

		DoCommand("/idle") 
		zo_callLater(function () DoCommand(ELMcommand) end, 50 )
		
		loopCount = loopcount + 1
	end
  end

end

function RepeatedlyPlayEmote(emote, times)
  
  if type(times) ~= "number" then
  	times = 10
  end
  if emote then
	loopCount = 1
	maxLoop = times
	PerformEmote(emote, times)
  end
end

SLASH_COMMANDS["/loop"] = function (emote)
  shouldLoop = true
  RepeatedlyPlayEmote(emote, 20)
end

SLASH_COMMANDS["/startloop"] = function (emote)
  shouldLoop = true
  RepeatedlyPlayEmote(emote, 1000)
end

SLASH_COMMANDS["/stoploop"] = function()
  shouldLoop = false
end
Edit: This still has an issue if the player runs two /startloop commands with a /stoploop between them.

Thanks for your consideration.
Last edited by dominoid : 03/16/15 at 07:21 AM.
Report comment to moderator  
Reply With Quote
Unread 03/16/15, 07:00 AM  
dominoid
AddOn Author - Click to view AddOns

Forum posts: 34
File comments: 276
Uploads: 2
Not sure how much more taxing on the system it is, but calling 2,000 "call laters" immediately is creating 2,000 calls that can't be undone until they completely run. It will also cause problems in the following scenario.

/startloop [emote1]
/stoploop
/startloop [emote2]

You have now set 4,000 "call laters" in motion that won't end for 42 minutes! (1,000 calls set 2.5 seconds)

The second issue here is that now shoudLoop is True for all 2,000 calls and half of those are trying to run conflicting emotes!

Any way you can see the issues this poses. I will submit alternate code shortly.
Last edited by dominoid : 03/16/15 at 07:20 AM.
Report comment to moderator  
Reply With Quote
Unread 03/16/15, 06:47 AM  
dominoid
AddOn Author - Click to view AddOns

Forum posts: 34
File comments: 276
Uploads: 2
Brilliantly simple. Thank you.

You should look at reviving this one. It's broke, but was awesome.

http://www.esoui.com/downloads/info108-AutoEmote.html

Thanks.
Last edited by dominoid : 03/16/15 at 06:49 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: