10 int account_link(
const char *account_name,
const char *player_name);
29 void do_learn_spell(
object *op,
object *spell,
int special_prayer);
41 bool csv_contains(std::string list, std::string item, std::string delim=
",");
45 int hit_map(
object *op,
int dir, uint32_t type,
int full_hit);
47 int attack_ob(
object *op,
object *hitter);
50 int hit_player(
object *op,
int dam,
object *hitter, uint32_t type,
int full_hit);
55 int checkbanned(
const char *login,
const char *host);
61 void command_me(
object *op,
const char *params);
176 void do_harvest(
object *pl,
int dir,
object *skill);
187 void do_goto(
object *op,
const char *name,
int x,
int y);
201 bool pick_up(
object *op,
object *alt);
204 object *
drop_object(
object *op,
object *tmp, uint32_t nrof);
205 void drop(
object *op,
object *tmp);
213 void examine(
object *op,
object *tmp);
266 void command_dm(
object *op,
const char *params);
288 void do_dump(
object *who,
object *what);
300 int infect_object(
object *victim,
object *disease,
int force);
310 void pray_at_altar(
object *pl,
object *altar,
object *skill);
315 void init(
int argc,
char **argv);
339 void check_login(
object *op,
const char *password);
360 int move_ob(
object *op,
int dir,
object *originator);
361 int transfer_ob(
object *op,
int x,
int y,
int randomly,
object *originator);
362 int teleport(
object *teleporter, uint8_t tele_type,
object *user);
364 int push_ob(
object *who,
int dir,
object *pusher);
365 int move_to(
object *op,
int x,
int y);
395 int pets_summon_object(
object *op,
object *caster,
object *spell_ob,
int dir,
const char *stringarg);
429 int fire_bow(
object *op,
object *arrow,
int dir,
int wc_mod, int16_t sx, int16_t sy);
430 void fire(
object *op,
int dir);
431 object *
find_key(
object *pl,
object *container,
object *door);
438 void kill_player(
object *op,
const object *killer);
441 void cast_dust(
object *op,
object *throw_ob,
int dir);
477 int write_rune(
object *op,
object *caster,
object *spell,
int dir,
const char *runename);
479 int dispel_rune(
object *op,
object *skill,
int dir);
480 int trap_see(
object *op,
object *trap);
481 int trap_show(
object *trap,
object *where);
482 int trap_disarm(
object *disarmer,
object *trap,
int risk,
object *skill);
484 int steal(
object *op,
int dir,
object *skill);
485 int pick_lock(
object *pl,
int dir,
object *skill);
486 int hide(
object *op,
object *skill);
487 int jump(
object *pl,
int dir,
object *skill);
492 int use_oratory(
object *pl,
int dir,
object *skill);
493 int singing(
object *pl,
int dir,
object *skill);
496 int pray(
object *pl,
object *skill);
497 void meditate(
object *pl,
object *skill);
498 int write_on_item(
object *pl,
const char *params,
object *skill);
499 int skill_throw(
object *op,
object *part,
int dir,
object *skill);
505 int change_skill(
object *who,
object *new_skill,
int flag);
507 int do_skill(
object *op,
object *part,
object *skill,
int dir,
const char *
string);
508 int64_t
calc_skill_exp(
const object *who,
const object *op,
const object *skill);
511 int use_skill(
object *op,
const char *
string);
512 void skill_attack(
object *tmp,
object *pl,
int dir,
const char *
string,
object *skill);
514 int fire_bolt(
object *op,
object *caster,
int dir,
object *spob);
518 int cast_cone(
object *op,
object *caster,
int dir,
object *spell);
519 int create_bomb(
object *op,
object *caster,
int dir,
object *spell);
522 int cast_curse(
object *op,
object *caster,
object *spell_ob,
int dir);
523 int mood_change(
object *op,
object *caster,
object *spell);
524 int fire_swarm(
object *op,
object *caster,
object *spell,
int dir);
525 int cast_light(
object *op,
object *caster,
object *spell,
int dir);
529 int recharge(
object *op,
object *caster,
object *spell_ob);
531 int cast_polymorph(
object *op,
object *caster,
object *spell_ob,
int dir);
532 int cast_create_missile(
object *op,
object *caster,
object *spell,
int dir,
const char *stringarg);
533 int cast_create_food(
object *op,
object *caster,
object *spell_ob,
int dir,
const char *stringarg);
534 int probe(
object *op,
object *caster,
object *spell_ob,
int dir,
int level);
539 int cast_wonder(
object *op,
object *caster,
int dir,
object *spell_ob);
542 int magic_wall(
object *op,
object *caster,
int dir,
object *spell_ob);
543 int dimension_door(
object *op,
object *caster,
object *spob,
int dir);
544 int cast_heal(
object *op,
object *caster,
object *spell,
int dir);
545 int cast_change_ability(
object *op,
object *caster,
object *spell_ob,
int dir,
int silent);
546 int cast_bless(
object *op,
object *caster,
object *spell_ob,
int dir);
547 int alchemy(
object *op,
object *caster,
object *spell_ob);
548 int remove_curse(
object *op,
object *caster,
object *spell);
550 int cast_identify(
object *op,
object *caster,
object *spell);
552 int cast_transfer(
object *op,
object *caster,
object *spell,
int dir);
555 int animate_weapon(
object *op,
object *caster,
object *spell,
int dir);
557 int create_aura(
object *op,
object *caster,
object *spell);
558 int write_mark(
object *op,
object *spell,
const char *msg);
561 void set_spell_skill(
object *op,
object *caster,
object *spob,
object *dest);
565 int caster_level(
const object *caster,
const object *spell);
584 void spell_failure(
object *op,
int failure,
int power,
object *skill);
585 int cast_spell(
object *op,
object *caster,
int dir,
object *spell_ob,
char *stringarg);
620 char const*
newhash(
char const *password);
void command_speed(object *op, const char *params)
Changes the server speed.
void command_smile(object *op, const char *params)
'smile' command.
void spring_trap(object *trap, object *victim)
This function generalizes attacks by runes/traps.
void regenerate_rod(object *rod)
Regenerates a rod's charges.
int slow_living_by(object *op, const int speed_penalty)
void init_signals()
Setup our signal handlers.
void apply_by_living_below(object *pl)
Attempt to apply the object 'below' the player.
void clean_tmp_files(void)
Save unique maps and clean up temporary map files unless recycling temporary maps.
void set_map_timeout(mapstruct *oldmap)
Enable swapping for the given map.
void do_dump(object *who, object *what)
object * lookup_spell_by_name(object *op, const char *spname)
Look at object 'op' and see if they know the spell spname.
int dispel_rune(object *op, object *skill, int dir)
Someone is trying to disarm a rune.
void command_bounce(object *op, const char *params)
'bounce' command.
int apply_special(object *who, object *op, int aflags)
Apply an object.
const char * get_reply_text_own(reply_type rt)
Return the verb for the player's dialog type.
int apply_manual(object *op, object *tmp, int aflag)
Main apply handler.
const char * determine_god(object *op)
Determines if op worships a god.
void polymorph(object *op, object *who, int level)
Handles polymorphing an object, living or not.
void command_arrest(object *op, const char *params)
Wizard jails player.
void show_skills(object *op, const char *search)
Displays a player's skill list, and some other non skill related info (god, max weapon improvements...
void command_hiscore(object *op, const char *params)
Player is asking for the hiscore.
void legacy_remove_force(object *op)
void command_east(object *op, const char *params)
'east' command.
int change_skill(object *who, object *new_skill, int flag)
This changes the object's skill to new_skill.
void commands_clear()
Clear all registered commands.
int friendly_fire(object *op, object *hitter)
Find out if this is friendly fire (PVP and attacker is peaceful) or not.
void monster_do_say(const mapstruct *map, const char *message)
Output a NPC message on a map.
int move_player(object *op, int dir)
Move player in the given direction.
int skill_ident(object *pl, object *skill)
Main identification skill handling.
void command_yawn(object *op, const char *params)
'yawn' command.
int64_t calc_skill_exp(const object *who, const object *op, const object *skill)
Calculates amount of experience can be gained for successful use of a skill.
void enter_exit(object *op, object *exit_ob)
Tries to move 'op' to exit_ob.
This is used by get_rangevector to determine where the other creature is.
void roll_again(object *op)
Ask the player what to do with the statistics.
void quest_start(player *pl, sstring quest_code, int state)
Start a quest for a player.
int cast_raise_dead_spell(object *op, object *caster, object *spell, int dir, const char *arg)
This handles the raise dead / resurrection spells.
void leave(player *pl, int draw_exit)
Player logs out, or was disconnected.
int account_login(const char *account_name, const char *account_password)
Check if the given account exists, and whether the password is correct.
void command_diff(object *op, const char *params)
Get a diff of specified items.
object * check_spell_known(object *op, const char *name)
Checks to see if player knows the spell.
int check_name(player *me, const char *name)
Ensure player's name is valid.
void free_quest_definitions(void)
void command_quit(object *op, const char *params)
Tell players to use the 'delete' command.
void command_bow(object *op, const char *params)
'bow' command.
bool player_can_find(object *op, object *ob)
Return true if player 'op' can see object 'op' for purpose of locating items for partial item matchin...
void command_skills(object *op, const char *params)
Player is asking for her skills.
void remove_door(object *op)
Remove non locked doors.
int account_remove_player(const char *account_name, const char *player_name)
Removes a player name from an account.
void monster_communicate(object *op, const char *txt)
This function looks for an object or creature that is listening to said text.
void command_pout(object *op, const char *params)
'pout' command.
int caster_level(const object *caster, const object *spell)
This function returns the effective level the spell is being cast at.
void command_motd(object *op, const char *params)
Display the message of the day.
object * get_nearest_criminal(object *mon)
void command_strut(object *op, const char *params)
'strut' command.
void register_all_ob_types(void)
Calls the intialization functions for all individual types.
void command_flip(object *op, const char *params)
'flip' command.
void do_forget_spell(object *op, const char *spell)
Erases spell from player's inventory.
void command_cast(object *op, const char *params)
'cast' command, prepares a spell for laster casting.
int makes_invisible_to(object *pl, object *mon)
This checks to see if 'pl' is invisible to 'mon'.
bool check_password(const char *typed, const char *crypted)
Hash a password and compare it to the stored version.
int cure_disease(object *sufferer, object *caster, sstring skill)
Do the cure disease stuff, from the spell "cure disease".
void command_overlay_save(object *op, const char *params)
Saves the op's map as an overlay - objects are persisted.
int monster_can_see_enemy(object *op, object *enemy)
Assuming no walls/barriers, lets check to see if its possible to see an enemy.
void command_title(object *op, const char *params)
Player wishes to change her title.
int cast_change_ability(object *op, object *caster, object *spell_ob, int dir, int silent)
Cast some stat-improving spell.
int apply_auto(object *op)
Map was just loaded, handle op's initialization.
void pets_follow_owner(object *ob, object *owner)
A pet is trying to follow its owner.
void apply_handle_yield(object *tmp)
This checks whether the object has a "on_use_yield" field, and if so generated and drops matching ite...
void command_face(object *op, const char *params)
Player wants to face a given direction.
void do_some_living(object *op)
Regenerate hp/sp/gr, decreases food.
void command_unregister(command_registration command)
Unregister a previously registered command.
void command_dm(object *op, const char *params)
Actual command to perhaps become dm.
void command_dump(object *op, const char *params)
Dumps the difference between an object and its archetype.
void drain_wand_charge(object *wand)
Drains a charge from a wand.
void command_snicker(object *op, const char *params)
'snicker' command.
player * add_player(socket_struct *ns, int flags)
Tries to add player on the connection passwd in ns.
void command_stay(object *op, const char *params)
'stay' command.
int player_arrest(object *who)
Put a player into jail, taking into account cursed exits and player's region.
void cast_dust(object *op, object *throw_ob, int dir)
Handles op throwing objects of type 'DUST'.
void command_smirk(object *op, const char *params)
'smirk' command.
void command_grin(object *op, const char *params)
'grin' command.
void command_invisible(object *op, const char *params)
Wizard wants to become invisible.
int attack_ob(object *op, object *hitter)
Simple wrapper for attack_ob_simple(), will use hitter's values.
int push_ob(object *who, int dir, object *pusher)
Something is pushing some other object.
void command_nod(object *op, const char *params)
'nod' command.
int account_change_password(const char *account_name, const char *current_password, const char *new_password)
Change an account password.
int forbid_play(void)
Checks if server should be started.
int monster_compute_path(object *source, object *target, int default_dir)
Computes a path from source to target.
void command_freeze(object *op, const char *params)
Freezes a player for a specified tick count, 100 by default.
void command_body(object *op, const char *params)
This command dumps the body information for object *op.
int cast_bless(object *op, object *caster, object *spell_ob, int dir)
Improve statistics of some living object.
const char * account_get_account_for_char(const char *charname)
This looks at all the accounts and sees if charname is associated with any of them.
int identify_object_with_skill(object *tmp, object *pl, object *skill, int print_on_success)
Helper function for do_skill_ident, so that we can loop over inventory AND objects on the ground conv...
void party_set_password(partylist *party, const char *password)
Sets a party's password.
void command_examine(object *op, const char *params)
'examine' command.
int move_disease(object *disease)
Ticks the clock for disease: infect, aggravate symptoms, ...
int account_new(const char *account_name, const char *account_password)
Adds an account.
void move_player_mover(object *op)
This function takes a PLAYERMOVER as an argument, and performs the function of a player mover...
void pets_move(object *ob)
Handles a pet's movement.
void command_stack_pop(object *op, const char *params)
Pop the stack top.
void knowledge_give(player *pl, const char *marker, const object *book)
Give a knowledge item from its code.
int save_player(object *op, int flag)
Saves a player to disk.
void command_sniff(object *op, const char *params)
'sniff' command.
partylist * party_get_next(const partylist *party)
Returns the next party from the list of all parties.
void command_loadplugin(object *op, const char *params)
Loads the given plugin.
void command_dumpallarchetypes(object *op, const char *params)
Various archetypes-related statistics.
void move_symptom(object *symptom)
Make the symptom do the nasty things it does.
void fix_stopped_item(object *op, mapstruct *map, object *originator)
Put stopped item where stop_item() had found it.
void command_use(object *op, const char *params)
Try to use an item on another.
void enter_player_maplevel(object *op)
Move a player to its stored map level.
void examine_monster(object *op, object *tmp, int level)
Player examine a monster.
void key_roll_stat(object *op, char key)
Player is currently swapping stats.
int cast_smite_spell(object *op, object *caster, int dir, object *spell)
The priest points to a creature and causes a 'godly curse' to descend.
void command_style_map_info(object *op, const char *params)
Displays information about styles loaded for random maps.
void(* command_function)(object *op, const char *params)
One command function.
void command_malloc(object *op, const char *params)
Display memory information.
void receive_player_password(object *op, const char *password)
A player just entered her password, including for changing it.
void command_scream(object *op, const char *params)
'scream' command.
bool can_follow(object *op, player *other)
Socket structure, represents a client-server connection.
void spell_failure(object *op, int failure, int power, object *skill)
Handles the various effects for differing degrees of failure badness.
int check_pick(object *op)
Sees if there is stuff to be picked up/picks up stuff, for players only.
const char * party_get_leader(const partylist *party)
Returns the name of the party's leader.
object * monster_check_enemy(object *npc, rv_vector *rv)
Checks npc->enemy and returns that enemy if still valid, NULL otherwise.
int pick_lock(object *pl, int dir, object *skill)
Lock pick handling.
void command_learn_special_prayer(object *op, const char *params)
Wizard wants to learn a god-given spell.
int16_t SP_level_spellpoint_cost(object *caster, object *spell, int flags)
Scales the spellpoint cost of a spell by it's increased effectiveness.
void command_whereabouts(object *op, const char *params)
'whereabouts' command.
int object_teleport(object *op, mapstruct *map, int x, int y)
Move the specified object in a free spot around the map's x & y.
void command_chuckle(object *op, const char *params)
'chuckle' command.
void command_reset(object *op, const char *params)
Resets a map.
int free_no_drop(object *op)
Check whether the given object is FLAG_NO_DROP.
void command_glare(object *op, const char *params)
'glare' command.
int cast_word_of_recall(object *op, object *caster, object *spell_ob)
Word of recall causes the player to return 'home'.
void command_summon(object *op, const char *params)
Summons player near DM.
void command_create(object *op, const char *params)
Wizard wants to create an object.
const char * party_get_password(const partylist *party)
Returns the party's password.
void play_again(object *op)
Ask the player whether to play again or disconnect.
void command_version(object *op, const char *params)
Server version.
void legacy_move_hole(object *op)
void check_spell_expiry(object *spell)
Checks if player should be warned of soon expiring spell.
int checkbanned(const char *login, const char *host)
Check if a player and/or host is banned.
int SP_level_dam_adjust(const object *caster, const object *spob)
Returns adjusted damage based on the caster.
void command_cringe(object *op, const char *params)
'cringe' command.
void blind_living(object *op, object *hitter, int dam)
Blind a living thing.
const char * account_exists(const char *account_name)
Checks the existing accounts, and see if this account exists.
int stand_near_hostile(object *who)
Determine if who is standing near a hostile creature.
void accounts_load(void)
This loads all the account entries into memory.
void command_gasp(object *op, const char *params)
'gasp' command.
void command_passwd(object *pl, const char *params)
Player is asking to change password.
void command_settings(object *op, const char *ignored)
Wizard wants to know some server settings, so display.
int roll_stat(void)
This rolls four 1-6 rolls and sums the best 3 of the 4.
player * find_player_options(const char *plname, int options, const mapstruct *map)
Find a player.
int trap_disarm(object *disarmer, object *trap, int risk, object *skill)
Try to disarm a trap/rune.
player * find_player(const char *plname)
Find a player by her full name.
int apply_can_apply_object(const object *who, const object *op)
Checks to see if 'who' can apply object 'op'.
void party_leave(object *op)
Makes a player leave his party.
int verify_player(const char *name, char *password)
This verify that a character of name exits, and that it matches password.
int jump(object *pl, int dir, object *skill)
Jump skill handling.
int monster_move(object *op)
Main monster processing routine.
object * stop_item(object *op)
An item (ARROW or such) stops moving.
void command_insert_into(object *op, const char *params)
Puts an object into another.
void command_wimpy(object *op, const char *params)
Player wants to change how soon she'll flee.
int remove_trap(object *op, object *skill)
This skill will disarm any previously discovered trap.
void command_wave(object *op, const char *params)
'wave' command.
void party_remove(partylist *party)
Removes and frees a party.
void command_abil(object *op, const char *params)
Changes an object's statistics.
command_registration command_register(const char *name, uint8_t type, command_function func, float time)
Register a player-issued command.
void fix_weight(void)
Check recursively the weight of all players, and fix what needs to be fixed.
void command_fire_stop(object *op, const char *params)
Player wants to stop firing.
int create_bomb(object *op, object *caster, int dir, object *spell)
Create a bomb.
void pets_attempt_follow(object *for_owner, int force)
Check pets so they try to follow their master around the world.
void dead_player(object *op)
Kill a player on a permanent death server with resurrection.
int cast_item_curse_or_bless(object *op, object *spell_ob)
This alters player's marked item's cursed or blessed status, based on the spell_ob's fields...
void command_spit(object *op, const char *params)
'spit' command.
void process_object(object *op)
Main object move function.
void cone_drop(object *op)
Drops an object based on what is in the cone's "other_arch".
int apply_race_and_class(object *op, archetype *race, archetype *opclass, living *stats)
This is somewhat like key_change_class() above, except we know the race to change to...
int legal_range(object *op, int r)
Check for the validity of a player range.
void command_search(object *op, const char *params)
'search' command.
void command_dumpabove(object *op, const char *params)
Player wants to dump object above her.
int player_can_view(object *pl, object *op)
Check the player los field for viewability of the object op.
int path_to_player(object *mon, object *pl, unsigned mindiff)
Returns the direction to the player, if valid.
void command_dance(object *op, const char *params)
'dance' command.
void free_quest(void)
Free all quest status structures.
void command_language(object *op, const char *params)
This is the 'language' command.
int reflwall(mapstruct *m, int x, int y, object *sp_op)
Decides weither the (spell-)object sp_op will be reflected from the given mapsquare.
void pets_terminate_all(object *owner)
Removes all pets someone owns.
int recharge(object *op, object *caster, object *spell_ob)
Recharge wands.
void command_quest(object *op, const char *params)
Command handler for 'quest'.
void command_swap(object *op, const char *params)
Mark a map as ready for swapping.
int swap_map(mapstruct *map)
Swaps a map to disk.
static struct Command_Line_Options options[]
Actual valid command line options.
void command_party(object *op, const char *params)
'party' command, subdivided in different sub commands.
void command_stats(object *op, const char *params)
Displays the statistics of a player.
void command_players(object *op, const char *params)
Display all known players.
void command_think(object *op, const char *params)
'think' command.
void command_stack_list(object *op, const char *params)
Displays stack contents.
int cast_cone(object *op, object *caster, int dir, object *spell)
Casts a cone spell.
void check_active_maps(void)
Finds maps in memory to swap.
void command_fire(object *op, const char *params)
Player wants to start firing.
void command_remove(object *op, const char *params)
Remove an object from its position.
void cleanup(void)
Clean up everything and exit.
void command_slap(object *op, const char *params)
'slap' command.
int cast_create_food(object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
Create food.
void commands_init(void)
Init standard commands.
void dump_quests(void)
Dump all of the quests, then calls exit() - useful in terms of debugging to make sure that quests are...
void command_reply(object *op, const char *params)
Reply to last person who told you something [mids 01/14/2002].
void command_gsay(object *op, const char *params)
'gsay' command, talks to party.
static std::shared_ptr< inja::Environment > env
Rendering environment.
void hiscore_display(object *op, int max, const char *match)
Displays the high score file.
void command_unarmed_skill(object *op, const char *params)
Player wants to change prefered unarmed skill.
void check_bullet(object *op)
Checks to see what op should do, given the space it is on (eg, explode, damage player, etc).
void get_name(object *op)
Waiting for the player's name.
void command_peaceful(object *op, const char *params)
Player toggles her peaceful status.
void command_clap(object *op, const char *params)
'clap' command.
void command_say(object *op, const char *params)
'say' command.
void command_strings(object *op, const char *params)
Various string-related statistics.
void command_brace(object *op, const char *params)
Player toggles her braced status.
void pets_control_golem(object *op, int dir)
Makes the golem go in specified direction.
int use_alchemy(object *op)
Handle use_skill for alchemy-like items.
int apply_check_weapon_power(const object *who, int improves)
This checks to see of the player (who) is sufficient level to use a weapon with improves improvements...
void command_whistle(object *op, const char *params)
'whistle' command.
void command_cough(object *op, const char *params)
'cough' command.
int probe(object *op, object *caster, object *spell_ob, int dir, int level)
Try to get information about a living thing.
int trap_show(object *trap, object *where)
Handles showing a trap/rune detonation.
void apply_changes_to_player(object *pl, object *change, int limit_stats)
Applies (race) changes to a player.
void knowledge_item_can_be_used_alchemy(object *op, const object *item)
Displays known alchemy recipes an item can be used in.
object * races_get_random_monster(const char *race, int level)
Get a random monster of specified race and level at most the specified one.
void command_invoke(object *op, const char *params)
'invoke' command, fires a spell immediately.
int move_to(object *op, int x, int y)
Move an object one square toward a specified destination on the same map.
void flush_old_maps(void)
Reset maps that need to, remove their swap file.
int cast_curse(object *op, object *caster, object *spell_ob, int dir)
Curse an object, reducing its statistics.
int skill_throw(object *op, object *part, int dir, object *skill)
Throwing skill handling.
void command_fix_me(object *op, const char *params)
Wrapper to fix a player.
void command_dmtell(object *op, const char *params)
Private communication, by a DM (can't be ignored by player).
int fire_swarm(object *op, object *caster, object *spell, int dir)
The following routine creates a swarm of objects.
reply_type
Various kind of messages a player or NPC can say.
void command_twiddle(object *op, const char *params)
'twiddle' command.
void command_shiver(object *op, const char *params)
'shiver' command.
int apply_by_living(object *pl, object *op, int aflag, int quiet)
Living thing is applying an object.
void command_bowmode(object *op, const char *params)
Player wants to change the bowmode, how arrows are fired.
void do_hidden_move(object *op)
For hidden creatures - a chance of becoming 'unhidden' every time they move - as we subtract off 'inv...
void confuse_living(object *op, object *hitter, int dam)
Confuse a living thing.
void kill_player(object *op, const object *killer)
Handle a player's death.
void command_goto(object *op, const char *params)
Wizard teleports to a map.
int account_is_logged_in(const char *name)
This checkes if an account is logged in.
void command_addexp(object *op, const char *params)
This adds exp to a player.
void receive_party_password(object *op, const char *password)
Player entered a party password.
void accounts_save(void)
Save all the account information.
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
void send_delayed_buffers(player *pl)
Send all delayed buffers for a player.
int detect_curse_on_item(object *pl, object *tmp, object *skill)
Runs a 'detect curse' check on a given item.
void command_wizpass(object *op, const char *params)
Wizard toggling wall-crossing.
void command_tell(object *op, const char *params)
Private communication.
void set_player_socket(player *p, socket_struct *ns)
This copies the data from the socket into the player structure.
command_registration command_register_extra(const char *name, const char *extra, uint8_t type, command_function_extra func, float time)
Register a player-issued command with an extra parameter.
void key_change_class(object *op, char key)
This function takes the key that is passed, and does the appropriate action with it (change race...
int knowledge_player_knows(const player *pl, const char *knowledge)
Determines whether a player knows a specific knowledge or not.
void account_char_remove(Account_Chars *chars, const char *pl_name)
This removes a character on this account.
void command_search_items(object *op, const char *params)
'search-items' command.
void account_logout(const char *account_name)
Remove 'account_name' from the list of logged in accounts.
void monster_npc_say(object *npc, const char *cp)
Simple function to have some NPC say something.
int SP_level_wc_adjust(const object *caster, const object *spob)
Returns adjusted wc based on the caster and the spell.
void command_sneeze(object *op, const char *params)
'sneeze' command.
object * find_target_for_friendly_spell(object *op, int dir)
This function is commonly used to find a friendly target for spells such as heal or protection or arm...
void close_modules()
Clean up all modules which are not disabled.
void drain_rod_charge(object *rod)
Drain charges from a rod.
int hide(object *op, object *skill)
Main hide handling.
void command_setgod(object *op, const char *params)
Sets the god for some objects.
void command_laugh(object *op, const char *params)
'laugh' command.
void command_hug(object *op, const char *params)
'hug' command.
int monster_stand_in_light(object *op)
Cache monster_stand_in_light_internal().
void key_confirm_quit(object *op, char key)
We receive the reply to the 'quit confirmation' message.
void monster_npc_call_help(object *op)
A monster calls for help against its enemy.
void command_run(object *op, const char *params)
Player wants to start running.
void command_archs(object *op, const char *params)
void get_password(object *op)
Waiting for the player's password.
void monster_check_apply_all(object *monster)
Calls monster_check_apply() for all inventory objects.
object * hit_with_arrow(object *op, object *victim)
hit_with_arrow() disassembles the missile, attacks the victim and reassembles the missile...
int plugins_init_plugin(const char *libfile)
Try to load the specified plugin.
void load_races(BufferReader *reader, const char *filename)
Reads the races file in the lib/ directory, then overwrites old 'race' entries.
void command_shake(object *op, const char *params)
'shake' command.
uint64_t command_registration
Identifier when registering a command.
void player_set_state(player *pl, uint8_t state)
Set the player's state to the specified one.
object * get_nearest_player(object *mon)
Finds the nearest visible player or player-friendly for some object.
void account_char_save(Account_Chars *chars)
Saves the character information for the given account.
int pets_should_arena_attack(object *pet, object *owner, object *target)
Determines if checks so pets don't attack players or other pets should be overruled by the arena petm...
void account_password(char *buf, int len, socket_struct *ns)
Handles the account password change.
int cast_create_obj(object *op, object *new_op, int dir)
Creates object new_op in direction dir or if that is blocked, beneath the player (op).
void party_send_message(object *op, const char *message)
Send a message to all party members except the speaker.
int summon_hostile_monsters(object *op, int n, const char *monstername)
Summons hostile monsters and places them in nearby squares.
int perceive_self(object *op)
Living thing wants to know information.
void command_rotateshoottype(object *op, const char *params)
'rotateshoottype' command, switch range attack.
void(* command_function_extra)(object *op, const char *params, const char *extra)
One command function, with a custom parameter specified at registration time.
int SP_level_duration_adjust(const object *caster, const object *spob)
Adjust the duration of the spell based on level.
void command_rskill(object *pl, const char *params)
'ready_skill' command.
void command_throw(object *op, const char *params)
'throw' command.
void command_applymode(object *op, const char *params)
Players wants to change the apply mode, ie how to handle applying an item when no body slot available...
int pets_summon_golem(object *op, object *caster, int dir, object *spob)
Summons a monster.
void knowledge_read(player *pl, object *book)
Player is reading a book, give knowledge if needed, warn player, and such.
void set_first_map(object *op)
This loads the first map an puts the player on it.
void command_chat(object *op, const char *params)
'chat' command.
void read_map_log(void)
Reads temporary maps information from disk.
int cast_light(object *op, object *caster, object *spell, int dir)
Illuminates something on a map, or try to blind a living thing.
void command_northeast(object *op, const char *params)
'northeast' command.
SockList * player_get_delayed_buffer(player *pl)
Get a delayed socket buffer, that will be sent after the player's tick is complete.
void command_stack_push(object *op, const char *params)
Push specified item on stack.
void command_apply(object *op, const char *params)
'apply' command.
void command_cointoss(object *op, const char *params)
'cointoss' command.
void command_dumpallmaps(object *op, const char *params)
Various map-related statistics.
void command_shout(object *op, const char *params)
'shout' command.
int write_mark(object *op, object *spell, const char *msg)
This writes a rune that contains the appropriate message.
void command_knowledge(object *pl, const char *params)
Handle the 'knowledge' for a player.
void command_wizcast(object *op, const char *params)
Wizard toggling "cast everywhere" ability.
void spell_effect(object *spob, int x, int y, mapstruct *map, object *originator)
Inserts into map a spell effect based on other_arch.
void command_showpets(object *op, const char *params)
Players wants to know her pets.
int hit_map(object *op, int dir, uint32_t type, int full_hit)
Attack a spot on the map.
void command_learn_spell(object *op, const char *params)
Wizard wants to learn a regular spell.
int is_true_undead(object *op)
Is the object a true undead?
void legacy_animate_trigger(object *op)
void command_blush(object *op, const char *params)
'blush' command.
void command_inventory(object *op, const char *params)
Shows the inventory or some item.
int steal(object *op, int dir, object *skill)
Main stealing function.
int teleport(object *teleporter, uint8_t tele_type, object *user)
Teleport an item around a nearby random teleporter of specified type.
int infect_object(object *victim, object *disease, int force)
Try to infect something with a disease.
int monster_can_detect_enemy(object *op, object *enemy, rv_vector *rv)
Determine if we can 'detect' the enemy.
void command_party_rejoin(object *op, const char *params)
Handles the 'party_rejoin' command.
void confirm_password(object *op)
Ask the player to confirm her password during creation.
void command_lock_item(object *op, const char *params)
Alternate way to lock/unlock items (command line).
void command_teleport(object *op, const char *params)
Teleport next to target player.
void hiscore_check(object *op, int quiet)
Checks if player should enter the hiscore, and if so writes her into the list.
void remove_locked_door(object *op)
Same as remove_door() but for locked doors.
void paralyze_living(object *op, int dam)
Paralyze a living thing.
int do_skill(object *op, object *part, object *skill, int dir, const char *string)
Main skills use function-similar in scope to cast_spell().
int cftimer_destroy(int id)
Destroys an existing timer.
int move_ob(object *op, int dir, object *originator)
Op is trying to move in direction dir.
player * get_player(player *p)
Create a player's object, initialize a player's structure.
void do_learn_spell(object *op, object *spell, int special_prayer)
Actually makes op learn spell.
void cftimer_init(void)
Initialize timers.
int plugins_remove_plugin(const char *id)
Unload the specified plugin.
void examine(object *op, object *tmp)
Player examines some object.
int trap_see(object *op, object *trap)
Should op see trap?
void player_unready_range_ob(player *pl, object *ob)
Unready an object for a player.
int min_casting_level(const object *caster, const object *spell)
This function takes a caster and spell and presents the effective level the caster needs to be to cas...
int op_on_battleground(object *op, int *x, int *y, archetype **trophy)
Check if the given object (usually a player) is standing on a battleground tile.
int cast_detection(object *op, object *caster, object *spell)
Detect magic or invisible items.
void cast_magic_storm(object *op, object *tmp, int lvl)
This is really used mostly for spell fumbles and the like.
void command_west(object *op, const char *params)
'west' command.
object * find_marked_object(object *op)
Return the object the player has marked with the 'mark' command below.
partylist * party_find(const char *partyname)
Find a party by name.
void command_snap(object *op, const char *params)
'snap' command.
void quest_load_definitions(void)
void tick_the_clock(void)
This performs the basic function of advancing the clock one tick forward.
void command_delete(object *op, const char *params)
Player wants to totally delete her character.
void command_list(object *pl, bool is_dm)
Display the list of commands to a player.
void command_debug(object *op, const char *params)
Player wants to see/change the debug level.
void do_harvest(object *pl, int dir, object *skill)
Player is trying to harvest something.
void command_snore(object *op, const char *params)
'snore' command.
void init(int argc, char **argv)
This is the main server initialization function.
void command_lick(object *op, const char *params)
'lick' command.
void command_resistances(object *op, const char *params)
Players wants to know her resistances.
void command_follow(object *op, const char *params)
Follow a player, or stop following a player.
int cast_wonder(object *op, object *caster, int dir, object *spell_ob)
wonder is really just a spell that will likely cast another spell.
void command_thank(object *op, const char *params)
'thank' command.
void command_dumpfriendlyobjects(object *op, const char *params)
Various friendly object-related statistics.
void command_listen(object *op, const char *params)
Change the player's listen level.
void cleanupPlugins(void)
Call the crossfire_plugin::closefunc on the various plugins, used at server shutdown.
void process_events(void)
Process all active objects.
void fix_luck(void)
Fixes luck of players, slowly move it towards 0.
int cast_invisible(object *op, object *caster, object *spell_ob)
Makes the player or character invisible.
void emergency_save(int flag)
Save all players.
partylist * party_get_first(void)
Returns the first party from the list of all parties.
int write_rune(object *op, object *caster, object *spell, int dir, const char *runename)
Player is attempting to write a magical rune.
void knowledge_process_incremental(void)
Incrementally send knowledge information to players, and remove information for players who left...
void delete_character(const char *name)
Totally deletes a character.
int cast_consecrate(object *op, object *caster, object *spell)
A spell to make an altar your god's.
void plugins_display_list(object *op)
Displays a list of loaded plugins (keystrings and description) in the game log window.
void give_initial_items(object *pl, treasurelist *items)
Gives a new player her initial items.
void command_accountpasswd(object *op, const char *params)
void command_kill_pets(object *op, const char *params)
Player wants to get rid of pets.
void put_object_in_sack(object *op, object *sack, object *tmp, uint32_t nrof)
Something tries to put an object into another.
void command_forget_spell(object *op, const char *params)
Command for players to forget a spell.
int quest_get_player_state(player *pl, sstring quest_code)
Get the quest state for a player.
void command_unloadplugin(object *op, const char *params)
Unloads the given plugin.
void command_purge_quest(object *op, const char *param)
void command_sigh(object *op, const char *params)
'sigh' command.
int fire_bow(object *op, object *arrow, int dir, int wc_mod, int16_t sx, int16_t sy)
Creature (monster or player) fires a bow.
int ok_to_put_more(mapstruct *m, int16_t x, int16_t y, object *op, uint32_t immune_stop)
Returns true if it is ok to put spell op on the space/may provided.
void explode_bullet(object *op)
Causes an object to explode, eg, a firebullet, poison cloud ball, etc.
int cast_transfer(object *op, object *caster, object *spell, int dir)
This spell transfers sp from the player to another person.
void quest_send_initial_states(player *pl)
Send the current quest states for the specified player, if the client supports those notifications...
void drop(object *op, object *tmp)
Drop an item, either on the floor or in a container.
int players_on_map(mapstruct *m, int show_all)
Returns the count of players on a map, calculated from player list.
void skill_attack(object *tmp, object *pl, int dir, const char *string, object *skill)
Core routine for use when we attack using a skills system.
void knowledge_first_player_save(player *pl)
Ensure the knowledge state is correctly saved for the player.
void command_north(object *op, const char *params)
'north' command.
int dimension_door(object *op, object *caster, object *spob, int dir)
Teleport through some doors and space.
Structure handling character information for an account.
void command_poke(object *op, const char *params)
'poke' command.
void command_help(object *op, const char *params)
Player is asking for some help.
int handle_newcs_player(object *op)
Handles commands the player can send us, and various checks on invisibility, golem and such...
void fire(object *op, int dir)
Received a fire command for the player - go and do it.
void command_shoottype(object *op, const char *params)
'shoottype' command, set range attack.
void command_maps(object *op, const char *params)
'maps' command.
void save_throw_object(object *op, uint32_t type, object *originator)
Object is attacked with some attacktype (fire, ice, ...).
int cast_destruction(object *op, object *caster, object *spell_ob)
Hit all monsters around the caster.
void command_free(object *op, const char *params)
Totally free an object.
Various statistics of objects.
void command_cry(object *op, const char *params)
'cry' command.
void free_races(void)
Frees all race-related information.
static const flag_definition flags[]
Flag mapping.
void inventory(object *op, object *inv)
Prints object's inventory.
void move_firewall(object *op)
Move for FIREWALL.
treasurelist represents one logical group of items to be generated together.
void command_dropall(object *op, const char *params)
Command to drop all items that have not been locked.
object * find_applied_skill_by_name(const object *op, const char *name)
Find a skill by name using the last_skill_ob list.
void knowledge_add_probe_monster(object *op, object *mon)
Display monster details, then add to a player's knowledge if not already.
void command_cackle(object *op, const char *params)
'cackle' command.
int learn_skill(object *pl, object *scroll)
Player is trying to learn a skill.
void command_ssdumptable(object *op, const char *params)
Various string-related statistics.
void command_execute(object *pl, char *command)
Handle a player-issued command.
void remove_unpaid_objects(object *op, object *env, int free_items)
This goes throws the inventory and removes unpaid objects, and puts them back in the map (location an...
void dump_spells(void)
Dumps all the spells - now also dumps skill associated with the spell.
void store_spell_expiry(object *spell)
Stores in the spell when to warn player of expiration.
void server_main(int argc, char *argv[])
Server main function.
void knowledge_send_known(player *pl)
Send initial known knowledge to player, if requested.
int tailor_god_spell(object *spellop, object *caster)
Changes the attributes of cone, smite, and ball spells as needed by the code.
int account_check_string(const char *str)
Checks a string to make sure it does not have any invalid characters.
void command_empty(object *op, const char *params)
'empty' command.
void pets_terminate(object *pet)
Removes a pet, taking care of clearning the owner's fields if needed.
int account_link(const char *account_name, const char *player_name)
Adds a player name to an account.
int pray(object *pl, object *skill)
Praying skill handling.
void command_sulk(object *op, const char *params)
'sulk' command.
void command_banish(object *op, const char *params)
Add player's IP to ban_file and kick them off the server.
void command_run_stop(object *op, const char *params)
Player wants to stop running.
Account_Chars * account_char_load(const char *account_name)
For a given account name, load the character information and return it.
int cast_cause_disease(object *op, object *caster, object *spell, int dir)
Let's try to infect something.
object * monster_find_nearest_enemy(object *npc, object *owner)
Returns the nearest enemy (monster or generator) which is visible to npc.
void command_growl(object *op, const char *params)
'growl' command.
void command_dmhide(object *op, const char *params)
A players wants to become DM and hide.
int detect_magic_on_item(object *pl, object *tmp, object *skill)
Runs a 'detect magic' check on a given item.
int cast_heal(object *op, object *caster, object *spell, int dir)
Heals something.
void quest_set_player_state(player *pl, sstring quest_code, int state)
Set the state of a quest for a player.
void command_southeast(object *op, const char *params)
'southeast' command.
static event_registration m
void get_attack_message_for_attack_type(int dam, uint8_t atm_type, const char *victim_name, char *buf1, char *buf2)
Get the attack message for a damage and a type.
void command_giggle(object *op, const char *params)
'giggle' command.
void pray_at_altar(object *pl, object *altar, object *skill)
Player prays at altar.
void add_server_collect_hooks()
archetype * determine_holy_arch(const object *god, const char *type)
Determines the archetype for holy servant and god avatar.
object * find_random_spell_in_ob(object *ob, const char *skill)
This returns a random spell from 'ob'.
int become_follower(object *op, const object *new_god)
This function is called whenever a player has switched to a new god.
void command_burp(object *op, const char *params)
'burp' command.
int cast_create_missile(object *op, object *caster, object *spell, int dir, const char *stringarg)
Create a missile (nonmagic - magic +4).
int SP_level_range_adjust(const object *caster, const object *spob)
Adjust the range of the spell based on level.
player * find_player_socket(const socket_struct *ns)
Return a player for a socket structure.
void command_mapinfo(object *op, const char *params)
'mapinfo' command.
int cftimer_create(int id, long delay, object *ob, int mode)
Creates a new timer.
void command_time(object *op, const char *params)
Players asks for the time.
void party_obsolete_parties(void)
Remove unused parties (no players).
object * monster_find_throw_ob(object *op)
Find an item for the monster to throw.
int mood_change(object *op, object *caster, object *spell)
This covers the various spells that change the moods of monsters - makes them angry, peaceful, friendly, etc.
void command_take(object *op, const char *params)
This takes (picks up) an item.
void recursive_roll(object *op, int dir, object *pusher)
An object is pushed by another which is trying to take its place.
void set_spell_skill(object *op, object *caster, object *spob, object *dest)
Utility function to assign the correct skill when casting.
void command_south(object *op, const char *params)
'south' command.
void check_login(object *op, const char *password)
Actually login a player, load from disk and such.
int remove_curse(object *op, object *caster, object *spell)
This function removes the cursed/damned status on equipped items.
void command_rename_item(object *op, const char *params)
Changing the custom name of an item.
void command_groan(object *op, const char *params)
'groan' command.
void clear_skill(object *who)
This function just clears the chosen_skill and range_skill values in the player.
int cftimer_find_free_id(void)
Finds a free ID for a new timer.
void receive_player_name(object *op, const char *name)
A player just entered her name.
void command_mon_aggr(object *op, const char *params)
When DM is possessing a monster, flip aggression on and off, to allow better motion.
void command_save(object *op, const char *params)
Player wants to get saved.
int cast_earth_to_dust(object *op, object *caster, object *spell_ob)
Basically destroys earthwalls in the area.
void destroy_object(object *op)
Recursively object_free_drop_inventory() op and its inventory.
int cast_change_map_lightlevel(object *op, object *spell)
This changes the light level for the entire map.
void command_stack_clear(object *op, const char *params)
Empty DM item stack.
void command_northwest(object *op, const char *params)
'northwest' command.
void quest_first_player_save(player *pl)
Ensure the quest state is correctly saved for a player.
int singing(object *pl, int dir, object *skill)
Singing skill handling.
void command_kiss(object *op, const char *params)
'kiss' command.
void command_listplugins(object *op, const char *params)
Lists all plugins currently loaded with their IDs and full names.
void command_dumpbelow(object *op, const char *params)
Player wants to dump object below her.
void command_shutdown(object *op, const char *params)
Totally shutdowns the server.
void command_overlay_reset(object *op, const char *params)
Removes the overlay for op's current map.
void command_disarm(object *op, const char *params)
'disarm' command.
void account_char_free(Account_Chars *chars)
This frees all data associated with the character information.
void check_physically_infect(object *victim, object *hitter)
Possibly infect due to direct physical contact i.e., AT_PHYSICAL.
int fire_bolt(object *op, object *caster, int dir, object *spob)
Cast a bolt-like spell.
void party_join(object *op, partylist *party)
Makes a player join a party.
int transport_can_hold(const object *transport, const object *op, int nrof)
Can transport hold object op? This is a pretty trivial function, but in the future, possible transport may have more restrictions or weight reduction like containers.
int move_object(object *op, int dir)
Try to move op in the direction "dir".
void command_bleed(object *op, const char *params)
'bleed' command.
void command_orcknuckle(object *op, const char *params)
Plays the "orcknucke" game.
void command_cast_spell(object *op, const char *params, int cast_now)
Sets up to cast a spell.
void monster_check_doors(object *op, mapstruct *m, int x, int y)
Living creature attempts to open a door.
void scroll_failure(object *op, int failure, int power)
op made some mistake with a scroll, this takes care of punishment.
void command_possess(object *op, const char *params)
DM can possess a monster.
void apply_auto_fix(mapstruct *m)
Go through the entire map (only the first time when an original map is loaded) and performs special a...
void cftimer_process_timers(void)
Processes all timers.
int find_traps(object *pl, object *skill)
Checks for traps on the spaces around the player or in certain objects.
void command_nowiz(object *op, const char *params)
Steps down from wizard mode.
int hideability(object *ob)
Look at the surrounding terrain to determine the hideability of this object.
void list_players(object *op, region *reg, partylist *party)
Displays the players in a region or party.
void send_news(const object *op)
Send the news to a player.
void apply_builder_remove(object *pl, int dir)
Item remover.
void receive_play_again(object *op, char key)
Player replied to play again / disconnect.
int fire_arch_from_position(object *op, object *caster, int16_t x, int16_t y, int dir, object *spell)
Fires an archetype.
void command_printlos(object *op, const char *params)
Various LOS-related statistics.
void monster_check_earthwalls(object *op, mapstruct *m, int x, int y)
Living creature attempts to hit an earthwall.
void command_mark(object *op, const char *params)
'mark' command, to mark an item for some effects (enchant armor, ...).
void command_hide(object *op, const char *params)
Wizard 'hide' command.
int party_confirm_password(const partylist *party, const char *password)
Checks whether a given password matches the party's password.
void send_rules(const object *op)
Send the rules to a player.
int alchemy(object *op, object *caster, object *spell_ob)
Change items to gold nuggets.
int playername_ok(const char *cp)
Is the player name valid.
void accounts_clear(void)
This is used purely by the test harness - by clearing the accounts, it can then verify that the data ...
void initPlugins(void)
Plugins initialization.
void counterspell(object *op, int dir)
Nullifies spell effects.
void command_hiccup(object *op, const char *params)
'hiccup' command.
int animate_weapon(object *op, object *caster, object *spell, int dir)
Generalization of staff_to_snake().
void command_frown(object *op, const char *params)
'frown' command.
int use_oratory(object *pl, int dir, object *skill)
Oratory skill handling.
void monster_do_living(object *op)
For a monster, regenerate hp and sp, potentially clear scared status.
void command_rules(object *op, const char *params)
Display the server rules.
bool map_can_reset(const mapstruct *map, long current_time)
Returns whether a map can be reset, including all other maps in the same reset group.
bool pick_up(object *op, object *alt)
Try to pick up an item.
void dragon_ability_gain(object *who, int atnr, int level)
When a dragon-player gains a new stage of evolution, he gets some treasure.
void command_pickup(object *op, const char *params)
'pickup' command.
void make_visible(object *op)
Makes an object visible again.
void roll_stats(object *op)
Roll the initial player's statistics.
void free_knowledge(void)
Free all knowledge data.
int pets_summon_object(object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
General purpose summoning function.
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
Move an object (even linked objects) to another spot on the same map.
char ** account_get_players_for_account(const char *account_name)
Returns an array of strings for the characters on this account - the array is null terminated...
void command_sound(object *op, const char *params)
Player wants to change sound status.
void command_loadtest(object *op, const char *params)
This command will stress server.
object * find_key(object *pl, object *container, object *door)
We try to find a key for the door as passed.
void command_recollect(object *op, const char *params)
void rod_adjust(object *rod)
Adjusts rod attributes.
void command_patch(object *op, const char *params)
Wizard wants to altar an object.
bool csv_contains(std::string list, std::string item, std::string delim=",")
Split list by comma, then see if item matches anything in the list.
void apply_map_builder(object *pl, int dir)
Global building function.
void knowledge_send_info(socket_struct *ns)
Send the reply_info for 'knowledge_info'.
void set_darkness_map(mapstruct *m)
Set the darkness level for a map, based on the time of the day.
object * find_skill_by_number(object *who, int skillno)
This returns the first skill pointer of the given subtype (the one that accumulates exp...
void command_dumpallobjects(object *op, const char *params)
Various object-related statistics.
Contains the base information we use to make up a packet we want to send.
object * pets_get_enemy(object *pet, rv_vector *rv)
Given that 'pet' is a friendly object, this function returns a monster the pet should attack...
partylist * party_form(object *op, const char *partyname)
Forms the party struct for a party called 'partyname'.
int use_skill(object *op, const char *string)
Similar to invoke command, it executes the skill in the direction that the user is facing...
void command_southwest(object *op, const char *params)
'southwest' command.
void command_afk(object *op, const char *params)
Toggles the afk status of a player.
int should_director_abort(const object *op, const object *victim)
Check if op should abort moving victim because of it's race or slaying.
void free_server(void)
Frees all memory allocated around here:
void command_whereami(object *op, const char *params)
'whereami' command.
void command_news(object *op, const char *params)
Display the server news.
void command_accuse(object *op, const char *params)
'accuse' command.
int spell_find_dir(mapstruct *m, int x, int y, object *exclude)
Search what direction a spell should go in, first the center square then some close squares in the gi...
void command_usekeys(object *op, const char *params)
Player wants to change how keys are used.
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
Object is attacked by something.
void move_player_attack(object *op, int dir)
The player is also actually going to try and move (not fire weapons).
void hiscore_init(void)
Initializes the module.
int write_on_item(object *pl, const char *params, object *skill)
Implement the 'inscription' skill, which checks for the required skills and marked items before runni...
void command_shrug(object *op, const char *params)
'shrug' command.
void command_toggle_shout(object *op, const char *params)
A simple toggle for the no_shout field.
void enter_player_savebed(object *op)
This is a basic little function to put the player back to his savebed.
void command_uskill(object *pl, const char *params)
'use_skill' command.
void command_dumpmap(object *op, const char *params)
Various map-related statistics.
char const * newhash(char const *password)
void do_goto(object *op, const char *name, int x, int y)
object * drop_object(object *op, object *tmp, uint32_t nrof)
Try to drop an object on the floor.
linked_char * account_get_additional_chars(const char *account_name, const Account_Chars *chars, int *count)
Get a list of character names linked to the specified account which are not listed in chars...
void command_beg(object *op, const char *params)
'beg' command.
player * find_player_partial_name(const char *plname)
Find a player by a partial name.
void meditate(object *pl, object *skill)
Meditation skill handling.
int quest_was_completed(player *pl, sstring quest_code)
Check if a quest was completed once for a player, without taking account the current state...
object * find_skill_by_name(object *who, const char *name)
This returns the skill pointer of the given name (the one that accumulates exp, has the level...
void command_purge_quest_definitions(object *op, const char *param)
int cast_create_town_portal(object *op, object *caster, object *spell)
This function cast the spell of town portal for op.
void command_petmode(object *op, const char *params)
Player wants to change how her pets behave.
void init_ob_methods(void)
Initializes the ob_method system.
void account_char_add(Account_Chars *chars, player *pl)
This adds a player to the list of accounts.
int cast_identify(object *op, object *caster, object *spell)
Identifies objects in the players inventory/on the ground.
void command_me(object *op, const char *params)
'me' command.
void change_object(object *op)
Replaces op with its other_arch if it has reached its end of life.
void pets_move_golem(object *op)
Handles a golem's movement.
int face_player(object *op, int dir)
Face player in the given direction.
int check_race_and_class(living *stats, archetype *race, archetype *opclass)
This checks to see if the race and class are legal.
void command_statistics(object *pl, const char *params)
Prints out some useful information for the character.
int get_party_password(object *op, partylist *party)
Ask the player for the password of the party she wants to join.
void command_kick(object *op, const char *params)
Kicks a player from the server.
int create_aura(object *op, object *caster, object *spell)
Create an aura spell object and put it in the player's inventory.
void dump_races(void)
Dumps all race information to stderr.
void command_who(object *op, const char *params)
'who' command.
object * fix_stopped_arrow(object *op)
An ARROW stops moving.
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
Main dispatch when someone casts a spell.
void shuffle_attack(object *op)
This routine shuffles the attack of op to one of the ones in the list.
void command_drop(object *op, const char *params)
'drop' command.
void command_puke(object *op, const char *params)
'puke' command.
int cast_polymorph(object *op, object *caster, object *spell_ob, int dir)
Polymorph spell casting.
void init_skills(void)
This just sets up the skill_names table above.
void command_wink(object *op, const char *params)
'wink' command.
int magic_wall(object *op, object *caster, int dir, object *spell_ob)
This creates magic walls.
void display_motd(const object *op)
Sends the message of the day to the player.