Re: [NEWBIE] CircleMUD and problems with

From: Rob Baumstark (shirak@CONNECT.AB.CA)
Date: 07/29/97

> bunch of games that i can't possibly live without :)  but luckily i have
> just been informed by mail that i have won 11 million dollars so i can
> go and max out my credit cards buying computers and puppies.......
Get me one too... (computer that is)
> enough of that nonsense...
> I was just thinking about some spells and i thought up this spell that
> remove the targets weapon and send it to a random location in my little
> MUDland...  So all I need to do is check if they have a weapon, then
> that weapon and then find a random room to put it in...I'm pretty sure i
> find how to remove the weapon (remove command) and how to find a random
> (teleport spell) but how would i check if they have a weapon?  I can't
> of where to look for this.  I think putting the weapon in a randomly
> room would be pretty easy but I'm a newbie coder.  If anyone has any
> on this I would really appreciate the help...  If you feel like flaming I
> will ruin it for you right now:
> I don't know anything about C and i need to learn how to code and I'll
> amount to anything and my feet stink........
It's quite easy to get the players weapon..., though this will look like
Uhh..., well, another language to you probably.  Show it to your coder, if
he can't understand it, well, you have a coding problem.

  struct obj_data *weapon;

  if(weapon = GET_EQ(ch, WEAR_WIELD)) {
    /* He has a weapon, and the weapon var is pointing at it now */
  } else {
    /* He has no weapon, and the weapon var is NULL */

I'm quite familiar with all the GET_EQ functions, and that type of stuff
right now, as I just wrote my own Dual-wield code from scratch.
  hope this helps.
     Rob Baumstark:

   Forsaken Realms:   telnet://

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST