101
101
notify(executor, "Your murder attempt failed.");
102
102
buf1 = alloc_lbuf("do_kill.failed");
103
sprintf(buf1, "%s tried to kill you!", Name(executor));
103
mux_sprintf(buf1, LBUF_SIZE, "%s tried to kill you!", Moniker(executor));
104
104
notify_with_cause_ooc(victim, executor, buf1);
105
105
if (Suspect(executor))
107
strcpy(buf1, Name(executor));
107
mux_strncpy(buf1, Moniker(executor), LBUF_SIZE-1);
108
108
if (executor == Owner(executor))
110
raw_broadcast(WIZARD, "[Suspect] %s tried to kill %s(#%d).", buf1, Name(victim), victim);
110
raw_broadcast(WIZARD, "[Suspect] %s tried to kill %s(#%d).", buf1, Moniker(victim), victim);
114
114
buf2 = alloc_lbuf("do_kill.SUSP.failed");
115
strcpy(buf2, Name(Owner(executor)));
115
mux_strncpy(buf2, Moniker(Owner(executor)), LBUF_SIZE-1);
116
116
raw_broadcast(WIZARD, "[Suspect] %s <via %s(#%d)> tried to kill %s(#%d).",
117
buf2, buf1, executor, Name(victim), victim);
117
buf2, buf1, executor, Moniker(victim), victim);
128
128
buf2 = alloc_lbuf("do_kill.succ.2");
129
129
if (Suspect(executor))
131
strcpy(buf1, Name(executor));
131
mux_strncpy(buf1, Moniker(executor), LBUF_SIZE-1);
132
132
if (executor == Owner(executor))
134
raw_broadcast(WIZARD, "[Suspect] %s killed %s(#%d).", buf1, Name(victim), victim);
134
raw_broadcast(WIZARD, "[Suspect] %s killed %s(#%d).", buf1, Moniker(victim), victim);
138
strcpy(buf2, Name(Owner(executor)));
138
mux_strncpy(buf2, Moniker(Owner(executor)), LBUF_SIZE-1);
139
139
raw_broadcast(WIZARD, "[Suspect] %s <via %s(#%d)> killed %s(#%d).",
140
buf2, buf1, executor, Name(victim), victim);
140
buf2, buf1, executor, Moniker(victim), victim);
143
sprintf(buf1, "You killed %s!", Name(victim));
144
sprintf(buf2, "killed %s!", Name(victim));
143
mux_sprintf(buf1, LBUF_SIZE, "You killed %s!", Moniker(victim));
144
mux_sprintf(buf2, LBUF_SIZE, "killed %s!", Moniker(victim));
145
145
if (!isPlayer(victim))
147
147
if (halt_que(NOTHING, victim) > 0)
155
did_it(executor, victim, A_KILL, buf1, A_OKILL, buf2, A_AKILL, (char **)NULL, 0);
155
did_it(executor, victim, A_KILL, buf1, A_OKILL, buf2, A_AKILL, 0,
159
sprintf(buf1, "%s killed you!", Name(executor));
160
mux_sprintf(buf1, LBUF_SIZE, "%s killed you!", Moniker(executor));
160
161
notify_with_cause_ooc(victim, executor, buf1);
162
163
// Pay off the bonus.
166
167
cost /= 2; // Victim gets half.
167
168
if (Pennies(Owner(victim)) < mudconf.paylimit)
169
sprintf(buf1, "Your insurance policy pays %d %s.", cost,
170
mux_sprintf(buf1, LBUF_SIZE, "Your insurance policy pays %d %s.", cost,
170
171
mudconf.many_coins);
171
172
notify(victim, buf1);
172
173
giveto(Owner(victim), cost);
233
234
sp = str = alloc_lbuf("do_give.gfail");
234
235
safe_str("You can't give ", str, &sp);
235
safe_str(Name(thing), str, &sp);
236
safe_str(Moniker(thing), str, &sp);
236
237
safe_str(" away.", str, &sp);
239
did_it(giver, thing, A_GFAIL, str, A_OGFAIL, NULL, A_AGFAIL, (char **)NULL, 0);
240
did_it(giver, thing, A_GFAIL, str, A_OGFAIL, NULL, A_AGFAIL, 0,
243
245
if (!could_doit(thing, recipient, A_LRECEIVE))
245
247
sp = str = alloc_lbuf("do_give.rfail");
246
safe_str(Name(recipient), str, &sp);
248
safe_str(Moniker(recipient), str, &sp);
247
249
safe_str(" doesn't want ", str, &sp);
248
safe_str(Name(thing), str, &sp);
250
safe_str(Moniker(thing), str, &sp);
249
251
safe_chr('.', str, &sp);
252
did_it(giver, recipient, A_RFAIL, str, A_ORFAIL, NULL, A_ARFAIL, (char **)NULL, 0);
254
did_it(giver, recipient, A_RFAIL, str, A_ORFAIL, NULL, A_ARFAIL, 0,
258
261
if (!(key & GIVE_QUIET))
260
263
str = alloc_lbuf("do_give.thing.ok");
261
strcpy(str, Name(giver));
262
notify_with_cause_ooc(recipient, giver, tprintf("%s gave you %s.", str, Name(thing)));
264
mux_strncpy(str, Moniker(giver), LBUF_SIZE-1);
265
notify_with_cause_ooc(recipient, giver, tprintf("%s gave you %s.", str, Moniker(thing)));
263
266
notify(giver, "Given.");
264
notify_with_cause_ooc(thing, giver, tprintf("%s gave you to %s.", str, Name(recipient)));
267
notify_with_cause_ooc(thing, giver, tprintf("%s gave you to %s.", str, Moniker(recipient)));
267
did_it(giver, thing, A_DROP, NULL, A_ODROP, NULL, A_ADROP, (char **)NULL, 0);
268
did_it(recipient, thing, A_SUCC, NULL, A_OSUCC, NULL, A_ASUCC, (char **)NULL, 0);
270
did_it(giver, thing, A_DROP, NULL, A_ODROP, NULL, A_ADROP, 0, NULL, 0);
271
did_it(recipient, thing, A_SUCC, NULL, A_OSUCC, NULL, A_ASUCC, 0,
271
275
static void give_money(dbref giver, dbref recipient, int key, int amount)
297
301
if (!could_doit(giver, recipient, A_LUSE))
299
notify(giver, tprintf("%s won't take your money.", Name(recipient)));
303
notify(giver, tprintf("%s won't take your money.", Moniker(recipient)));
349
notify(giver, tprintf("You give a %s to %s.", mudconf.one_coin, Name(recipient)));
350
notify_with_cause_ooc(recipient, giver, tprintf("%s gives you a %s.", Name(giver), mudconf.one_coin));
353
notify(giver, tprintf("You give a %s to %s.", mudconf.one_coin, Moniker(recipient)));
354
notify_with_cause_ooc(recipient, giver, tprintf("%s gives you a %s.", Moniker(giver), mudconf.one_coin));
354
notify(giver, tprintf("You give %d %s to %s.", amount, mudconf.many_coins, Name(recipient)));
358
notify(giver, tprintf("You give %d %s to %s.", amount, mudconf.many_coins, Moniker(recipient)));
355
359
notify_with_cause_ooc(recipient, giver, tprintf("%s gives you %d %s.",
356
Name(giver), amount, mudconf.many_coins));
360
Moniker(giver), amount, mudconf.many_coins));
373
377
// Transfer the money and run PAY attributes
375
379
giveto(recipient, cost);
376
did_it(giver, recipient, A_PAY, NULL, A_OPAY, NULL, A_APAY, (char **)NULL, 0);
380
did_it(giver, recipient, A_PAY, NULL, A_OPAY, NULL, A_APAY, 0, NULL, 0);