|
kyros Novice
Joined: 26 Jan 2005 Posts: 33
|
Posted: Sat Jul 30, 2005 5:21 am
HELP :( |
I have been scripting all night, but I can't get it right, this is what I want.
As you can see below, we have an assortment of tags on our mud, after our names. I want to add my own. Look below please.
Code: |
MATERIA MAGICA: Search Players Online
.-------------------------------------------------------------------------.
[46 :166 F Sidhe Bard Wilds ] Aryne [o:////:[::::::>][A][Q][<Combat>]
[60 :240 F Hero Social] Mashimaro [=Va|ha||a=][A]
[60 :240 M Hero Towne ] Tejon [/>Annwn<\]
[60 :240 M Hero Underg] Nerion [/>Annwn<\][<Combat>]
[7 :67 F Ogre Bard Social] Greela
[46 :166 M Dwarf Bard Social] Tinkle [>>Condemned<<][A]
[55 :235 F Sidhe Bard Underg] Joseph [<EyeS>][A][<Combat>]
[60 :240 M Hero Underg] Nyan [/>Annwn<\][A][<Combat>]
[60 :240 M Hero Planar] Felony [::nAo::][<Deceased>]
[60 :240 M Hero Planar] Damodred [+):SanguinE:(+][<Deceased>]
[1 :1 M Human Bard Towne ] Malanthyus [HC]
[8 :8 M HlfLg Bard ] Aloond
[27 :27 M H-Elf Bard Towne ] Jorka
[54 :234 F Sidhe Bard Towne ] Iiris [{+DIGM+}]
[60 :240 M Hero Towne ] Spizy [---,-->{@]
[50 :230 F HlfLg Bard Clanhl] Ishynir [..>>)MoW(<<..][A]
[44 :44 M Ogre Bard Towne ] Node [-127-]
`-------------------------------------------------------------------------'
Total matches: 17. |
What I want is any area listed in this variable
#VAR areas {Dungn|Isle |Underw|Planar|Keep|Underg|Tower}
to have an added (Possible PK) at the end of the name. EX:
Code: |
MATERIA MAGICA: Search Players Online
.-------------------------------------------------------------------------.
[46 :166 F Sidhe Bard Wilds ] Aryne [o:////:[::::::>][A][Q][<Combat>]
[60 :240 F Hero Social] Mashimaro [=Va|ha||a=][A]
[60 :240 M Hero Towne ] Tejon [/>Annwn<\]
[60 :240 M Hero Underg] Nerion [/>Annwn<\][<Combat>] (Possible PK)
[7 :67 F Ogre Bard Social] Greela
[46 :166 M Dwarf Bard Social] Tinkle [>>Condemned<<][A]
[55 :235 F Sidhe Bard Underg] Joseph [<EyeS>][A][<Combat>]
[60 :240 M Hero Underg] Nyan [/>Annwn<\][A][<Combat>]
[60 :240 M Hero Planar] Felony [::nAo::][<Deceased>] (Possible PK)
[60 :240 M Hero Planar] Damodred [+):SanguinE:(+][<Deceased>] (Possible PK)
[1 :1 M Human Bard Towne ] Malanthyus [HC]
[8 :8 M HlfLg Bard ] Aloond
[27 :27 M H-Elf Bard Towne ] Jorka
[54 :234 F Sidhe Bard Towne ] Iiris [{+DIGM+}]
[60 :240 M Hero Tower ] Spizy (Possible PK)
[50 :230 F HlfLg Bard Clanhl] Ishynir [..>>)MoW(<<..][A]
[44 :44 M Ogre Bard Towne ] Node [-127-]
`-------------------------------------------------------------------------'
Total matches: 17. |
Is there a way of doing this, I have been trying things with triggers all night, but I can't get it right. I know I will have to use %ismember to match the areas up, but other than that, I am blank. Help me out please.
[/code] |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sat Jul 30, 2005 6:11 am |
*Untested* Mainly the PSUB is untested as I have not tried to use it like this before Lemme know if it works!
Code: |
#TRIGGER "pos_pk" {MATERIA MAGICA: Search Players Online} {}
#COND {.-------------------------------------------------------------------------.} {#T+ pkwho} {within|param=1}
#COND {`-------------------------------------------------------------------------'} {#T- pkwho}
#TRIGGER "pkwho" {&3:&3 {M|F} &10 (&6)] (%x) *} {
#IF (%ismember(%lower(%trim("%1")),%lower(@areas)) {
#PSUB {~(Possible PK~)} %eval(%len(%line)+2)
}
} |
|
|
|
|
kyros Novice
Joined: 26 Jan 2005 Posts: 33
|
Posted: Sat Jul 30, 2005 1:04 pm |
This is what your script did to the formatting of the mud.
Code: |
02:241 M Legend Social] Kazmo [??Milk??][A] [60 :240 M Hero Social] Spizy [---,-->{@] [75 :241 F Archon Social] Hysparina [??Milk??][A] [18 :78 F Ogre Rogue Towne ] Kattlekirk [60 :60 M Dwarf Caval Towne ] Leadfoot [23 :143 F H-Elf Pries Castle] Kiyone [55 :175 F Drow Witch Social] Kasei [A] [60 :120 F Sidhe Monk Keep ] Fuchi [Diversity] [79 :241 F Archon Towne ] Shakti [??Milk??](Quest)[C]ontinue [R]edraw [B]ack [E]xit: [60 :180 F Ogre Shama Social] Xarlia [A] [60 :120 M Drow Pries Towne ] Perias [>)InNueNdO(<] [39 :159 F Sidhe Monk Towne ] Jurka [-=}TweaK{=-] [60 :60 F Mintr Barba Towne ] Auxesia [/>Annwn<\] [102:241 M Archon Home ] Jaxxon [-=}TweaK{=-][A] [60 :120 F Fey Valky Wilds ] Daye [<+MiRAGE+>] [74 :241 M Archon Social] Alias [ProphecY] [120:241 M Archon Home ] Gunner [{+DIGM+}]`-------------------------------------------------------------------------' Visible Immortals online: 0 Visible Players Online: 164 (Possible PK)[AWAY](@#cabal) (Possible PK) (Possible PK) (Possible PK)[AWAY](@#cabal) (P(Possible PK)ossible PK)[AWAY](@#cabal) (Possible PK)[AWAY](@#cabal) |
|
|
Last edited by kyros on Sat Jul 30, 2005 1:07 pm; edited 2 times in total |
|
|
|
kyros Novice
Joined: 26 Jan 2005 Posts: 33
|
Posted: Sat Jul 30, 2005 1:04 pm |
Didn't work :(
|
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: Sat Jul 30, 2005 8:59 pm |
Code: |
#TRIGGER {^ MATERIA MAGICA: Search Players Online} {#T+ PossiblePK}
#CLASS PossiblePK
#VARIABLE areas {Dungn|Isle |Underw|Planar|Keep|Underg|Tower}
#TRIGGER {^ ~[%d%s~:%d%s ? %x%s%w%s(%w)~] *} {#IF (%ismember(%1,@areas)) {#SAYPROMPT ~(Possible PK~)}}
#TRIGGER (^ Total matches: %d.} {#T- PossiblePK}
#CLASS 0 |
Tested this offline by sending your search output. Triggers returned this:
Code: |
MATERIA MAGICA: Search Players Online
.-------------------------------------------------------------------------.
[46 :166 F Sidhe Bard Wilds ] Aryne [o:////:[::::::>][A][Q][<Combat>]
[60 :240 F Hero Social] Mashimaro [=Va|ha||a=][A]
[60 :240 M Hero Towne ] Tejon [/>Annwn<\]
[60 :240 M Hero Underg] Nerion [/>Annwn<\][<Combat>] (Possible PK)
[7 :67 F Ogre Bard Social] Greela
[46 :166 M Dwarf Bard Social] Tinkle [>>Condemned<<][A]
[55 :235 F Sidhe Bard Underg] Joseph [<EyeS>][A][<Combat>]
[60 :240 M Hero Underg] Nyan [/>Annwn<\][A][<Combat>]
[60 :240 M Hero Planar] Felony [::nAo::][<Deceased>] (Possible PK)
[60 :240 M Hero Planar] Damodred [+):SanguinE:(+][<Deceased>] (Possible PK)
[1 :1 M Human Bard Towne ] Malanthyus [HC]
[8 :8 M HlfLg Bard ] Aloond
[27 :27 M H-Elf Bard Towne ] Jorka
[54 :234 F Sidhe Bard Towne ] Iiris [{+DIGM+}]
[60 :240 M Hero Tower ] Spizy (Possible PK)
[50 :230 F HlfLg Bard Clanhl] Ishynir [..>>)MoW(<<..][A]
[44 :44 M Ogre Bard Towne ] Node [-127-]
`-------------------------------------------------------------------------'
Total matches: 17. |
|
|
|
|
kyros Novice
Joined: 26 Jan 2005 Posts: 33
|
Posted: Tue Aug 02, 2005 11:02 pm |
it didn't trigger off at all :(
|
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: Wed Aug 03, 2005 1:29 am |
Try it like this instead (without the carrots)
Code: |
#TRIGGER {MATERIA MAGICA: Search Players Online} {#T+ PossiblePK}
#CLASS PossiblePK
#VARIABLE areas {Dungn|Isle |Underw|Planar|Keep|Underg|Tower}
#TRIGGER {~[%d%s~:%d%s ? %x%s%w%s(%w)~] *} {#IF (%ismember(%1,@areas)) {#SAYPROMPT ~(Possible PK~)}}
#TRIGGER (Total matches: %d.} {#T- PossiblePK}
#CLASS 0 |
|
|
|
|
kyros Novice
Joined: 26 Jan 2005 Posts: 33
|
Posted: Wed Aug 03, 2005 11:29 pm |
that does this:
Code: |
[60 :60 F HlfLg Rogue Tower] Azureus (Quest)
(Possible PK)(Possible PK) [60 :180 M H-Elf Bard At Sea] Zeles
[20 :80 M Drow Caval ] Someone. [..>>)MoW(<<..](Quest)
[99 :241 F Archon Social] Alondra [+Fallen+]
[48 :48 F HlfLg Wizrd Tower] Someone. [@}@}===,====]
(Possible PK)(Possible PK) [20 :20 M Ogre Bard Towne ] Roonskar
|
|
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: Thu Aug 04, 2005 1:43 am |
Did you remove the previous set of triggers? If not, the triggers likely did not overwrite each other and now you have almost duplicate triggers. That would most likely be the cause of the two (Possible PK) flags. As for why it wrapped to the next line like it did, I'm at a loss.
|
|
|
|
kyros Novice
Joined: 26 Jan 2005 Posts: 33
|
Posted: Fri Aug 05, 2005 1:44 am |
Yes I did.
|
|
|
|
kyros Novice
Joined: 26 Jan 2005 Posts: 33
|
Posted: Tue Aug 09, 2005 7:46 pm |
*bump* still looking for an answer!
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Wed Aug 10, 2005 12:40 am |
Putting it at the end and keeping previous formating is gonna be out of the question. How about after the name?
Code: |
#TRIGGER "pos_pk" {MATERIA MAGICA: Search Players Online} {}
#COND {.-------------------------------------------------------------------------.} {#T+ pkwho} {within|param=1}
#COND {`-------------------------------------------------------------------------'} {#T- pkwho}
#TRIGGER "pkwho" {&3:&3 {M|F} &10 (&6)] (%x)( )*} {
#IF (%ismember(%lower(%trim("%1")),%lower(@areas)) {
#PSUB {%char(32)~(Possible PK~)%char(32)} %x3
}
} |
|
|
|
|
kyros Novice
Joined: 26 Jan 2005 Posts: 33
|
Posted: Wed Oct 11, 2006 1:20 pm |
Is there any answer to this question? I want to keep the formatting but a simple (Possible PK) at the end.
|
|
|
|
igorshadow Newbie
Joined: 02 Jun 2006 Posts: 9 Location: Kansas
|
Posted: Wed Oct 11, 2006 4:47 pm |
Why not just do your Possible PK with a color insteat of tring to add more text?
Just a thought |
|
|
|
kyros Novice
Joined: 26 Jan 2005 Posts: 33
|
Posted: Sat Oct 28, 2006 12:10 pm |
Well, I would like to keep the mud output and just have (Possible PK) at the end of the line.
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Oct 28, 2006 9:42 pm |
Try this.
Code: |
#TRIGGER "pos_pk" {MATERIA MAGICA: Search Players Online} {}
#COND {.-------------------------------------------------------------------------.} {#T+ pkwho} {within|param=1}
#COND {`-------------------------------------------------------------------------'} {#T- pkwho}
#TRIGGER "pkwho" {&3:&3 {M|F} &10 (&6)] (%x) *} {#IF (%ismember( %lower( %trim( "%1")), %lower( @areas))) {#PSUB { ~(Possible PK~)} %len( %line) 0}} "" {notrig|disable}
|
Remember to delete the old triggers before you do though. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
|
|