Code: Select all
| Buffspam 1.0 by Slice
|
| Setup instructions:
| 1) Search and Replace "buffchannel" for whatever your buffchannel is.
| 2) Search and Replace "mypriv" for whatever your private channel will be for control of this script.
|
| There are four commands: spam, write, add, help
|
| Spam - Sends the current list to the buff channel
|
| Write - Performs a manual write of the bufflist in memory to the INI file
|
| Add - The format of the add command is add <buffvariable> <Playername>
| i.e. - add gsymbol fred
| This will add that person to the list in memory and also call the write to ini sub.
|
| Help - Will list all the variables on the bufflist.
|
|
|
#turbo
#define INIFile "c:\macroquest\release\macros\buffs.ini"
#event Privatechat "You tell mypriv"
sub Main
/zapvars
/declare Bufflist array2
/declare Buffcount global
/declare Chatchannel global
/declare gsymbol global
/declare gbot9 global
/declare gfos global
/declare gsta global
/declare gsot global
/declare gsop global
/declare greplen global
/declare gsv global
/declare gsd global
/declare gdmf global
/declare gvoq global
/declare gvq global
/declare ggod global
/declare gbss global
/declare gtot global
/declare gpos global
/declare gmor global
/declare ssymbol global
/declare spot9 global
/declare sfos global
/declare sfa global
/declare ssov global
/declare sdmf global
/declare sfon global
/declare scotr global
/declare srods global
/declare scoh global
/declare sdoh global
/declare sbor global
/declare svirtue global
/declare swog global
/declare ssta global
/declare crnr global
/declare drnr global
/declare ernr global
/varset Bufflist(1,0) gsymbol
/varset Bufflist(1,1) gbot9
/varset Bufflist(1,2) gfos
/varset Bufflist(1,3) gsta
/varset Bufflist(1,4) gsot
/varset Bufflist(1,5) gsop
/varset Bufflist(1,6) greplen
/varset Bufflist(1,7) gsv
/varset Bufflist(1,8) gsd
/varset Bufflist(1,9) gdmf
/varset Bufflist(1,10) gvoq
/varset Bufflist(1,11) gvq
/varset Bufflist(1,12) ggod
/varset Bufflist(1,13) gbss
/varset Bufflist(1,14) gtot
/varset Bufflist(1,15) gpos
/varset Bufflist(1,16) gmor
/varset Bufflist(1,17) ssymbol
/varset Bufflist(1,18) spot9
/varset Bufflist(1,19) sfos
/varset Bufflist(1,20) sfa
/varset Bufflist(1,21) ssov
/varset Bufflist(1,22) sdmf
/varset Bufflist(1,23) sfon
/varset Bufflist(1,24) scotr
/varset Bufflist(1,25) srods
/varset Bufflist(1,26) scoh
/varset Bufflist(1,27) sdoh
/varset Bufflist(1,28) sbor
/varset Bufflist(1,29) svirtue
/varset Bufflist(1,30) swog
/varset Bufflist(1,31) ssta
/varset Bufflist(1,32) crnr
/varset Bufflist(1,33) drnr
/varset Bufflist(1,34) ernr
/varset Buffcount 34
/call Loadbufflist
:Mainloop
/doevents
/goto :Mainloop
/return
sub Loadbufflist
/declare counter local
/for counter 0 to @Buffcount
/varset "@Bufflist(1,@counter)" "$ini("INIFile","Buffs","@Bufflist(1,@counter)")"
/next counter
/return
sub Announcebuffs
/chat #buffchannel ===== GROUP / MGB =====
/chat #buffchannel Symbol -> @gsymbol == Bot9 -> @gbot9
/chat #buffchannel Fos -> @gfos == STA -> @gsta
/chat #buffchannel SoT -> @gsot == Sop -> @gsop
/chat #buffchannel Replen -> @greplen == DMF -> @gdmf
/chat #buffchannel SV -> @gsv == SD -> @gsd
/chat #buffchannel VoQ -> @gvoq == VQ -> @gvq
/chat #buffchannel Bss -> @gbss == GoD -> @ggod
/chat #buffchannel ToT -> @gtot == PoS -> @gpos
/chat #buffchannel MoR -> @gmor
/chat #buffchannel ===== SINGLE =====
/chat #buffchannel Symbol -> @ssymbol == Pot9 -> @spot9
/chat #buffchannel Fos -> @sfos == FA -> @sfa
/chat #buffchannel SoV -> @ssov == DMF -> @sdmf
/chat #buffchannel FoN -> @sfon == CotR -> @scotr
/chat #buffchannel Rods -> @srods == CoH -> @scoh
/chat #buffchannel BoR -> @sbor == DoH -> @sdoh
/chat #buffchannel Virtue -> @svirtue == WoG -> @swog
/chat #buffchannel Stamina -> @ssta
/chat #buffchannel R&R Cleric -> @crnr
/chat #buffchannel R&R Druid -> @drnr
/chat #buffchannel R&R Enchanter -> @ernr
/chat #buffchannel
/return
sub Writebufflist
/declare counter local
/for counter 0 to @Buffcount
/ini "INIFile" "Buffs" "@Bufflist(1,@counter)" @@Bufflist(1,@counter)
/next counter
/return
sub Event_Privatechat
/declare Length local
/declare Namestring local
/declare Command local
/declare counter local
/varset Command $arg(4,"@Param0")
/varset Command $lcase("@Command")
/if "@Command"=="'spam'" {
/call Announcebuffs
/return
}
/if "@Command"=="'write'" {
/call Writebufflist
/return
}
/if "@Command"=="'add" {
/varset Namestring $arg(6,"@Param0")
/varset Length $strlen("@Namestring")
/varset $lcase("$arg(5,"@Param0")") $left($calc(@Length-1),"@Namestring")
/call Writebufflist
}
/if "@Command"=="'help'" {
/chat #mypriv Current buff variables are:
/for counter 0 to @Buffcount
/chat #mypriv @Bufflist(1,@counter)
/next counter
}
/return
Code: Select all
[Buffs]
gsymbol=Player1
gbot9=Player2
gfos=Player3
gsta=Player4
gsot=Player5
gsop=Player6
greplen=Player7
gsv=Player8
gsd=Player9
gdmf=Player10
gvoq=Player11
gvq=Player12
ggod=Player13
gbss=Player14
gtot=Player15
gpos=Player16
gmor=Player35
ssymbol=Player17
spot9=Player18
sfos=Player19
sfa=Player20
ssov=Player21
sdmf=Player22
sfon=Player23
scotr=Player24
srods=Player25
scoh=Player26
sdoh=Player27
sbor=Player28
svirtue=Player29
swog=Player30
ssta=Player31
crnr=Player32
drnr=Player33
ernr=Player34

