Template:Macro: Difference between revisions

From CLUMP
Jump to navigationJump to search
(Replaced content with "==Description== * ==Dependencies== * ==Usage== * ==Noteworthy Techniques== * ==Credits== * ==Code== <pre> </pre> ==Revisions== * YYYYMMDD-initials: ==Links== *")
 
Line 16: Line 16:
==Code==
==Code==
<pre>
<pre>
/*-----------------------------------------------------------------------------
          | shareMultiple Version 1.0.1 | ThankGroup Version 2.0.4 |
--------------------------------- Description ---------------------------------
Shares is an expansion of the default /share command to accept multiple names, to speed sharing groups of people.
----------------------------------- Usage -------------------------------------
just type in
sh <name> <name> <name> <name> <name>
to share up to you maximum number of people.
----------------------------------- Setup -------------------------------------
Note: to work properly you might have to remove the line
"sh" "/share " @text "\r" from your default macros file.
or you can use other built in triggers:
"shm" & "/shm"
//Mac Users: Add the line below to your default macro file:
include "shares.txt"
//PC Users: change this file name to "shares.mac"
and add the line below to your default macro file:
include "shares.mac"
-----------------------------------------------------------------------------*/
/****** Share Triggers ******/
"sh" call shareMultiList
"/shm" call shareMultiList
"shm" call shareMultiList
/****** Thank Group Triggers ******/
"/thg" call ThankGroup
"/thga" call AddToThankGroup
"/thgwho" call WhoAmIThanking
"/thg?" call WhoAmIThanking
"/thgc" call ClearThankGroup
"/thn" call ThankNext
"/ths" call ThankSharers
"/tn" call ThankNext
/*Edit this list with to up to 5 exiles you like to share with automatically. Note will only work with debug = 1 */
set listA "Yor Talin Phroon Lorikeet Kyvnn"
set debug 0
set slotG 0
set theMessage ":)" //Edit this to whatever
shareMultiList
{
setglobal count 0
if @text == ""
if debug == 1
message "No people listed. Defaulting to " listA
label LOOPA
      if count < listA.num_words
        "/share "  listA.word[count] "\r"
        setglobal myThankGroup[slotG] listA.word[count]
if debug == 1
pause 1
message "*" myThankGroup[slotG] " added to thankgroup."
end if
set count + 1
setglobal slotG + 1
setglobal thankTotal + 1
pause 20
goto LOOPA
end if
else
"/share\r"
end if
else
label LOOPB
if count < @text.num_words
"/share "  @text.word[count] "\r"
setglobal myThankGroup[slotG] @text.word[count]
if debug == 1
pause 1
message "*" myThankGroup[slotG] " added to thankgroup."
end if
set count + 1
setglobal slotG + 1
setglobal thankTotal + 1
pause 20
goto LOOPB
end if
end if
}
/***************************** Thank Group v2.0.4 *****************************/
ThankGroup // /thg This Thanks everyone in your thinkgroup one at a time
{
if @text == "reset"
call ClearThankGroup
goto END
else if @text == "/reset"
call ClearThankGroup
goto END
else
setglobal theMessage @text
end if
set thankTotalAdjustment thankTotal
set thankTotalAdjustment - 1
pause 1
label LOOP
if thankTarget < thankTotalAdjustment
call ThankNext
pause 1201
goto LOOP
else
message "***You are out of people to thank.***"
message "***To Add more type /thga <name> [name] ..."
end if
message ending thanks
label END
}
AddToThankGroup    // /thga
{
set num_people @text.num_words
setglobal slot 0
if debug == 1
message "slotG="slotG
end if
label addloop
if slot < num_people
setglobal myThankGroup[slotG] @text.word[slot]
if debug == 1
message "*myThankGroup[" slotG "]=" myThankGroup[slotG]
end if
pause 1
setglobal slot + 1
setglobal thankTotal + 1
setglobal slotG + 1
goto addloop
end if
if modeverbose == 1
call WhoAmIThanking
end if
}
ClearThankGroup  // /thc
{
message "Clearing thank group"
setglobal thankTarget 0
setglobal counted 0
setglobal thankTotal 1
setglobal myThankGroup ""
setglobal slotG 0
message thankTarget "*" counted "*" thankTotal "*" myThankGroup "*" slotG "*"
}
ThankNext      // /tn
{
if @Text == ""
"/thank " myThankGroup[thankTarget] " thank you for being part of my group. =^)\r"
else
"/thank " myThankGroup[thankTarget] " " theMessage "\r"
end if
pause 1
if @env.TextLog < "You have no karma to give."
if debug == 1
message "*Unable to give kamra to  " myThankGroup[thankTarget] " holding place."
end if
else if @env.TextLog < "myThankGroup[thankTarget] is not in the lands."
if debug == 1
message "*Unable to give kamra (No Target) holding place."
end if
    message "*Add more people to your thank group. /thga <name> [name] ...."
else
if thankTarget < thankTotal
setglobal thankTarget + 1
end if
end if
if debug == 1
pause 4
message "The next person to be thanked is " myThankGroup[thankTarget]
end if
}
WhoAmIThanking // /thgwho, /thg?
{
if @text == "reset"
call ClearThankGroup
else if @text == "/reset"
call ClearThankGroup
end if
message "•My thank group is currently: "
setglobal counted 0
set thankTotalAdjustment thankTotal
set thankTotalAdjustment - 1
label LOOPSTART
if counted < thankTotalAdjustment
if counted == thankTarget
message "[" counted "]*" myThankGroup[counted]
else
message "[" counted "]" myThankGroup[counted]
end if
setglobal counted + 1
goto LOOPSTART
end if
}
ThankSharers // /ths
{
set number 0
if debug == 1
message "Shares in are " @my.shares_in
message "Thank Share In Number =" @my.shares_in.num_words
end if
label LOOP0
if number == @my.shares_in.num_words
goto END
else
setglobal myThankGroup[slotG] @my.shares_in.word[number]
setglobal slotG + 1
set number + 1
setglobal thankTotal + 1
goto LOOP0
end if
label END
if debug == 1
call WhoAmIThanking
end if
}


</pre>
</pre>

Latest revision as of 16:07, 27 August 2010

Description[edit]

Dependencies[edit]

Usage[edit]

Noteworthy Techniques[edit]

Credits[edit]

Code[edit]


Revisions[edit]

  • YYYYMMDD-initials:

Links[edit]