reading it now , but it seems like that might be what I am looking for thanks Nick!
<triggers>
<!-- trigger to match start of inventory -->
<trigger
enabled="y"
match="You are carrying:"
send_to="12"
sequence="100"
>
<send>
inventory_table = {}
EnableTrigger ("inventory_line", true)
EnableTrigger ("inventory_stopper", true)
</send>
</trigger>
<!-- trigger to match an inventory line -->
<trigger
match="*"
name="inventory_line"
send_to="12"
sequence="50"
>
<send>
table.insert (inventory_table, "%0") -- add inventory item to our table
</send>
</trigger>
<!-- trigger to match end of inventory -->
<trigger
match="(^<)|^$"
name="inventory_stopper"
regexp="y"
send_to="12"
sequence="40"
>
<send>
-- don't need to track inventories any more
EnableTrigger ("inventory_line", false)
EnableTrigger ("inventory_stopper", false)
-- in case no table yet
inventory_table = inventory_table or {}
table.sort (inventory_table)
print ("In your inventory is:")
for _, item in ipairs (inventory_table) do
print (item)
end -- for
</send>
</trigger>
</triggers>
ok What does this mean?
send_to="12"
sequence="100"
I am guessing sequence it the order of trigger firing
(but the order is reverse (highest number first.)
have no idea what send_to 12 is.
I see the send to box
and have learned here that
Send("cast 'armor'") will send my command to the mud world.
I will chance this
<triggers>
<!-- trigger to match start of inventory -->
<trigger
enabled="y"
match="You are carrying:"
send_to="12"
sequence="100"
>
<send>
inventory_table = {}
EnableTrigger ("inventory_line", true)
EnableTrigger ("inventory_stopper", true)
</send>
</trigger>
to this?
trigger box
You are affected by the following spells:
<triggers>
<!-- trigger to match start of inventory -->
<trigger
enabled="y"
match="You are affected by the following spells:"
send_to="12"
sequence="100"
>
<send>
inventory_table = {}
EnableTrigger ("inventory_line", true)
EnableTrigger ("inventory_stopper", true)
</send>
</trigger>
where inventory_line is do I put the word
Armor
for the name of the spell I want to check is there?
for inventory_stopper can i use my prompt?
<514/514hp 67/89ma 255/255mv>
but change it to
<*/*hp*/*ma*/*mv>
I am in the Edit Trigger Section
of the mushclient.
Where do I put send_to="12"
<trigger
enabled="y"
match="You are affected by the following spells:"
send_to="12"
sequence="100"
>
<send>
inventory_table = {}
EnableTrigger ("inventory_line", true)
EnableTrigger ("inventory_stopper", true)
</send>
</trigger>
all the above goes in the send section right?
in trigger box also goes
You are affected by the following spells:
If I am right I think I might have it.
Nope it only got me disconnected from mud.
my guess you can't use the prompt to stop trigger.
Here is what I put just in case someone has answer before i find it out.
Think I am going to have to use the wait command, I thought I read.
Trigger 1
You are affected by the following spells:
in send box
<trigger
enabled="y"
match="You are affected by the following spells:"
send_to="12"
sequence="100"
>
<send>
inventory_table = {}
EnableTrigger ("Armor", true)
EnableTrigger ("<*/*hp*/*ma*/*mv>", true)
</send>
</trigger>
send to box
Script
Sequence box
100
____________________________________________
trigger 2
Trigger box
Armor
send box
<trigger
match="*"
name="Armor"
send_to="12"
sequence="50"
>
<send>
table.insert (inventory_table, "%0") -- add inventory item to our table
</send>
</trigger>
Send to box
script
Sequence box
50
__________________________________________________
trigger 3
trigger box
<*/*hp*/*ma*/*mv>
Send box
<trigger
match="(^<)|^$"
name="<*/*hp*/*ma*/*mv>"
regexp="y"
send_to="12"
sequence="40"
>
<send>
-- don't need to track inventories any more
EnableTrigger ("Armor", false)
EnableTrigger ("<*/*hp*/*ma*/*mv>", false)
-- in case no table yet
inventory_table = inventory_table or {}
table.sort (inventory_table)
print ("In your inventory is:")
for _, item in ipairs (inventory_table) do
print (item)
end -- for
</send>
</trigger>
</triggers>
Send to box
Script
Sequence box
40 |