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 ➜ General ➜ zMud to MUSHclient Script Conversion

zMud to MUSHclient Script Conversion

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


Pages: 1  2 

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #15 on Mon 03 Sep 2007 03:26 AM (UTC)
Message
Quote:
It's a conglomeration of Ninja's and Atreidess' monitoring script.

Mine is almost finished and so far it works much better than I had hoped when I started... except for a minor issue with crashing if you kill a gq mob and don't win the gq. As soon as I get that stable, I will release mine. Or I can email it to you if you don't mind that bit of annoyance here and there.

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Bottomfeeder   (42 posts)  Bio
Date Reply #16 on Wed 05 Sep 2007 04:43 AM (UTC)
Message
Oh man, that would be great.

Ono (Venificius on aard) was helping clean out the bugs on the script NeoFryBoy posted on here. I was positive we had it but it falls apart after a day or two for some reason. If you need a tester for your script let me know.

I'm loving your quest mob/quest reporter/level timers and would love to get my hands on more of your handiwork.

Oh, my email is cam_revard@yahoo.com
Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #17 on Wed 05 Sep 2007 04:31 PM (UTC)
Message
Ok, finally finished debugging that gq loss part. Really pathetically stupid error I don't care to admit to making :p Anyway, I've released a beta version on my website http://biggs.is-a-geek.net/~balaam/ under GainMonitor. I have not gotten around to adding any neat things like double xp tracking, voluntary clan taxing and the like, but it works. It even recognizes when you are in note mode and won't do that annoying "gt quest time" thing everyone else seems to enjoy putting into their notes. Instead, it displays the information to the screen only. Colours are also customizable, as is where each information type is displayed.

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Csd132   (6 posts)  Bio
Date Reply #18 on Fri 18 Jan 2008 06:12 AM (UTC)
Message
Shaun Biggs,

If you wouldn't mind, would you be willing to post your moon tracking plug-in that you created in here? I'm relatively new to Mushclient and so I'm not very good at scripting just yet. I have been trying to do the same thing you said (and convert Bejito's Moonbot script from Zmud to MC), but I haven't really been able to do it.

I admit that part of the problem is that I was never great at coding in Zmud either (aside from basic triggers and aliases), so I don't really fully understand even how the moon class works. I've spent quite a bit of time just reading through that code and trying to display it in such a way as to make sense, but there are far too many nested if statements and commands I don't understand.

If you'd like I can post the moonbot script to this forum. The script itself (for Zmud) can be found at http://mud.alhena.org/scripting/moonbot.zip

I would really appreciate your help. That might actually be a good plug in to add to Venificius's Aardwolf Plugin Zip File. You, Nick, and Venificius have really made my transition to Mushclient a real joy. I've become somewhat dependent on the forum to get things to work and I absolutely love the code you guys have come up with. Thanks so much



Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #19 on Fri 18 Jan 2008 04:23 PM (UTC)

Amended on Sun 20 Jan 2008 04:16 AM (UTC) by Shaun Biggs

Message
Sorry, my site went down for quite a while, and now I'm having a rather hard time getting my old host name back. This is also an old version, I don't have access to the new version while I'm at work.

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Thursday, May 17, 2007, 9:30 AM -->
<!-- MuClient version 4.05 -->

<!-- Plugin "moonbot" generated by Plugin Wizard -->

<muclient>
<plugin
   name="moonbot"
   author="Balaam"
   id="2349913955dd86427355ad5e"
   language="Lua"
   purpose="moon phase tracker"
   save_state="y"
   date_written="2007-05-17 09:28:14"
   requires="4.05"
   version="1.0"
   >
</plugin>

<!--  Get our standard constants -->

<include name="constants.lua"/>

<!--  Triggers  -->

<triggers>
  <trigger
   enabled="y"
   group="moons"
   match="--&gt; TICK &lt;--*"
   name="moontick"
   send_to="12"
   sequence="100"
  >
  <send>for i,v in pairs(moons) do
  if moons[i].now ~= nil then
    moons[i].now = (v.now+1) % v.cycle
  end
end
if countdown == nil then
  countdown, countdowndur = nextunion()
else
  countdown = countdown - 1
  if countdown &lt; 1 then
    countdown, countdowndur = nextunion()
    ColourNote("lime", "black", "Three moons are up for "..countdowndur.." ticks!" )
  end
