View Single Post
02-23-08, 02:13 AM   #1
Tornik
A Defias Bandit
Join Date: Feb 2008
Posts: 3
inputString/string.gsub Help Required

I'm trying to re-work the Pirate Speak mod it to use internally in my guild - we're rolling up a small alt-guild made up of Orcs, and I'm trying to re-write your mod so that we all talk like Orks from Games Workshop's Warhammer 40,000.

Anyhow, most of the code is straight-forward, which is good as my Lua knowledge is hardly in-depth, the only real problem I'm having is when I'm trying to get the mod to change words that share certain sequences of letters. For example, "his" and "this" tend to get mixed up, as do "the" and "their".

I notice in the code use various symbols like ^, [a], $, are used to prevent the same thing, but I can't quite get it to work, and I was hoping there was a way around this. Can anyone help me out, assuming it's straightforward, or maybe point me towards a resource online I could use? I've tried going through the Lua 5.1 manual online, but as I don't quite know how to correctly phrase what I'm looking for, I'm not getting far.
  Reply With Quote