diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-24 15:31:28 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-24 15:31:28 +0000 |
commit | 85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7 (patch) | |
tree | 3954f54f4adce21db6566710b1b02555b4d241a3 /src/map/pc.c | |
parent | 0e67259ca839671dac06dd804d6867ebe33df74a (diff) | |
download | hercules-85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7.tar.gz hercules-85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7.tar.bz2 hercules-85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7.tar.xz hercules-85fdcfa5c7831dc87a2b6810b3e2ebd5e3ec49c7.zip |
* Added 'map_charid2id'
* Changed monster damage logging to save char ID's
* Implemented 'event_script_type'
* Set Emsolute Develop as a learnable skill
* Updated 'require_glory_guild'
* Allow monsters to cast skills near themselves even when monster_nofootset is set to 'yes'
* Print number of online users in online.txt/.html even if there's only 1 user
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1282 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 8c0857d4b..768098afb 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -840,7 +840,7 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars sprintf(tmp_output,"Character '"CL_WHITE"%s"CL_RESET"' logged in. (Account ID: '"CL_WHITE"%d"CL_RESET"').\n", sd->status.name, sd->status.account_id); ShowInfo(tmp_output); - { + if (script_config.event_script_type == 0) { struct npc_data *npc; //printf("pc: OnPCLogin event done. (%d events)\n", npc_event_doall("OnPCLogin") ); if ((npc = npc_name2id(script_config.login_event_name))) { @@ -848,7 +848,12 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars sprintf (tmp_output, "Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.login_event_name); ShowStatus(tmp_output); } + } else { + sprintf (tmp_output, "%d '"CL_WHITE"%s"CL_RESET"' events executed.\n", + npc_event_doall_id(script_config.login_event_name, sd->bl.id), script_config.login_event_name); + ShowStatus(tmp_output); } + // Send friends list clif_friends_list_send(sd); @@ -4645,10 +4650,16 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage) if (sd->state.event_death) pc_setglobalreg(sd,"killerrid",(ssd->status.account_id)); if (ssd->state.event_kill) { - struct npc_data *npc; - if ((npc = npc_name2id(script_config.kill_event_name))) { - run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCKillNPC - sprintf (tmp_output, "Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.kill_event_name); + if (script_config.event_script_type == 0) { + struct npc_data *npc; + if ((npc = npc_name2id(script_config.kill_event_name))) { + run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCKillNPC + sprintf (tmp_output, "Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.kill_event_name); + ShowStatus(tmp_output); + } + } else { + sprintf (tmp_output, "%d '"CL_WHITE"%s"CL_RESET"' events executed.\n", + npc_event_doall_id(script_config.kill_event_name, sd->bl.id), script_config.kill_event_name); ShowStatus(tmp_output); } } @@ -4656,10 +4667,16 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage) } if (sd->state.event_death) { - struct npc_data *npc; - if ((npc = npc_name2id(script_config.die_event_name))) { - run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCDeathNPC - sprintf (tmp_output, "Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.die_event_name); + if (script_config.event_script_type == 0) { + struct npc_data *npc; + if ((npc = npc_name2id(script_config.die_event_name))) { + run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCDeathNPC + sprintf (tmp_output, "Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.die_event_name); + ShowStatus(tmp_output); + } + } else { + sprintf (tmp_output, "%d '"CL_WHITE"%s"CL_RESET"' events executed.\n", + npc_event_doall_id(script_config.die_event_name, sd->bl.id), script_config.die_event_name); ShowStatus(tmp_output); } } |