Thema: Hunter Addon Problem!!!
Diskutiere im Jäger Forum über Hunter Addon Problem!!!. Hallo, ich will für den Hunter ein Addon schreiben, welches NUR den Zufriedenheitsframe des Pets anzeigt. hier sind die LUA und XML dateien: Code: function.lua local happiness; function out(text) DEFAULT_CHAT_FRAME:AddMessage(text) end function error(textmsg) UIErrorsFrame:AddMessage(textmsg, 1.0, 1.0, 0, 1, 10) end function FaraFrames_OnLoad() this:RegisterEvent("PLAYER_ENTERING_WORLD"); this:RegisterEvent("PLAYER_LOGIN"); this:RegisterEvent("PLAYER_PET_CHANGED"); ...
Du bist noch kein Mitglied?
Mitglieder sehen keine störende Werbung und können alle Funktionen des Forums nutzen. Die Registrierung ist kostenlos und es ist keine Bestätigung deiner E-Mail Adresse erforderlich! Schließe dich rund 260.000 Mitgliedern an und sei Teil des größten, deutschen World of Warcraft Forums!
Alt 07.10.2008, 07:40   #1
Level 4
 
 
Beiträge: 8

Hunter Addon Problem!!!

Hallo, ich will für den Hunter ein Addon schreiben, welches NUR den Zufriedenheitsframe des Pets anzeigt. hier sind die LUA und XML dateien:
Code:
function.lua
local happiness;

function out(text)
 DEFAULT_CHAT_FRAME:AddMessage(text) 
end

function error(textmsg)
 UIErrorsFrame:AddMessage(textmsg, 1.0, 1.0, 0, 1, 10)
end

function FaraFrames_OnLoad()
	this:RegisterEvent("PLAYER_ENTERING_WORLD");
	this:RegisterEvent("PLAYER_LOGIN");
	this:RegisterEvent("PLAYER_PET_CHANGED");
	this:RegisterEvent("UNIT_AURA");
	this:RegisterEvent("UNIT_COMBAT");
	this:RegisterEvent("UNIT_DISPLAYPOWER");
	this:RegisterEvent("UNIT_FOCUS");
	this:RegisterEvent("UNIT_HAPPINESS");
	this:RegisterEvent("UNIT_HEALTH");
	this:RegisterEvent("UNIT_LEVEL");
	this:RegisterEvent("UNIT_MANA");
	this:RegisterEvent("UNIT_MAXFOCUS");
	this:RegisterEvent("UNIT_MAXHEALTH");
	this:RegisterEvent("UNIT_MAXMANA");
	this:RegisterEvent("UNIT_MODEL_CHANGED");
	this:RegisterEvent("UNIT_NAME_UPDATE");
	this:RegisterEvent("UNIT_PET");
	this:RegisterEvent("UNIT_PET_EXPERIENCE");
	this:RegisterEvent("UNIT_PORTRAIT_UPDATE");
	this:RegisterEvent("UNIT_SPELLMISS");
  out("Pet Satisfaction erfolgreich geladen.");
  SLASH_FARAFRAMES1 = "/petsatisfaction";
  SLASH_FARAFRAMES2 = "/ps";
  SlashCmdList["FARAFRAMES"] = function(msg)
		FaraFrames_SlashCommandHandler(msg);
	end
	this:SetAttribute("unit", "pet");
	
end

function Pet_Satisfaction_Events:UNIT_HAPPINESS()
	Pet_Satisfaction_Set_Happiness();
end

function Pet_Satisfaction_Set_Happiness()
	happiness = GetPetHappiness();

	if (happiness == 1) then
		Pet_Satisfaction_Texture:SetTexCoord(0.375, 0.5625, 0, 0.359375);
	elseif (happiness == 2) then
		Pet_Satisfaction_Texture:SetTexCoord(0.1875, 0.375, 0, 0.359375);
	elseif (happiness == 3) then
		Pet_Satisfaction_Texture:SetTexCoord(0, 0.1875, 0, 0.359375);
	end
end


function FaraFrames_SlashCommandHandler(msg)
 	FaraFrames_Toggle(msg);
end

function FaraFrames_Toggle(num)
   local frame = getglobal("FaraFrames" .. num)
   if (frame) then
   if(  frame:IsVisible() ) then
      frame:Hide();
   else
      frame:Show();
   end
   end
