Help - Search - Members - Calendar
Full Version: Capturing Enemies From Party Tells?
Achaea's Forums > Off-Topic > Tech Support > Client Help
Horuce
Ok, while raiding as a shaman if I'm not smudging a totem I'm propping one but when someone lists off 20 names that need to be enemied, it takes a bit to type all their names out. So how do you get

(Party): Bill says, "Enemies are mike, larry, sue, dave.

I tried doing

#trigger {(party): %w says, "Enemies are %w, %w, <so forth till 20 names>.} {unenemy all;enemy %2;enemy %3<so forth till enemy %21;pt Enemies accuired are %2, %3 <till reach %21> }}

This did not fire at all is it the ()'s around party? But how does one get the the trigger to fire and enemy all names given, Trevise gave me some advise last night but I couldn't figure out exactly how to do it, so I'm asking again here anyone know how to do this?
Saadya
I think it has to be

#trigger {~(Party~)

You have to add ~ because parentheses have their own function in zmud script.
Laorir
QUOTE (Horuce @ Aug 4 2009, 11:26 AM) *
Ok, while raiding as a shaman if I'm not smudging a totem I'm propping one but when someone lists off 20 names that need to be enemied, it takes a bit to type all their names out. So how do you get

(Party): Bill says, "Enemies are mike, larry, sue, dave.

I tried doing

#trigger {(party): %w says, "Enemies are %w, %w, <so forth till 20 names>.} {unenemy all;enemy %2;enemy %3<so forth till enemy %21;pt Enemies accuired are %2, %3 <till reach %21> }}

This did not fire at all is it the ()'s around party? But how does one get the the trigger to fire and enemy all names given, Trevise gave me some advise last night but I couldn't figure out exactly how to do it, so I'm asking again here anyone know how to do this?

#TRIGGER {^~(Party~): %w says, "Enemies are (*)."$} {enemies=%replace(%1, ", ", "|"); #FORALL (@enemies) {enemy %i}}

That's not perfect, but it's pretty close to what you're looking for, I think. It's also a lot cleaner than writing 20 triggers.
Dontarion
Laorir has it on the nose. I don't think you need the (@enemies) just @enemies.

You may even be able to use:

#TRIGGER {STUFF} {unenemy all;#FORALL %replace(%1, ", ", "|") {enemy %i}}

I'd suggest making this an ANSI trigger so people can't craft clever illusions, OOC clan tells, tells, emotes, etcetera.
Sena
QUOTE (Dontarion @ Aug 4 2009, 11:35 AM) *
I don't think you need the (@enemies) just @enemies.

#IF stuff {do stuff} will usually work, since zMUD is pretty lax about syntax, but it's a good idea to use #IF (stuff) {do stuff}. I've had problems with leaving out the parentheses before.
Horuce
Ok, I tested it tonight, and all it did was enemy the very first person in the sequence it didnt go any further how do I fix that?
Laorir
QUOTE (Horuce @ Aug 5 2009, 12:02 AM) *
Ok, I tested it tonight, and all it did was enemy the very first person in the sequence it didnt go any further how do I fix that?

Post the trigger and value you have?
Laorir
Nevermind, I know what it is. You have to put quotes around %1. I forgot Zmud requires you to do that (switch to cmud!).

So it should be:

#TRIGGER {^~(Party~): %w says, "Enemies are (*)."$} {enemies=%replace("%1", ", ", "|"); #FORALL (@enemies) {enemy %i}}
Gorlasintan
QUOTE (Laorir @ Aug 4 2009, 11:22 PM) *
(switch to cmud!).

The current beta version of cMud is buggy as - for me.
Laorir
QUOTE (Gorlasintan @ Aug 5 2009, 12:28 AM) *
QUOTE (Laorir @ Aug 4 2009, 11:22 PM) *
(switch to cmud!).

The current beta version of cMud is buggy as - for me.

Ya, I'm still using 2.37 whenever I play. I've played around with the beta version a little bit, but I haven't found anything earth shattering to justify trying to use a beta product for playing yet.
Gorlasintan
Idk what happened. 3.08 worked fine. Then it forced me to update to 3.10, and now I can't use ctrl+f in any windows (it starts throwing out handling errors about windows and stuff, and then after this it freaks out when I push any buttons/anything that opens a window, or I try typing in the command line).
Horuce
Thanks works great, and aye cmud ...not real useful, crashes majorly so I stick with zmud
Trevize
sad.gif CMUD is still buggy? I was considering trying it out again earlier, meh.
Laorir
QUOTE (Trevize @ Aug 5 2009, 05:19 AM) *
sad.gif CMUD is still buggy? I was considering trying it out again earlier, meh.

CMUD is relatively stable. Don't use the beta version though.
Gorlasintan
QUOTE (Laorir @ Aug 5 2009, 07:44 AM) *
QUOTE (Trevize @ Aug 5 2009, 05:19 AM) *
sad.gif CMUD is still buggy? I was considering trying it out again earlier, meh.

