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
just
> go and max out my credit cards buying computers and puppies.......
Get me one too... (computer that is)
> enough of that nonsense...
<chuckles>
> I was just thinking about some spells and i thought up this spell that
would
> 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
remove
> that weapon and then find a random room to put it in...I'm pretty sure i
can
> find how to remove the weapon (remove command) and how to find a random
room
> (teleport spell) but how would i check if they have a weapon?  I can't
think
> of where to look for this.  I think putting the weapon in a randomly
chosen
> room would be pretty easy but I'm a newbie coder.  If anyone has any
ideas
> 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
never
> 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.
simply:

  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:   shirak@connect.ab.ca
                      cst0656@nait.ab.ca

   Forsaken Realms:   telnet://drewl.v-wave.com:4000
--------------------------------------------------------------------------


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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