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.
 Entire forum ➜ MUSHclient ➜ General ➜ question with multiple line triggers

question with multiple line triggers

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


Pages: 1  2 

Posted by Guest1   USA  (256 posts)
Date Reply #15 on Mon 10 Feb 2003 10:30 PM (UTC)

Amended on Mon 10 Feb 2003 10:37 PM (UTC) by Guest1

Message
Thanks Magnum, yes that line is even easier stiil :)

The score function is going to take some thinking as I'd like to be able to give the scores as both a single 'total points' value (easily done), but also have it able to be broken down, so I may end up having a lot of variables.

Ideally there will be a variety of options so that if a player grouptells SCORES, I'd respond with a triggered grouptell reply of

     playername1 = x points
     playername2 = x points
     playername3 = x points
     playername4 = x points

in value order, and if they type just SCORE, they would only get their personal score, not everyone elses. The additional things would be something like a team member grouptelling STAT to get a breakdown of their score.. like

     playername3 has 12 blinds, 6 trips, 8 mobchops etc 

and in turn STATS would give everyones stats

     playername1 = x blinds, x trips, x mobchops etc 
     playername2 = x blinds, x trips, x mobchops etc 
     playername3 = x blinds, x trips, x mobchops etc 
     playername4 = x blinds, x trips, x mobchops etc

and of course LOSER would state who is coming last, and EVIL would show who has chopped the most other players (it's a side effect that happens sometimes on the mud I play on that in a chop group you sometimes miss the mob and hit one of the other team members instead) so in other words there will be a lot more detail required than purely just a points total score.


..and yup I always have had different world files for each character :) In fact I'm still using vers3.26 and haven't upgraded yet because I'm hoping Nick will add in the suggestions I wrote an another thread before I change everything to trigger groups and plugins etc

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2274

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2111
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #16 on Mon 10 Feb 2003 10:54 PM (UTC)
Message
Ah, now you're getting into some complex variable tracking, using arrays or databases of some kind. Building the triggers and output routines is fairly straight foward, but deciding exactly which data to track, and how you will track it is another matter completely.

What I do for projects of this magnitude, is to actually draw up on paper a chart of all the data I want to track. I try to determine what values I need stored on an ongoing basis (between MUSHclient sessions), and which ones I don't. How is the data related? etc... What is the most efficient way to interact with the data?

As your project becomes more complex, you're going to have to rely on yourself to do the programming. Frankly, from my own perspective, I have too much work for my own projects (that I have been putting off) that needs doing, before I write for someone else. Fortunately, we've got a budding community here, so you should be able to get help whenever you are stuck, and many of us try and provide snippets from time to time, or even share our own work, which you can learn from by example.

The project I am currently working on might be useful, but I don't think I'll finish it for a few weeks, 'cause I only take stabs at it once it a while. It's main functionality relies on a large multi-dimensional array.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

Posted by Guest1   USA  (256 posts)
Date Reply #17 on Mon 10 Feb 2003 11:11 PM (UTC)

Amended on Mon 10 Feb 2003 11:25 PM (UTC) by Guest1

Message
hehe no probs, I had already started 'drawing' it out on notepad :) ..I have most of the messages I'll need to trigger on, although there's a few still missing which could take a few days or more to get depending if any groups are running when I am able to log on.

My basic idea atm is that a player will need to grouptell something like ADDME before I start tracking them, and when they do, it will create a variable for thier name (ie: player6 variable value = playername) and then for each player there will be a series of numerical variables for the differing actions.. so for each player there will be maybe 8 variables;

     var player1 = playername (text)
      var player1_blinds = x (integer)
      var player1_trips = x (integer)
      var player1_chops = x (integer)
      var player1_headchops = x (integer) etc..

     var player2 = playername (text)
      var player2_blinds = x (integer)
      var player2_trips = x (integer)
      var player2_chops = x (integer)
      var player2_headchops = x (integer) etc..

..and so on, all fed direct from the triggers like the one on this thread with a simple line added to get existing var and add 1 to it. Calling their stats would pull direct from the variables, and calculating a score would be an easy to code formula, along with sorting for group scores.. but again, if all of these are MC variables then I guess it will start effecting my gameplay with lags.. when it comes to using arrays/database, I know about --> <-- this much hehe.

At this stage I only envisage using it on a group duration basis only, so that when each mob is killed and the gold it has is split between the team members, a small percentage would be held back in a pot and given to the 'winner' at the end of the group and then all the stats would be wiped.
..but yeah, further down the track it may turn into keeping longer term stats for players if the interest is there. I'm in no big rush to complete this either, it's a project for me to do when I have the time, be it days, weeks or months in the process. :)
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #18 on Tue 11 Feb 2003 12:15 AM (UTC)
Message
Man, I should rush my latest plugin just so I can show it to you as an example. Although the nature of the data is completely different, you could see how I manage to work with arrays, and manage to write some efficient subroutines by using certain MUSHclient programming 'tricks' (such as having trigger names contain relevant data).

Anyway, you should definately put your data in an array. Don't use MUSHclient variables either.

Dim CombatMonitor(20, 5)  ' Number of Players, Number of items to track.

' CombatMonitor(PlayerNumber, 1) = Player_Name
' CombatMonitor(PlayerNumber, 2) = Player_Blinds
' CombatMonitor(PlayerNumber, 3) = Player_Trips
' CombatMonitor(PlayerNumber, 4) = Player_Chops
' CombatMonitor(PlayerNumber, 5) = Player_HeadChops

Because the number of players can vary, it's a bit tough to make the array flexible. You can probably use "ReDim", but I've had problems figuring out how to get that to work the way I wanted, but I'm sure it's workable once you figure out the syntax.

Using an array like that makes it MUCH easier to print 'charts' later. For example:

Sub Print_Stats (a, b, c)
  Dim x,y
  Dim OutputLine
  World.Send "title line."
  For x = 1 to NumberofPlayers
    OutputLine = ""
    For y = 1 to UBound(CombatMonitor, 2)
      OutputLine = OutputLine & CombatMonitor(x,y)
    Next
    World.Send OutputLine
  Next
End Sub

With a small subroutine like that, you could print out a large chart. (Of course, that code is rather raw, and would need cleaning to format the output nicely).

It's too much work for me to do everything for you. My home mud is down right now, so I can't even work on my project till it's back up. (Well, I could, but it's a pain in the ass). Sigh.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

Posted by Guest1   USA  (256 posts)
Date Reply #19 on Tue 11 Feb 2003 12:38 AM (UTC)
Message
Hey np Magnum :) I wasn't expecting anyone to write anything for me, just looking for advice and it's much appreciated.

I'll coast around the internet over the next week or two and see what I can dig up as well, that's basically how I figured out how to do the vbs for MC. Again, at this stage it's highly unlikely that playerstats will be kept long-term at all, so no biggie there, it's just to add a bit of fun to the groups and stop people botting.

*ack* dammit.. dwarven prince just killed me.. gotta go.
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.


56,003 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.