[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  quest complete trigger problems

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: quest complete trigger problems
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Perrin   USA  (31 posts)  [Biography] bio
Date Tue 01 Jan 2008 06:54 AM (UTC)  quote  ]
Message
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Sunday, December 30, 2007, 8:45 PM -->
<!-- MuClient version 4.14 -->



<muclient>
<plugin
name="quester"
author="Randalthor"
id="cfcbe12cc3b9518a11b1e080"
language="VBscript"
purpose="to keep track of your progress"
save_state="y"
date_written="2007-12-30 20:42:13"
requires="4.14"
version="1.0"
>

</plugin>


<!-- Get our standard constants -->

<include name="constants.vbs"/>

<!-- Triggers -->

<triggers>
<trigger
custom_colour="12"
enabled="y"
ignore_case="y"
keep_evaluating="y"
match="^Questor tells you \'As a reward, I am giving you (\d{1,}) quest points and (\d{1,}) gold\.\'$"
name="QuestTrig1"
regexp="y"
send_to="12"
sequence="98"
>
<send>setvariable "goldgain", %2
setvariable "qpgain", %1
enabletrigger "QuestTrig2", 1
enabletrigger "QuestTrig3", 1
world.addtimer "qcd_1", 0, 27, 0, "gtell @Gthree minutes@Y and counting..........@w", 5, ""
world.addtimer "qcd_2", 0, 28, 0, "gtell @ytwo minutes @Yand counting..........@w", 5, ""
world.addtimer "qcd_3", 0, 29, 0, "gtell @Rone @Yminute remaining..........@w", 5, ""
</send>
</trigger>
<trigger
custom_colour="12"
ignore_case="y"
keep_evaluating="y"
match="^You get lucky and gain an extra (.*?) quest points\.$"
name="QuestTrig2"
regexp="y"
send_to="12"
sequence="98"
>
<send>setvariable "qpgain", Cint(getvariable("qpgain")+%1)
</send>
</trigger>
<trigger
custom_colour="12"
ignore_case="y"
keep_evaluating="y"
match="^You gain an extra (.*?) quest points \'MCCP Bonus\'\.$"
name="QuestTrig3"
regexp="y"
send_to="12"
sequence="98"
>
<send>setvariable "qpgain", Cint(getvariable("qpgain")+%1)
enabletrigger "QuestTrig2", 0
enabletrigger "QuestTrig3", 0
send "gtell Quest Complete: " &amp; getvariable("qpgain") &amp; " qp and " &amp; getvariable("goldgain") &amp; " gold."
</send>
</trigger>
<trigger
custom_colour="10"
enabled="y"
ignore_case="y"
keep_evaluating="y"
match="^You gain an extra (.*?) quest points \'MCCP Bonus\'\.$"
name="QuestTrig4"
regexp="y"
send_to="12"
sequence="98"
>
<send>setvariable "qptotal", Cint(getvariable("qptotal"))+Cint(getvariable("qpgain"))</send>
</trigger>
<trigger
custom_colour="11"
enabled="y"
ignore_case="y"
keep_evaluating="y"
match="^You gain an extra (.*?) quest points \'MCCP Bonus\'\.$"
name="QuestTrig5"
regexp="y"
send_to="12"
sequence="98"
>
<send>setvariable "goldtotal", Cint(getvariable("goldtotal"))+Cint(getvariable("goldgain"))</send>
</trigger>
<trigger
custom_colour="11"
enabled="y"
match="You . o O ( clear )"
name="logger"
send_to="12"
sequence="100"
>
<send>world.appendtonotepad "aard_quest_log", "Today's total " &amp; getvariable ("goldtotal") &amp; " gold and " &amp; getvariable ("qptotal") &amp; " quest points "

setvariable "goldtotal", 0
setvariable "qptotal", 0 </send>
</trigger>
</triggers>

<!-- Aliases -->

<aliases>
<alias
match="qr"
enabled="y"
sequence="100"
>
<send>enter
run 8s
quest request</send>
</alias>
<alias
match="qc"
enabled="y"
sequence="100"
>
<send>enter
run 8s
quest complete</send>
</alias>
</aliases>

</muclient>

aardwolf player
[Go to top] top

Posted by Perrin   USA  (31 posts)  [Biography] bio
Date Sat 17 Jul 2004 02:52 AM (UTC)  quote  ]

Amended on Thu 20 Dec 2007 09:58 AM (UTC) by Perrin

Message
thanks everyone for the help. Flannel even with what you sent me i have to fiddle with to get it to work. for furture refrence this is the set the ended up working.

just realized small typo corrected 12/20/07

<triggers>
<trigger
custom_colour="12"
enabled="y"
ignore_case="y"
keep_evaluating="y"
match="^Questor tells you \'As a reward, I am giving you (\d{1,}) quest points and (\d{1,}) gold\.\'$"
name="QuestTrig1"
regexp="y"
send_to="12"
sequence="98"
>
<send>setvariable &quot;goldgain&quot;, %2
setvariable &quot;qpgain&quot;, %1
enabletrigger &quot;QuestTrig2&quot;, 1
enabletrigger &quot;QuestTrig3&quot;, 1
</send>
</trigger>
<trigger
custom_colour="12"
ignore_case="y"
keep_evaluating="y"
match="^You gain an extra (.*?) quest points \'MCCP Bonus\'\.$"
name="QuestTrig3"
regexp="y"
send_to="12"
sequence="98"
>
<send>setvariable &quot;qpgain&quot;, Cint(getvariable(&quot;qpgain&quot;)+%1)
enabletrigger &quot;QuestTrig2&quot;, 0
enabletrigger &quot;QuestTrig3&quot;, 0
send &quot;gtell Quest Complete: &quot; &amp; getvariable(&quot;qpgain&quot;) &amp; &quot; qp and &quot; &amp; getvariable(&quot;goldgain&quot;) &amp; &quot; gold.&quot;
</send>
</trigger>
<trigger
custom_colour="12"
ignore_case="y"
keep_evaluating="y"
match="^You get lucky and gain an extra (.*?) quest points\.$"
name="QuestTrig2"
regexp="y"
send_to="12"
sequence="98"
>
<send>setvariable &quot;qpgain&quot;, Cint(getvariable(&quot;qpgain&quot;)+%1)
</send>
</trigger>
</triggers>

aardwolf player
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Fri 16 Jul 2004 09:46 PM (UTC)  quote  ]
Message
actually, those are supposed to be references to the wildcards. They should be %1 on both accounts.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Fri 16 Jul 2004 05:30 PM (UTC)  quote  ]
Message
Hmm. In the first case you are trying to add nothing to the variable, i.e. '+' instead of '+ 1', or whatever you may have intended.

In both cases you are forgettting a ')'. What you are telling it is basically this:

Cint - Convert the following to integer.
( - start with
getvariable("qpgain") + 2 - The value of gpgain + 2

You need to also have:

) - end conversion

someplace in there. In other words:

setvariable "qpgain", Cint(getvariable("qpgain")+2)

or

setvariable "qpgain", Cint(getvariable("qpgain"))+2

Though the second is probably better, since you already know that '+ 2' is an integer. If gpgain for some reason isn't, then you would get another error, as a result of adding 2 to a non-number. You need to fix the first line the same way *and* add the value you want to add to it, which I assume was supposed to be '1':

setvariable "qpgain", Cint(getvariable("qpgain")+1

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Perrin   USA  (31 posts)  [Biography] bio
Date Fri 16 Jul 2004 09:02 AM (UTC)  quote  ]
Message
I have done all that (all ready had all that done)
I keep getting this :

Error Number: -2146827286
Event: Execution of line 1 column 50
Description: Syntax error
Line in error:
setvariable "qpgain", Cint(getvariable("qpgain")+
Called By: Immediate execution

Error Number: -2146827282
Event: Execution of line 1 column 51
Description: Expected ')'
Line in error:
setvariable "qpgain", Cint(getvariable("qpgain")+2
Called By: Immediate execution

the second time it fired i didn't notice because i hit my complete quest macro (recalls/uses recall portal, runs to questor and sends quest complete)and left my keyboard to use restroom and came back it caused mushclient to close the muds window.

aardwolf player
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Thu 15 Jul 2004 04:58 PM (UTC)  quote  ]
Message
What are you doing? You need to check "enable scripting", set it to VBScript, Then Import those triggers (copy/paste, or importXML). No script file involved.

However, those triggers DO use the MCCP bonus as a fairly important line, is there any reason (assuming youre on the same mud) that you DONT have MCCP turned on (and thus arent getting the bonus?) That line made the whole system a lot easier.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Perrin   USA  (31 posts)  [Biography] bio
Date Thu 15 Jul 2004 11:45 AM (UTC)  quote  ]

Amended on Thu 15 Jul 2004 11:46 AM (UTC) by Perrin

Message
ok i have been fiddling with the script posted on the other thread and can't get it to work (when i hit edit script the page is blank could that have something to do with it?) and a error screen pops up say statement expected error in line.

aardwolf player
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Thu 15 Jul 2004 08:44 AM (UTC)  quote  ]
Message
Like nick said...
http://www.gammon.com.au/forum/?bbsubject_id=4389
has this exact question.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Perrin   USA  (31 posts)  [Biography] bio
Date Thu 15 Jul 2004 08:41 AM (UTC)  quote  ]
Message
I did some tinkering and found a string that works as a trigger to do what i want but still need somekind of script to read it.

^Questor tells you \'As a reward\, I am giving you (.*?) quest points and (.*?) gold\.\'$

echo %1qp %2 gold

^You get lucky and gain an extra (.*?) quest points\.$

echo %1 qp

aardwolf player
[Go to top] top

Posted by Nick Gammon   Australia  (18,800 posts)  [Biography] bio   Forum Administrator
Date Thu 15 Jul 2004 08:35 AM (UTC)  quote  ]
Message
This came up recently, try reading this page:

http://www.gammon.com.au/forum/?bbsubject_id=4389

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Perrin   USA  (31 posts)  [Biography] bio
Date Thu 15 Jul 2004 08:25 AM (UTC)  quote  ]

Amended on Thu 15 Jul 2004 08:27 AM (UTC) by Perrin

Message
Well I am playing on Aardwolf and am tring to combine what would take two regualer triggers giving two messages into one message.

first idea i had was:
Questor tells you 'As a reward, I am giving you [0-9] quest points and [0-9] gold.'
send: (something like) echo %1 qp %2 gold
You get lucky and gain an extra [0-9] quest points.
send echo %1 qp

and get a script to add the 2 diffrent qp ammounts and send it over a channel with the gold number added as well
any ideas would be helpfull thanks in advance.

aardwolf player
[Go to top] 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.


3,560 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]