Jump to content

Replacement for destroytotem()


  • Please log in to reply
7 replies to this topic

#1 Keiret

Keiret
  • Junkies
  • Taurenclass_name
  • EU-Al'Akir
  • Blackout
  • Posts: 433
  • Talents: Restoration

Posted 23 January 2013 - 05:31 PM

So I'm trying to fix this addon which is using destroytotem() in the OnClick event to destroy totems.

This is what the function looks like currently.
function PitBull4_Totems.button_scripts:OnClick(mousebutton)
if (mousebutton == "RightButton" and self.slot and not self.force_show) then
DestroyTotem( self.slot )
end
end

I know theres a slash-command in wow that goes /click frame mousebutton which works for destroying totems but I have little to no experience with lua and the wow API and not sure how to use it(if its even possible).

I tried just replacing destroytotem with the click, but it doesn't work.
click "TotemFrameTotem"..self.slot RightButton

If anyone knows a simple way to make this work please let me know :)

#2 DraedithIRL

DraedithIRL
  • Members
  • Posts: 2

Posted 23 January 2013 - 05:35 PM

I use this for tremor, sure you can adapt it for whatever you need:


#showtooltip
/stopcasting
/click TotemFrameTotem1 RightButton
/cast Tremor Totem

Drops and destroys tremor on one bind.

+rep if helped

#3 Keiret

Keiret
  • Junkies
  • Taurenclass_name
  • EU-Al'Akir
  • Blackout
  • Posts: 433
  • Talents: Restoration

Posted 23 January 2013 - 05:39 PM

If you read my post you would've seen I already know of that slash-command and is not what I'm asking for.

#4 DraedithIRL

DraedithIRL
  • Members
  • Posts: 2

Posted 23 January 2013 - 05:41 PM

Not sure why you need an addon when there's a perfectly simple macro, but suit yourself

#5 Keiret

Keiret
  • Junkies
  • Taurenclass_name
  • EU-Al'Akir
  • Blackout
  • Posts: 433
  • Talents: Restoration

Posted 23 January 2013 - 05:47 PM

Because I want to be able to destroy totems(to prevent combat entering, etc) without having to use 4 binds for each individual totem. I already use a tremor destroying macro, but I want to be able to click off other totems the way I have been doing for years.

#6 Askow

Askow
  • Members
  • Orcclass_name
  • EU-Ysondre
  • Vengeance / Rache
  • Posts: 13
  • Talents: Restoration 0/2/2/1/0/0
  • RBG: 384

Posted 24 January 2013 - 10:17 AM

Totemic recall ?

#7 Keiret

Keiret
  • Junkies
  • Taurenclass_name
  • EU-Al'Akir
  • Blackout
  • Posts: 433
  • Talents: Restoration

Posted 25 January 2013 - 06:35 PM

Totemic recall is a spell that removes all totems. It cannot be used while CC'd and is on the global cooldown. Let's stay on topic :)

#8 Zerstiren

Zerstiren
  • Junkies
  • Humanclass_name
  • US-Darkspear
  • Cyclone
  • Posts: 167
  • Talents: Holy 2/1/1/2/2/0
  • LocationNew Jersey

Posted 29 January 2013 - 04:49 PM

Give this a whirl:

_G["TotemFrameTotem"..self.slot]:Click(RightButton)

Click() is the proper API, and passes whatever is nested in the "(" and ")" to the OnClick function.  Additionally, you need need to wrap your refrence in _G[""] considering your are construction a global string with concatenation.

Edited by Zerstiren, 29 January 2013 - 04:49 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<