Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Stat Rolling Trigger
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Domnslave2003
(2 posts) Bio
|
Date
| Wed 12 May 2004 08:11 AM (UTC) Amended on Wed 12 May 2004 10:35 PM (UTC) by Nick Gammon
|
Message
| I'm looking for someone to make me a stat rolling trigger(s)
for zmud v7.05 that will do either...
A: look at each stat and reroll the given set of scores if they're all not 14 or higher
OR
B: add up the sum of all the stats and reroll them if their total is less than 110
I ship off to basic training in 12 days so i need this fairly soon... as for the output of the mud when making a character .. its as follows:
Character stats
------------------------------
You may now roll for your character's stats.
You may roll as often as you like.
Strength: 12 (Average)
Dexterity: 10 (Average)
Constitution: 13 (Fit)
Intelligence: 14 (Smart)
Wisdom: 9 (Average)
Charisma: 8 (Average)
Luck: 16 (Very lucky)
Keep? (Y/N)
ok .. hope that helps .. thanks. | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #1 on Wed 12 May 2004 08:22 AM (UTC) |
Message
| Entirely the wrong forum for zmud scripting support - try the forums over at zuggsoft, Im sure theyll be more helpful since thats the zmud support forums. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | Top |
|
Posted by
| Zendu
(66 posts) Bio
|
Date
| Reply #2 on Wed 12 May 2004 08:35 AM (UTC) Amended on Wed 12 May 2004 08:36 AM (UTC) by Zendu
|
Message
| wow how often does that happen
i can tell you how to do it in mushclient... i think.. |
God im helpless
Currently using MushClient 3.46 on Win Xp pro on [url=www.aetolia.com]Aetolia[/url] | Top |
|
Posted by
| Domnslave2003
(2 posts) Bio
|
Date
| Reply #3 on Wed 12 May 2004 05:28 PM (UTC) |
Message
| okay ... same situation and whatnot .... now that i have mushclient, could someone help write up a trigger for mush? | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #4 on Wed 12 May 2004 08:11 PM (UTC) Amended on Wed 12 May 2004 10:23 PM (UTC) by Flannel
|
Message
| Copy this whole thing, then paste it in your triggers page (copy it, have it on your clipboard, then go to triggers, and click paste). It should work, some of the syntax might be a little off, let me know. Also, as they match, the triggers will change the text color to brown on black, if this doesnt happen, let me know.
(Nick, change the title of this thread? for archive purposes, or something?)
<triggers>
<trigger
custom_colour="10"
enabled="y"
match="^Charisma: (\d+) \(.*\) $"
regexp="y"
send_to="9"
sequence="100"
variable="RollCha"
>
<send>%1</send>
</trigger>
<trigger
custom_colour="10"
enabled="y"
match="^Constitution: (\d+) \(.*\) $"
regexp="y"
send_to="9"
sequence="100"
variable="RollCon"
>
<send>%1</send>
</trigger>
<trigger
custom_colour="10"
enabled="y"
match="^Dexterity: (\d+) \(.*\) $"
regexp="y"
send_to="9"
sequence="100"
variable="RollDex"
>
<send>%1</send>
</trigger>
<trigger
custom_colour="10"
enabled="y"
match="^Intelligence: (\d+) \(.*\) $"
regexp="y"
send_to="9"
sequence="100"
variable="RollInt"
>
<send>%1</send>
</trigger>
<trigger
custom_colour="10"
enabled="y"
match="^Keep\? \(Y\/N\) $"
regexp="y"
send_to="12"
sequence="100"
>
<send>dim add, check
add = "N"
If (Cint(Getvariable("RollStr"))+Cint(Getvariable("RollDex"))+Cint(Getvariable("RollCon"))+Cint(Getvariable("RollInt"))+Cint(Getvariable("RollWis"))+Cint(Getvariable("RollCha"))+Cint(Getvariable("RollLck"))) >= 110 Then
add = "Y"
end if
check = "Y"
If Cint(Getvariable("RollStr") < 14 then
check = "N"
end if
If Cint(Getvariable("RollDex") < 14 then
check = "N"
end if
If Cint(Getvariable("RollCon") < 14 then
check = "N"
end if
If Cint(Getvariable("RollInt") < 14 then
check = "N"
end if
If Cint(Getvariable("RollWis") < 14 then
check = "N"
end if
If Cint(Getvariable("RollCha") < 14 then
check = "N"
end if
If Cint(Getvariable("RollLck") < 14 then
check = "N"
end if
If check == "N" OR add == "N" then
world.send "N"
else
world.send "Y"
end if</send>
</trigger>
<trigger
custom_colour="10"
enabled="y"
match="^Luck: (\d+) \(.*\) $"
regexp="y"
send_to="9"
sequence="100"
variable="RollLck"
>
<send>%1</send>
</trigger>
<trigger
custom_colour="10"
enabled="y"
match="^Strength: (\d+) \(.*\) $"
regexp="y"
send_to="9"
sequence="100"
variable="RollStr"
>
<send>%1</send>
</trigger>
<trigger
custom_colour="10"
enabled="y"
match="^Wisdom: (\d+) \(.*\) $"
regexp="y"
send_to="9"
sequence="100"
variable="RollWis"
>
<send>%1</send>
</trigger>
</triggers>
|
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Zendu
(66 posts) Bio
|
Date
| Reply #5 on Wed 12 May 2004 08:18 PM (UTC) Amended on Wed 12 May 2004 08:20 PM (UTC) by Zendu
|
Message
|
*edit* drat flannel knows more about scipting than i...and hes faster |
God im helpless
Currently using MushClient 3.46 on Win Xp pro on [url=www.aetolia.com]Aetolia[/url] | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #6 on Wed 12 May 2004 11:01 PM (UTC) Amended on Wed 12 May 2004 11:02 PM (UTC) by Nick Gammon
|
Message
| With the latest version of MUSHclient you can do that as a single multi-line trigger, like this:
<triggers>
<trigger
enabled="y"
lines_to_match="10"
match="(?x) ^\s*Strength\:\s*(?P<str>\d+)\s*\(.*\)\n \s*Dexterity\:\s*(?P<dex>\d+)\s*\(.*\)\n \s*Constitution\:\s*(?P<con>\d+)\s*\(.*\)\n \s*Intelligence\:\s*(?P<int>\d+)\s*\(.*\)\n \s*Wisdom\:\s*(?P<wis>\d+)\s*\(.*\)\n \s*Charisma\:\s*(?P<cha>\d+)\s*\(.*\)\n \s*Luck\:\s*(?P<lck>\d+)\s*\(.*\)\n \n \s*Keep\?\s+\(Y/N\)\s*$"
multi_line="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
total = %<str> + %<dex> + %<con> + %<int> + _
%<wis> + %<cha> + %<lck>
if %<str> < 14 or _
%<dex> < 14 or _
%<con> < 14 or _
%<int> < 14 or _
%<wis> < 14 or _
%<cha> < 14 or _
%<lck> < 14 then
ColourNote "white", "blue", "stats too low"
Send "N"
elseif total < 110 then
ColourNote "white", "blue", "total too low (" & total & ")"
Send "N"
else
ColourNote "white", "blue", "accepted stats"
Send "Y"
end if
</send>
</trigger>
</triggers>
This uses named wildcards and multi-line triggers to achieve the whole stat roller in a single trigger with fairly easily viewed arithmetic.
You can copy the whole lot and click the "paste" button in the trigger list to import it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
25,719 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top