Making staffs/wands usable in all eq positions [by Michael Gallagher]
Snippet Posted Thursday, December 2nd @ 05:38:08 PM, by George Greer in the Commands dept.
Michael Gallagher(Subliminal) writes, "This snippet is very simple it's really the idea that im posting. This will allow you to use wands and staffs in any position you have."

Although it's very simple, the usual disclaimer applies, im not responsible for this code. please backup first.

First of all open act.other.c and goto ACMD(do_use)

Where it says "mag_item = GET_EQ(ch, WEAR_HOLD);"

replace that line with the following code:

 for (i = 0; i < NUM_WEARS; i++)
   if (get_obj_in_list_vis(ch, arg, ch->equipment[i])) {
    mag_item = GET_EQ(ch, i);
    break;
   }
   else {
    mag_item = NULL;
   }

also put "int i;" under "struct obj_data *mag_item;"

I told you it was simple.

<< FTP Uploads 1999/11/19 | Reply | View as text | Threaded | Enhanced damage skill [by Gerold Fisher] >>

 


Related Links
  Michael Gallagher(Subliminal)
Related Articles
More by greerga
 
 

CircleMUD Snippets
 
Note: Not all of these snippets will work perfectly with your version of code, so be prepared to fix one or two bugs that may arise, and please let me know what you needed to do to fix it. Sending a corrected version is always welcome.
Finally, if you wish to use any of the snippets from this page, you are more than welcome, just mention the authors in your credits. If you wish to release any of these snippets to the public on another site, contact me FIRST.