WoWInterface SVN SimpleAssist

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 1 to Rev 2
    Reverse comparison

Rev 1 → Rev 2

Readme.txt New file
0,0 → 1,142
SimpleAssist v2.6
 
 
Description
===========
 
SimpleAssist is a World of Warcraft AddOn.
Is is a replacement for the usual "/assist {name}" macro.
 
 
Install
=======
 
Extract the files into your World of Warcraft Interfaces/AddOns directory.
 
 
Features
========
* Compatibility with World of Warcraft v3.0
* Low memory usage (~0.1MB)
 
* Key bind to set the assist
* Key bind to execute the assist
* Key bind to request an assist
 
Usage
=====
Go to the Key Bindings panel from the Main Menu.
Set a key to remember who to assist.
Set one to assist that player.
Simple!
 
/sass to bring up more information.
 
Known Issues
============
 
* None
 
Versions
========
 
2.6 - Sep 27, 2008
* Minor changes to work with WoW client 3.0.
 
 
2.52 - Nov 13, 2007
* Updated TOC for patch 2.3. No other changes.
 
2.51 - Sep 25, 2007
* Updated TOC for patch 2.2. No other changes.
 
 
2.5 - July 11, 2007
* Removed code that attempted to respond to "assistme" emotes and other requests. This is no longer allowed in WoW client 2.x.
 
 
2.42 - May 22, 2007
* Updated TOC number for WoW client 2.1
* Updated version number
* No other changes
 
2.41 - Apr 30, 2007
* Discovered some unintentional dependencies. Hopefully these have ben fixed.
 
2.4 - Apr 13, 2007
* Updated version number
* Setting the assist during combat now presents a warning that the assist will not change until combat ends.
* Assist now changes - with messages - when leaving combat if you tried to change your assist during combat.
 
2.3 - Jan 12, 2007
* testing version for "focus" interface - not released
 
2.2 - Dec 26, 2006
* Updated for WoW 2.0 client.
* Because of in-combat restrictions, setting a new assist during combat will not work.
The next version will include a scheduler to allow you set a new assist and have it take effect
when you leave combat.
 
2.11 - Aug 22, 2006
* Updated TOC numbers for patch 1.12. No other changes.
 
2.1 - Aug 19, 2006
* Added optional support for SchnoggoAlert for the announcements
 
2.0 - July 10, 2006
* Broke out all the options into a separate panel in the information/options window. (/sass)
* Made the /attacktarget emote optional (and off by default)
 
1.10 - July 8, 2006
* Added option to customize the request message
 
1.9 - July 3, 2006
* Removed test to see if you are in a Raid when using Raid Icons. They work in regular parties now.
 
1.8 - July 1, 2006
* Added option to assign Raid Icons when requesting assistance on your target.
 
1.7 - May 28, 2006
* Updated for patch 1.11
* Added option to send request in Raid Warning channel.
* Took out the check to make sure your learned assist was another player. In the Battle of Darrowshire, for instance, you probably want to assist Captain Redpath.
 
1.6 - May 19, 2006
* Added ability to send a message in chat when requesting assistance.
* Added a preferences panel to select which channels to send message in.
 
 
1.5 - Apr 20, 2006
* Pulled out all strings for localization
 
1.4 - Mar 28, 2006
* Update for WoW version 1.10
 
1.3 - Mar 12, 2006
* Added a new keybind to request an assist (same as the /attacktarget emote)
* Added function to listen for the /attacktarget emote
 
 
1.2 - Mar 6, 2006
* Removed group to handle grouping events. The behaviors intended for this section
have been moved to the "Lookout" AddOn.
 
1.1 - Feb 4, 2006
* Removed some stray debugging code.
 
1.0 - Feb 4, 2006
* First version released
 
To-Do
======
* Next version will have an option to allow raid/group leaders set your Assist for you.
* Use addon channel to negotiate a Lookout Leader. The leader chooses which Raid Icon to use.
* Convert targeting of Players to Raid Icon
* Add AQ20 bug fight with ability to
 
Contact
=======
 
Author: Schnoggo (schnoggo@gmail.com)
Website: http://schnoggo.com
 
Property changes : Added: svn:executable + *
Bindings.xml New file
0,0 → 1,17
<Bindings>
 
<Binding name="SASS_LEARN" header="SASS_TITLE">
SimpleAssist_LearnAssist("target");
</Binding>
 
<Binding name="SASS_ASSIST">
SimpleAssist_DoAssist();
</Binding>
 
<Binding name="SASS_ASK" >
SimpleAssist_AskAssist();
</Binding>
 
 
 
</Bindings>
\ No newline at end of file Property changes : Added: svn:executable + *
SimpleAssist.xml New file
0,0 → 1,1391
<!-- SimpleAssist v2.5 -->
 
 
<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">
 
 
 
 
 
<Button name="SimpleAssistTabTemplate"
inherits="CharacterFrameTabButtonTemplate"
virtual="true"
>
<Scripts>
<OnClick>
PlaySound("igMainMenuOpen");
PanelTemplates_Tab_OnClick(self,SimpleAssistPrefsFrame);
SimpleAssist_ShowPanel(SimpleAssistPrefsFrame.selectedTab);
</OnClick>
</Scripts>
</Button>
 
 
<!-- InputBoxTemplate -->
<EditBox name="SimpleAssistInputBoxTemplate"
inherits="InputBoxTemplate"
virtual="true"
>
<Size>
<AbsDimension x="80" y="26"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTemplate"
>
<Offset>
<AbsDimension x="20" y="-20"/>
</Offset>
</Anchor>
</Anchors>
</EditBox>
 
 
 
