Ok guys I thought it might be beneficial for us to have a topic where we can report bugs and fixes or get help with getting bugs fixed that we have found
I have found a bug in Gickers D20 that I'm having a bit of a problem correcting....
My players after setting up stats can type setstats reset and reset their stats at any point in time they like...I foresee this being abused by restatting before leveling up to get more skill points...before a fight to get better Dex ...etc, etc..
Can anybody take a look
the lines I'm thinking maybe causing the problems are as follows
Code:
if (is_abbrev(arg1, "reset")) {
send_to_char(ch, "You reset your stats back to the default values.\r\n");
GET_STAT_POINTS(ch) = 20;
ch->real_abils.str = 10;
ch->real_abils.dex = 10;
ch->real_abils.con = 10;
ch->real_abils.intel = 10;
ch->real_abils.wis = 10;
ch->real_abils.cha = 10;
return 1;
}
or
Code:
if (GET_STAT_POINTS(ch) == 0) {
send_to_char(ch, "You need to type @Ysetstats reset@n if you want to change your stats after using all of your points.\r\n");
return 1;
Now I don't mind if they are in the stat room and resetting stats because they made a mistake, I am completely ok with that, but after they leave that room, I don't want them to be able to reset their stats to avoid abuse.
I have tried to change the above code into this
Code:
if (is_abbrev(arg1, "reset") && GET_ROOM_VNUM(IN_ROOM(ch)) == 30003) {
send_to_char(ch, "You reset your stats back to the default values.\r\n");
GET_STAT_POINTS(ch) = 30;
ch->real_abils.str = 10;
ch->real_abils.dex = 10;
ch->real_abils.con = 10;
ch->real_abils.intel = 10;
ch->real_abils.wis = 10;
ch->real_abils.cha = 10;
return 1;
}
but to no avail my test PCs can still reset anywhere
any help would be very much appreciated