Jump to content

pan

Community Contributors
  • Content Count

    355
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by pan

  1. To alter which skills can be reproduced just change your dbskill_reproduce_db.txt and add those ids that are missing. To alter plagiarism/preserve you need to alter the function can_copy that is in skill.c, search for the line: if((skill_id >= LK_AURABLADE && skill_id <= ASC_CDP) || (skill_id >= ST_PRESERVE && skill_id <= CR_CULTIVATION))change it to:if(/*(skill_id >= LK_AURABLADE && skill_id <= ASC_CDP) ||*/ (skill_id >= ST_PRESERVE && skill_id <= CR_CULTIVATION))And finally to change shadow spell open skill.c and search for:if( skill_id >= GS_GLITTERING || skill->get_type(skill_id) != BF_MAGIC ||replace it with:if( /*skill_id >= GS_GLITTERING ||*/ skill->get_type(skill_id) != BF_MAGIC ||Just change those files and rebuild c: oh, I haven't checked in-game if any of those changes work, could you test and post your results? @EDIT Oh, sorry I missed a spot, open srcmapclif.c and search for: sd->status.skill[i].id < GS_GLITTERING && skill->get_type(sd->status.skill[i].id) == BF_MAGIC )replace it with: /*sd->status.skill[i].id < GS_GLITTERING &&*/ skill->get_type(sd->status.skill[i].id) == BF_MAGIC )
  2. It looks like that some function is trying to adjust a timer that has an invalid timer id... Oh, and it is source related
  3. I just tested this code in Hercules' last revision and it's working fine, have you altered anything in it? You could post the snippet that you are using c:
  4. You could use instead of this loop a initnpctimer and a label, but I think it's simpler this way: OnInit: waitingroom "PvP[" + getmapusers("guild_vs3") + "/30]",0; while(1) { delwaitingroom strnpcinfo(3); waitingroom "PvP[" + getmapusers("guild_vs3") + "/30]",0; sleep 1000; //Update rate (ms) } end;Haven't tested it, but I hope it works c:
  5. Remove the file extension and I think it'll work c waitingroom "PvP[" + getmapusers("guild_vs3") + "/30]",0;
  6. pan

    Timer sys_tick

    Thank you for recommending the article, it's very good indeed. Sorry for any inconvenience :x
  7. I did it, it's building with a warning but it's nothing serious c: src/map/battle.c | 3 ++- src/map/pc.c | 1 + src/map/status.c | 25 +++++++++++++++++++------ 3 files changed, 22 insertions(+), 7 deletions(-)diff --git a/src/map/battle.c b/src/map/battle.cindex b814321..5221b34 100644--- a/src/map/battle.c+++ b/src/map/battle.c@@ -252,7 +252,8 @@ int battle_delay_damage(int64 tick, int amotion, struct block_list *src, struct nullpo_ret(target); sc = status->get_sc(target);-+ //devotion patch by Cyrix (rathena) ([email protected])+ //https://www.facebook.../ragdb.ragnarok if( sc && sc->data[SC_DEVOTION] && damage > 0 && skill_id != PA_PRESSURE && skill_id != CR_REFLECTSHIELD ) damage = 0; diff --git a/src/map/pc.c b/src/map/pc.cindex 9a0760d..48538e3 100644--- a/src/map/pc.c+++ b/src/map/pc.c@@ -6762,6 +6762,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { for(j = 0; j < 5; j++) if (sd->devotion[j]){ struct map_session_data *devsd = map->id2sd(sd->devotion[j]);+ if (devsd) status_change_end(&devsd->bl, SC_DEVOTION, INVALID_TIMER); sd->devotion[j] = 0;diff --git a/src/map/status.c b/src/map/status.cindex 6cfd799..b1af54e 100644--- a/src/map/status.c+++ b/src/map/status.c@@ -1161,13 +1161,26 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, // if (!target->prev && !(flag&2)) // return 0; //Cannot damage a bl not on a map, except when "charging" hp/sp + //devotion patch by Cyrix (rathena) ([email protected]) sc = status->get_sc(target);- if( hp && battle_config.invincible_nodamage && src && sc && sc->data[SC_INVINCIBLE] && !sc->data[SC_INVINCIBLEOFF] )- hp = 1; - if( hp && !(flag&1) ) {+ if( hp && !(flag&1|8) ) { if( sc ) { struct status_change_entry *sce;+ if( (sce = sc->data[SC_DEVOTION]) && src && battle->get_current_skill(src) != PA_PRESSURE )+ { // Devotion prevents any of the other ailments from ending.+ struct block_list *d_bl = map->id2bl(sce->val1);+ if( d_bl && (+ (d_bl->type == BL_MER && ((TBL_MER*)d_bl)->master && ((TBL_MER*)d_bl)->master->bl.id == target->id) ||+ (d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce->val2] == target->id)+ ) && check_distance_bl(target, d_bl, sce->val3) )+ {+ clif->damage(d_bl, d_bl, timer->gettick(), 0, 0, hp, 0, 0);+ status_fix_damage(NULL, d_bl, hp, 0);+ return 0;+ }+ status_change_end(target, SC_DEVOTION, -1);+ } if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) status_change_end(target, SC_STONE, INVALID_TIMER); status_change_end(target, SC_FREEZE, INVALID_TIMER);@@ -1178,9 +1191,9 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, status_change_end(target, SC_HIDING, INVALID_TIMER); status_change_end(target, SC_CLOAKING, INVALID_TIMER); status_change_end(target, SC_CHASEWALK, INVALID_TIMER);- status_change_end(target, SC_CAMOUFLAGE, INVALID_TIMER);- status_change_end(target, SC__INVISIBILITY, INVALID_TIMER);- status_change_end(target, SC_DEEP_SLEEP, INVALID_TIMER);+ //status_change_end(target, SC_CAMOUFLAGE, INVALID_TIMER);+ //status_change_end(target, SC__INVISIBILITY, INVALID_TIMER);+ //status_change_end(target, SC_DEEP_SLEEP, INVALID_TIMER); if ((sce=sc->data[SC_ENDURE]) && !sce->val4 && !sc->data[SC_LKCONCENTRATION]) { //Endure count is only reduced by non-players on non-gvg maps. //val4 signals infinite endure. [Skotlex]
  8. pan

    Timer sys_tick

    Hello, I was coding some modifications and I found out that sys_tick() is declared as int64 and I think it should've been declared as unsigned int64. In windows this function calls pGetTickCount64(), from winapi, which is declared as ULONGLONG that is equivalent to unsigned int64. @srccommontimer.c static int64 sys_tick(void) http://msdn.microsoft.com/en-us/library/windows/desktop/ms724411(v=vs.85).aspxhttp://msdn.microsoft.com/en-us/library/cc230393.aspx
  9. Now I see, I tried to reproduce with the correct link and the same error occurred here.
  10. I'm sure that it is the link that you're using that is returning those bad gateway errors, if you change the link to the correct one it'll work. You are using a "git link" and you are trying to pull from a svn, you need to use a "svn link" or change the link that you are using, or it will never work.
  11. If you can't change the link of the repository that you're using, you could just use git instead of svn... http://herc.ws/board/topic/152-obtaining-hercules/?p=846
  12. If there are no console errors whatsoever you could do a coredump of your map-server and analyse it...
  13. You are not using the right link, you should use this one: http://github.com/HerculesWS/HerculesIf you need more information this topic is very useful: http://herc.ws/board/topic/152-obtaining-hercules/
  14. Open src/map/pc.c and search for: if (nameid != ITEMID_NAUTHIZ && sd->sc.opt1 > 0 && sd->sc.opt1 != OPT1_STONEWAIT && sd->sc.opt1 != OPT1_BURNING)replace with:if (nameid != ITEMID_NAUTHIZ && sd->sc.opt1 > 0 && !sd->sc.opt1 != OPT1_CRYSTALIZE && sd->sc.opt1 != OPT1_STONEWAIT && sd->sc.opt1 != OPT1_BURNING)All those skills and npc effects that use SC_COLD will also be affected and the user will be able to use items.Hope this works c:
  15. Oh sorry I didn't notice, I thought that there were more changes :x
  16. pan

    permanent emotion

    http://upaste.me/6a72933486220b72 I think this way it would work better, also I think some kind of mapflag is needed to end a script when a player warps out. Oh, btw, I forgot to add OnInit, just add it before OnStart... Regards.
  17. Also I don't know why but sometimes when posting long "[ code ]"s they are cut. And it sure looks like that happened with your post as both codes are the same, sometimes editing works to fix that c:
  18. I'm not sure if that's the best approach to this problem but you could try using this snippet: int storeall_timer(int tid, int64 tick, int id, intptr_t data){ struct map_session_data *sd; if( (sd=(struct map_session_data *)map->id2sd(id)) == NULL ) return 1; //ShowDebug("storeall_timer: bl.id = %d, sd->storeall_tid = %dn", sd->bl.id, sd->storeall_tid); if(sd->storeall_tid != tid) { ShowError("storeall_timer %d != %dn",sd->storeall_tid,tid); return 0; } sd->storeall_tid = INVALID_TIMER; // Player can use the command once again c: //ShowDebug("storeall_timer: done! sd->storeall_tid = %d n",sd->storeall_tid); return 0;}/*========================================== * @storeall by [MouseJstr] * Put everything into storage *------------------------------------------*/ACMD(storeall){ int i; nullpo_retr(false, sd); if (sd->storeall_tid != INVALID_TIMER && sd->storeall_tid) { clif->message(fd, "You need to wait for a while to use this function."); return false; } if (sd->state.storage_flag != 1) { //Open storage. if( storage->open(sd) == 1 ) { clif->message(fd, "You can't open the storage currently."); return false; } } for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) { if(sd->status.inventory[i].equip != 0) pc->unequipitem(sd, i, 3); storage->add(sd, i, sd->status.inventory[i].amount); } } // Starts the timer, note that it's in ms sd->storeall_tid = timer->add( (timer->gettick()+60000), storeall_timer, sd->bl.id, 0); //ShowDebug("storeall: bl.id = %d, storeall_tid = %dn", sd->bl.id,sd->storeall_tid); storage->close(sd); clif->message(fd, "It is done"); return true;}I haven't tested this mod in-game, but my modifications in your snippet built just fine.Regards. @EDIT: Tested the code and made minor changes c:
  19. I don't think that rA's source code is that different than Hercules', just some functions have changed in those files as far as I'm aware of. Instead of using a diff patcher you could do those changes manually. Regards.
  20. I haven't tested this changes in-game but the build was successful without any warnings. And party_share_level was disabled, it would mess with the new configuration. Open char/inter.h and search for: extern unsigned int party_share_level; replace it with: /*extern unsigned int party_share_level;*/extern unsigned int party_share_range; Open char/int_party.c and search for: return (p->party.count < 2 replace the whole line with: return (p->party.count < 2 ||/* p->max_lv - p->min_lv <= party_share_level ||*/ p->max_lv - p->min_lv <= (p->max_lv*(party_share_range/100)) ); Open char/inter.c, search for: unsigned int party_share_level = 10; replace with: //unsigned int party_share_level = 10;unsigned int party_share_range = 20; // 20% as default value search: else if(!strcmpi(w1,"party_share_level")) party_share_level = atoi(w2); replace with: /*else if(!strcmpi(w1,"party_share_level")) party_share_level = atoi(w2);*/ else if(!strcmpi(w1,"party_share_range")) party_share_range = atoi(w2); Build your char-server, then open conf/inter-server.conf, search for: // Level range for sharing within a partyparty_share_level: 15 Replace it with: // Level range for sharing within a party//party_share_level: 15// Floating share rate (0-100) in percentage// default: 20party_share_range: 20 Run your server and check if the changes worked c:
×
×
  • Create New...

Important Information

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