<!-- Prefs page (tab) template -->
<Frame
name="SimpleAssistPrefsTemplate"
virtual="true"
parent="SimpleAssistPrefsFrame"
>
<Size><AbsDimension x="420" y="500"/></Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsFrame"
>
<Offset><AbsDimension x="20" y="-40"/></Offset>
</Anchor>
</Anchors>
</Frame>
 
 
 
<Frame
name="SimpleAssist"
>
<Size>
<AbsDimension x="520" y="350"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
 
<Scripts>
<OnLoad>
SimpleAssist_OnLoad();
</OnLoad>
<OnEvent>
SimpleAssist_Event(event)
</OnEvent>
</Scripts>
</Frame>
 
<MessageFrame
name="SimpleAssistAlertFrame"
insertMode="TOP"
parent="UIParent"
frameStrata="LOW"
toplevel="true"
>
 
<Size>
<AbsDimension x="520" y="60"/>
</Size>
 
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
 
<Scripts>
</Scripts>
 
<FontString inherits="NumberFontNormalHuge" justifyH="CENTER"/>
</MessageFrame>
 
 
 
 
<Frame name="SimpleAssistPrefsFrame"
frameStrata="DIALOG"
toplevel="true"
parent="UIParent"
movable="true"
hidden="true"
enableMouse="true"
>
<Size>
<AbsDimension x="450" y="550"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Backdrop
bgFile="Interface\DialogFrame\UI-DialogBox-Background"
edgeFile="Interface\DialogFrame\UI-DialogBox-Border"
tile="true"
>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<EdgeSize>
<AbsValue val="32"/>
</EdgeSize>
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11"/>
</BackgroundInsets>
</Backdrop>
 
<Layers>
<Layer level="ARTWORK">
<FontString
name="$parent_H1"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_TITLE"
>
<Anchors>
<Anchor
point="LEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsFrame"
>
<Offset>
<AbsDimension x="20" y="-22"/>
</Offset>
</Anchor>
</Anchors>
<Color r=".2" g="1" b=".2" a="1" />
</FontString>
 
</Layer>
</Layers>
 
<frames>
 
 
 
<Button
name="$parentButtonClose"
inherits="OptionsButtonTemplate"
text="SASSTEXT_BUTTON_CLOSE"
id="12" >
<Size>
<AbsDimension x="160" y="24"/>
</Size>
<Anchors>
<Anchor point="BOTTOMRIGHT" relativeTo="SimpleAssistPrefsFrame" >
<Offset>
<AbsDimension x="-12" y="16"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>SimpleAssistPrefsFrame:Hide();</OnClick>
</Scripts>
</Button>
 
<Button
name="SimpleAssistPrefsFrameTab1"
inherits="SimpleAssistTabTemplate"
id="1"
text="DESCRIPTION">
<Anchors>
<Anchor point="BOTTOMLEFT">
<Offset><AbsDimension x="11" y="-26"/></Offset>
</Anchor>
</Anchors>
</Button>
 
 
<Button
name="SimpleAssistPrefsFrameTab2"
inherits="SimpleAssistTabTemplate"
id="2"
text="OPTIONS">
<Anchors>
<Anchor
point="LEFT"
relativePoint="RIGHT"
relativeTo="SimpleAssistPrefsFrameTab1"
>
<Offset><AbsDimension x="-14" y="0"/></Offset>
</Anchor>
</Anchors>
</Button>
 
 
 
</frames>
<Scripts>
<OnLoad>
PanelTemplates_SetNumTabs(self,2);
SimpleAssistPrefsFrame.selectedTab=1;
PanelTemplates_UpdateTabs(self);
</OnLoad>
 
<OnMouseDown>self:StartMoving();</OnMouseDown>
<OnMouseUp>self:StopMovingOrSizing();</OnMouseUp>
<OnDragStop>self:StopMovingOrSizing();</OnDragStop>
<OnShow>SimpleAssistPrefsFrameOnShow();</OnShow>
</Scripts>
</Frame>
 
 
 
 
<!-- start of content frame -->
<frame
name="SimpleAssistDescriptionPanel"
inherits="SimpleAssistPrefsTemplate"
parent="SimpleAssistPrefsFrame"
 
>
 
<Layers>
<Layer level="ARTWORK">
 
 
<FontString
name="$parent_Text1"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_SUMMARY"
nonspacewrap="false"
maxLines="3"
>
<Size>
<AbsDimension x="400" y="110"/>
</Size>
 
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistDescriptionPanel"
>
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
 
 
<FontString
name="$parent_H2"
inherits="GameFontNormal"
justifyH="LEFT"
text="SASSTEXT_BINDING_SET_TITLE"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistDescriptionPanel"
>
<Offset>
<AbsDimension x="0" y="-70"/>
</Offset>
</Anchor>
</Anchors>
<Color r=".2" g="1" b="1" a="1" />
</FontString>
 
 
<FontString
name="$parent_Text2"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_BINDING_SET"
nonspacewrap="false"
>
<Size>
<AbsDimension x="400" y="99"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="$parent_H2"
>
<Offset>
<AbsDimension x="20" y="-14"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
 
