|
maelgrim Newbie
Joined: 30 Aug 2002 Posts: 7 Location: Sweden
|
Posted: Mon Oct 28, 2002 10:07 pm
help with advanced list making please |
Ok, what I whant to do is to make a list of the murderers in the mud. So everytime someone enters the game I write who.
This is what is shown (for example):
There are 17 mortals, 6 wizards, and 2 arches currently logged on. (total: 25)
Admin and coders : B = Busy, I = Idle
[RETIRED GOD] Yappo (I) [EMPEROR] Rocky (I) [CREATOR] Armina (I)
[ARCH] Styggamorf (I) [KING] Egwene (I) [CREATOR] Polgara (I)
[EMPEROR] Gopher (I) [CREATOR] Zandor (I)
Mortals : * = ML, + = Testchar, & = Ghost, @ = In a court, $ = Murderer
41 @* Ciani 24 @* Sabotage 17 & some mist
33 @*$ Kalinin 24 @*$ Blaquesmith 15 @ Immortal
29 @* Akuma 20 @*$ Sheriff 6 &$ some mist
28 * Morrfin 19 @* Boa 1 Spragdawly
28 @* Stormcrow 19 * Iprenmannen 1 Pasta
27 @* Undertow 18 + Eria
The $ before the names says they are murderers. What I would like to do when I receive this who list would be to add Kalinin, Blaquesmith and Sheriff to the variable @murderers.
If they already are in list they should not be added again...
There is nothing that points out where the who list stops...not even an emty line....
OBS! The trigger should not be able to abuse either!
Thanks in advance!
/ Maelgrim |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Oct 29, 2002 4:24 am |
I think this will work.
#TR {%d ??(?) (%w)} {#IF ((%1 = "$") AND (%2 <> "some")) {#ADDITEM murderers %2}
LightBulb
Senior Member |
|
|
|
maelgrim Newbie
Joined: 30 Aug 2002 Posts: 7 Location: Sweden
|
Posted: Tue Oct 29, 2002 3:19 pm |
Sorry! I didn't notice that the spaces dissapeared...this is how it really looks:
41 @* Ciani 24 @* Sabotage 17 & some mist
33 @*$ Kalinin 24 @*$ Blaquesmith 15 @ Immortal
29 @* Akuma 20 @*$ Sheriff 6 &$ some mist
28 * Morrfin 19 @* Boa 1 Spragdawly
28 @* Stormcrow 19 * Iprenmannen 1 Pasta
27 @* Undertow 18 + Eria
Lightbulb: Thanks for looking at it. But the trigger you gave me can be abused. If someone says for example:
Undertow says: 28 @*$ Stormcrow
then Stormcrow would be added to murderer list even tho he is not a murderer. And that is very bad.
Ohh...and I forgot to say this before. If for example Kalinin WAS a murderer but is no more. Then he should be removed from the murderers list. That is also a reason why the trigger should not be able to be abused. Otherwise they would be able remove themself from the murderer list.
/ Maelgrim |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Oct 29, 2002 5:32 pm |
Sorry, Maelgrim, but the truth is that ANY trigger can be abused (tricked). I've given you the basic trigger, you can modify it by adding anchors, keeping it in a normally disabled class, etc. But I don't expect you'll ever come up with anything that's absolutely foolproof. The only way of doing that is to do things manually. Human judgment can't yet be duplicated by computer.
Oh, and I recognized the spacing, that's why I have ??(?).
You can remove people from the list by adding {#DELITEM murderers %2} as the false action of the #IF command.
To sum up, you'll probably need at least 3 triggers, since there are from 1 to 3 characters per line. That will allow you to use a beginning-of-line anchor (^) on all of them. You might need additional triggers to allow for "some mist" (two words) instead of a name (single word), especially if you want to use an end-of-line anchor ($). Put the triggers inside a normally-disabled class, enable it when you do your "who" list (possible methods include using an #ALIAS for the "who" command, using a trigger for character arrival, doing it manually before a "who" list), disable it when the "who" list is finished (possible methods for disabling the class include doing it manually, using #ALARM).
LightBulb
Senior Member |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|