CMUD is relatively stable. Don't use the beta version though.

This.

I live on The Edge™ because I am hardcore and apparently am a masochist.
Dontarion
I think it is hilarious he wanted everyone to pay for a new client and made CMUD which is still buggy as can be. Switch to MUSH. I <3 MUSH now that I've gotten used to it and a semi-functional system in place.

The only thing I hate about MUSH is the fact that I can't switch between World Properties and the main display.
Laorir
QUOTE (Dontarion @ Aug 5 2009, 12:40 PM) *
I think it is hilarious he wanted everyone to pay for a new client and made CMUD which is still buggy as can be. Switch to MUSH. I <3 MUSH now that I've gotten used to it and a semi-functional system in place.

The only thing I hate about MUSH is the fact that I can't switch between World Properties and the main display.

I actually tried to switch to MUSH and had gotten to the point where I could get around in it pretty well. I couldn't deal without the mapper that Cmud provides though. If MUSH ever had something like that built in, I'd probably switch over to that permanently.
Dontarion
QUOTE (Laorir @ Aug 5 2009, 12:47 PM) *
QUOTE (Dontarion @ Aug 5 2009, 12:40 PM) *
I think it is hilarious he wanted everyone to pay for a new client and made CMUD which is still buggy as can be. Switch to MUSH. I <3 MUSH now that I've gotten used to it and a semi-functional system in place.

The only thing I hate about MUSH is the fact that I can't switch between World Properties and the main display.

I actually tried to switch to MUSH and had gotten to the point where I could get around in it pretty well. I couldn't deal without the mapper that Cmud provides though. If MUSH ever had something like that built in, I'd probably switch over to that permanently.

You might be able to alter vadimap. biggrin.gif
Belus
QUOTE (Dontarion @ Aug 5 2009, 09:40 AM) *
Switch to MUSH. I <3 MUSH now that I've gotten used to it and a semi-functional system in place.

Me too.

I tried switching to MUSH three years ago just before I went dormant, but I couldn't figure it out.
I've been playing with it for about a week now and I think I'm finally to the point where I can build an equivalent system to my old one. The only thing I still need to figure out are stringlist variables and %push / %pop equivalents to rebuild an offensive system.

Recently I've fallen in love with the Send File option under Input. It makes composing help files and equivalents much easier.
Sena
QUOTE (Belus @ Aug 5 2009, 04:46 PM) *
Recently I've fallen in love with the Send File option under Input. It makes composing help files and equivalents much easier.

How is it different from #SEND?
Gorlasintan
QUOTE (Belus @ Aug 5 2009, 03:46 PM) *
The only thing I still need to figure out are stringlist variables and %push / %pop equivalents to rebuild an offensive system.

I'd imagine Lua would have these features/functions built-in, if that's the language you're using.
Belus
QUOTE (Sena @ Aug 5 2009, 01:47 PM) *
QUOTE (Belus @ Aug 5 2009, 04:46 PM) *
Recently I've fallen in love with the Send File option under Input. It makes composing help files and equivalents much easier.

How is it different from #SEND?

I copy the composition of interest into a .txt file and set all the formatting I might want.
Send File then reads and sends it line by line.
You can configure commands to do before sending the file (like househelp edit scroll;*clear;yes) and after (like *save).
Basically I now quickly and directly import .txt's from my computer to any journal, newsboard or help file without worrying about formatting.

QUOTE (Gorlasintan @ Aug 5 2009, 01:47 PM) *
QUOTE (Belus @ Aug 5 2009, 03:46 PM) *
The only thing I still need to figure out are stringlist variables and %push / %pop equivalents to rebuild an offensive system.

I'd imagine Lua would have these features/functions built-in, if that's the language you're using.

I'm sure it does, I just need to dig around for them.
Soludra
QUOTE (Belus @ Aug 5 2009, 02:09 PM) *
I copy the composition of interest into a .txt file and set all the formatting I might want.
Send File then reads and sends it line by line.
You can configure commands to do before sending the file (like househelp edit scroll;*clear;yes) and after (like *save).
Basically I now quickly and directly import .txt's from my computer to any journal, newsboard or help file without worrying about formatting.


Why did I never notice that?...
Sena
QUOTE (Belus @ Aug 5 2009, 05:09 PM) *
QUOTE (Sena @ Aug 5 2009, 01:47 PM) *
QUOTE (Belus @ Aug 5 2009, 04:46 PM) *
Recently I've fallen in love with the Send File option under Input. It makes composing help files and equivalents much easier.

How is it different from #SEND?

I copy the composition of interest into a .txt file and set all the formatting I might want.
Send File then reads and sends it line by line.
You can configure commands to do before sending the file (like househelp edit scroll;*clear;yes) and after (like *save).
Basically I now quickly and directly import .txt's from my computer to any journal, newsboard or help file without worrying about formatting.