<FontString
name="$parent_H3"
inherits="GameFontNormal"
justifyH="LEFT"
text="SASSTEXT_BINDING_ASSIST_TITLE"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="$parent_H2"
>
<Offset>
<AbsDimension x="0" y="-70"/>
</Offset>
</Anchor>
</Anchors>
<Color r=".2" g="1" b="1" a="1" />
</FontString>
 
 
<FontString
name="$parent_Text3"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_BINDING_ASSIST"
nonspacewrap="false"
>
<Size>
<AbsDimension x="400" y="99"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="$parent_H3"
>
<Offset>
<AbsDimension x="20" y="-14"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
<FontString
name="$parent_H4"
inherits="GameFontNormal"
justifyH="LEFT"
text="SASSTEXT_BINDING_REQ_TITLE"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="$parent_H3"
>
<Offset>
<AbsDimension x="0" y="-100"/>
</Offset>
</Anchor>
</Anchors>
<Color r=".2" g="1" b="1" a="1" />
</FontString>
 
 
<FontString
name="$parent_Text4"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_BINDING_REQ"
nonspacewrap="false"
>
<Size>
<AbsDimension x="400" y="99"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="$parent_H4"
>
<Offset>
<AbsDimension x="20" y="-14"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
 
 
</Layer>
</Layers>
 
 
<frames>
 
<!-- buttons go here -->
 
 
</frames>
</frame>
 
<!-- End of content frame-->
 
 
 
 
<!-- start of content frame -->
<frame
name="SimpleAssistOptionsPanel"
inherits="SimpleAssistPrefsTemplate"
parent="SimpleAssistPrefsFrame"
 
>
 
<Layers>
<Layer level="ARTWORK">
 
 
<FontString
name="SimpleAssistPrefsChatHead"
inherits="GameFontNormal"
justifyH="LEFT"
text="SASSTEXT_CHAT_HEAD"
>
<Size>
<AbsDimension x="440" y="80"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistOptionsPanel"
>
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Color r=".2" g="1" b="1" a="1" />
</FontString>
 
 
 
<FontString
name="SimpleAssistPrefsTextEMOTE"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_CHAT_EMOTE"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsChatHead"
>
<Offset>
<AbsDimension x="60" y="-70"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
<FontString
name="SimpleAssistPrefsTextSAY"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_CHAT_SAY"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsChatHead"
>
<Offset>
<AbsDimension x="60" y="-100"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
<FontString
name="SimpleAssistPrefsTextYELL"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_CHAT_YELL"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsChatHead"
>
<Offset>
<AbsDimension x="60" y="-130"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
<FontString
name="SimpleAssistPrefsTextRAID"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_CHAT_RAID"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsChatHead"
>
<Offset>
<AbsDimension x="240" y="-70"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
<FontString
name="SimpleAssistPrefsTextPARTY"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_CHAT_PARTY"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsChatHead"
>
<Offset>
<AbsDimension x="240" y="-100"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
<FontString
name="SimpleAssistPrefsTextRW"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_CHAT_RW"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsChatHead"
>
<Offset>
<AbsDimension x="240" y="-130"/>
</Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
<!-- custom message: -->
 
<FontString
name="SimpleAssistPrefsCustomChatHead"
inherits="GameFontNormal"
justifyH="LEFT"
text="SASSTEXT_CUSTOM_CALL_HEAD"
>
<Size>
<AbsDimension x="440" y="140"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsChatHead"
>
<Offset>
<AbsDimension x="0" y="-110"/>
</Offset>
</Anchor>
</Anchors>
<Color r=".2" g="1" b="1" a="1" />
</FontString>
 
<FontString
name="SimpleAssistPrefsCustomChatPlayer"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_CUSTOM_CALL_PLAYERNAME"
nonspacewrap="false"
>
<Size>
<AbsDimension x="240" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsCustomChatHead"
>
<Offset><AbsDimension x="88" y="-96"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
<FontString
name="SimpleAssistPrefsCustomChatTarget"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_CUSTOM_CALL_MOBNAME"
nonspacewrap="false"
>
<Size>
<AbsDimension x="300" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsCustomChatPlayer"
>
<Offset><AbsDimension x="168" y="0"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
 
<!-- raid targets: -->
 
<FontString
name="SimpleAssistPrefsRaidHead"
inherits="GameFontNormal"
justifyH="LEFT"
text="SASSTEXT_RTARGET_HEAD"
>
<Size>
<AbsDimension x="440" y="140"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsChatHead"
>
<Offset>
<AbsDimension x="0" y="-250"/>
</Offset>
</Anchor>
</Anchors>
<Color r=".2" g="1" b="1" a="1" />
</FontString>
 
 
 
<FontString
name="SimpleAssistPrefsTextRaid0"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_RTARGET0"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsRaidHead"
>
<Offset><AbsDimension x="60" y="-100"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
<FontString
name="SimpleAssistPrefsTextRaid1"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_RTARGET1"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid0"
>
<Offset><AbsDimension x="0" y="-20"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
<FontString
name="SimpleAssistPrefsTextRaid2"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_RTARGET2"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid1"
>
<Offset><AbsDimension x="0" y="-20"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
<FontString
name="SimpleAssistPrefsTextRaid3"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_RTARGET3"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid2"
>
<Offset><AbsDimension x="0" y="-20"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
 
 
 
 
 
 
 
 
<FontString
name="SimpleAssistPrefsTextRaid4"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_RTARGET4"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsRaidHead"
>
<Offset><AbsDimension x="240" y="-100"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
<FontString
name="SimpleAssistPrefsTextRaid5"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_RTARGET5"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid4"
>
<Offset><AbsDimension x="0" y="-20"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
<FontString
name="SimpleAssistPrefsTextRaid6"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_RTARGET6"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid5"
>
<Offset><AbsDimension x="0" y="-20"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
<FontString
name="SimpleAssistPrefsTextRaid7"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_RTARGET7"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid6"
>
<Offset><AbsDimension x="0" y="-20"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
<FontString
name="SimpleAssistPrefsTextRaid8"
inherits="GameFontNormal"
justifyV="TOP"
justifyH="LEFT"
text="SASSTEXT_RTARGET8"
nonspacewrap="false"
>
<Size>
<AbsDimension x="200" y="40"/>
</Size>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid7"
>
<Offset><AbsDimension x="0" y="-20"/></Offset>
</Anchor>
</Anchors>
<Color r="1" g="1" b="1" a="1" /> <!-- White Color -->
</FontString>
 
 
 
 
 
</Layer>
</Layers>
 
 
<frames>
 
 
<CheckButton
name="SimpleAssistPrefsEMOTE"
inherits="UICheckButtonTemplate"
id="01"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextEMOTE"
>
<Offset><AbsDimension x="-30" y="10"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>SimpleAssist_Options_OnClick(); </OnClick>
</Scripts>
</CheckButton>
 
 
<CheckButton
name="SimpleAssistPrefsSAY"
inherits="UICheckButtonTemplate"
id="01"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextSAY"
>
<Offset><AbsDimension x="-30" y="10"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>SimpleAssist_Options_OnClick(); </OnClick>
</Scripts>
</CheckButton>
 
<CheckButton
name="SimpleAssistPrefsYELL"
inherits="UICheckButtonTemplate"
id="01"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextYELL"
>
<Offset><AbsDimension x="-30" y="10"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>SimpleAssist_Options_OnClick(); </OnClick>
</Scripts>
</CheckButton>
 
<CheckButton
name="SimpleAssistPrefsRAID"
inherits="UICheckButtonTemplate"
id="01"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRAID"
>
<Offset><AbsDimension x="-30" y="10"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>SimpleAssist_Options_OnClick(); </OnClick>
</Scripts>
</CheckButton>
 
<CheckButton
name="SimpleAssistPrefsPARTY"
inherits="UICheckButtonTemplate"
id="01"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextPARTY"
>
<Offset><AbsDimension x="-30" y="10"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>SimpleAssist_Options_OnClick(); </OnClick>
</Scripts>
</CheckButton>
 
<CheckButton
name="SimpleAssistPrefsRW"
inherits="UICheckButtonTemplate"
id="01"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRW"
>
<Offset><AbsDimension x="-30" y="10"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>SimpleAssist_Options_OnClick(); </OnClick>
</Scripts>
</CheckButton>
 
 
 
 
 
 
<EditBox name="SimpleAssistChatText1"
inherits="SimpleAssistInputBoxTemplate"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsCustomChatHead"
>
<Offset>
<AbsDimension x="0" y="-90"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>SimpleAssist_GetPrefsText(); </OnTextChanged>
</Scripts>
</EditBox>
 
 
<EditBox name="SimpleAssistChatText2"
inherits="SimpleAssistInputBoxTemplate"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistChatText1"
>
<Offset>
<AbsDimension x="170" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>SimpleAssist_GetPrefsText(); </OnTextChanged>
</Scripts>
</EditBox>
 
 
<EditBox name="SimpleAssistChatText3"
inherits="SimpleAssistInputBoxTemplate"
>
<Anchors>
<Anchor
point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistChatText2"
>
<Offset>
<AbsDimension x="170" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>SimpleAssist_GetPrefsText(); </OnTextChanged>
</Scripts>
</EditBox>
 
 
 
 
 
<CheckButton
name="SimpleAssist_RB0"
inherits="SendMailRadioButtonTemplate"
>
<Anchors>
<Anchor point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid0"
>
<Offset><AbsDimension x="-20" y="2"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnClick>SimpleAssist_Radio_OnClick(0);
</OnClick>
</Scripts>
</CheckButton>
 
 
<CheckButton
name="SimpleAssist_RB1"
inherits="SendMailRadioButtonTemplate"
>
<Anchors>
<Anchor point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid1"
>
<Offset><AbsDimension x="-20" y="2"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnClick>SimpleAssist_Radio_OnClick(1);
</OnClick>
</Scripts>
</CheckButton>
 
 
<CheckButton
name="SimpleAssist_RB2"
inherits="SendMailRadioButtonTemplate"
>
<Anchors>
<Anchor point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid2"
>
<Offset><AbsDimension x="-20" y="2"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnClick>SimpleAssist_Radio_OnClick(2);
</OnClick>
</Scripts>
</CheckButton>
 
 
<CheckButton
name="SimpleAssist_RB3"
inherits="SendMailRadioButtonTemplate"
>
<Anchors>
<Anchor point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid3"
>
<Offset><AbsDimension x="-20" y="2"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnClick>SimpleAssist_Radio_OnClick(3);
</OnClick>
</Scripts>
</CheckButton>
 
 
 
<CheckButton
name="SimpleAssist_RB4"
inherits="SendMailRadioButtonTemplate"
>
<Anchors>
<Anchor point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid4"
>
<Offset><AbsDimension x="-20" y="2"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnClick>SimpleAssist_Radio_OnClick(4);
</OnClick>
</Scripts>
</CheckButton>
 
<CheckButton
name="SimpleAssist_RB5"
inherits="SendMailRadioButtonTemplate"
>
<Anchors>
<Anchor point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid5"
>
<Offset><AbsDimension x="-20" y="2"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnClick>SimpleAssist_Radio_OnClick(5);
</OnClick>
</Scripts>
</CheckButton>
 
<CheckButton
name="SimpleAssist_RB6"
inherits="SendMailRadioButtonTemplate"
>
<Anchors>
<Anchor point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid6"
>
<Offset><AbsDimension x="-20" y="2"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnClick>SimpleAssist_Radio_OnClick(6);
</OnClick>
</Scripts>
</CheckButton>
 
 
<CheckButton
name="SimpleAssist_RB7"
inherits="SendMailRadioButtonTemplate"
>
<Anchors>
<Anchor point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid7"
>
<Offset><AbsDimension x="-20" y="2"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnClick>SimpleAssist_Radio_OnClick(7);
</OnClick>
</Scripts>
</CheckButton>
 
