WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Skillstance (https://www.wowinterface.com/forums/showthread.php?t=7219)

Radoznali 12-09-06 02:00 PM

[Request]-Skillstance
 
if someone can update this addon to wow 2.0 it would be great


localization.lua
Wanttarget = "You have no target" -- tries to target nearest enemy
WantBattleStance = "Must be in Battle Stance"
WantBerserkerStance = "Must be in Berserker Stance"
WantDefensiveStance = "Must be in Defensive Stance"
WantOffensiveStance = "Must be in Battle Stance, Berserker Stance"

battle_stance = "Battle Stance"
defensive_stance = "Defensive Stance"
berserker_stance = "Berserker Stance"

if(GetLocale() == "deDE") then
Wanttarget = "Ihr habt kein Ziel"
WantBattleStance = "Muss in Kampfhaltung sein"
WantBerserkerStance = "Muss in Berserkerhaltung sein"
WantDefensiveStance = "Muss in Verteidigungshaltung sein"
WantOffensiveStance = "Muss in Kampfhaltung, Berserkerhaltung sein"

battle_stance = "Kampfhaltung"
defensive_stance = "Verteidigungshaltung"
berserker_stance = "Berserkerhaltung"
end

if(GetLocale() == "frFR") then
Wanttarget = "Cible hors de portée"
WantBattleStance = "Doit être en Posture de combat"
WantBerserkerStance = "Doit être en Posture berserker"
WantDefensiveStance = "Doit être en Posture défensive"
WantOffensiveStance = "Doit être en Posture de combat ou berserker"

battle_stance = "Posture de combat"
defensive_stance = "Posture défensive"
berserker_stance = "Posture berserker"
end

SkillStance.lua
--SkillStance AddOn by Taloquin, original code by Leleth--

local current_argument = "";

function SkillStance_OnLoad()
_,lclass = UnitClass("player")
if (lclass == "WARRIOR") then
isWarrior = true
end
this:RegisterEvent("UI_ERROR_MESSAGE")
end

function SkillStance_OnEvent()
SkillStance_Loop()
end

function SkillStance_Loop()
local i = 1;
while(getglobal("arg"..i) ~= nil) do
current_argument = getglobal("arg"..i);
if _CheckFor( Wanttarget) then
TargetNearestEnemy()
return
end
if _CheckFor( WantBattleStance) then
if isWarrior then
CastShapeshiftForm(1)
return
end
end
if _CheckFor( WantDefensiveStance) then
if isWarrior then
CastShapeshiftForm(2)
return
end
end
if _CheckFor( WantBerserkerStance) then
if isWarrior then
CastShapeshiftForm(3)
return
end
end
if _CheckFor( WantOffensiveStance) then
if isWarrior then
CastShapeshiftForm(1)
return
end
end
i = i+1;
end
end

function _CheckFor(TheString)
if (TheString ~= nil) then
if ((string.find(current_argument, TheString) ~= nil)) then
return true
else
return false
end
else
DEFAULT_CHAT_FRAME:AddMessage("SkillStance Error: Compare String is Nil value. Check the localisation.lua for errors!")
return false;
end
end

SkillStance.toc
## Interface: 1800
## Title: SkillStance
## Author: Taloquin
## Notes: Switches stances based on skill requirements.
SkillStance.xml

SkillStance.xml
- <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<Script file="SkillStance.lua" />
<Script file="localization.lua" />
- <Frame name="SkillStanceFrame">
- <Scripts>
<OnLoad>SkillStance_OnLoad();</OnLoad>
<OnEvent>SkillStance_OnEvent();</OnEvent>
</Scripts>
</Frame>
</Ui>

Radoznali 12-10-06 04:33 AM

or suggest some other addon with same functionality?

Radoznali 12-12-06 05:44 AM

and no anwers to that too?


All times are GMT -6. The time now is 11:24 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI