PDA

View Full Version : help with my first addon please!


promithius
13-05-2006, 10:38 PM
Hi guys, having never written an addon in my life i figured here would be a good place to ask =P Does anyone have any good links to some newbie guides?

The add-on i want to write would be one that can auto-call a mini pet (non-combat). i know there used to be one, but since you cant link to movment keys nymore it dosent work. i propose using the PLAYER_TARGET_CHANGED command. Also, how do i link to an inventory slot? (say you have your pet in slot 1 of your generic bag) and how would i make the add-on check if the pet was already out? im guessing some form of IF command such as (s'cuse the psuedo code, i dont know the commands)

IF
pet out = true
THEN
do nothing
ELSE
call slot 1 bag 1
END

good idea? the addon dosent need a UI if i do it this way, just some simple code. heres my psuedo code for the whole thing:

ON
player_change_target
THEN CHECK
pet out = true
THEN
do nothing
ELSE
call slot 1 bag 1
END

help with the code? i can work out how to actually compile the mod myself =D found a site explaining that. also, would i need to use a .toc at all?

Sorry for my post being all over the place! having to write this quick!
(yes, im the same person from thr WoW official forums! copy n pasted the post i made there)
All help appreciated!

promithius
14-05-2006, 03:42 PM
the old addon is minipetleash, was on curse gaming but it has gone. i cant find it anywhere, if anyone has it, please PM me