|
Recall Command [by Quinn] |
|
|
|
Posted Wednesday, August 12th @ 11:34:50 PM, by George Greer in the Commands dept.
Added Apr 27, 1998. Click the link below to read it or download it.
From: Matthew Roach <af237@pgfn.bc.ca>
Subject: Recall Command.
My recall code :)
ok here is what I did its quite simple and charges 1k gold for every
level past 5 :)
thanks to JurniMan for the idea :)
in act.other.c at the end of the file add this:
ACMD(do_recall)
{
extern sh_int r_mortal_start_room;
if (IS_NPC(ch)) {
send_to_char("Monsters can't recall!!\r\n", ch);
return;
}
if (GET_LEVEL(ch) <= 10) {
send_to_char("Recalling for FREE..\r\n", ch);
act("$n concentrates and disappears.", TRUE, ch, 0, 0, TO_ROOM);
char_from_room(ch);
char_to_room(ch, r_mortal_start_room);
act("$n appears suddenly.", TRUE, ch, 0, 0, TO_ROOM);
look_at_room(ch, 0);
return;
}
else {
send_to_char("Recalling for 1000 gold per level...\r\n", ch);
if (GET_GOLD(ch) < (GET_LEVEL(ch) * 1000))
{
send_to_char("You don't have enough gold!\r\n", ch);
act("$n tries to recall, but fails\r\n", FALSE, ch, 0, 0, TO_ROOM);
return;
}
else {
GET_GOLD(ch) -= (GET_LEVEL(ch) * 1000);
act("$n concentrates and disappears.", TRUE, ch, 0, 0, TO_ROOM);
char_from_room(ch);
char_to_room(ch, r_mortal_start_room);
act("$n appears suddenly.", TRUE, ch, 0, 0, TO_ROOM);
look_at_room(ch, 0);
return;
}
}
}
now in interpreter.c search for ACMD(do_reboot); and add this after it:
ACMD(do_recall);
now search for { "reply" , POS_SLEEPING, do_reply , 0, 0 },
and put this above it:
{ "recall" , POS_STANDING, do_recall , 0, 0 },
Ok well thats it please give me Proper credit
in the credits file
-Matt Roach
<< Races vs. Classes [by Nashak] | Reply | View as text | Flattened | Recall Snippet [by The Ready *2* Die? Staff] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|