apostrophes and targets

Post Reply
lyrralt
Posts: 2
Joined: Thu Dec 23, 2010 7:08 pm

apostrophes and targets

Post by lyrralt »

Mudlet doesn't seem to like apostrophes, because when I enter any into an alias the program crashes. The first example my mud uses apostrophes for spell casting to sepearate the spell input from the target name c 'fireball' dave. Second, when I get a successful alias made (minus apostrophes), I want to be able to add a target after the input of the alias. So if my alias word is fire, and I want that to cast fireball, I want to be able to type fire dave and have it throw a fireball at him. Also I'll be as clear about this as I can, I need to know exactly what to put where with no extra brackets or anything. If you write it, I'm going to type it :)

Thanks in advance for anyone that helps me.

syrik
Posts: 90
Joined: Sat Jun 26, 2010 9:57 pm

Re: apostrophes and targets

Post by syrik »

I think the easiest way would be this:
Have a targetting alias that would be like this:

Pattern: ^weave (.+)$

Script: weave = matches[2]
cecho("<white>Weave target set to: <gold>" .. weave .. "\n")

Then have another alias that would be like this:
send("channel 'fireball' " .. weave)
cecho("<firebrick>Channel fireball <gold>" .. weave .. "\n")

Yetzederixx
Posts: 186
Joined: Sun Nov 14, 2010 5:57 am

Re: apostrophes and targets

Post by Yetzederixx »

Alias: Acid Blast
Pattern: ^ac?(?: ([\w']+))?$
Code: [show] | [select all] lua
if matches[2] then
	send("c 'acid blast' " .. matches[2])
else
	send("c 'acid blast'")
end
Maybe that'll help, either way that's how I do it.

Edit: Suppose I should mention, that you can enter a ' into the alias without it crashing.

Post Reply