<CheckButton
name="SimpleAssist_RB8"
inherits="SendMailRadioButtonTemplate"
>
<Anchors>
<Anchor point="TOPLEFT"
relativePoint="TOPLEFT"
relativeTo="SimpleAssistPrefsTextRaid8"
>
<Offset><AbsDimension x="-20" y="2"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
</OnLoad>
<OnClick>SimpleAssist_Radio_OnClick(8);
</OnClick>
</Scripts>
</CheckButton>
 
 
 
 
 
 
 
 
 
 
</frames>
 
 
 
</frame>
 
<!-- End of content frame-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
</Ui>
Property changes : Added: svn:executable + *
SimpleAssist.lua New file
0,0 → 1,528
-- Globals:
-- ========
-- SimpleAssist_SavedVars = {};
SimpleAssist_variablesLoaded = false;
-- SimpleAssist_units={};
SimpleAssist_PendingLearn=nil;
SimpleAssistPrefs_PanelFrames =
{
"SimpleAssistDescriptionPanel",
"SimpleAssistOptionsPanel"
};
 
-- Locals:
-- =======
 
local MYADDON_NAME = "SimpleAssist";
local MYADDON_VERSION = "2.6";
local MYADDON_AUTHOR = "Schnoggo";
local MYADDON_EMAIL = "schnoggo@gmail.com";
local MYADDON_WEBSITE = "http://schnoggo.com";
 
local myPlayerRealm=GetCVar("realmName");
local myPlayerName=UnitName("player");
local myPlayerClassText, myPlayerClassType = UnitClass("player");
 
-- default config settings
 
 
local SimpleAssistDefaults={SimpleAssistPrefsRAID=false,
SimpleAssistPrefsSAY = false,
SimpleAssistPrefsYELL = false,
SimpleAssistPrefsPARTY = false
};
SimpleAssistDefaults["CustomChat"]={};
SimpleAssistDefaults["CustomChat"][1]="Help";
SimpleAssistDefaults["CustomChat"][2]="in attacking";
SimpleAssistDefaults["CustomChat"][3]=".";
SimpleAssistDefaults["version"]=2;
 
-- My local functions:
-- ====================
 
 
 
 
 
 
 
-- Event functions
-- Onload:
function SimpleAssist_OnLoad()
-- this:RegisterEvent("ADDON_LOADED");
 
-- Register the slash command
-- --------------------------
SLASH_SIMPLEASSIST1 = "/sass";
SlashCmdList["SIMPLEASSIST"] = SimpleAssist_CommandLine;
 
--[[this is code]]--
 
 
 
 
-- Register the event handlers:
-- =============================
 
this:RegisterEvent("VARIABLES_LOADED");
-- this:RegisterEvent("CHAT_MSG_TEXT_EMOTE");
this:RegisterEvent("PLAYER_ENTERING_WORLD");
this:RegisterEvent("UPDATE_BINDINGS");
this:RegisterEvent("PLAYER_LEAVE_COMBAT");
this:RegisterEvent("PLAYER_REGEN_ENABLED");
 
if (not myPlayerName) then
myPlayerName = UnitName("player");
end
 
DEFAULT_CHAT_FRAME:AddMessage(SASSTEXT.WELCOME, 0.5, 1.0, 0.5, 1);
 
 
end -- OnLoad
 
 
 
 
 
 
function SimpleAssist_Event(event)
local eventHandled = false;
local inParty, unitID;
 
-- VARIABLES_LOADED
-- ================
 
if ( event == "VARIABLES_LOADED" ) then
-- record that we have been loaded:
SimpleAssist_variablesLoaded = true;
 
 
if not (SimpleAssistSavedVars) then
SimpleAssistSavedVars={
SimpleAssistPrefsRAID=false,
SimpleAssistPrefsSAY = false,
SimpleAssistPrefsYELL = false,
SimpleAssistPrefsPARTY = false,
SimpleAssistRaidIcon=0};
SimpleAssistSavedVars["CustomChat"]={};
SimpleAssistSavedVars["CustomChat"][1]=SASSTEXT_CUSTOM_CALL_BEFORE;
SimpleAssistSavedVars["CustomChat"][2]=SASSTEXT_CUSTOM_CALL_MIDDLE;
SimpleAssistSavedVars["CustomChat"][3]=SASSTEXT_CUSTOM_CALL_AFTER;
end
 
 
if (SimpleAssistSavedVars["version"] == nil) then
SimpleAssistSavedVars["version"]=2;
SimpleAssistSavedVars["CustomChat"]={};
SimpleAssistSavedVars["CustomChat"][1]=SASSTEXT_CUSTOM_CALL_BEFORE;
SimpleAssistSavedVars["CustomChat"][2]=SASSTEXT_CUSTOM_CALL_MIDDLE;
SimpleAssistSavedVars["CustomChat"][3]=SASSTEXT_CUSTOM_CALL_AFTER;
else
 
end
 
eventHandled = true;
end -- ( event == "VARIABLES_LOADED" )
 
 
 
