Boxboy writes, 'I was rather disappointed with the fact that many Muds have things like 'a Two-Handed sword' which you can use whilst holding something with your other whilst wielding it. So, here is my oh so basic idea for two handed weapons...' I was rather disappointed with the fact that many Muds have things like 'a Two-Handed sword' which you can use whilst holding something with your other whilst wielding it. Well this seemed rather, stupid, So, here is my oh so basic idea for two handed weapons, and don't hurt me for this contribution...... /***** START HERE ******/ Start in structs.h ------------------- Find, #define ITEM_NOSELL (1 << 16) /* Shopkeepers won't touch it */ then below it add, #define ITEM_TWO_HANDED (1 << 17) /* Both hands mustbe free to wield it */ Note: Make sure this has the right number. Now move on to act.item.c, -------------------------- Find the function, do_wield, in it you will find a line which looks like, send_to_char("You can't wield that.\r\n", ch); right below it just add, if (IS_OBJ_STAT(obj, ITEM_TWO_HANDED) && GET_EQ(ch, WEAR_HOLD)) send_to_char("Your other hand is already holding something.\r\n", ch); right now find the function, do_grab, At the top there should be, struct obj_data *obj; below it add, struct obj_data *wielded = GET_EQ(ch, WEAR_WIELD); Now search for the line, perform_wear(ch, obj, WEAR_LIGHT); add right below it just add, else if ((GET_EQ(ch, WEAR_WIELD) && IS_OBJ_STAT(wielded, ITEM_TWO_HANDED))) { send_to_char("You cannot hold something as you are wielding a two handed weapon.\r\n", ch); return; } /***** FINISH HERE *****/ Well thats all, piece of, er pie. Well you could add things like, if you strength is 18/100 then you can wield a TWO_HANDED weapon AND hold something. Well that is all for now, hopefully this will be put in many Muds, as this will make them just that much more realistic If you use this, please can you just send me an Email saying that you liked, were insulted by, due to it you want my head on a pole, what ever takes your fancy, just let me know how you feel about this kind of snippet, thanks. baez@as-if.com PS: This is my first piece of code/snippet that I have given, but I hope to give more soon... Bye bye from Boxboy << Zone Saving [by BlueDragon] | Reply | Threaded >>
|
|