Unofficial World of Warcraft Forums  
Please respect other members. Please do not post links or information about hacking/warez/cheats.
Read the rules of these forums as we rarely warn before banning. Lost or need RSS check the forum map.

Quick Site Nav
Navigation
Worldofwar.Net
WoW Forums
WoWDigger WoW Database
Articles
Community Blogs
WoW Info
Wrath of the Lich King Info
Primary Professions
Secondary Professions
Maps
Classes
PvP
A-Z Index
Guides
Submit Guides
List Guides
UI/Mods
Latest Mods
Submit Mod
List Macros
Submit Macro
Media Gallery
Gallery Home
Upload Pics
Community WoW Shots
Community BC Shots
Player Pics
Official WoW Shots
Official BC Shots


Donate and get extra forum perks
Support WoW:IncGamers

Go Back   Unofficial World of Warcraft Forums > WoW Community Forums > UI Customisation > UI/Mod Developer Forum

Reply
 
Thread Tools Display Modes
Old 07-06-2006, 12:07 AM   #1
silvanas
WorldofWar.Net Member
 
Join Date: Apr 2004
Posts: 2
not getting the event ?

i got this code

Code:
<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/ \FrameXML\UI.xsd">
	<Script file="BagSlotType.lua"/>
	<Frame name="BSTMainFrame">
		<Scripts>
			<OnLoad>
				BagSlotType_Load();
			</OnLoad>
			<OnEvent>
				BagSlotType_Event();
			</OnEvent>
		</Scripts>
	</Frame>
</Ui>
Code:
VERSION = "|cffffffffversion: (|cff9900000|cffffffff.|cff9900000|cffffffff.|cff990000-1|cffffffff)"

function BagSlotType_Load()
    printf("|cffffffffBag Slot Types %s loaded.",VERSION)
	
	--register events
	this:RegisterEvent("BAG_OPEN")
	this:RegisterEvent("BAG_CLOSED")
	this:RegisterEvent("BAG_UPDATE")
	this:RegisterEvent("BAG_UPDATE_COOLDOWN")
	this:RegisterEvent("ITEM_LOCK_CHANGED")
    this:RegisterEvent("ITEM_PUSH")
    --this:RegisterEvent("ITEM_")
end

function BagSlotType_Event()
	--select event
	message(VarPrint(event) .." ,".. VarPrint(arg1) .." ,".. VarPrint(arg2))
	if event == "BAG_OPEN" then
		--messagef("BagSlotTypes: u opent bag slot %d!",arg1)
  		bst_bag_open(arg1)
	elseif event == "BAG_CLOSED" then
		--messagef("BagSlotTypes: u closed bag slot %d!",arg1)
		bst_bag_close(arg1)
 	elseif event == "BAG_UPDATE" then
 		--messagef("BagSlotTypes: u updated bag slot %d!",arg1)
 		bst_bag_update(arg1)
	elseif event == "BAG_UPDATE_COOLDOWN" then
 		--messagef("BagSlotTypes: u updated bag slot %d cooldown!",arg1)
 		bst_bag_update_cd(arg1)
   	end
	
end

function bst_bag_open(bagnum) end
function bst_bag_close(bagnum) end
function bst_bag_update(bagnum) end
function bst_bag_update_cd(bagnum) end
function bst_lock_chanced() end
function bst_item_push(maxstacksize,iconpath) end

function VarPrint(variable)
	local vartype = type(variable)
	if vartype == "string" then
		return variable
	elseif vartype == "number" then
		return tostring(variable)
    elseif vartype == "boolean" then
    	if variable then
        	return "true"
		else
			return "false"
		end
	else
        return vartype
	end
end

function printf(...)
	print(string.format(unpack(arg)))
end

function print(msg)
	if msg then
		DEFAULT_CHAT_FRAME:AddMessage(msg)
	end
end
but ehne i open or close a bag i never get BAG-OPEn or BAG_CLOSE i only get BAD_CLOSe whne i wlak into an instance ???
silvanas is offline   Reply With Quote
Old 07-06-2006, 07:15 AM   #2
Necrophob
WorldofWar.Net Member
 
Join Date: Nov 2005
Location: United States, Texas
Posts: 2
*From www.wowwiki.com*
BAG_OPEN
"Fired when a bag (NOTE: This is NOT fired for player containers, it's for those bag-like objects that you can remove items from but not put items into) is opened. "
Necrophob is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 06:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Advertisement System V2.5 By   Branden