In a message dated 98-07-15 19:15:56 EDT, scorn@RMI.NET writes: << Ok here is my deal... I have been trying to code in a pkill limit.... The limit is 5 levels up and down example: a level 20 char can only pkill within levels 15-25.... Now i tried using a check similar to summon, because it uses a check to see if the victim is less than 3 levels however its ugly with a bunch of errors. I was wondering perhaps someone has done this already and could point me in the right directions. i.e. what needs defining and what doesnt...etc. >> Try this...in act.offensive.c. + if ((!IS_NPC(ch) && !IS_NPC(vict)) { + if (GET_LEVEL(vict) < GET_LEVEL(ch) - 5) { + send_to_char("Tsk tsk, attacking younger players! You WOULD do that, wouldn't you?\r\n"); + break; + } else if (GET_LEVEL(vict) > GET_LEVEL(ch) + 5) { + send_to_char("A bit hard for you, isn't that? Wanna get chopped to pieces, eh!\r\n"); + break; + } else { if ((GET_POS(ch) == POS_STANDING) && (vict != FIGHTING(ch))) { hit(ch, vict, TYPE_UNDEFINED); WAIT_STATE(ch, PULSE_VIOLENCE + 2); } else send_to_char("You do the best you can!\r\n", ch); } + } } There ya go. Try that. My spacing might be a bit off. Especially since I ported this to AOL Email. Besides which MSVC uses dynamic tabs...instead of 4 spaces you can reset them and mine are two. :-) -Elrelet +------------------------------------------------------------+ | 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/15/00 PST