That's completely identical to #SEND. tongue.gif
Belus
QUOTE (Sena @ Aug 5 2009, 02:42 PM) *
QUOTE (Belus @ Aug 5 2009, 05:09 PM) *
QUOTE (Sena @ Aug 5 2009, 01:47 PM) *
QUOTE (Belus @ Aug 5 2009, 04:46 PM) *
Recently I've fallen in love with the Send File option under Input. It makes composing help files and equivalents much easier.

How is it different from #SEND?

I copy the composition of interest into a .txt file and set all the formatting I might want.
Send File then reads and sends it line by line.
You can configure commands to do before sending the file (like househelp edit scroll;*clear;yes) and after (like *save).
Basically I now quickly and directly import .txt's from my computer to any journal, newsboard or help file without worrying about formatting.

That's completely identical to #SEND. tongue.gif

Cool. I never used #SEND while I was on Zmud. Did it exist in version 7.20a?
Sena
QUOTE (Belus @ Aug 5 2009, 07:26 PM) *
Cool. I never used #SEND while I was on Zmud. Did it exist in version 7.20a?

Yep.
Trevize
QUOTE (Gorlasintan @ Aug 5 2009, 04:47 PM) *
QUOTE (Belus @ Aug 5 2009, 03:46 PM) *
The only thing I still need to figure out are stringlist variables and %push / %pop equivalents to rebuild an offensive system.

I'd imagine Lua would have these features/functions built-in, if that's the language you're using.

Assuming you're dealing with Lua and tables, x is the name of the table, and you're using numerically indexed tables so they work like zMUD stringlists...

%push adds something to the start of the list. In Lua, assuming y is what you want to insert, this does that:
CODE
table.insert (x, 1, y)


%pop removes the first item in a list and returns the item. In Lua, this does that:
CODE
table.remove (x, 1)
Dontarion
biggrin.gif Thank you Trevize. I don't have a use right now but the wholist in zMud uses pop and push so much.
Trevize
QUOTE (Dontarion @ Aug 6 2009, 03:11 PM) *
biggrin.gif Thank you Trevize. I don't have a use right now but the wholist in zMud uses pop and push so much.

Not a problem. You know you can always PM me or poke me ingame if you need anything.
Belus
QUOTE (Trevize @ Aug 5 2009, 05:16 PM) *
Assuming you're dealing with Lua and tables, x is the name of the table, and you're using numerically indexed tables so they work like zMUD stringlists...

%push adds something to the start of the list. In Lua, assuming y is what you want to insert, this does that:
CODE
table.insert (x, 1, y)


%pop removes the first item in a list and returns the item. In Lua, this does that:
CODE
table.remove (x, 1)


I don't think table.insert works quite how you explained it.

CODE
x = {1, 2, "three", 4}

if I used table.insert (x, 1, y) then x would be {y, 2, "three", 4}
If I just use table.insert(x, y) then x would be {1, 2, "three", 4, y}

%push would have made it {y, 1, 2, "three", 4}
Trevize
QUOTE (Belus @ Aug 18 2009, 09:46 PM) *
I don't think table.insert works quite how you explained it.

CODE
x = {1, 2, "three", 4}

if I used table.insert (x, 1, y) then x would be {y, 2, "three", 4}
If I just use table.insert(x, y) then x would be {1, 2, "three", 4, y}

%push would have made it {y, 1, 2, "three", 4}

Try something before you post. tongue.gif

The function table.insert does not remove or replace anything. With three parameters, it inserts the third into the first at the position of the second, moving all other numerically indexed items above up one. With two params, it works like your example shows, adding it to the end.

Note that I have tprint, a function Nick made to display table data, enabled for this example. Lines I enter, in order, and the output (if any) in a comment after.

CODE
tprint (x)               -- (nothing)
x = {1, 2, "three", 4}   -- (nothing)
tprint (x)               -- 1=1 2=2 3="three" 4=4
y = "a"                  -- (nothing)
table.insert (x, 1, y)   -- (nothing)
tprint (x)               -- 1="a" 2=1 3=2 4="three" 5=4


If you want to replace, you just do x[1] = "a" instead.

Also, maybe a little easier to understand is the example in the MUSHclient help file.
CODE
t = { "the", "quick", "brown", "fox" }
table.insert (t, 2, "very") -- new element 2
table.insert (t, "jumped")  -- add to end of table
table.foreachi (t, print)

-->

1 the
2 very
3 quick
4 brown
5 fox
6 jumped
Belus
QUOTE (Trevize @ Aug 18 2009, 06:56 PM) *
Try something before you post. tongue.gif


I was reading http://lua-users.org/wiki/TablesTutorial and must have confused myself. Makes more sense now, Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.