end
Code:
interface.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="functions.lua"/> <!-- Here the Scripts that have to be Executed --> <Frame name="FaraFrames_GeneralScripts" hidden="true"> <Scripts> <OnLoad> FaraFrames_OnLoad(); </OnLoad></Scripts> </Frame> <Frame name="FaraFrames" hidden="true" virtual="true" parent="UIParent"> <!-- set the size of the frame --> <Size> <AbsDimension x="200" y="200"/> </Size> <!-- set where the frame will be anchored --> <Anchors> <Anchor point="CENTER" /> </Anchors> <!-- set the parameters for the layers of the frame --> <Layers> <Layer level="BACKGROUND"> <Texture name="$parent_Background" setAllPoints="true"> <!-- Texture has blue color wit 50% alpha --> <Color r="0" g="0" b="1" a="0.5" /> </Texture> </Layer> </Layers> <!-- event handling --> </Frame> <!-- We now create a new Template with frameStrata="DIALOG" the Backdrop Border definitions work only correctly with the Dialog type of Frame --> <Frame name="FaraFramesDialog" hidden="true" toplevel="true" virtual="true" frameStrata="DIALOG" parent="UIParent"> <Size> <AbsDimension x="24" y="23"/> </Size> <Anchors> <Anchor point="CENTER"/> </Anchors> <Backdrop tile="true"> <TileSize> <AbsValue val="32"/> </TileSize> <EdgeSize> <AbsValue val="32"/> </EdgeSize> <BackgroundInsets> <AbsInset left="11" right="12" top="12" bottom="11"/> </BackgroundInsets> </Backdrop> </Frame> <Frame name="FaraFramesshow" inherits="FaraFramesDialog" movable="true" enableMouse="true"> <Size> <AbsDimension x="24" y="23"/> </Size> <Anchors> <Anchor point="TOP"> <Offset> <AbsDimension x="0" y="-5"/> </Offset> </Anchor> </Anchors> <Layers> <Layer level="BACKGROUND"> <Texture name="Pet_Satisfaction_Texture" file="Interface\PetPaperDollFrame\UI-PetHappiness" setAllPoints="true"> <Size> <AbsDimension x="24" y="23"/> </Size> <TexCoords left="0" right="0.1875" top="0" bottom="0.359375"/> </Texture> </Layer> </Layers> <Scripts> <OnMouseDown> this:StartMoving(); </OnMouseDown> <OnMouseUp> this:StopMovingOrSizing(); </OnMouseUp> <OnDragStop> this:StopMovingOrSizing(); </OnDragStop> </Scripts> </Frame> </Ui>
Code:
PetSatisfaction.toc
## Interface: 20400
## Title: PetSatisfaction
## Notes: Die Petzufriedenheits Frame.
## SavedVariablesPerCharacter: Pet_Satisfaction_Save
## Version: 1.0
## Author: uddy

interface.xml
Ich hoffe auf schnelle antwort
uddy ist offline  
Alt 07.10.2008, 07:40  
Anzeige
 
 

AW: Hunter Addon Problem!!!

Hast du schon im Lösungsbuch nachgelesen? Eventuell hilft dir das ja weiter...
 
Alt 07.10.2008, 08:22   #2
Level 85
 
Avatar von Tronjer

... ist angeschlagen
 
Fraktion: Allianz
Realm: Nethersturm
Rasse: Menschen
Klasse: Krieger
 
Beiträge: 3.637

AW: Hunter Addon Problem!!!

Ich versteh diesen Thread so wenig wie Deinen anderen. Und einer langt.
Tronjer ist offline  
Alt 07.10.2008, 08:34   #3
Ehren-Mitglied
 
Avatar von hogix

... ist beschäftigt
 
Fraktion: Allianz
Realm: Forscherliga
Rasse: Gnome
Klasse: Schurke
 
Beiträge: 7.055

AW: Hunter Addon Problem!!!

Mach hier -> https://www.wow-forum.com/de/25534-j...n-problem.html weiter. Wer was damit anfangen kann, dem reicht ein Thread mit den Codes.

/vote4close
hogix ist offline  
Alt 07.10.2008, 11:56   #4
Ehren-Mitglied
 
Avatar von Suli

... ist abenteuerlustig
 
Fraktion: Allianz
Realm: Die Aldor
Rasse: Nachtelfen
Klasse: Magier
 
Beiträge: 3.398

AW: Hunter Addon Problem!!!

Einmal reicht doch....

/closed
Suli ist offline  


Ähnliche Themen zu „Hunter Addon Problem!!!”
  • addon problem
    hi ich habe ein problem mit meienem addon und zwar zeigt mir das addon komplett an was wer in meienm umkreis castet heist im bg sehe ich meine...
  • Hunter Addon Problem mit LUA
    Hallo, ich will für den Hunter ein Addon schreiben, welches NUR den Zufriedenheitsframe des Pets anzeigt. hier sind die LUA und XML dateien:...
  • Riesengroßes Problem mit eienn Addon!
    Habe ein Problem mit einen Addon und zwar den Titan-emotes menu addon es funktioniert nicht. Titan Pannel läuft einwandfrei unter Addons ist untzer...
  • Problem mit einen Interface Addon
    Hallo Leute ich habe mir da Addon Pack "Victory Rush UI" heruntergeladen, und es passt mir auch sehr gut. Das Problem das ich habe ist eigentlich...
  • Addon Problem
    Habe ein grosses Addon Problem! :traurig: Habe gerade vor ca 30 Minuten etwa 10 neue Addons die mit dem neuen Patch 2.0 funzen müssten. Von...