--[[
if (eventHandled == false and event == "CHAT_MSG_TEXT_EMOTE") then
if ( arg1 ~= nil) then
msgText = string.lower(arg1);
if (string.find( msgText, SASSTEXT_ATTACK_EMOTE) ) then
if (arg2 ~= nil) then
-- if (UnitIsPlayer(arg2)) then
inParty, unitID=SimpleAssist_PlayerInParty(arg2)
if (inParty) then -- setup pref to toggle party behavior
-- SimpleAssist_units["assist1"]=UnitName(unit);
AssistUnit(arg2);
SimpleAssist_PopMsg(SASSTEXT.ASSISTING .. " " .. arg2);
end -- party member
 
 
end -- speaker is not nil
end -- message asks to attack
end -- msg not nil
end -- is in chat msg
]]--
if (eventHandled == false and event == "PLAYER_ENTERING_WORLD") then
-- "frameType", "frameName", parentFrame[, "inheritsFrame"]);
-- local f = CreateFrame("Button", "SimpleAssistActionFrame", nil, "SecureActionButtonTemplate");
local f = CreateFrame("CheckButton", "SimpleAssistActionButton", UIParent, "ActionBarButtonTemplate");
 
f:SetAttribute("type", "macro");
f:SetAttribute("width", "30");
f:SetAttribute("height", "30");
f:SetAttribute("macrotext", "/assist target");
f:ClearAllPoints();
f:SetPoint("TOPLEFT", "UIParent", "TOPLEFT", -100, -100); -- (point, frame, relativePoint , x, y);
-- putting the button off-screen to make it invisible
-- f:SetPoint("BOTTOMRIGHT", "UIParent", "TOPLEFT", 2, -2); -- (point, frame, relativePoint , x, y);
 
 
SimpleAssist_UpdateBindings();
eventHandled = true;
 
end -- PLAYER_ENTERING_WORLD
 
if (eventHandled == false and event == "UPDATE_BINDINGS") then
SimpleAssist_UpdateBindings();
eventHandled = true;
end
 
 
if (eventHandled == false and ((event == "PLAYER_LEAVE_COMBAT") or (event == "PLAYER_REGEN_ENABLED"))) then
if (SimpleAssist_PendingLearn ~= nil) then
-- SimpleAssist_PrivateLearnAssist(SimpleAssist_PendingLearn);
-- replace with code that uses player name instead of unitID
 
if (SimpleAssist_PendingLearn == "pending clear") then
getglobal("SimpleAssistActionButton"):SetAttribute("macrotext", "/assist target");
SimpleAssist_PopMsg(SASSTEXT.CLEARED);
else
-- expand the macro code here
getglobal("SimpleAssistActionButton"):SetAttribute("macrotext", "/assist "..SimpleAssist_PendingLearn);
SimpleAssist_PopMsg(SASSTEXT.ASSIST_SET ..": " .. SimpleAssist_PendingLearn);
end
SimpleAssist_PendingLearn = nil;
end
eventHandled = true;
end -- event handled?
 
 
 
 
 
if (eventHandled == false) then
-- msgText = string.lower(arg1);
end
 
 
 
 
 
 
end -- end of function
 
 
 
 
function SimpleAssist_UpdateBindings()
if getglobal("SimpleAssistActionButton") then
local k1, k2, k3 = GetBindingKey("SASS_ASSIST");
if (k1) then -- SetOverrideBindingClick(owner, isPriority, "KEY", "ButtoName"[,"mouseButton"]);
-- DEFAULT_CHAT_FRAME:AddMessage("SASS key="..k1, 0.5, 1.0, 0.5, 1);
SetOverrideBindingClick(getglobal("SimpleAssistActionButton"),nil,k1,"SimpleAssistActionButton");
end
end -- button instantiated
end
 
function SimpleAssistTester()
SimpleAssist_PopMsg("Yadda");
 
end
 
-- command line parameters: (slash command handler)
function SimpleAssist_CommandLine(msg)
cmd=string.lower(msg);
 
if ( ( msg=="1") or (msg=="")) then
SimpleAssistPrefsFrame:Show();
end
 
if ( msg =="0") then
SimpleAssistPrefsFrame:Hide();
end
 
 
end
 
 
 
 
-- GUI Handlers:
-- =============================
 
 
-- prefs:
function SimpleAssist_Options_OnClick(arg1)
id = this:GetID()
local buttonName=this:GetName()
SimpleAssistDefaults[buttonName] =getglobal(buttonName):GetChecked();
SimpleAssistSavedVars[buttonName] =getglobal(buttonName):GetChecked();
end
 
 
function SimpleAssist_Radio_OnClick(arg1)
SimpleAssistSavedVars["SimpleAssistRaidIcon"]=arg1;
SimpleAssistUpdateRadios();
end
 
 
-- OnShow
function SimpleAssistPrefsFrameOnShow()
 
 
-- draw the current settings:
table.foreach(SimpleAssistSavedVars,
function(k,v)
if (getglobal(k) ~= nil) then
if string.find("Text",k) then
 
else
getglobal(k):SetChecked(v);
end
 
end
end
 
);
-- fill in the text for the custom chat message:
for i = 1,3 do
local tMsgName="SimpleAssistChatText"..i;
local tMsgText= SimpleAssistSavedVars["CustomChat"][i];
if (tMsgText ~= nil) then
getglobal(tMsgName):SetText(tMsgText);
end
end
 
-- draw the radio buttons for Icon
if (SimpleAssistSavedVars["SimpleAssistRaidIcon"] == nil) then
SimpleAssistSavedVars["SimpleAssistRaidIcon"] = 0;
end
 
SimpleAssistUpdateRadios();
 
-- update tabs:
if (SimpleAssistPrefs_CurrentPanel==nil) then
SimpleAssistPrefs_CurrentPanel=-1;
end
local tPanel = SimpleAssistPrefs_CurrentPanel;
SimpleAssistPrefs_CurrentPanel=-1;
SimpleAssist_HidePanel(2);
SimpleAssist_HidePanel(1);
 
