caspe 16 Posted June 25, 2017 Announcement after emergency call skill ready, also when EC skill used and try to use again it should show remaining time. Quote Share this post Link to post Share on other sites
0 bWolfie 138 Posted June 25, 2017 (edited) Logically through a script, you could initnpctimer() and then message() the AID. But I don't know how to do that through source. Edit: just skimming through some source, I think you can use a combination of timer->gettick() and something else to perform the time counter. Not sure about sending a msg to the guild leader though. I think you can achieve the GL ID through sql query, im not sure about the announcement part tho. Edit2: sorry, i dont actually have meaningful contribution, just rambling. Apologies. Edited June 25, 2017 by Myriad Quote Share this post Link to post Share on other sites
0 caspe 16 Posted June 25, 2017 Script will also work fine Quote Share this post Link to post Share on other sites
0 bWolfie 138 Posted June 26, 2017 (edited) Thanks to @Smoke I made a source edit which will send a clif->message stating how long until ecall can be used again. Unfortunately I couldn't figure out how to send an announcement once the timer is up. PM me on herc discord if you are interested. Edited June 26, 2017 by Myriad 3 Quazi, Sephus and caspe reacted to this Quote Share this post Link to post Share on other sites
0 caspe 16 Posted June 26, 2017 @Myriad thanks, maybe post here it will be useful for others to. 1 Tsuuu reacted to this Quote Share this post Link to post Share on other sites
0 caspe 16 Posted June 27, 2017 (edited) Thanks to @Myriad now emergency call show remaining time Here is changes: skill.c Spoiler In skill.c, find: ------------------- if (sd) guild->block_skill(sd,skill->get_time2(skill_id,skill_lv)); In case GD_EMERGENCYCALL: ------------------- Change to ------------------- if (sd) { guild->block_skill(sd,skill->get_time2(skill_id,skill_lv)); pc_setglobalreg(sd, script->add_str("RECALL_DELAY"), time(0) + 300); } message.conf Spoiler In conf/message.conf, add your custom message ------------------- CUSTOM_MSG_NUMBER: You cannot use Emergency Call for another %d seconds. clif.c Spoiler Find: -------------------------------------------------------------------- if( pc_issit(sd) ) return; if( skill->not_ok(skill_id, sd) ) return; -------------------------------------------------------------------- Add this code after first if ----------------------------------------------------------------------- if (skill_id == GD_EMERGENCYCALL && sd->state.gmaster_flag && pc_readglobalreg(sd,script->add_str("RECALL_DELAY")) > time(0)) { char output[100]; sprintf(output, msg_txt(CUSTOM_MSG_NUMBER), (DIFF_TICK(pc_readglobalreg(sd,script->add_str("RECALL_DELAY")), time(0)))); // You cannot use Emergency Call for another %d seconds. clif->message(sd->fd, output); clif->message(sd->fd, "Emergency Call failed."); return; } Everything working fine except one compilation warning map\skill.c(8111): warning C4244: 'function': conversion from 'time_t' to 'int', possible loss of data Can someone help me to fix that. using latest hercules revision. Edited June 27, 2017 by caspe 1 bWolfie reacted to this Quote Share this post Link to post Share on other sites
0 caspe 16 Posted June 29, 2017 anyone here who can help me to solve this warning? Quote Share this post Link to post Share on other sites
0 Rebel 23 Posted September 14, 2018 Any update on this? Its not working. Quote Share this post Link to post Share on other sites
Announcement after emergency call skill ready, also when EC skill used and try to use again it should show remaining time.
Share this post
Link to post
Share on other sites