• 0

    posted a message on Arathi Basin -- DBM
    Well i finally got a reply on the DBM forum's, and one of the mod's said "we will look into it" let's see how well that works.
    Posted in: AddOn HELP!
  • 0

    posted a message on Arathi Basin -- DBM
    1. Got it.

    2. I know, but it was just really bugging me that it wouldn't work.

    3. DBM hasn't been updated for a couple month's. And i went onto the site, which is very inactive and neither of the authors/admin's have been on at all this month. (A month and a half login period)
    Posted in: AddOn HELP!
  • 0

    posted a message on Arathi Basin -- DBM
    I've been trying to fix this, but it's been a fail attempt every time, i think i have came to a good hypothesis though.... The problem has to be within the timing/registering event part of the code, because toward's the last maybe, 30-40 of AB, the flag cap timer's start showing.

    If anyone has any info on how to fix it, or how to start fixing it, it would very very very AWESOME lol. I really would like to know the timer's on the flag's in this Battleground.

    Once again,

    Thank you.
    Posted in: AddOn HELP!
  • 0

    posted a message on A rogue 'beginner' AddOn
    Oh, ok, i see. But my problem is still with them being broke O.o, there is NO reason why it should be, but it is.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Taking a break.
    As Ketho said, thank you, you helped me a lot, with my many noobish question's, and have helped me very much. Thanks to you, i'm now trying to fix the Arathi Basin cap timer's for DBM.

    So enjoy your break, have fun, and hope to see you around.
    Posted in: General Chat
  • 0

    posted a message on A rogue 'beginner' AddOn
    Well, i just hit a road block. I was editing 1 more thing in my .xml's that i wanted to test (Everything has been working perfectly) But that edit didn't work, and it was only a cosmetic edit, so i put the .xml's back to the way they were. Now, neither of the notification's are firing. I'm also not receiving any error's upon load or event firing.

    Here are my files:
    MainHand.lua
    MainHand.xml
    RogueNote.toc
    SecondHand.lua
    SecondHand.xml
    Posted in: Lua Code Discussion
  • 0

    posted a message on A rogue 'beginner' AddOn
    Also, i have it do that stuff on load, so it will check, one it loads. Because before, it would always pop up when you first logged into the game, even if you had your poison's applied, that way fixed it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on A rogue 'beginner' AddOn
    local secondaryHandLink = GetInventoryItemLink("player", GetInventorySlotInfo("MainHandSlot"))


    Need's to be SecondaryHandSlot
    Posted in: Lua Code Discussion
  • 0

    posted a message on A rogue 'beginner' AddOn
    Nope, that didn't help either. They both fire when the main hand changes, but they don't fire when the off hand changes. And it's weird, because the SecondHand is set to read the SecondaryHandSlot, but it seem's like it still read's the MainHandSlot.
    Posted in: Lua Code Discussion
  • 0

    posted a message on A rogue 'beginner' AddOn
    I'm now trying separate .lua and .xml files for each hand, but i am still trying to figure out how to make the anchor point's bigger.
    Posted in: Lua Code Discussion
  • 0

    posted a message on A rogue 'beginner' AddOn
    This is my .lua

    -- Author      : wwwDot
    -- Create Date : 12/13/2010 5:05 PM
    
    function MainWeapNote_OnLoad(self)
    	local hasMainHandEnchant = GetWeaponEnchantInfo()
    	local mainHandLink = GetInventoryItemLink("player", GetInventorySlotInfo("MainHandSlot"))
    	local hasFishingPole = mainHandLink and select(7, GetItemInfo(mainHandLink)) == "Fishing Poles"
    	
    	if mainHandLink and not hasMainHandEnchant and not hasFishingPole then
    		self:Show()
    	else
    		self:Hide()
    	end
    
    	self:RegisterEvent("UNIT_INVENTORY_CHANGED")
    end
    
    function SecondaryWeapNote_OnLoad(self)
    	local hasSecondaryHandEnchant = GetWeaponEnchantInfo()
    	local secondaryHandLink = GetInventoryItemLink("player", GetInventorySlotInfo("SecondaryHandSlot"))
    
    	if secondaryHandLink and not hasSecondaryHandEnchant then
    		self:Show()
    	else
    		self:Hide()
    	end
    	
    	self:RegisterEvent("UNIT_INVENTORY_CHANGED")
    end
    
    function MainWeapNote_OnEvent(self, event)
    	--if arg1 ~= "player" then 
    	--	return 
    	--end
    
    	if event == "UNIT_INVENTORY_CHANGED" then
    		local hasMainHandEnchant = GetWeaponEnchantInfo()
    
    		local mainHandLink = GetInventoryItemLink("player", GetInventorySlotInfo("MainHandSlot"))
    		
    		local hasFishingPole = mainHandLink and select(7, GetItemInfo(mainHandLink)) == "Fishing Poles"
    
    		if mainHandLink and not hasFishingPole and not hasMainHandEnchant then
    			self:Show()
    		else
    			self:Hide()
    		end
    
    		if hasFishingPole then
    			print("Your Fishing Pole Is Equipped")
    		end
    	end
    end
    
    function SecondaryWeapNote_OnEvent(self, event)
    	--if arg1 ~= "player" then 
    	--	return
    	--end
    	
    	if event == "UNIT_INVENTORY_CHANGED" then
    	
    		local hasSecondaryHandEnchant = GetWeaponEnchantInfo()
    
    		local secondaryHandLink = GetInventoryItemLink("player", GetInventorySlotInfo("SecondaryHandSlot"))
    	
    		if secondaryHandLink and not hasSecondaryHandEnchant then
    			self:Show()
    		else
    			self:Hide()
    		end
    	end
    end


    And this is my .xml

    <Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns="http://www.blizzard.com/wow/ui/">
    	<Script file="EasyControl.lua" />
    	<Frame name="MainWeapNote" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
    		<Size>
    			<AbsDimension x="510" y="20" />
    		</Size>
    		<Anchors>
    			<Anchor point="CENTER">
    				<Offset x="2" y="1" />
    			</Anchor>
    		</Anchors>
    		<TitleRegion setAllPoints="true">
    			<Size>
    				<AbsDimension x="2" y="1" />
    			</Size>
    			<Anchors>
    				<Anchor point="TOPLEFT" />
    				<Anchor point="TOPRIGHT" />
    			</Anchors>
    		</TitleRegion>
    		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
    			<BackgroundInsets>
    				<AbsInset left="2" right="1" top="2" bottom="2" />
    			</BackgroundInsets>
    			<TileSize>
    				<AbsValue val="2" />
    			</TileSize>
    			<EdgeSize>
    				<AbsValue val="1" />
    			</EdgeSize>
    			<Color r="2" g="0.4" b="0.1" />
    			<BorderColor r="1.5" g="0.2" b="0.4" />
    		</Backdrop>
    
    		<Layers>
    			<Layer level="OVERLAY">
    				<FontString name="NoPoisionsMain" inherits="GameFontNormal" text="Your current main hand weapon is not poison enchanted.">
    					<Size>
    						<AbsDimension x="600" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="CENTER">
    							<Offset x="0" y="0" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    			</Layer>
    		</Layers>
    
    		<Scripts>
    			<OnLoad>MainWeapNote_OnLoad(self);</OnLoad>
    			<OnEvent>MainWeapNote_OnEvent(self, event, ...);</OnEvent>
    			<OnDragStart>self:StartMoving();</OnDragStart>
    			<OnDragStop>self:StopMovingOrSizing();</OnDragStop>
    		</Scripts>
    	</Frame>
    
    	<Frame name="SecondaryWeapNote" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
    		<Size>
    			<AbsDimension x="510" y="20" />
    		</Size>
    		<Anchors>
    			<Anchor point="TOPLEFT">
    				<Offset x="1" y="2" />
    			</Anchor>
    		</Anchors>
    		<TitleRegion setAllPoints="true">
    			<Size>
    				<AbsDimension x="2" y="1" />
    			</Size>
    			<Anchors>
    				<Anchor point="TOPLEFT" />
    				<Anchor point="TOPRIGHT" />
    			</Anchors>
    		</TitleRegion>
    		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
    			<BackgroundInsets>
    				<AbsInset left="51" right="2" top="1" bottom="5" />
    			</BackgroundInsets>
    			<TileSize>
    				<AbsValue val="10" />
    			</TileSize>
    			<EdgeSize>
    				<AbsValue val="15" />
    			</EdgeSize>
    			<Color r="4" g="1.4" b="3.1" />
    			<BorderColor r="2.5" g="0.6" b="2.4" />
    		</Backdrop>
    
    		<Layers>
    			<Layer level="OVERLAY">
    				<FontString name="NoPoisionsOff" inherits="GameFontNormal" text="Your current off hand weapon is not poison enchanted.">
    					<Size>
    						<AbsDimension x="600" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="CENTER">
    							<Offset x="0" y="0" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    			</Layer>
    		</Layers>
    
    		<Scripts>
    			<OnLoad>SecondaryWeapNote_OnLoad(self);</OnLoad>
    			<OnEvent>SecondaryWeapNote_OnEvent(self, event, ...);</OnEvent>
    			<OnDragStart>self:StartMoving();</OnDragStart>
    			<OnDragStop>self:StopMovingOrSizing();</OnDragStop>
    		</Scripts>
    	</Frame>
    
    
    </Ui>
    Posted in: Lua Code Discussion
  • 0

    posted a message on A rogue 'beginner' AddOn
    Ok, i think i might have it. But when the AddOn is first activated, and your character is loaded into the world, the notification is automatically there, even if you have your poison's on, until you either, equip a fishing pole, or un-equip your dagger's and re-equip them.

    Also, how do you make Anchor Point's bigger? It is hard as hell to move this notification because its so hard to find it since its such a small point.

    /edit:

    Just noticed, that the off hand frame fire's when the main hand does, so if the poison is added, or taken from the main, but not the off hand weapon, the off hand weapon notification still fire's.

    If both hand slots are empty, there's no poison enchant on the weapon that goes in the secondary hand slot, and you equip the secondary dagger, the secondary notification fire's like it's supposed to, and the main hand doesn't... Like it's supposed to. But after that, if i still didn't enchant the secondary hand dagger, and equipped the main hand weapon that did have the poison enchant, the secondary hand notification would go away, is if the poison was applied to the secondary hand dagger.
    Posted in: Lua Code Discussion
  • 0

    posted a message on A rogue 'beginner' AddOn
    Ok, i fixed that problem, now it's just back to always showing.

    I'm stumped, i'm goona go look at some other AddOn's see if they can help me out with this.
    Posted in: Lua Code Discussion
  • 0

    posted a message on A rogue 'beginner' AddOn
    Would i have to do a

    <OnLoad>MainWeapNote(self)</OnLoad>

    In the .xml?


    edit:
    ^ That causes it to not show.
    Posted in: Lua Code Discussion
  • 0

    posted a message on A rogue 'beginner' AddOn
    -- Author      : wwwDot
    -- Create Date : 11/14/2010 5:05:10 PM
    
    function MainWeapNote(self)
    	self:RegisterEvent("UNIT_INVENTORY_CHANGED")
    end
    
    function SecondaryWeapNote(self)
    	self:RegisterEvent("UNIT_INVENTORY_CHANGED")
    end
    
    function MainWeapNote_OnEvent(self, event, arg1)
    	if arg1 ~= "player" then 
    		return 
    	end
    
    	if event == "UNIT_INVENTORY_CHANGED" then
    				--local hasMainHandEnchant, _, _, hasSecondaryHandEnchant = GetWeaponEnchantInfo()
    		local hasMainHandEnchant = GetWeaponEnchantInfo()
    
    		local mainHandLink = GetInventoryItemLink("player", GetInventorySlotInfo("MainHandSlot"))
    				--local secondaryHandLink = GetInventoryItemLink("player", GetInventorySlotInfo("MainHandSlot"))
    		local hasFishingPole = mainHandLink and select(7, GetItemInfo(mainHandLink)) == "Fishing Poles"
    
    		if mainHandLink and not hasFishingPole and not hasMainHandEnchant then
    				--or ( secondaryHandLink and not hasSecondaryHandEnchant )
    			self:Show()
    		else
    			self:Hide()
    		end
    	end
    end
    
    function SecondaryWeapNote_OnEvent(self, event, arg1)
    	if arg1 ~= "player" then 
    		return
    	end
    	
    	if event == "UNIT_INVENTORY_CHANGED" then
    	
    		local hasSecondaryHandEnchant = GetWeaponEnchantInfo()
    
    		local secondaryHandLink = GetInventoryItemLink("player", GetInventorySlotInfo("OffHandSlot"))
    	
    		if secondaryHandLink and not hasSecondaryHandEnchant then
    			self:Show()
    		else
    			self:Hide()
    		end
    	end
    end


    That's my .lua right now, i didn't make a frame for the offhand weapon yet, just wanted to try to get the main hand working.

    This is my .xml
    <Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns="http://www.blizzard.com/wow/ui/">
    	<Script file="EasyControl.lua" />
    	<Frame name="MainWeapNote" parent="UIParent" toplevel="true" movable="false" enableMouse="false">
    		<Size>
    			<AbsDimension x="510" y="20" />
    		</Size>
    		<Anchors>
    			<Anchor point="CENTER">
    				<Offset x="2" y="1" />
    			</Anchor>
    		</Anchors>
    		<TitleRegion setAllPoints="true">
    			<Size>
    				<AbsDimension x="2" y="1" />
    			</Size>
    			<Anchors>
    				<Anchor point="TOPLEFT" />
    				<Anchor point="TOPRIGHT" />
    			</Anchors>
    		</TitleRegion>
    		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" 
    
    tile="true">
    			<BackgroundInsets>
    				<AbsInset left="2" right="1" top="2" bottom="2" />
    			</BackgroundInsets>
    			<TileSize>
    				<AbsValue val="2" />
    			</TileSize>
    			<EdgeSize>
    				<AbsValue val="1" />
    			</EdgeSize>
    			<Color r="2" g="0.4" b="0.1" />
    			<BorderColor r="1.5" g="0.2" b="0.4" />
    		</Backdrop>
    
    		<Layers>
    			<Layer level="OVERLAY">
    				<FontString name="NoPoisions" inherits="GameFontNormal" text="You currently have one or more weapons 
    
    equipped without your poision enchant.">
    					<Size>
    						<AbsDimension x="600" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="CENTER">
    							<Offset x="0" y="0" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    			</Layer>
    		</Layers>
    
    		<Scripts>
    			<OnEvent>MainWeapNote_OnEvent(self, event, arg1)</OnEvent>
    		</Scripts>
    	</Frame>
    
    
    </Ui>


    The notification still is always there no matter the state.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.