mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-20 07:56:09 +01:00
Object Events and some formatting corrections.
This commit is contained in:
parent
36f35cdf55
commit
f0d34e6cd6
5 changed files with 55 additions and 35 deletions
|
|
@ -1521,49 +1521,49 @@ ACMD(do_sac)
|
|||
one_argument(argument, arg);
|
||||
|
||||
if (!*arg) {
|
||||
send_to_char(ch, "Sacrifice what?\n\r");
|
||||
return;
|
||||
}
|
||||
|
||||
send_to_char(ch, "Sacrifice what?\n\r");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(j = get_obj_in_list_vis(ch, arg, NULL, world[IN_ROOM(ch)].contents)) && (!(j = get_obj_in_list_vis(ch, arg, NULL, ch->carrying)))) {
|
||||
send_to_char(ch, "It doesn't seem to be here.\n\r");
|
||||
return;
|
||||
}
|
||||
send_to_char(ch, "It doesn't seem to be here.\n\r");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CAN_WEAR(j, ITEM_WEAR_TAKE)) {
|
||||
send_to_char(ch, "You can't sacrifice that!\n\r");
|
||||
return;
|
||||
}
|
||||
send_to_char(ch, "You can't sacrifice that!\n\r");
|
||||
return;
|
||||
}
|
||||
|
||||
act("$n sacrifices $p.", FALSE, ch, j, 0, TO_ROOM);
|
||||
|
||||
switch (rand_number(0, 5)) {
|
||||
case 0:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n", GET_OBJ_SHORT(j));
|
||||
increase_gold(ch, 1);
|
||||
break;
|
||||
case 1:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe Gods ignore your sacrifice.\r\n", GET_OBJ_SHORT(j));
|
||||
break;
|
||||
case 2:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe gods give you %d experience points.\r\n", GET_OBJ_SHORT(j), (2*GET_OBJ_COST(j)));
|
||||
GET_EXP(ch) += (2*GET_OBJ_COST(j));
|
||||
break;
|
||||
case 3:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive %d experience points.\r\n", GET_OBJ_SHORT(j), GET_OBJ_COST(j));
|
||||
GET_EXP(ch) += GET_OBJ_COST(j);
|
||||
break;
|
||||
case 4:
|
||||
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins.\r\n", GET_OBJ_COST(j));
|
||||
increase_gold(ch, GET_OBJ_COST(j));
|
||||
break;
|
||||
case 5:
|
||||
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins\r\n", (2*GET_OBJ_COST(j)));
|
||||
increase_gold(ch, (2*GET_OBJ_COST(j)));
|
||||
break;
|
||||
case 0:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n", GET_OBJ_SHORT(j));
|
||||
increase_gold(ch, 1);
|
||||
break;
|
||||
case 1:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe Gods ignore your sacrifice.\r\n", GET_OBJ_SHORT(j));
|
||||
break;
|
||||
case 2:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nThe gods give you %d experience points.\r\n", GET_OBJ_SHORT(j), (2*GET_OBJ_COST(j)));
|
||||
GET_EXP(ch) += (2*GET_OBJ_COST(j));
|
||||
break;
|
||||
case 3:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive %d experience points.\r\n", GET_OBJ_SHORT(j), GET_OBJ_COST(j));
|
||||
GET_EXP(ch) += GET_OBJ_COST(j);
|
||||
break;
|
||||
case 4:
|
||||
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins.\r\n", GET_OBJ_COST(j));
|
||||
increase_gold(ch, GET_OBJ_COST(j));
|
||||
break;
|
||||
case 5:
|
||||
send_to_char(ch, "Your sacrifice to the Gods is rewarded with %d gold coins\r\n", (2*GET_OBJ_COST(j)));
|
||||
increase_gold(ch, (2*GET_OBJ_COST(j)));
|
||||
break;
|
||||
default:
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n", GET_OBJ_SHORT(j));
|
||||
increase_gold(ch, 1);
|
||||
send_to_char(ch, "You sacrifice %s to the Gods.\r\nYou receive one gold coin for your humility.\r\n",GET_OBJ_SHORT(j));
|
||||
increase_gold(ch, 1);
|
||||
break;
|
||||
}
|
||||
for (jj = j->contains; jj; jj = next_thing2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue