Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
MUSHclient
Tips and tricks
Triggers and putting a balance on them
Triggers and putting a balance on them
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Pages: 1
2
Posted by
| Natasi
(79 posts) bio
|
Date
| Reply #15 on Wed 08 Sep 2004 11:31 PM (UTC) |
Message
| I get this error when trying to load a script with my Sub's for the triggers....
Error number: -2146827256
Event: Execution of line 1 column 1
Description: Invalid character
Line in error:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fcharset0 Courier New;}{\f3\fswiss\fcharset0 Arial;}}
Called by: Immediate execution
When I loaded the vbs file, mushclient added that whole part itself for some reason to the beggining of it. | top |
|
Posted by
| Flannel
USA (1,230 posts) bio
|
Date
| Reply #16 on Wed 08 Sep 2004 11:38 PM (UTC) Amended on Wed 08 Sep 2004 11:39 PM (UTC) by Flannel
|
Message
| Open it up in a text editor. Looks like RTF stuff.
Are you sure you saved it as vbs? (You might think you saved it as vbs, but it actually had something else appended to the end, if you have file extensions hidden, youll have to get creative with opening/saving, and you might see "script.vbs" but in reality its "script.vbs.rtf" or whatever)
But yeah, see if you cant delete the extra stuff (or just make a new file) in a text editor (not word, and not wordpad, notepad if nothing else, or MCs notepad). |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | top |
|
Posted by
| Natasi
(79 posts) bio
|
Date
| Reply #17 on Thu 09 Sep 2004 04:43 AM (UTC) |
Message
| ok, did it in Notepad and didn't get that error...now I'm getting this one and whenever I try something that does script I get a big red pop up that says my script is not enabled...even though it is...
Error number: -2146827276
Event: Execution of line 57 column 5
Description: Expected 'If'
Line in error:
end Sub
Called by: Immediate execution
following is the first part of the script I made, it's based on the one in this post earlier.
Sub herbhealing (a, b, c)
Dim value, spell, anorexia, aeon
anorexia = world.getvariable ("affliction_anorexia")
aeon = world.getvariable ("affliction_aeon")
If aeon = "on" Then
Exit Sub
If anorexia = "on" Then
Exit Sub
End If
For Each v In world.GetVariableList
value = world.GetVariable (v)
If Left (v, 11) = "affliction_" Then
spell = Mid (v, 12)
If value = "on" Then
Select Case spell
Case "stupidity" world.sendpush "eat pennyroyal"
Case "slickness" world.sendpush "eat calamus"
Case "paralysis" world.sendpush "eat kombu"
Case "confusion" world.sendpush "eat pennyroyal"
case "epilepsy" world.sendpush "eat kombu"
Case "dizziness" world.sendpush "eat kombu"
Case "recklessness" world.sendpush "eat horehound"
Case "justice" world.sendpush "eat reishi"
Case "paranoia" world.sendpush "eat pennyroyal"
case "hallucinations" world.sendpush "eat pennyroyal"
case "generosity" world.sendpush "eat galingale"
case "claustrophobia" world.sendpush "eat wormwood"
case "vertigo" world.sendpush "eat myrtle"
Case "dementia" world.sendpush "eat pennyroyal"
case "clumsiness" world.sendpush "eat kombu"
case "agoraphobia" world.sendpush "eat wormwood"
case "peace" world.sendpush "eat reishi"
Case "hemophilia" world.sendpush "eat yarrow"
Case "lethargy" world.sendpush "eat yarrow"
Case "relapsing" world.sendpush "eat yarrow"
Case "arteries" world.sendpush "eat yarrow"
Case "healthleech" world.sendpush "eat horehound"
Case "dissonant" world.sendpush "eat horehound"
Case "addiction" world.sendpush "eat galingale"
Case "gluttony" world.sendpush "eat galingale"
Case "rigormortis" world.sendpush "eat marjoram"
Case "torn" world.sendpush "eat marjoram"
Case "vapors" world.sendpush "eat kombu"
Case "nerves" world.sendpush "eat kombu"
Case "hypochondria" world.sendpush "eat wormwood"
Case "vestiphobia" world.sendpush "eat wormwood"
Case "sensitivity" world.sendpush "eat myrtle"
Case "weakness" world.sendpush "eat marjoram"
Case "lovers" world.sendpush "eat galingale"
Case "deafness" world.sendpush "eat faeleaf"
Case "blindenss" world.sendpush "eat faeleaf"
End Select
Exit Sub
End If
End If
Next
End Sub if
Sub stupidityon (a, b, c)
world.setvariable "affliction_stupidity", "on"
anorexia = world.getvariable ("affliction_anorexia")
aeon = world.getvariable ("affliction_aeon")
If aeon = "off" Then
If anorexia = "off" Then
world.sendpush "eat pennyroyal"
End If
end Sub
Sub stupidityoff (a, b, c)
world.setvariable "affliction_stupidity", "off"
End Sub
-------------------
this is just the beggining...please tell me what I've done wrong here if anything, thanks | top |
|
Posted by
| Flannel
USA (1,230 posts) bio
|
Date
| Reply #18 on Thu 09 Sep 2004 04:53 AM (UTC) |
Message
| End If
Next
End Sub if <---------------
Sub stupidityon (a, b, c)
Is that if there a copy error?
Also, which line is 57? Is there anything above this in the file?
If it says your script isnt enabled, enable it, save the world, close it, and reopen it (maybe restart MC, if you feel like it). And see if its still enabled.
You can go check the world file if its enabled. It should be. If its not in the world file, add it. Since it could be an issue with saving the world file with the enabled set.
Although I highly doubt that. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | top |
|
Posted by
| Natasi
(79 posts) bio
|
Date
| Reply #19 on Thu 09 Sep 2004 06:36 AM (UTC) |
Message
| ack, where I placed that "if" was line 57..forgot to mention that...I checked and everything is enabled it said. I saved the world and restarted everything and it still says I dont have script enabled. minus that stupidityon/off Sub, can you show me how that first Herbhealing Sub is supposed to go? Thanks again | top |
|
Posted by
| Natasi
(79 posts) bio
|
Date
| Reply #20 on Sun 12 Sep 2004 02:00 AM (UTC) |
Message
| YIPPY!! I figured out the errors..and my afflictions get healed..but when I get herbbalance back it's not curing my left over afflictions like it should...following is the "herbhealing" Sub...if anyone can tell me what I may be doing wrong, thank you
Sub herbhealing (a, b, c)
Dim value, spell, anorexia, aeon
anorexia = world.getvariable ("affliction_anorexia")
aeon = world.getvariable ("affliction_aeon")
If aeon = "on" Then
Exit Sub
If anorexia = "on" Then
Exit Sub
End If
For Each v In world.GetVariableList
value = world.GetVariable (v)
If Left (v, 11) = "affliction_" Then
spell = Mid (v, 12)
If value = "on" Then
Select Case spell
Case "stupidity" world.sendpush "eat pennyroyal"
Case "slickness" world.sendpush "eat calamus"
Case "paralysis" world.sendpush "eat kombu"
Case "confusion" world.sendpush "eat pennyroyal"
case "epilepsy" world.sendpush "eat kombu"
Case "dizziness" world.sendpush "eat kombu"
Case "recklessness" world.sendpush "eat horehound"
Case "justice" world.sendpush "eat reishi"
Case "paranoia" world.sendpush "eat pennyroyal"
case "hallucinations" world.sendpush "eat pennyroyal"
case "generosity" world.sendpush "eat galingale"
case "claustrophobia" world.sendpush "eat wormwood"
case "vertigo" world.sendpush "eat myrtle"
Case "dementia" world.sendpush "eat pennyroyal"
case "clumsiness" world.sendpush "eat kombu"
case "agoraphobia" world.sendpush "eat wormwood"
case "peace" world.sendpush "eat reishi"
Case "hemophilia" world.sendpush "eat yarrow"
Case "lethargy" world.sendpush "eat yarrow"
Case "relapsing" world.sendpush "eat yarrow"
Case "arteries" world.sendpush "eat yarrow"
Case "healthleech" world.sendpush "eat horehound"
Case "dissonant" world.sendpush "eat horehound"
Case "addiction" world.sendpush "eat galingale"
Case "gluttony" world.sendpush "eat galingale"
Case "rigormortis" world.sendpush "eat marjoram"
Case "torn" world.sendpush "eat marjoram"
Case "vapors" world.sendpush "eat kombu"
Case "nerves" world.sendpush "eat kombu"
Case "hypochondria" world.sendpush "eat wormwood"
Case "vestiphobia" world.sendpush "eat wormwood"
Case "sensitivity" world.sendpush "eat myrtle"
Case "weakness" world.sendpush "eat marjoram"
Case "lovers" world.sendpush "eat galingale"
Case "deafness" world.sendpush "eat faeleaf"
Case "blindenss" world.sendpush "eat faeleaf"
End Select
Exit Sub
End If
End If
Next
end if
end sub
| top |
|
Posted by
| Patt
(1 post) bio
|
Date
| Reply #21 on Wed 16 Mar 2005 05:38 AM (UTC) |
Message
| Hey everyone,
Coming across Ked's example script put me on a good start but the Save affliction fuctions isnt working for me. Whenever I set the trigger of nothing happens. Anyone lend me some assistance please? | 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.
66,418 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top