Jump to content

pan

Community Contributors
  • Content Count

    355
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by pan

  1. What changes have you made? I just built using latest svn revision and no warnings/errors were found using MSVC 2010... If you haven't made any changes try reverting to a previous revision and see if that works.
  2. Podem ser usados clients da mesma forma, todos esses emuladores estão emulando a mesma coisa, né? c: As databases devem ser convertidas para o formato suportado pela libconf utilizada no núcleo do Hercules, mas é disponibilizado um conversor http://herc.ws/board/topic/2906-introducing-rathena-to-hercules-database-converters/ att EDIT: Postei o link errado de conversor, as databases convertidas por esses que estão no link acima são somente as sql e não as de itens como pedido, aqui está o link corrigido: http://haru.ws/hercules/itemdbconverter/
  3. Não sei como o Hercules anda para um servidor estável mesmo, já vi mais de um report de crashes repentinos no map-server, espero que achem logo o que está causando essa "instabilidade". Quanto ao brAthena não sei se está ativo, acabei de voltar para essas coisas e não planejo chegar nem perto dessas comunidades brasileiras shaushaushasuah mas o Cronus anda meio morto já faz um tempo, quando eu parei de frequentar já estava isso em meados de 2009~2010, o desenvolvimento de lá nunca foi muito ativo shaushaushaushasu
  4. You could always use bonuses to alter in certain ways a player interact with other races (from doc/item_bonus.txt with some modifications, I changed some variable names to "default" them) n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect, 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon, 10=Boss monster, 11=Other than (normal monster) boss monster(Check db/mob_race2_db.txt)bonus bIgnoreDefRace,n; Disregard DEF against enemies of race nbonus bIgnoreMDefRace,n; Disregard MDEF against enemies of race nbonus bDefRatioAtkRace,n; Does more damage depending on monster Defense against race n (defense disregard)bonus2 bAddRace,n,x; +x% physical damage against race nbonus2 bMagicAddRace,n,x; +x% magical damage against race nbonus2 bSubRace,n,x; +x% damage reduction against race nbonus2 bIgnoreMdefRate,n,x; Disregard x% of the target's MDEF if the target belongs to race n;bonus3 bAddMonsterDropItem,x,n,y; Adds a y/100% chance for item x to be dropped, when killing any monster of race n. If 'y' is negative value, then it's a part of formula chance = -y*(killed_mob_level/10)+1bonus2 bCriticalAddRace,n,r; Critical + r vs. enemies of race nbonus2 bAddRace2,n,x; Increase damage by x% vs. enemies of race n y: 0=Don't show damage 1=Show damagebonus2 bExpAddRace,n,x; Increase exp gained by x% vs. enemies of race nbonus2 bSPGainRace,n,x; When killing a monster of race n by physical attack gain x amount of spbonus2 bSubRace2,n,x; Damage x% reduction from enemies of race nbonus2 bAddMonsterDropChainItem,x,n; Able to get item of chain type x (only constant applicable) when you kill a monster of race nbonus2 bWeaponComaRace,n,y; y/100% chance to cause Coma when attacking a monster of race n with a normal attackbonus2 bIgnoreDefRate,n,x; Disregard x% of the target's DEF if the target belongs to race n;bonus3 bHPDrainRateRace,n,r,x; Adds a r/10% chance to receive x% of damage dealt as HP from a monster of race n with normal attack.bonus3 bSPDrainRateRace,n,r,x; Adds a r/10% chance to receive x% of damage dealt as SP from a monster of race n with normal attack.bonus2 bHPDrainValueRace,n,x; Heals +x HP when attacking a monster of race r with normal attack.bonus2 bSPDrainValueRace,n,x; Heals +x SP when attacking a monster of race r with normal attack.bonus2 bHPGainRaceAttack,n,x; Heals x HP when attacking n Race on every hitbonus2 bSPGainRaceAttack,n,x; Heals x SP when attacking n Race on every hitIf you really need a source mod you could always ask for a new bonus that alters a player race, if you want so you can post in this topic...
  5. pan

    Error at clif.c

    There are other topics that describe sudden map-crashes, but none of the others have debug info, in my opinion these crashes look like something that's wrong in Hercules' core, can you post the call stack? Knowing which part of the src called this function would help pinpointing the real issue
  6. A sintaxe dos npcs do Hercules é basicamente a mesma do brAthena ou do Cronus, há algumas modificações no leitor de scripts daqui, mas qualquer incompatibilidade da para resolver bem facilmente c:
  7. pan

    Error at clif.c

    It looks like it's a problem in Hercules and not in any mod you've made... Did you edit anything related to the elemental system? What were you doing in-game when it happened?
  8. Everything is working now, I corrected my other post as well adding those changes in the knight snippet, the first one was very poorly coded, I did it in a hurry... Regards
  9. Haven't tested those mods, but they built without any errors. Regarding adding one soul skill to blacksmiths you can only mod your databases and it should work, but of course KN_CHARGEATK will stop being a quest skill and'll only work when a character is linked even when he is a knight... I've tried making some changes in the source-code to bypass this issue, but it seems that if the skill is not sent to the client with 0x8 as info it won't be activated when someone is linked. So I bypassed using a quite "unorthodox" way, it's not neat code as I don't like to force the client to do anything, but it works. I think the other modifications worked as they are fairly simple to make, so I haven't tested them in-game just the one that's complex. Open src/map/status.c and find: case SC_RAISINGDRAGON: sce->val2 = st->max_hp / 100;// Officially tested its 1%hp drain. [Jobbie] break;Add below: case SC_SOULLINK: // This is _not_ the best way to do that ): if( (sd->class_&MAPID_UPPERMASK) == MAPID_BLACKSMITH ) pc->skill(sd, KN_CHARGEATK, 1, 0); break;Find: case ITEMID_ORC_LOAD_CARD: clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_ORCLORD); break; } } break;Add below: case SC_SOULLINK: // This is _not_ the best way to do that ): if(/* pc->checkskill(sd, KN_CHARGEATK) && */(sd->class_&MAPID_UPPERMASK) == MAPID_BLACKSMITH) pc->skill(sd, KN_CHARGEATK, 0, 0); break;Open src/map/skill.c and find:Search for: if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); return 0; }Replace it with: // If linked, knights are able to use parrying with one handed swords (type 2) if( require.weapon && !pc_check_weapontype(sd,require.weapon) && !( skill_id == LK_PARRYING && sd->sc.data[SC_SOULLINK] && pc_check_weapontype(sd,1<<2) )) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); return 0; }Find (again): if( require.weapon && !pc_check_weapontype(sd,require.weapon) ) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); return 0; }Replace with: if( require.weapon && !pc_check_weapontype(sd,require.weapon) && !( skill_id == LK_PARRYING && sd->sc.data[SC_SOULLINK] && pc_check_weapontype(sd,1<<2) )) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); return 0; }Open src/map/battle.c and search for: case SM_BASH: case MS_BASH: skillratio += 30 * skill_lv;Add below: // If linked, super novices will have SM_BASH's ratio increased by 50% if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_SUPERNOVICE ) skillratio += 50;Search for: case MO_FINGEROFFENSIVE: skillratio+= 50 * skill_lv;Add below: // If linked, monks will have MO_FINGEROFFENSIVE's ratio increased by 15% if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_MONK ) skillratio += 15;Search for: case CG_ARROWVULCAN: skillratio += 100 + 100 * skill_lv;Add below: // If linked, bards/dancers will have CG_ARROWVULCAN's damage increased by 15% if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_BARDDANCER ) skillratio += 15;Finally find: if (md.damage < 0 || md.damage > INT_MAX>>1) //Overflow prevention, will anyone whine if I cap it to a few billion? //Not capped to INT_MAX to give some room for further damage increase.Add above: // If linked, alchemists will have 15% increase in CR_ACIDDEMONSTRATION's damage if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ALCHEMIST ) md.damage += md.damage*15/100;Open src/map/pc.c and search for: for (i = 0; i < ARRAYLENGTH(scw_list); i++) { // Skills requiring specific weapon types if( scw_list[i] == SC_DANCING && !battle_config.dancing_weaponswitch_fix ) continue;Add below: // If linked, knights are able to use parrying with one handed swords (type 2) if( scw_list[i] == SC_PARRYING && sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_KNIGHT && (!pc_check_weapontype(sd,skill->get_weapontype(status->sc2skill(scw_list[i]))) && !pc_check_weapontype(sd,2) ) ) { status_change_end(&sd->bl, scw_list[i], INVALID_TIMER); continue; // We don't want to fall under the next check }Save all files and build your map-server, test in-game and if you're having any trouble just post and I'll try to answer as quickly as possible c: Regards. EDIT: Corrected mistake in knight related snippet EDIT2: Corrected error as reported in: http://herc.ws/board/topic/4360-custom-link-mods/
  10. With this mods there will be no hunger, as far as I know there's no way to totally remove the hunger bar without having client-side modified. Haven't tested this changes in-game, but they built without showing any errors/warnings. Open src/map/pet.c and search for: if( pd->petDB ) { if( pd->petDB->equip_script ) status_calc_pc(sd,SCO_NONE); if( battle_config.pet_hungry_delay_rate != 100 ) interval = (pd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100; else interval = pd->petDB->hungry_delay; } if( interval <= 0 ) interval = 1; pd->pet_hungry_timer = timer->add(timer->gettick() + interval, pet->hungry, sd->bl.id, 0); return 0;}Change it to: if( pd->petDB ) { if( pd->petDB->equip_script ) status_calc_pc(sd,SCO_NONE);// if( battle_config.pet_hungry_delay_rate != 100 )// interval = (pd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100;// else// interval = pd->petDB->hungry_delay; } // if( interval <= 0 )// interval = 1;// pd->pet_hungry_timer = timer->add(timer->gettick() + interval, pet->hungry, sd->bl.id, 0); pd->pet.hungry = 70; // Optimal hunger value pd->pet.intimate = 1000; // Oh, so intimate return 0;}Now search for:timer->add_func_list(pet->hungry,"pet_hungry");Change it to://timer->add_func_list(pet->hungry,"pet_hungry");Find:int pet_hungry(int tid, int64 tick, int id, intptr_t data) { struct map_session_data *sd; struct pet_data *pd; int interval; sd=map->id2sd(id); if(!sd) return 1; if(!sd->status.pet_id || !sd->pd) return 1; pd = sd->pd; if(pd->pet_hungry_timer != tid){ ShowError("pet_hungry_timer %d != %dn",pd->pet_hungry_timer,tid); return 0; } pd->pet_hungry_timer = INVALID_TIMER; if (pd->pet.intimate <= 0) return 1; //You lost the pet already, the rest is irrelevant. pd->pet.hungry--; if( pd->pet.hungry < 0 ) { pet_stop_attack(pd); pd->pet.hungry = 0; pet->set_intimate(pd, pd->pet.intimate - battle_config.pet_hungry_friendly_decrease); if( pd->pet.intimate <= 0 ) { pd->pet.intimate = 0; pd->status.speed = pd->db->status.speed; } status_calc_pet(pd, SCO_NONE); clif->send_petdata(sd,pd,1,pd->pet.intimate); } clif->send_petdata(sd,pd,2,pd->pet.hungry); if(battle_config.pet_hungry_delay_rate != 100) interval = (pd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100; else interval = pd->petDB->hungry_delay; if(interval <= 0) interval = 1; pd->pet_hungry_timer = timer->add(tick+interval,pet->hungry,sd->bl.id,0); return 0;}Replace it with:int pet_hungry(int tid, int64 tick, int id, intptr_t data) {/** struct map_session_data *sd; struct pet_data *pd; int interval; sd=map->id2sd(id); if(!sd) return 1; if(!sd->status.pet_id || !sd->pd) return 1; pd = sd->pd; if(pd->pet_hungry_timer != tid){ ShowError("pet_hungry_timer %d != %dn",pd->pet_hungry_timer,tid); return 0; } pd->pet_hungry_timer = INVALID_TIMER; if (pd->pet.intimate <= 0) return 1; //You lost the pet already, the rest is irrelevant. pd->pet.hungry--; if( pd->pet.hungry < 0 ) { pet_stop_attack(pd); pd->pet.hungry = 0; pet->set_intimate(pd, pd->pet.intimate - battle_config.pet_hungry_friendly_decrease); if( pd->pet.intimate <= 0 ) { pd->pet.intimate = 0; pd->status.speed = pd->db->status.speed; } status_calc_pet(pd, SCO_NONE); clif->send_petdata(sd,pd,1,pd->pet.intimate); } clif->send_petdata(sd,pd,2,pd->pet.hungry); if(battle_config.pet_hungry_delay_rate != 100) interval = (pd->petDB->hungry_delay*battle_config.pet_hungry_delay_rate)/100; else interval = pd->petDB->hungry_delay; if(interval <= 0) interval = 1; pd->pet_hungry_timer = timer->add(tick+interval,pet->hungry,sd->bl.id,0);**/ return 0;}Find:int pet_hungry_timer_delete(struct pet_data *pd){ nullpo_ret(pd); if(pd->pet_hungry_timer != INVALID_TIMER) { timer->delete(pd->pet_hungry_timer,pet->hungry); pd->pet_hungry_timer = INVALID_TIMER; } return 1;}Replace with:int pet_hungry_timer_delete(struct pet_data *pd){ nullpo_ret(pd);/** if(pd->pet_hungry_timer != INVALID_TIMER) { timer->delete(pd->pet_hungry_timer,pet->hungry); pd->pet_hungry_timer = INVALID_TIMER; }**/ return 1;}Search for:int pet_food(struct map_session_data *sd, struct pet_data *pd){ int i,k; k=pd->petDB->FoodID; i=pc->search_inventory(sd,k); if(i < 0) { clif->pet_food(sd,k,0); return 1; } pc->delitem(sd,i,1,0,0,LOG_TYPE_CONSUME); if( pd->pet.hungry > 90 ) pet->set_intimate(pd, pd->pet.intimate - pd->petDB->r_full); else { if( battle_config.pet_friendly_rate != 100 ) k = (pd->petDB->r_hungry * battle_config.pet_friendly_rate)/100; else k = pd->petDB->r_hungry; if( pd->pet.hungry > 75 ) { k = k >> 1; if( k <= 0 ) k = 1; } pet->set_intimate(pd, pd->pet.intimate + k); } if( pd->pet.intimate <= 0 ) { pd->pet.intimate = 0; pet_stop_attack(pd); pd->status.speed = pd->db->status.speed; } else if( pd->pet.intimate > 1000 ) pd->pet.intimate = 1000; status_calc_pet(pd, SCO_NONE); pd->pet.hungry += pd->petDB->fullness; if( pd->pet.hungry > 100 ) pd->pet.hungry = 100; clif->send_petdata(sd,pd,2,pd->pet.hungry); clif->send_petdata(sd,pd,1,pd->pet.intimate); clif->pet_food(sd,pd->petDB->FoodID,1); return 0;}Replace it with:int pet_food(struct map_session_data *sd, struct pet_data *pd){/** int i,k; k=pd->petDB->FoodID; i=pc->search_inventory(sd,k); if(i < 0) { clif->pet_food(sd,k,0); return 1; } pc->delitem(sd,i,1,0,0,LOG_TYPE_CONSUME); if( pd->pet.hungry > 90 ) pet->set_intimate(pd, pd->pet.intimate - pd->petDB->r_full); else { if( battle_config.pet_friendly_rate != 100 ) k = (pd->petDB->r_hungry * battle_config.pet_friendly_rate)/100; else k = pd->petDB->r_hungry; if( pd->pet.hungry > 75 ) { k = k >> 1; if( k <= 0 ) k = 1; } pet->set_intimate(pd, pd->pet.intimate + k); } if( pd->pet.intimate <= 0 ) { pd->pet.intimate = 0; pet_stop_attack(pd); pd->status.speed = pd->db->status.speed; } else if( pd->pet.intimate > 1000 ) pd->pet.intimate = 1000; status_calc_pet(pd, SCO_NONE); pd->pet.hungry += pd->petDB->fullness; if( pd->pet.hungry > 100 ) pd->pet.hungry = 100;**/ clif->send_petdata(sd,pd,2,pd->pet.hungry); clif->send_petdata(sd,pd,1,pd->pet.intimate);// clif->pet_food(sd,pd->petDB->FoodID,1); return 0;}
  11. pan

    FSK skill

    They're the values that define the % of attack that'll be added when this skill is used. For instance if the player has this skill in level 5 it would add: -70 + 10*skill_lv-70 + (10*7) = 0% base attackPlus other additions that depend on statuses... Don't forget that this skill does triple damage, so if your base attack is 152 and your skill lv is 7:attack = base_attack + (base_attack*70/100)attack = 152 + 152*70/100attack = 258,4
  12. pan

    countitem loop

    Considering he said it's a snippet I assume we're all assuming this is either inside a fully functioning script that requires a player to click it to start, or talk to it via OnWhisperGlobal Maybe it's not possible to use this syntax?for(.@i = 0; .@i < getarraysize(.item); .@i++)I'm not sure whether the emulator can or can't parse var = val inside 'for's or 'if's
  13. pan

    FSK skill

    Open src/map/battle.c and search for: case TK_JUMPKICK: skillratio += -70 + 10*skill_lv; if (sc && sc->data[SC_COMBOATTACK] && sc->data[SC_COMBOATTACK]->val1 == skill_id) skillratio += 10 * status->get_lv(src) / 3; //Tumble bonus if (flag) { skillratio += 10 * status->get_lv(src) / 3; //Running bonus (TODO: What is the real bonus?) if( sc && sc->data[SC_STRUP] ) // Spurt bonus skillratio *= 2; } break;Change skillratio += -70 + 10*skill_lv; to whichever value you want, remember that this value is in %
  14. pan

    countitem loop

    Have you changed your getarraysize(.item[0])togetarraysize(.item)?What happens when you run your script?
  15. pan

    countitem loop

    You should always declare something before trying to use it, otherwise the server won't be able to identify those variables when it reads the script. You could also use this example:- script Deleter -1,{ // Declare your variables before using them setarray .item[0], 501, 502, 503, 504; .amt = 1; // Usually commands that identify _arrays_ use only names to identify them, without '[' ']' for(.@i = 0; .@i < getarraysize(.item); .@i++) { // It's possible not to use brackets '{' '}' when there's only one line after an 'if' or an 'for' // You could also remove the brackets from this 'for', but it would make the script more difficult to read if(countitem(.item[.@i]) >= .amt) delitem .item[.@i], .amt; }}Mhalicot's example works because it uses an initialization event ('OnInit') that is executed (parsed) before the rest of the script.Hope I've helped c:
  16. pan

    Item bonus

    Oh I got it, it's the ability to make bonuses last only for a certain period of time that's missing in our engine
  17. pan

    Item bonus

    Doesn't sc_start do the exactly same thing as AddParamTime?
  18. pan

    FSK skill

    What do you want to increase in this skill?
  19. It's very easy to enable those functions. See those links for reference: http://eathena.ws/wiki/index.php/GDB http://www.eathena.ws/board/index.php?showtopic=91817
  20. Amazing work, I just thought that some of the textures that are being used in some of the houses are kind of strange :x but overalll 9/10 wish I could model and map like that
  21. pan

    Item bonus

    I tested on Hercules and those SCs (status changes) work just like any increase would in Aegis... The only consumables I can remember that increase statuses are foods and there're proper changes that are applied:SC_FOOD_STR 204SC_FOOD_AGI 205SC_FOOD_VIT 206SC_FOOD_INT 207SC_FOOD_DEX 208SC_FOOD_LUK 209Athena-based emulators are different than Aegis and that's not a bad thing, I don't think that it's needed to change this syntax that's been used for a long time just to be like Aegis, specially in this case when the only difference is nomenclature. If there was real need to be just like Aegis we could rewrite our script engine and parse directly from leaks, if I'm not mistaken, there're some legal aspects that don't let us do that. Have you found any other bonuses that are wrong in Hercules?
  22. You need to build your map-server enabling debug and enable coredump and stackdump, then you can debug even when there were no errors. This hexed doesn't support this diff, you should downgrade to one that does if you need this feature.
  23. pan

    Item bonus

    My guess is that Athena devs never followed strictly Aegis' "cleaner" script tabs because they wanted to emulate some kind of C89 to approximate their script standard to the one that's used in the src... In my humble opinion sometimes it's cleaner to code using commas to differentiate different parameters than using only spaces or tabs (like in headers).Also there're ways to increase one statuses temporarily: SC_INCAGI 190SC_INCVIT 191SC_INCINT 192SC_INCDEX 193SC_INCLUK 194Regarding:AddAttrTolerace PROPERTY_All 3 MAGICIt'd be nice to have a way to use all properties at once in Hercules too, but you could use something like:for( set @i,0; @i <= 9; set @i, @i++; )%TAB%bonus3 bSubEle,@i,3,BF_MAGIC; Which bonuses do not exist? And which ones are incorrect?
×
×
  • Create New...

Important Information

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