if (tPanel<1) then
tPanel=1
end
SimpleAssist_ShowPanel(tPanel);
 
 
 
end
 
 
 
function SimpleAssistUpdateRadios()
i=0;
while (i<9) do
if (i==SimpleAssistSavedVars["SimpleAssistRaidIcon"]) then
getglobal("SimpleAssist_RB"..i):SetChecked(true);
else
getglobal("SimpleAssist_RB"..i):SetChecked(false);
end
i=i+1;
end
end
 
 
 
 
 
function SimpleAssist_ShowPanel(whichPanel)
 
if (SimpleAssistPrefs_CurrentPanel > 0) then
SimpleAssist_HidePanel(SimpleAssistPrefs_CurrentPanel);
end
 
 
getglobal(SimpleAssistPrefs_PanelFrames[whichPanel]):Show();
SimpleAssistPrefs_CurrentPanel=whichPanel;
end
 
 
function SimpleAssist_HidePanel(whichPanel)
getglobal(SimpleAssistPrefs_PanelFrames[whichPanel]):Hide();
SimpleAssistPrefs_CurrentPanel = 0;
end
 
 
 
function SimpleAssist_GetPrefsText()
 
SimpleAssistSavedVars["CustomChat"]={};
for i = 1,3 do
local tMsgName="SimpleAssistChatText"..i;
local tMsgText=getglobal(tMsgName):GetText();
if (tMsgText ~= nil) then
SimpleAssistSavedVars["CustomChat"][i]=tMsgText;
end
end
end
 
 
 
 
 
 
-- In Game Functions:
 
function SimpleAssist_LearnAssist(unit)
-- {unit} = ID of unit to be set as assist (from Target)
 
if (InCombatLockdown()) then
local thisUnitName=UnitName(unit);
if (thisUnitName==nil) then
SimpleAssist_PendingLearn="pending clear"; -- use a name with a space and no upper-case
SimpleAssist_PopMsg(SASSTEXT.CLEAR_PENDING);
else
SimpleAssist_PendingLearn=thisUnitName;
SimpleAssist_PopMsg(SASSTEXT.ASSIST_PENDING .. thisUnitName);
end
else
SimpleAssist_PrivateLearnAssist(unit);
end
 
end -- function
 
 
function SimpleAssist_PrivateLearnAssist(unit)
if (UnitName(unit) == nil) then
-- SimpleAssist_units["assist1"]=nil;
getglobal("SimpleAssistActionButton"):SetAttribute("macrotext", "/assist target");
SimpleAssist_PopMsg(SASSTEXT.CLEARED);
end
 
