summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-16 08:25:45 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-16 08:25:45 +0000
commit4431323e09b1ab9875ea8ac67f0ecd1b36420559 (patch)
tree3e45c50e0b8333a87443240bd7cd7653c9bfe948 /src/map/script.c
parent35c7324f5f2f1a5f1dc4fa690020fcbd0c18d891 (diff)
downloadhercules-4431323e09b1ab9875ea8ac67f0ecd1b36420559.tar.gz
hercules-4431323e09b1ab9875ea8ac67f0ecd1b36420559.tar.bz2
hercules-4431323e09b1ab9875ea8ac67f0ecd1b36420559.tar.xz
hercules-4431323e09b1ab9875ea8ac67f0ecd1b36420559.zip
* Fixed a typo in quests/all_quest.txt
* Set 'killerrid' and do PCKillEvent before calling PCDieEvent * Added some new script event related options to script config * Added 10 of the new card effects on the 2/15's patch * Minor rewrites on self and enemy weapon/armor breaking * Added missing code for 'bBreakWeaponRate' and 'bBreakWeaponRate' effects * Added missing code for 'bAddStealRate' effect * Removed redundant 'infinite_autospell' in map_session_data git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1116 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c43
1 files changed, 39 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 6daa1340a..263aba6bc 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7222,6 +7222,14 @@ int script_config_read(char *cfgName)
script_config.check_cmdcount=8192;
script_config.check_gotocount=512;
+ script_config.die_event_name = (char *)aCallocA(24,sizeof(char));
+ script_config.kill_event_name = (char *)aCallocA(24,sizeof(char));
+ script_config.login_event_name = (char *)aCallocA(24,sizeof(char));
+ script_config.logout_event_name = (char *)aCallocA(24,sizeof(char));
+
+ script_config.event_script_type = 0;
+ script_config.event_requires_trigger = 1;
+
fp=fopen(cfgName,"r");
if(fp==NULL){
printf("file not found: %s\n",cfgName);
@@ -7254,6 +7262,24 @@ int script_config_read(char *cfgName)
else if(strcmpi(w1,"check_gotocount")==0) {
script_config.check_gotocount = battle_config_switch(w2);
}
+ else if(strcmpi(w1,"event_script_type")==0) {
+ script_config.event_script_type = battle_config_switch(w2);
+ }
+ else if(strcmpi(w1,"die_event_name")==0) {
+ strcpy(script_config.die_event_name, w2);
+ }
+ else if(strcmpi(w1,"kill_event_name")==0) {
+ strcpy(script_config.kill_event_name, w2);
+ }
+ else if(strcmpi(w1,"login_event_name")==0) {
+ strcpy(script_config.login_event_name, w2);
+ }
+ else if(strcmpi(w1,"logout_event_name")==0) {
+ strcpy(script_config.logout_event_name, w2);
+ }
+ else if(strcmpi(w1,"require_set_trigger")==0) {
+ script_config.event_requires_trigger = battle_config_switch(w2);
+ }
else if(strcmpi(w1,"import")==0){
script_config_read(w2);
}
@@ -7302,10 +7328,19 @@ int do_final_script()
if(userfunc_db)
strdb_final(userfunc_db,userfunc_db_final);
- if (str_data)
- aFree(str_data);
- if (str_buf)
- aFree(str_buf);
+ if (str_data)
+ aFree(str_data);
+ if (str_buf)
+ aFree(str_buf);
+
+ if (script_config.die_event_name)
+ aFree(script_config.die_event_name);
+ if (script_config.kill_event_name)
+ aFree(script_config.die_event_name);
+ if (script_config.login_event_name)
+ aFree(script_config.die_event_name);
+ if (script_config.logout_event_name)
+ aFree(script_config.die_event_name);
return 0;
}