where were was this code two days ago! I used the dwield code from the ftp sight for bpl17 and got THE MOST INTERESTING ERROR! If you were wearing something IE:a helmet and tried to were another helmet instead of saying your already wearing something it said putting helmet on and if you did eq you were still wereing the original helmet and the one you tried to put on just disappeared didn't even return to inventory! But the error messages worked fine for the new dwield code ie if you were already dual wielding it would prompt you to remove one before using another weapon or holding something. took me FOREVER to fix this:) -----Original Message----- From: Mechanical Animal [mailto:acydtryp@MAIL.COM] Sent: Saturday, November 11, 2000 8:27 PM To: CIRCLE@post.queensu.ca Subject: [CIRCLE] [CODE] My update to DWIELD Firstly, remove the acmd(do_dwield) command all together. Then change your acmd(do_wield) with this: ACMD(do_wield) { struct obj_data *obj; one_argument(argument, arg); if (!*arg) send_to_char("Wield what?\r\n", ch); else if (GET_EQ(ch, WEAR_DWIELD)) send_to_char("Remove your secondary weapon first.\n\r", ch); else if (!(obj = get_obj_in_list_vis(ch, arg, ch->carrying))) { sprintf(buf, "You don't seem to have %s %s.\r\n", AN(arg), arg); send_to_char(buf, ch); } else { if (!CAN_WEAR(obj, ITEM_WEAR_WIELD)) send_to_char("You can't wield that.\r\n", ch); else if (GET_OBJ_WEIGHT(obj) > str_app[STRENGTH_APPLY_INDEX(ch)].wield_w) send_to_char("It's too heavy for you to use.\r\n", ch); else if (GET_EQ(ch, WEAR_WIELD) && !GET_SKILL(ch, SKILL_DUAL)) send_to_char("You have no idea how to dual wield.\r\n", ch); else if (GET_EQ(ch, WEAR_WIELD) && GET_EQ(ch, WEAR_SHIELD)) send_to_char("You cannot dual wield while using a shield.\r\n", ch); else if (GET_EQ(ch, WEAR_WIELD) && !GET_EQ(ch, WEAR_SHIELD)) perform_wear(ch, obj, WEAR_DWIELD); else perform_wear(ch, obj, WEAR_WIELD); } } Basically.. it modifies it, so you 'wield <weapon1>' then 'wield <weapon2>' .. it checks if your wielding a weapon and if you are, moves it to your dwield slot. Checks if your using a shield, etc etc. I've tested this all and it works. Also, change do_remove with this: Let me know whatcha'll think. My first sent piece of code to you guys =) (I just didn't like do_dwield .. hehe.) Regards, The Mechanical Animal <acydtryp@mail.com> ______________________________________________ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+ +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/11/01 PDT