Ok so I've been playing on mudlet for about a month now, and I still only have very rudimentary knowledge of how to code. I don't think I'm a complete git when it comes to this sort of thing because I've taught myself how to code for other things however even after reading through the mudlet manual I still am pretty lost on a few points.
My main issue is, you guessed it, variables. I've learned so far that you can use \w+ to capture a single word and use it as a variable with matches[2] (thy does it start at 2 and not 1?) but I still haven't figured out how to capture a string of letters/numbers or multiple words. Is there a a helpfile somewhere that explains specifically the capturing and usage of variables? When do I need to use .. before matches to (expand I think) the variable, and what does that even mean?
I've done my best not to pester people in and out of game because in game it's often difficult to discuss ooc things, often simply because there are more pressing matters like hunting or defending etc. and I read just about every post in the forums pertaining to coding issues and try to understand the problems people are posting and the answers others are giving. What I really wish I had was a few simple examples and a list of the syntax for capturing different sorts of variables/strings.
I tried to make a simple set of triggers to announce mindnet stuff and I just couldn't get it to work, and although I can make an attack alias like "send("kill " .. target)" I coudln't figure out how to make alias' for my strikes which have the target variable in the middle of the equation.
Any help in or out of game would be greatly appreciated and would go a long way in helping me enjoy the coding aspect of playing the game rather than feel like im fighting with syntax instead of orcs.
Comments
This creates the string "strike Carmain hamstring", given target being set to "Carmain". If you want to have a variable for the strike, you can do this:
So again, find someone in the Mudlet clan (ask in the Sylvan combat clan for an invite) and feel free to ask questions. And if you need help, I'm always willing in game.