end</send>
  </trigger>
  <trigger
   enabled="y"
   group="moons"
   match="^You notice the (black|grey|white) moon fall in the (ea|we)st.$"
   name="moonsetting"
   regexp="y"
   script="moonsetting"
   sequence="100"
  >
  </trigger>
</triggers>

<!--  Aliases  -->

<aliases>
  <alias
   match="moon:plot"
   enabled="y"
   group="moontracker"
   send_to="12"
   sequence="100"
  >
  <send>if (moons.black.now == nil ) or
   (moons.grey.now == nil ) or
   (moons.white.now == nil ) then
  Note( "The cycle of one or more moons is unknown.")
else
  plotdata={white={},grey={},black={}}
  for i = 0,69 do
    for m,t in pairs(plotdata) do
      table.insert(t, ((moons[m].now + i ) % moons[m].cycle) &lt; moons[m].up)
    end
  end
  for i,t in pairs(plotdata) do
    local temp = "["
    for _,v in ipairs(t) do
      if v then
        temp = temp.."O"
      else
        temp = temp.."."
      end
    end
    print(temp.."] "..i)
  end
end</send>
  </alias>
  <alias
   match="moon:union"
   enabled="y"
   group="moontracker"
   send_to="12"
   sequence="100"
  >
  <send>print(nextunion())</send>
  </alias>

  <alias
   match="moon:print"
   enabled="y"
   group="moontracker"
   send_to="12"
   sequence="100"
  >
  <send>Note( "Black="..(moons.black.now or "nil")..
        " Grey="..(moons.grey.now or "nil")..
	" White="..(moons.white.now or "nil") )
  </send>
  </alias>
  
  <alias
   match="moon:tick"
   enabled="y"
   group="moontracker"
   send_to="12"
   sequence="100"
  >
  <send>tickgag = not tickgag
  SetVariable( "tickgag", tostring(gagmoon) )
  local temp = "n"
  if tickgag then temp = "y" end
  SetTriggerOption( "moontick", "omit_from_output", temp )
  ColourNote( "white", "black", "Tick gagging set to ",
              "lime",  "black", tostring(tickgag) )
  </send>
  </alias>

  <alias
   match="^moon(bot)?:help"
   send_to="12"
   regexp="y"
   enabled="y"
  >
  <send>  OnPluginInstall()
  ColourNote( "white", "black", "moonbot:help ",
              "lime",  "black", ": You just typed it.  Look what happened." )
  ColourNote( "white", "black", "moon:plot    ",
              "lime",  "black", ": show the moon cycle" )
  ColourNote( "white", "black", "moon:union   ",
              "lime",  "black", ": show time until next union of 3 moons" )
  ColourNote( "white", "black", "moon:tick    ",
              "lime",  "black", ": turn tick gagging on or off" )
  </send>
  </alias>
  
</aliases>

<!--  Script  -->
<script>
<![CDATA[
tickgag = GetVariable( "tickgag" )
if tickgag == nil then
  tickgag = false
else
  tickgag = gagmoon == "true"
  SetTriggerOption( "moontick", "omit_from_output", "y" )
end

moons={black={now=nil,cycle=50,up=13},
       grey={now=nil,cycle=30,up=8},
       white={now=nil,cycle=65,up=17}}

function moonsetting( tname, tstr, wildcards )
  local moon = wildcards[1]
  moons[moon].now = moons[moon].up - 2
end-- moonsetting

function printmoons()
  Note( "Black="..(moons.black.now or "nil")..
        " Grey="..(moons.grey.now or "nil")..
	" White="..(moons.white.now or "nil") )
end

function nextunion()
  if (moons.black.now == nil ) or
     (moons.grey.now == nil ) or
     (moons.white.now == nil ) then
    return nil,nil
  else
    local offset = 0
    while ((moons.white.now + offset) % moons.white.cycle >= moons.white.up) or
          ((moons.black.now + offset) % moons.black.cycle >= moons.black.up) or
          ((moons.grey.now + offset) % moons.grey.cycle >= moons.grey.up) do
      offset = offset + 1
    end
    local duration = 1
    while ((moons.white.now + offset + duration) % moons.white.cycle < moons.white.up) and
          ((moons.black.now + offset + duration) % moons.black.cycle < moons.black.up) and
          ((moons.grey.now + offset + duration) % moons.grey.cycle < moons.grey.up) do
      duration = duration + 1
    end
    return offset,duration
  end
end -- nextunion()

function OnPluginInstall()
  ColourNote( "white", "black", "Plugin ",
              "lime",  "black", GetPluginName(),
              "white", "black", " Version:",
              "lime",  "black", tostring(GetPluginInfo (GetPluginID(), 19)),
              "white", "black", " installed." )
end -- OnPluginInstall

function OnPluginClose()
  ColourNote( "white", "black", "Plugin ",
              "lime",  "black",  GetPluginName(),
	      "white", "black", " closed." )
end -- OnPluginClose

]]>
</script>