if (UnitIsPlayer(unit)) then
if (UnitIsFriend("target", unit)) then -- unit could technically be "target" here... (changed from player to target for Battle of Darrowshire and similar events
-- SimpleAssist_units["assist1"]=UnitName(unit);
local thisUnitName=UnitName(unit);
-- expand the macro code here
-- /assist [target=focus, exists]
-- check for modifier to use
-- /use [nomodifier, nomounted]Snowy Gryphon;
-- /use [modifier:alt]Palomino Bridle;
getglobal("SimpleAssistActionButton"):SetAttribute("macrotext", "/assist "..thisUnitName);
SimpleAssist_PopMsg(SASSTEXT.ASSIST_SET ..": " .. thisUnitName);
end -- friend
end -- player
end
 
 
 
function SimpleAssist_AskAssist()
local partyCount = GetNumPartyMembers();
local raidCount = GetNumRaidMembers();
local uName=UnitName("target");
if (uName ~= nil) then
-- local msg = SASSTEXT.CHAT_ASSIST;
-- string.gsub(s, pattern, replace [, n])
-- msg=string.gsub(msg, "{name}", myPlayerName );
-- msg=string.gsub(msg, "{target}", uName );
local p1=SimpleAssistSavedVars["CustomChat"][1];
local p2=SimpleAssistSavedVars["CustomChat"][2];
local p3=SimpleAssistSavedVars["CustomChat"][3];
if (p1 ~= "") then
p1=p1.." ";
end
-- if (p2 ~= "") then
-- p2=" "..p2.." ";
-- end
-- if (p3 ~= "") then
-- p3=" "..p3;
-- end
 
local msg = p1 .. myPlayerName .. p2 .. uName .. p3;
if ((SimpleAssistSavedVars["SimpleAssistPrefsRAID"]) and (raidCount > 0)) then
SendChatMessage(msg, "RAID");
 
else -- only show party if not in raid
if ((SimpleAssistSavedVars["SimpleAssistPrefsPARTY"]) and (partyCount > 0)) then
SendChatMessage(msg, "PARTY");
end
end
if (SimpleAssistSavedVars["SimpleAssistPrefsYELL"]) then
SendChatMessage(msg, "YELL");
end
if (SimpleAssistSavedVars["SimpleAssistPrefsSAY"]) then
SendChatMessage(msg, "SAY");
end
 
if (SimpleAssistSavedVars["SimpleAssistPrefsRW"]) then
SendChatMessage(msg, "RAID_WARNING");
end
end
-- if (GetNumRaidMembers()>0) then
if (SimpleAssistSavedVars["SimpleAssistRaidIcon"] ~= 0) then
SetRaidTarget("target",SimpleAssistSavedVars["SimpleAssistRaidIcon"]);
end
-- end
if (SimpleAssistSavedVars["SimpleAssistPrefsEMOTE"]) then
DoEmote("ATTACKMYTARGET");
end
 
 
end
 
 
 
 
function SimpleAssist_PopMsg(msg)
-- Our head's up display for this AddOn
-- Inputs: {msg} = message to display in the HUD
if (msg == nil) then
msg="Oh Baby!";
end
if (SchnoggoAlertInform) then
SchnoggoAlertInform(msg);
else
SimpleAssistAlertFrame:AddMessage(msg, 1, 1, 1, 1, 3);
end
end
 
function SimpleAssist_DoAssist()
-- this function is now a dummy. It exists only so that a keybinding can be set.
 
end
 
 
 
 
function SimpleAssist_PlayerInParty(name)
-- Determine if {name} is in our party or raid
-- Inputs: {name} = a player name [string]
--
-- Outputs: {arg1} = whether {name} is in our group/raid [boolean]
-- {arg2} = unitID of {name}
 
local partyCount = GetNumPartyMembers();
local raidCount = GetNumRaidMembers();
local inRaid=false;
local raidID=nil;
if true and raidCount > 0 then
-- see if in raid
for i=1, raidCount do
local raidName, rank, subgroup, level, class, fileName, zone, online = GetRaidRosterInfo(i);
if (raidName ~= nil) then
if (raidName == name) then
inRaid=true;
raidID="raid"..i;
break;
end
end
end
 
elseif (partyCount > 0) then
-- see if in party
for i=1, partyCount do
if UnitName("party"..i) == name then
inRaid=true;
break;
end
end
end
return inRaid, raidID;
end
 
 
Property changes : Added: svn:executable + *
SimpleAssist.toc New file
0,0 → 1,10
## Interface: 30000
## Title: SimpleAssist
## Notes: Replace the common /assist macro
## Version: 2.52
## Author: Schnoggo
## Dependencies:
## SavedVariables: SimpleAssistSavedVars
localization.lua
SimpleAssist.lua
SimpleAssist.xml
Property changes : Added: svn:executable + *
localization.lua New file
0,0 → 1,60
SASSTEXT_TITLE="Schnoggo's Simple Assist Ver. 2.6";
SASSTEXT_OPTIONSPACING=-60; -- vertical distance between each TITLE below:
SASSTEXT_SUMMARY="Use the Key Bindings (Main Menu:Key Binding) panel to set up your keys.";
SASSTEXT_BINDING_SET_TITLE="Set Player to Assist";
SASSTEXT_BINDING_SET="Target the player you wish to assist in battle by clicking them or their portrait. Then hit the key you've bound to this function to ''remember'' who to assist.";
SASSTEXT_BINDING_ASSIST_TITLE="Assist Learned Player";
SASSTEXT_BINDING_ASSIST="Hitting this key will select the target of (''assist'') the player you selected with the ''Set Player to Assist.'' If no player is learned, this will assist your current target. Because of the default behavior, it is safe to bind this to your regular Assist key (F).";
SASSTEXT_BINDING_REQ_TITLE="Request Assistance";
SASSTEXT_BINDING_REQ="This key will send a request for others to attack your current target. Addons cannot automatically change targets, so this feature is informational only. Click the OPTIONS tab below to enable additional features.";
 
 
SASSTEXT_BUTTON_CLOSE="Close";
 
SASSTEXT_CHAT_HEAD="You may optionally send a message in chat when requesting assistance. Select which chat channels below:";
SASSTEXT_CHAT_EMOTE="Emote";
SASSTEXT_CHAT_YELL="Yell";
SASSTEXT_CHAT_RAID="Raid";
SASSTEXT_CHAT_PARTY="Party";
SASSTEXT_CHAT_SAY="Say";
SASSTEXT_CHAT_RW="RaidWarning";
 
 
SASSTEXT_CUSTOM_CALL_HEAD="You can customize the message sent in chat when requesting assistance:";
SASSTEXT_CUSTOM_CALL_BEFORE="Help ";
SASSTEXT_CUSTOM_CALL_PLAYERNAME=UnitName("player");
SASSTEXT_CUSTOM_CALL_MIDDLE=" in attacking ";
SASSTEXT_CUSTOM_CALL_MOBNAME="[Target]";
SASSTEXT_CUSTOM_CALL_AFTER=".";
 
 
 
SASSTEXT_RTARGET_HEAD="You can assign a ''Raid Target Icon'' to your current target when requesting assistance. You can select which icon:";
SASSTEXT_RTARGET0="No Icon";
SASSTEXT_RTARGET1="Star";
SASSTEXT_RTARGET2="Circle";
SASSTEXT_RTARGET3="Diamond";
SASSTEXT_RTARGET4="Triangle";
SASSTEXT_RTARGET5="Crescent";
SASSTEXT_RTARGET6="Square";
SASSTEXT_RTARGET7="X";
SASSTEXT_RTARGET8="Skull";
 
 
 
BINDING_HEADER_SASS_TITLE = "Schnoggo's Simple Assist";
BINDING_NAME_SASS_LEARN = "Set Player to Assist";
BINDING_NAME_SASS_ASSIST = "Assist Learned Player";
BINDING_NAME_SASS_ASK = "Request Assistance";
 
SASSTEXT = {
WELCOME="SimpleAssist 2.6 Loaded. Type /sass to change settings.",
ASSISTING="Assisting",
CLEARED="Assist Cleared",
ASSIST_SET="Assist set",
ASSIST_PENDING="Assist will change when you leave combat. \nQueuing:",
CLEAR_PENDING="Assist will be cleared when you leave combat. ",
CHAT_ASSIST="Assist {name} in attacking {target}."
};
 
SASSTEXT_ATTACK_EMOTE="to attack";
\ No newline at end of file Property changes : Added: svn:executable + *