/***************************************************************************
*******************
Once again I thought I would submit something as a way to say thanks for
everyone who has helped me in the past. This special procedure is a way to
allow mortals to start their own arena. This only works if you have the
arena code in your mud. And There are some things I will mark that you can
change. It isnt beautiful. Anyway enjoy it.
****************************************************************************
******************/
/*Add this to the bottom of your spec_proc.c */
SPECIAL(arena)
{
extern void start_arena();
extern int lo_lim;
extern int hi_lim;
extern int start_time;
extern int cost_per_lev;
extern int game_length;
extern int in_arena;
extern int in_start_arena;
extern int time_to_start;
extern int time_left_in_game;
extern int arena_pot;
extern int bet_pot;
char lolim[MAX_INPUT_LENGTH];
char hilim[MAX_INPUT_LENGTH];
char arg1[MAX_INPUT_LENGTH];
char arg2[MAX_INPUT_LENGTH];
char buf[MAX_INPUT_LENGTH];
if(!cmd) {
switch(number(0,5)){
case 0:
send_to_room("Sparticus says,'If you are brave enough, start an
arena!'\r\n", ch->in_room);
return(1);
case 1:
send_to_room("Sparticus says,'To start an arena type Start low
high.'\r\n", ch->in_room);
return(1);
case 2:
send_to_room("Sparticus says,'The highest level is (whatever).'\r\n",
ch->in_room);
return(1);
case 3:
send_to_room("Sparticus says,'You must be at least level 25 to start an
arena.'\r\n",ch->in_room);
return(1);
case 4:
send_to_room("Sparticus says,'Only the brave and strong will
survive!'\r\n", ch->in_room);
return(1);
default:
send_to_room("Sparticus says,'Many adventurers enter only one
survives!\r\n",$
return(1);
}
}
two_arguments(argument, arg1, arg2);
if(!CMD_IS("start"))
return(0);
if(GET_LEVEL(ch)<25){ /* Set it to whatever level you like */
send_to_char("You need to be at least level 25.\r\n", ch);
return(1);
}
if(GET_GOLD(ch)<100000) { /* Obviously you can adust this amount */
send_to_char("The cost of starting an arena is 100,000 gold
coins!\r\n", ch);
return(1);
}
if(!*arg1){
send_to_char("Usage: Start low high\r\n", ch);
return(1);
}
if(!*arg2){
send_to_char("Usage: Start low high\r\n", ch);
return(1);
}
half_chop(argument, lolim, buf);
lo_lim = atoi(lolim);
if ((lo_lim < 0) || (lo_lim > LVL_IMPL)) {
send_to_char("Please choose a valid lower level.\r\n", ch);
return(1);
}
half_chop(buf, hilim, buf);
hi_lim = atoi(hilim);
if ((hi_lim < 0) || (hi_lim > LVL_IMPL)) {
send_to_char("Please choose a valid upper level.\r\n", ch);
return(1);
}
if (lo_lim >= hi_lim)
send_to_char("Usage: low high\r\n", ch);
return(1);
}
else {
lo_lim = atoi(lolim);
hi_lim = atoi(hilim);
start_time = 3; /* You can change this to have arena start whenever */
cost_per_lev = 800; /* You can change this to cost whatever */
game_length = 20; /* You can adjust how long the arena lasts */
in_arena = 0;
in_start_arena = 1;
time_to_start = start_time;
time_left_in_game = 0;
arena_pot = 0;
bet_pot = 0;
GET_GOLD(ch) -= 100000; /* Change this if you changed it above */
start_arena();
}
return(1);
}
/* Assign this to a mob in spec_assign.c */
/* add the word "start" to the list in Interpreter.c */
/* Have fun Abram@deltanet.com Please mail me and let me know if you used
this. thanks. */
+------------------------------------------------------------+
| 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/08/00 PST