Just an idea on the empty slots for the ITEM_COMPONENT (keep in mind i am a newbie coder, so i am not sure HOW possible this is) instead of just the component number, have them list diff attribs of that component i.e. 1: regen(1) 2: fire_resis(1) (the (1) is the level or str of the component) 3: heal(1) etc... then instead of looking for a component # it would check for the attrib and str, that way you can use diff combos for the same potion and maybe have the affect be as stronger if the (#) is higher, seems to me if this is codeable that you would then be able to limit higher level potions by making the really good componets scarce, but have lower powered versions floating around as teasers... just my .02$ Ghost Shaidan +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+ From ae744@freenet.toronto.on.ca Thu, 25 Jul 96 23:38 EDT X-SystemInfo: MyE-Mail: EMail X-Message-No: 3071 (database) From: Ryan A.J. Biggs <ae744@freenet.toronto.on.ca> To: linebacker <linebacker@microlink.net> Subject: Re: [Circle] Potion Ingredients Date: Thu, 25 Jul 96 23:38:00 Message-ID: <m0ujdjf-0009K7C@bloor.torfree.net> Reply-To: ae744@freenet.toronto.on.ca (ae744) X-POP3-Rcpt: lk4150@per Return-Path: <@QUCDN.QueensU.CA:owner-circle@cspo.queensu.ca> Received: from QUCDN.QueensU.CA (QUCDN.QueensU.CA [130.15.126.2]) by per.cybercity.dk (8.6.12/8.6.12) with SMTP id FAA22110 for <lk4150@krull.dk>; Fri, 26 Jul 1996 05:11:12 +0200 Received: from cspo.queensu.ca by QUCDN.QueensU.CA (IBM VM SMTP V2R2) with TCP;Fri, 26 Jul 96 00:16:24 EDT Received: by cspo.queensu.ca (SMI-8.6/SMI-SVR4)id XAA06608; Thu, 25 Jul 1996 23:39:26 -0500 Received: from mail.torfree.net by cspo.queensu.ca (SMI-8.6/SMI-SVR4) Received: from bloor.torfree.net ([199.71.188.18]) by mail.torfree.net Received: by bloor.torfree.net (Smail3.1.28.1 #6) Cc: circle@cspo.queensu.ca Sender: owner-circle@cspo.queensu.ca Precedence: bulk >I want to add a skill similiar to the do_brew that was >recently posted, but I want to require the players to >have in their inventory the necessary components. >ex: A healing potion would require some red powder, some >spider legs, and some plant leaves. (a rough example) >A check would be made to see if the char possess the necessary >ingredients for the particuliar potion, (much the same way the >mud checks for keys when unlocking doors) Take a look in magic.c (or is it spells.c where the non-manual spells are...I always get them mixed up) There is a funtion (but it's never called from pstock circle) that can search for up to 3 items in a players inventoory for use in a spell, and the items will be consumed in the spell. That should help yoou out. Perhaps you can even call it from the do_brew. i.e. case POTION_HEALING: if mag_materials(ch, ITEM_RED_POWDER, ITEM_SPIDER_LEG, ITEM_PLANT_LEAVES, TRUE, TRUE) do_brew(SPELL_HEAL); Here's the syntax.....int mag_materials(ch, item1vnum, item2vnun, item3vnum, extractbool, verbosebool) The first 4 are obvious....if extractbool is true (it and verbose bool are ints) then it will remove the items, if verbosebool is true, it will tell the player it extracted the irtems. >There would also be the chance of an explosion as in the do_brew. Just do the check before you call the do_brew, or in the do_brew, and you can get it done. -- ------------------------------------------------------------------ Ryan A.J. Biggs email-ae744@freenet.toronto.on.ca Doppleganger, Charon the Boatman and member of Dieties Anonymous Owner of a 100% organic wibble and Plasma lamp, and rubber chicken +-----------------------------------------------------------+ | 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/07/00 PST