Register forum user name Search FAQ

Gammon Forum

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 ➜ VBscript ➜ quest complete trigger problems

quest complete trigger problems

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Perrin   USA  (31 posts)  Bio
Date Thu 15 Jul 2004 08:25 AM (UTC)

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
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 15 Jul 2004 08:35 AM (UTC)
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
Top

Posted by Perrin   USA  (31 posts)  Bio
Date Reply #2 on Thu 15 Jul 2004 08:41 AM (UTC)
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
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Thu 15 Jul 2004 08:44 AM (UTC)
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.
Top

Posted by Perrin   USA  (31 posts)  Bio
Date Reply #4 on Thu 15 Jul 2004 11:45 AM (UTC)

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
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #5 on Thu 15 Jul 2004 04:58 PM (UTC)
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.
Top

Posted by Perrin   USA  (31 posts)  Bio
Date Reply #6 on Fri 16 Jul 2004 09:02 AM (UTC)
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
Top

Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Reply #7 on Fri 16 Jul 2004 05:30 PM (UTC)
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
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #8 on Fri 16 Jul 2004 09:46 PM (UTC)
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.
Top

Posted by Perrin   USA  (31 posts)  Bio
Date Reply #9 on Sat 17 Jul 2004 02:52 AM (UTC)

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
Top

Posted by Perrin   USA  (31 posts)  Bio
Date Reply #10 on Tue 01 Jan 2008 06:54 AM (UTC)
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
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.


38,367 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.