Jump to content
  • Featured Topics

  • Latest Commits

  • Topics

  • Posts

    • Hello, I tested this on the latest hercules. It has error
    • I get this error when i set it to OnInit: setunitdata( getnpcid(), UDT_GROUP, 21); setunittitle( getnpcid(), "Goddess Statue" ); end;   then: OnInit: setunitdata( strnpcinfo(1), UDT_GROUP, 21); setunittitle( strnpcinfo(1), "Goddess Statue" ); end; Whole script: //===== Hercules Script ====================================== //= [ Heal & Buffs ] //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.2 //===== Description: ========================================= //= Basic [ Heal & Buffs ] script. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Aligned coordinates with @go. //= 1.2 Fix variables and character stuck at healing //============================================================ - script Healer FAKE_NPC,{ .@price = 0; // Zeny required for heal .@Buffs = 1; // Also buff players? (1: yes / 0: no) .@Delay = 5; // Heal delay, in seconds if (@HD > gettimetick(GETTIMETICK_UNIXTIME)) { end; } if (.@price) { message strcharinfo(PC_NAME),"Healing costs "+.@price+" Zeny."; if (Zeny < .@price) end; if(select("^0055FFHeal^000000", "^777777Cancel^000000") == 2) close; Zeny -= .@price; } specialeffect(EF_HEAL2, AREA, playerattached()); percentheal 100,100; if (.@Buffs) { specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10; specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10; } if (.@Delay) { @HD = gettimetick(GETTIMETICK_UNIXTIME) + .@Delay; } end; OnInit: setunitdata( strnpcinfo(1), UDT_GROUP, 21); setunittitle( strnpcinfo(1), "Goddess Statue" ); end; } // Duplicates //============================================================ alberta,25,240,6 duplicate(Healer) Healer#alb 4_F_08_STATUE aldebaran,135,118,6 duplicate(Healer) Healer#alde 4_F_08_STATUE amatsu,200,79,4 duplicate(Healer) Healer#ama 4_F_08_STATUE ayothaya,207,169,6 duplicate(Healer) Healer#ayo 4_F_08_STATUE comodo,184,158,6 duplicate(Healer) Healer#com 4_F_08_STATUE einbech,57,36,6 duplicate(Healer) Healer#einbe 4_F_08_STATUE einbroch,57,202,6 duplicate(Healer) Healer#einbr 4_F_08_STATUE geffen,115,72,6 duplicate(Healer) Healer#gef 4_F_08_STATUE gonryun,156,122,6 duplicate(Healer) Healer#gon 4_F_08_STATUE hugel,89,150,6 duplicate(Healer) Healer#hug 4_F_08_STATUE izlude,125,118,5 duplicate(Healer) Healer#izl 4_F_08_STATUE jawaii,250,139,4 duplicate(Healer) Healer#jaw 4_F_08_STATUE lighthalzen,152,100,6 duplicate(Healer) Healer#lhz 4_F_08_STATUE louyang,226,103,4 duplicate(Healer) Healer#lou 4_F_08_STATUE manuk,272,144,6 duplicate(Healer) Healer#man 4_F_08_STATUE mid_camp,203,289,6 duplicate(Healer) Healer#mid 4_F_08_STATUE moc_ruins,72,164,4 duplicate(Healer) Healer#moc 4_F_08_STATUE morocc,153,97,6 duplicate(Healer) Healer#mor 4_F_08_STATUE moscovia,220,191,4 duplicate(Healer) Healer#mos 4_F_08_STATUE niflheim,212,182,5 duplicate(Healer) Healer#nif 4_F_08_STATUE payon,179,106,4 duplicate(Healer) Healer#pay 4_F_08_STATUE prontera,162,193,4 duplicate(Healer) Healer#prt 4_F_08_STATUE rachel,125,116,6 duplicate(Healer) Healer#rac 4_F_08_STATUE splendide,201,153,4 duplicate(Healer) Healer#spl 4_F_08_STATUE thor_camp,249,74,4 duplicate(Healer) Healer#thor 4_F_08_STATUE umbala,105,148,3 duplicate(Healer) Healer#umb 4_F_08_STATUE veins,217,121,4 duplicate(Healer) Healer#ve 4_F_08_STATUE xmas,143,136,4 duplicate(Healer) Healer#xmas 4_F_08_STATUE yuno,164,45,4 duplicate(Healer) Healer#yuno 4_F_08_STATUE // Duplicates (Renewal) //============================================================ brasilis,194,221,6 duplicate(Healer) Healer#bra 4_F_08_STATUE dewata,195,187,4 duplicate(Healer) Healer#dew 4_F_08_STATUE dicastes01,201,194,4 duplicate(Healer) Healer#dic 4_F_08_STATUE ecl_in01,45,60,4 duplicate(Healer) Healer#ecl 4_F_08_STATUE malangdo,132,114,6 duplicate(Healer) Healer#mal 4_F_08_STATUE malaya,205,205,6 duplicate(Healer) Healer#ma 4_F_08_STATUE mora,55,152,4 duplicate(Healer) Healer#mora 4_F_08_STATUE t_garden,123,121,4 duplicate(Healer) Healer#tgarden 4_F_08_STATUE  
    • you can find this in mapzone. Let us know also if it's working like gvg or not. I am interested also   Heracles-master\db\re { /* CvC zone is applied to all maps with a cvc mapflag */ name: "CvC" /* changing this name requires MAP_ZONE_CVC_NAME to also be changed in src/map/map.h file */ disabled_skills: { BS_GREED: "PLAYER" CG_HERMODE: "PLAYER" } disabled_items: { Greed_Scroll: true C_Beginner_Cap: true } /* cashshop disabled in cvc maps */ mapflags: ( "nocashshop", ) },  
    • hello can anyone help me decode which part when I relogin/logout the OnPCStatCalcEvent bonus stats disappear? I want to turn that off.   //===== Hercules Plugin ====================================== //= OnPCStatCalcEvent //===== By: ================================================== //= AnnieRuru //= originally by QQfoolsorellina //===== Current Version: ===================================== //= 2.0 //===== Compatible With: ===================================== //= Hercules 2020-11-12 //===== Description: ========================================= //= give player permanent bonus //===== Topic ================================================ //= http://herc.ws/board/topic/11292-onpcstatcalcevent/ //===== Additional Comments: ================================= //= fix `*skill` doesn't work correctly by using an external file //============================================================ #include "common/hercules.h" #include "map/pc.h" #include "map/script.h" #include "map/status.h" #include "common/conf.h" #include "common/memmgr.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "OnPCStatCalcEvent", SERVER_TYPE_MAP, "2.0", HPM_VERSION, }; VECTOR_DECL(struct script_code *)statcalcevent; int read_onpcstatcalcevent(void) { const char *confpath = "conf/import/OnPCStatCalcEvent.conf"; struct config_t onpcstatcalcevent_conf; if (!libconfig->load_file(&onpcstatcalcevent_conf, confpath)) { ShowError("can't read %s, file not found !\n", confpath); return -1; } struct config_setting_t *config_db = libconfig->setting_get_member(onpcstatcalcevent_conf.root, "script"); if (config_db == NULL) { ShowError("can't read %s\n", confpath); libconfig->destroy(&onpcstatcalcevent_conf); return -1; } struct config_setting_t *config = NULL; int i = 0; struct script_code *tmp; const char *string = NULL; VECTOR_INIT(statcalcevent); while ((config = libconfig->setting_get_elem(config_db, i++))) { if (libconfig->setting_lookup_string(config, "OnPCStatCalcEvent", &string)) { tmp = script->parse(string, "OnPCStatCalcEvent", 0, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL); VECTOR_ENSURE(statcalcevent, 1, 1); VECTOR_PUSH(statcalcevent, tmp); } else ShowError("Invalid Type on entry no."CL_WHITE"%d"CL_RESET" in '"CL_WHITE"%s"CL_RESET"'.\n", i, confpath); } // ShowDebug("%d\n", VECTOR_LENGTH(statcalcevent)); // for (i = 0; i < VECTOR_LENGTH(statcalcevent); i++) { // ShowDebug("%s\n", VECTOR_INDEX(statcalcevent, i)); // ShowDebug("%s\n", VECTOR_INDEX(statcalcevent, i)->script_buf); // } libconfig->destroy(&onpcstatcalcevent_conf); ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", VECTOR_LENGTH(statcalcevent), confpath); return VECTOR_LENGTH(statcalcevent); } void status_calc_pc_additional_post(struct map_session_data *sd, enum e_status_calc_opt opt) { if (sd == NULL) return; for (int i = 0; i < VECTOR_LENGTH(statcalcevent); i++) script->run(VECTOR_INDEX(statcalcevent, i), 0, sd->bl.id, 0); return; } BUILDIN(recalculatestat) { struct map_session_data *sd; if (script_hasdata(st,2)) { if (data_isstring(script_getdata(st,2))) sd = map->nick2sd(script_getstr(st,2), true); else sd = map->id2sd(script_getnum(st,2)); } else sd = script->rid2sd(st); if (sd) status_calc_pc(sd, SCO_FORCE); return true; } void clean_onpcstatcalcevent(void) { for (int i = 0; i < VECTOR_LENGTH(statcalcevent); ++i) { VECTOR_CLEAR(VECTOR_INDEX(statcalcevent, i)->script_buf); aFree(VECTOR_INDEX(statcalcevent, i)); } VECTOR_CLEAR(statcalcevent); return; } int script_reload_post(int retVal) { clean_onpcstatcalcevent(); read_onpcstatcalcevent(); return retVal; } HPExport void plugin_init(void) { addHookPost(status, calc_pc_additional, status_calc_pc_additional_post); addScriptCommand("recalculatestat", "?", recalculatestat); addHookPost(script, reload, script_reload_post); } HPExport void server_online(void) { read_onpcstatcalcevent(); } HPExport void plugin_final(void) { clean_onpcstatcalcevent(); }
    • CvC would work perfectly for me, I'll check it out, thanks
  • Download Statistics

    • Files
      457
    • Comments
      154
    • Reviews
      240

    Latest File
    By Hyroshima

    53    0

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.