Hi,
I know this is probably very simple, but I can't work it out. I want to count how many times a line of text appears, and after a certain number (eg. 4), execute a command.
here's the MUD output:
l papers in packet
Thin, flimsy, and prone to tearing, this is the sort of paper the Green Slab is printed on. Ink spreads and blotches, pencils make holes in it, and it isn't even much good for fish and chips. On the bright side, it's cheap.
It appears to have something written on it.
The sheet of cheap writing paper appears to be a magic scroll containing the spell Jogloran's Portal of Cheaper Travel.
Thin, flimsy, and prone to tearing, this is the sort of paper the Green Slab is printed on. Ink spreads and blotches, pencils make holes in it, and it isn't even much good for fish and chips. On the bright side, it's cheap.
It appears to have something written on it.
The sheet of cheap writing paper appears to be a magic scroll containing the spell Jogloran's Portal of Cheaper Travel.
etc ad nauseum
I want to count the line "The sheet of cheap writing paper appears to be a magic scroll containing the spell Jogloran's Portal of Cheaper Travel."
I stand in the shop, scribe the spell 4 times, put it into the packet. Currently I have the alias simply closing the packet at the end, then the trigger to sell the packet is the "You closed the packet" message. However I've had a few problems with packets being sold with less than 4 scrolls in them, so if I could only sell the packet when there's been four counts of that line, it would be much better for me.
here's what I tried in "send to script" with a trigger for that line.
@scrollcount = @scrollcount + 1
but it doesn't work. The error is:
[string "Trigger: "]:1: unexpected symbol near '@'
and then disconnects me from the MUD, something to do with compression.
any help for a slow-poke is appreciated, thanks in advance!
D |