</muclient>

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #20 on Fri 18 Jan 2008 04:31 PM (UTC)

Amended on Fri 18 Jan 2008 04:34 PM (UTC) by Shaun Biggs

Message
I cannot apologize enough for the formatting nightmare that is my previous post. Apparently IE doesn't like to display the xml in a way I could just copy/paste like Firefox does. I will check it over when I am at home to make sure that I correctly fixed my posting of the plugin.

Also, on an important note if you are concerned about integrating this with Bejito's plugin... Bejito and I think completely in the opposite direction. We have our counters starting in different places and the iterators count in different directions. Version 1.0 of mine works well (to be honest, I like Bejito's better), but don't expect them to integrate at all. That's what I've been doing with version 2.0 :)

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Csd132   (6 posts)  Bio
Date Reply #21 on Sat 19 Jan 2008 03:29 AM (UTC)
Message
Thanks Shaun so much!...I really appreciate your help. The script looks and works great. Please post version 2 of the moonbot script whenever you do finish working on it, but this version definitely does everything I wanted it to. Bejito's script had a couple other features like refreshing other people's moon scripts, but I don't need those features anyway.

Again, I can't thank you enough for your help.

For anyone else trying to use this script:

I had a little trouble at first getting it to work, but then I realized that as Shaun mentioned in his last post, IE messes up the formatting when pasting. Thus, IE was reading "&lt;" and "&gt;" and pasting them into the forum as "<" and ">" (which was causing the following error: Element name must start with letter or underscore, but starts with " " (problem in this file)).

To correct this, simply go through the code and replace all "<" and ">" not associated with a keyword flag with "&lt;" or "&gt;" respectively.

A useful post about that (and some other useful information) can be found at http://www.gammon.com.au/forum/?id=7123.

Thanks again, Shaun.
Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #22 on Sun 20 Jan 2008 04:26 AM (UTC)
Message
I fixed my post, so the script currently up should work by pasting it into a text file. I also managed to butt up against the 6000 character limit a few times trying to trim down the file.

Interfacing with Bejito's script is getting entertaining, since we apparently count in opposite directions, as well as using different number sets. Yay modular arithmetic! Anyway, here is the history part of my current version:

Version 2.0

version history:

2.0    - Redid how ticks were tracked.  No more problems with writing notes
       - Added a commented function at the bottom.  Uncomment it if you leave
         the world open but disconnected for long periods of time.
       - Added length of time until next junction in moon:union
       - Hey, I made a graph!
1.1    - Added command to clear the timing data
       - Cleaned up the display of moon:union 
1.0    - Basic functions of moonbot implemented.

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Onoitsu2   USA  (248 posts)  Bio
Date Reply #23 on Sun 20 Jan 2008 07:58 AM (UTC)
Message
One thing I would like to see is communication between other users of this plugin, even if it does not work with the zmud version. I have not looked at the numbers in either plugin, but don't think it would be too hard to do a conversion when reporting, I mean you cracked the "pathing" using different numbers.

I would have converted the original plugin, but I pay no attention to the moons, as I am not even a multi-class nor a tier, so don't enchant things.

-Onoitsu2
Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #24 on Sun 20 Jan 2008 04:40 PM (UTC)
Message
It's not hard to convert back and forth, I think the formula is just ( length_up - current_time) mod total_cycle, I just need to test it to make sure. And if I have it use Bejito's reporting as a standard (he was first, after all), then anyone using my plugin will be able to talk to each other and zMUD users' scripts.

I just need testing time. I got a new job a few months ago, and between training, then vacation, and now travel... well, there has not been terribly much time for mudding.

It is much easier to fight for one's ideals than to live up to them.
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.


72,213 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

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.