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
➜ Plugins
➜ French Mush
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Mamat
Indonesia (4 posts) Bio
|
Date
| Sat 03 Jul 2004 05:05 PM (UTC) |
Message
| I am only a player in a French Mush, and i would like to create my own and first plugin. (try)... I really do not know how to create a script or anything, but i really want to learn it.
I have try a Health Bar using a window, and try to adapt it in a Vampire the Masquerade Mush, but give me some errors, well alot. i do not know how to detect the right info, and many of the codes or variables are using French words using Accents, like "é, è, ê" what are the possibilities to fix that problem?
Please advise.
Thank you | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 03 Jul 2004 09:36 PM (UTC) |
Message
| It is hard to fix "some errors".
Please post the exact script you used, and the error messages. Copy and paste, not retype.
I don't speak French but there is at least one forum user that does. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #2 on Sat 03 Jul 2004 11:22 PM (UTC) |
Message
| *raises his hand*
However I'd need more information as well... but I do speak French quite well (having been through junior + high school in France) so I can help with any language issues. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Mamat
Indonesia (4 posts) Bio
|
Date
| Reply #3 on Sun 04 Jul 2004 04:06 AM (UTC) |
Message
| Thanks for your concern.
Actually, even after the error show, the Health Bar window open anyway, but empty.
I have those 3 Info that i want to switch.
HP = Sang
Mana = Santé
Move = Agravé
Translate - Sang = Blood, Santé = Health, Agravé = Agravated.
It is for A Vampire the Masquerade concept btw.
I do not think it is necessary to post my Code, since i use the same code that Nick Post, the Zip one. Nad try to change the HP, MAna, and Move to my french words.
-------------------------------
That error below is the error that show me even without changing anything from Nick's Original script.
I might as well do everything wrong hehehe.
Error number: -2146828275
Event: Execution of line 58 column 3
Description: Type mismatch
Called by: Function/Sub: OnPluginConnect called by Plugin Super_Health_Bar
Reason: Executing plugin Super_Health_Bar sub OnPluginConnect
----------------------------------
If i may ask, where do i put those 2 Folders attached to your Mushclient_bar.exe, the "source" & "WINNT" Folder..
I am really newbie in this code thing, I just want to learn it.
i will post the code in another post, since it is to much | Top |
|
Posted by
| Mamat
Indonesia (4 posts) Bio
|
Date
| Reply #4 on Sun 04 Jul 2004 04:07 AM (UTC) |
Message
| Here is teh code i use anyway :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient [
<!ENTITY trigger_match
"^\<\-?(\d+)\/(\d+) hp \-?(\d+)\/(\d+) m \-?(\d+)\/(\d+) mv\>(.*?)$"
>
]>
<!-- Saved on Saturday, August 16, 2003, 7:11 AM -->
<!-- MuClient version 3.42 -->
<!-- Plugin "Super_Health_Bar" generated by Plugin Wizard -->
<!--
You will probably need to customise the trigger to match your MUD.
See ENTITY line near top of file. The above trigger will match on:
<54/1000 hp 90/100 m 600/750 mv>
A simpler trigger would be:
<*/*hp */*m */*mv>
-->
<muclient>
<plugin
name="Super_Health_Bar"
author="Nick Gammon"
id="4637b3ca32d84f4b5ea6743b"
language="VBscript"
purpose="Health, Mana, Movement bar implemented with external VB program"
date_written="2003-08-16 07:08:12"
requires="3.42"
version="1.0"
save_state="y"
>
<description trim="y">
<![CDATA[
Uses a small Visual Basic program to display your current health,
mana and movement points in a separate window.
You need your prompt line to display the appropriate information,
naturally. I used this in SMAUG:
prompt <%h/%H hp %m/%M m %v/%V mv>
fprompt <%h/%H hp %m/%M m %v/%V mv>
"prompt" sets the normal prompt, "fprompt" sets the fight prompt.
Customise the plugin if you want to match a different sort of prompt line.
]]>
</description>
</plugin>
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
match="&trigger_match;"
regexp="y"
send_to="12"
sequence="100"
>
<send>
On Error Resume Next
if not isempty (barobject) then
if not (barobject is nothing) then
barobject.SetMaxHP %2
barobject.SetHP %1
barobject.SetMaxMana %4
barobject.SetMana %3
barobject.SetMaxMove %6
barobject.SetMove %5
end if
end if
</send>
</trigger>
</triggers>
<!-- Timers -->
<timers>
<timer
script="CheckPrompt"
enabled="y"
second="1"
>
</timer>
</timers>
<!-- Script -->
<script>
<![CDATA[
'
' global variable which is the HP bar Visual Basic COM object
'
dim barobject
barobject = empty
'
' Central spot for showing errors, so we can easily customise colours
'
sub ShowError (sMessage)
world.ColourNote "white", "red", sMessage
end sub
'
' This world has been connected (to the MUD)
'
sub OnPluginConnect
dim X, Y, width
if isempty (barobject) then
set barobject = nothing
end if
if barobject is nothing then
On Error Resume Next
set barobject = createobject ("MUSHclient_bar.Bar")
If Err.Number <> 0 Then
ShowError Err.Description
ShowError "Cannot execute bar display program"
ShowError "Check it is installed."
Exit Sub
End If
On Error GoTo 0
'
' reposition it (from value saved last time)
'
X = GetVariable ("X")
Y = GetVariable ("Y")
width = GetVariable ("width")
if not IsEmpty (X) and not IsEmpty (Y) then
barobject.SetPosition CInt (X), CInt (Y)
else
Note "First time used - using default screen position"
end if
if not IsEmpty (width) then
barobject.SetWidth CInt (width)
end if
barobject.SetTitle world, world.WorldName
end if
end sub
'
' This world has been disconnected (from the MUD)
'
sub OnPluginDisconnect
On Error Resume Next
'
' release bar window - remember position
'
if not isempty (barobject) then
if not barobject is nothing then
SetVariable "X", barobject.GetX
SetVariable "Y", barobject.GetY
SetVariable "width", barobject.GetWidth
set barobject = nothing
end if
end if
end sub
sub CheckPrompt (sName)
Dim regEx, Matches, Match, sLine, iNumber
'
' Find line number of last line in buffer
'
iNumber = world.GetLinesInBufferCount
' ignore lines with a newline at the end
if world.GetLineInfo (iNumber, 3) then exit sub
' ignore world.note lines
if world.GetLineInfo (iNumber, 4) then exit sub
' ignore player input lines
if world.GetLineInfo (iNumber, 5) then exit sub
'
' So far we have a line that is MUD output (not note or command)
' and it doesn't have a newline, so it is probably a prompt
'
' get text of line
sLine = world.GetLineInfo (iNumber, 1)
'
' Make a regular expression to match on the line:
'
'
Set regEx = New RegExp
'
' exit CDATA block so we can use the trigger entity
'
]]>
regEx.Pattern = "&trigger_match;"
<![CDATA[
'
' Execute regular expression
'
Set Matches = regEx.Execute (sLine)
'
' Exit if no match
'
if Matches.Count = 0 then exit sub
Set Match = Matches.Item (0)
Set regEx = Nothing
Set Matches = Nothing
'
' Update the bar
'
On Error Resume Next
if not isempty (barobject) then
if not (barobject is nothing) then
barobject.SetMaxHP CInt (Match.SubMatches (1))
barobject.SetHP CInt (Match.SubMatches (0))
barobject.SetMaxMana CInt (Match.SubMatches (3))
barobject.SetMana CInt (Match.SubMatches (2))
barobject.SetMaxMove CInt (Match.SubMatches (5))
barobject.SetMove CInt (Match.SubMatches (4))
end if
end if
Set Match = Nothing
end sub
'
' Called if the user closes the bar window
'
sub barclosed (arg)
OnPluginDisconnect
end sub
]]>
</script>
</muclient>
----------------------
SO what i did try actually is to change all HP to Sang and so on, and never work. Since i have the error even before. And the window is still showing the Original info, like HP Mana and Move.
If you guys think it is useless for you to help me, well i will understand...
Thanks guys!
Ciao.
| Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #5 on Sun 04 Jul 2004 11:05 PM (UTC) |
Message
| Is that the original plugin? There is not much point in posting that, we have that one. Can you post the one with your changes in it? And what goes wrong exactly? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Mamat
Indonesia (4 posts) Bio
|
Date
| Reply #6 on Mon 05 Jul 2004 04:52 AM (UTC) |
Message
| Oops, i have reinstall the original, and delete the one i try, i guess ill do it again.
Btw, even with the original script, it gives me the error:
Error number: -2146828275
Event: Execution of line 58 column 3
Description: Type mismatch
Called by: Function/Sub: OnPluginConnect called by Plugin Super_Health_Bar
Reason: Executing plugin Super_Health_Bar sub OnPluginConnect
So it is not actually the changes i made, or just not yet, since it never go until there... | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #7 on Mon 05 Jul 2004 04:22 PM (UTC) |
Message
| Maybe you don't have the right prompt trigger. What's the prompt look like on your MUSH? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,162 posts) Bio
Forum Administrator |
Date
| Reply #8 on Tue 06 Jul 2004 10:30 PM (UTC) |
Message
| Have you read this thread? ...
http://www.gammon.com.au/forum/?bbsubject_id=3128
This describes the Super Health Bar plugin. One essential is to compile the VB program that the trigger calls, or install the downloaded precompiled one. However there are 3 pages of that thread that discuss problems with doing that. This is not really the plugin's fault, it is problems with compiling and/or registering VB programs. Notice the disclaimer:
Quote:
However I am finding that when attempting to run it on other PCs I get strange behaviour, like missing VB DLLs, and other things. However you may be able to make it work, especially if you have VB installed.
|
- 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.
24,942 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top