Thread Tools Display Modes
06-10-06, 11:35 AM   #1
nick_cloy
A Kobold Labourer
Join Date: Jun 2006
Posts: 1
shaman reincarnation event

is it possible to have a function run every time a shaman uses their reincarnation ability?

if so then how?


EDIT:

at the moment i have a function that detects the popup window that comes up when you die (with the release button and possible soulstone/reincarnation buttons)

i get the window by using
lOriginal_StaticPopup_Show = StaticPopup_Show;
StaticPopup_Show = Res_StaticPopup_Show;
in a function that runs at load time


function Res_StaticPopup_Show(which, text_arg1, text_arg2)

local dialog = lOriginal_StaticPopup_Show(which, text_arg1, text_arg2);

local but1 = getglobal("StaticPopup1Button1"):GetText();
local but2 = getglobal("StaticPopup1Button2"):GetText();

message(which);
message(but1);
message(but2);

if (but2 == "Reincarnation")
message("Reincarnation is possible");
end

end

it all works apart from
if (but2 == "Reincarnation")
message("Reincarnation is possible");
end

the message(but2); part displays "Reincarnation" in the chat window, but the if (but2 == "Reincarnation") stops the script from working.

what i need is someway to compare the but2 variable with the string "Reincarnation" to see if they are the same, and if they are i need to be aware if the user click the reincarnation button, can anybody help me?

Last edited by nick_cloy : 06-11-06 at 05:16 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » shaman reincarnation event


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off