Alright, I am a warrior in the MUD Lusternia. Warriors have a skill called envenom which allows us to rub some venom on our swords. Now, when you strike with a sword, there's a chance that the venom will wipe off, or a chance that it will stay on the sword, OR it may be delivered to the person.
As such, venoms are a little unpredictable.
What I want to do, is make a system which sets a poison combination mode and re-envenoms your swords automatically according to that combo.
Now, a godsend is the command "WP" which probes our weapons and checks to see what poisons are on it. Here are some examples of its output:
Example 1: One poison
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has the following poisons or magical effects on it:
1) dulak
Example 2: No poisons
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has no poisons or magical effects on it.
Example 3: Multiple poisons
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has the following poisons or magical effects on it:
1) haemotox
2) haemotox
3) haemotox
4) haemotox
Now what I want to be able to do is make a function or something that checks each rapier through WP @sword1 and WP @sword2 and checks to see if the specified poisons are on it or not, and if it is, it applies them, and if there are poisons not specified, if wipes them off. An example in pseudocode
VENOMMODESWORD1 MORPHITE
CHECKRAPIER DOES-->
WP @sword1
WHICH SHOWS
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has the following poisons or magical effects on it:
1) haemotox
SENDS:
WIPE @sword1
ENVENOM @sword1 with MORPHITE
or lets say WP just sent
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has no poisons or magical effects on it.
it would only send
ENVENOM @sword1 with MORPHITE
I would also want to gag those WP lines. But I figure I could make a trigger group called "hideWP" that omits each line and enable the group during the script.
I was just wondering if you people could point me in the direction of:
- How to actually take the poisons list from WP and store it.
- How to compare this against some supposed EVENOMMODE
etc...
Note: By ENVENOMMODE I basically am thinking of calling an alias that sets the venom mode to "morphite" for example. I wouldn't want to put more than one venom on it.
I only know how to do some very basic things with lua. But I'm willing to learn if you help guide me through. This sort of thing would greatly,greatly, greatly optimize my poison usage.
As such, venoms are a little unpredictable.
What I want to do, is make a system which sets a poison combination mode and re-envenoms your swords automatically according to that combo.
Now, a godsend is the command "WP" which probes our weapons and checks to see what poisons are on it. Here are some examples of its output:
Example 1: One poison
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has the following poisons or magical effects on it:
1) dulak
Example 2: No poisons
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has no poisons or magical effects on it.
Example 3: Multiple poisons
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has the following poisons or magical effects on it:
1) haemotox
2) haemotox
3) haemotox
4) haemotox
Now what I want to be able to do is make a function or something that checks each rapier through WP @sword1 and WP @sword2 and checks to see if the specified poisons are on it or not, and if it is, it applies them, and if there are poisons not specified, if wipes them off. An example in pseudocode
VENOMMODESWORD1 MORPHITE
CHECKRAPIER DOES-->
WP @sword1
WHICH SHOWS
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has the following poisons or magical effects on it:
1) haemotox
SENDS:
WIPE @sword1
ENVENOM @sword1 with MORPHITE
or lets say WP just sent
It is a one-handed weapon.
Damage: 33 Precision: 235 Speed: 211
A loboshigaru rapier has no poisons or magical effects on it.
it would only send
ENVENOM @sword1 with MORPHITE
I would also want to gag those WP lines. But I figure I could make a trigger group called "hideWP" that omits each line and enable the group during the script.
I was just wondering if you people could point me in the direction of:
- How to actually take the poisons list from WP and store it.
- How to compare this against some supposed EVENOMMODE
etc...
Note: By ENVENOMMODE I basically am thinking of calling an alias that sets the venom mode to "morphite" for example. I wouldn't want to put more than one venom on it.
I only know how to do some very basic things with lua. But I'm willing to learn if you help guide me through. This sort of thing would greatly,greatly, greatly optimize my poison usage.