On Tue, 21 Jan 1997, Finality Admin. wrote: > Hey all, > > Anyone have any pointers on how I would go about removing the ' ' > symbols around the spells when cast. I know it can be done, I just don't > know where to start. It might be more problematic than just the code. Since spells can be multiple words and abbreviated. Without the '' it's impossible to determine 100% of the time what was intended as the spell and what was intended as the argument. Still, it might be quite possible if you cut off each successive word from the argument until you run into one that in addition to the other words does not equal a valid spell's name. For instance: > cast an dead alaman * Snip off 'an' and check if it's a spell (yes, 'animate dead'), cont. * Snip off 'dead' and check if "an dead" is a spell (same as above),cont. * Snip off 'alaman' and check if "an dead alaman" is a spell (no) In this manner, 'an dead' would be interpreted as the spell and 'alaman' would be interpreted as the argument. If no spells have more than 2 words for their names, you can just take off the first two, check if it's a spell, if not, just use the first one. Now, for the problems: > who Players online: Plane the guy with a stupid name for this example Stun who also has a stupid name > cast as plane * We have a spell named 'astral plane'. The 'as' points to it, so we see if 'as plane' points to a spell. Uh-oh, what if we are meaning to cast astral plane on Plane? > cast tr stun * Same as above, are we meaning 'tr stun' as the spell, or are we meaning cast 'tr' on 'stun'? For the offensive spells it's worse because 'tr stun' without args would be cast on the person you're fighting, even if you meant 'transfer health' to Stun. Solutions: (a) figure a better way than this, (b) have players with stupid names change them, make it clear to players that conflicts can arise when someone with a name that is also the second word of a spell could be interpreted wrongly and that in such cases, the '' can be used to resolve conflicts. -- Daniel Koepke dkoepke@california.com Forgive me father, for I am sin. +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST