Hiya all,
I am currently trying to add and argument to do_cast so people
can do something like the following:
cast 'minor creation' shield
cast 'change self' drow
cast 'change other' Tester drow
etc.
I think I have changed everything which needed changing to include the
extra argument bit, but I'm having trouble working out how I read the
target and argument in do cast. Below is the start of my do_cast
function. Casting a spell will have to following syntax:
cast 'spell name' [target] [argument]
How would I read in and store the target and argument?
Thanks in advance
Fionn
########
# Code #
########
ACMD(do_cast)
{
struct char_data *tch = NULL;
struct obj_data *tobj = NULL;
char *s, *t;
char *extra;
int mana, spellnum, i, target = 0;
/* get: blank, spell name, target name */
s = strtok(argument, "'");
if (s == NULL) {
send_to_char("Cast what where?\r\n", ch);
return;
}
s = strtok(NULL, "'");
if (s == NULL) {
send_to_char("Spell names must be enclosed in the Holy Magic Symbols: '\r\n", ch);
return;
}
t = ??
extra = ??
+-----------------------------------------------------------+
| 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