

Bringer
-
Posts
748 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Posts posted by Bringer
-
-
On 3/18/2021 at 1:59 PM, kalabasa said:
done solved
do you mind post the link of the following sprite
-
mmo.hpp
//These mark the ID of the jobs, as expected by the client. [Skotlex] enum e_job { JOB_STAR_EMPEROR, JOB_SOUL_REAPER, JOB_BABY_STAR_EMPEROR, JOB_BABY_SOUL_REAPER, JOB_STAR_EMPEROR2, JOB_BABY_STAR_EMPEROR2, JOB_PADAWAN = 4230, JOB_JEDI = 4231, JOB_SITH = 4232, JOB_MAX, };
map.hpp
//First Jobs //Note the oddity of the novice: //Super Novices are considered the 2-1 version of the novice! Novices are considered a first class type, too... enum e_mapid : uint64{ //Baby 3-2 Jobs MAPID_BABY_ROYAL_GUARD = JOBL_THIRD|MAPID_BABY_CRUSADER, MAPID_BABY_SORCERER, MAPID_BABY_MINSTRELWANDERER, MAPID_BABY_SURA, MAPID_BABY_GENETIC, MAPID_BABY_SHADOW_CHASER, MAPID_BABY_SOUL_REAPER, //Star Wars Job MAPID_PADAWAN, MAPID_JEDI = JOBL_2_1 | MAPID_PADAWAN, MAPID_SITH = JOBL_2_2 | MAPID_PADAWAN, // Additional constants MAPID_ALL = UINT64_MAX };
pc.cpp
/*========================================== * Convert's from the client's lame Job ID system * to the map server's 'makes sense' system. [Skotlex] *------------------------------------------*/ int pc_jobid2mapid(unsigned short b_class) //Baby 3-2 Jobs case JOB_BABY_ROYAL_GUARD: return MAPID_BABY_ROYAL_GUARD; case JOB_BABY_SORCERER: return MAPID_BABY_SORCERER; case JOB_BABY_MINSTREL: case JOB_BABY_WANDERER: return MAPID_BABY_MINSTRELWANDERER; case JOB_BABY_SURA: return MAPID_BABY_SURA; case JOB_BABY_GENETIC: return MAPID_BABY_GENETIC; case JOB_BABY_SHADOW_CHASER: return MAPID_BABY_SHADOW_CHASER; case JOB_BABY_SOUL_REAPER: return MAPID_BABY_SOUL_REAPER; //Doram Jobs case JOB_SUMMONER: return MAPID_SUMMONER; //Custom Jobs case JOB_PADAWAN: return MAPID_PADAWAN; case JOB_JEDI: return MAPID_JEDI; case JOB_SITH: return MAPID_SITH; default: return -1; } } //Reverts the map-style class id to the client-style one. int pc_mapid2jobid(unsigned short class_, int sex) { //Baby 3-2 Jobs case MAPID_BABY_ROYAL_GUARD: return JOB_BABY_ROYAL_GUARD; case MAPID_BABY_SORCERER: return JOB_BABY_SORCERER; case MAPID_BABY_MINSTRELWANDERER: return sex?JOB_BABY_MINSTREL:JOB_BABY_WANDERER; case MAPID_BABY_SURA: return JOB_BABY_SURA; case MAPID_BABY_GENETIC: return JOB_BABY_GENETIC; case MAPID_BABY_SHADOW_CHASER: return JOB_BABY_SHADOW_CHASER; case MAPID_BABY_SOUL_REAPER: return JOB_BABY_SOUL_REAPER; //Doram Jobs case MAPID_SUMMONER: return JOB_SUMMONER; //Custom Jobs case MAPID_PADAWAN: return JOB_PADAWAN; case MAPID_JEDI: return JOB_JEDI; case MAPID_SITH: return JOB_SITH; default: return -1; } /*==================================================== * This function return the name of the job (by [Yor]) *----------------------------------------------------*/ const char* job_name(int class_) { case JOB_STAR_EMPEROR: case JOB_SOUL_REAPER: case JOB_BABY_STAR_EMPEROR: case JOB_BABY_SOUL_REAPER: return msg_txt(NULL,782 - JOB_STAR_EMPEROR + class_); case JOB_STAR_EMPEROR2: return msg_txt(NULL,782); case JOB_BABY_STAR_EMPEROR2: return msg_txt(NULL,784); case JOB_PADAWAN: // Custom Jobs case JOB_JEDI: case JOB_SITH: return msg_txt(NULL,790 - JOB_PADAWAN + class_); default: return msg_txt(NULL,655); } }
script_constants.hpp
export_constant(JOB_STAR_EMPEROR); export_constant(JOB_SOUL_REAPER); export_constant(JOB_BABY_STAR_EMPEROR); export_constant(JOB_BABY_SOUL_REAPER); export_constant(JOB_STAR_EMPEROR2); export_constant(JOB_BABY_STAR_EMPEROR2); export_constant(JOB_PADAWAN); export_constant(JOB_JEDI); export_constant(JOB_SITH); export_constant2("EAJ_SUPER_NOVICE",MAPID_SUPER_NOVICE); export_constant2("EAJ_SUPERNOVICE",MAPID_SUPER_NOVICE); export_constant2("EAJ_SUPER_BABY",MAPID_SUPER_BABY); export_constant2("EAJ_SUPER_NOVICE_E",MAPID_SUPER_NOVICE_E); export_constant2("EAJ_SUPER_BABY_E",MAPID_SUPER_BABY_E); export_constant2("EAJ_SUMMONER",MAPID_SUMMONER); export_constant2("EAJ_PADAWAN", MAPID_PADAWAN); export_constant2("EAJ_JEDI", MAPID_JEDI); export_constant2("EAJ_SITH", MAPID_SITH);
inter.cpp
/* from pc.cpp due to @accinfo. any ideas to replace this crap are more than welcome. */ const char* job_name(int class_) { case JOB_PADAWAN: case JOB_JEDI: case JOB_SITH: return msg_txt(790 - JOB_PADAWAN + class_); default: return msg_txt(199); } }
anyone can tell what is missing ?
-
5 hours ago, DrakeSky said:
Hi! Good day!
Anyone know how to fix the arrow issue?
WEAPONTYPE_CrossBow = 73,
WEAPONTYPE_Arbalest = 74,
WEAPONTYPE_Kakkung = 75,
WEAPONTYPE_Hunter_Bow = 76,
WEAPONTYPE_Bow_Of_Rudra = 77,that is the weapontable, the problem is only Gakkung and Hunter Bow shows an arrow when attacking, the rest doesn't show an arrow.
Please helpPost your
weapontable.lub
iteminfo
itemdb -
4 hours ago, sacrox said:
Hello everyone, when I try to open the skillstree the game crashes and closes without any error, I have read in other posts that updating the skillfonz can be fixed , I have downloaded and applied this data but it still does not solve the problem: :(
skillinfoz(2).rar 169.49 kB · 0 downloads
I am currently using version 2018-06-20, the server will be pre-renewall without 3 jobs. I think that having the data in the skillfonz updated to 3 job, is it possible that I get the error? Help ! Thank you all
-
can you hex to enable patch for custom job
-
2 hours ago, shizelro said:
Is it possible to include the monster in BB like Thanatos, FBH,KIel, etc.. but they will not drop Cards? Can it be separated example scenario,
If I hunt FBH in the map where he respawns I can get a card if i'm luckyBut if it was summoned using BB CARD drop would be none existent?
just duplicate the mvp boss you like then remove the drop cards put on your mob_branch.txt
-
12 minutes ago, DrakeSky said:
Please help! I don't know the specific forum for my issue.
How to remove the drop of the black mushroom and red mushroom from Plant Cultivation of Biochemist?
TIA!
unlike flora /
// Whether or not Marine Spheres and Floras summoned by Alchemist drop items?
// This setting has three available values:
// 0: Nothing drops.
// 1: Only marine spheres drop items.
// 2: All alchemist summons drop items.
alchemist_summon_reward: 1easy to way just make duplicate of that monster with no drops or make new condition for this skill
mob.cppif( !(type&1) && !map_getmapflag(m, MF_NOMOBLOOT) && !md->state.rebirth && ( !md->special_state.ai || //Non special mob battle_config.alchemist_summon_reward == 2 || //All summoned give drops (md->special_state.ai==AI_SPHERE && battle_config.alchemist_summon_reward == 1) //Marine Sphere Drops items. ) )
// Plant Cultivation [Celest] case CR_CULTIVATION: if (sd) { if( map_count_oncell(src->m,x,y,BL_CHAR,0) > 0 ) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 1; } clif_skill_poseffect(src,skill_id,skill_lv,x,y,tick); if (rnd()%100 < 50) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } else { TBL_MOB* md = NULL; int t, mob_id; if (skill_lv == 1) mob_id = MOBID_BLACK_MUSHROOM + rnd() % 2; else { int rand_val = rnd() % 100; if (rand_val < 30) mob_id = MOBID_GREEN_PLANT; else if (rand_val < 55) mob_id = MOBID_RED_PLANT; else if (rand_val < 80) mob_id = MOBID_YELLOW_PLANT; else if (rand_val < 90) mob_id = MOBID_WHITE_PLANT; else if (rand_val < 98) mob_id = MOBID_BLUE_PLANT; else mob_id = MOBID_SHINING_PLANT; } md = mob_once_spawn_sub(src, src->m, x, y, "--ja--", mob_id, "", SZ_SMALL, AI_NONE); if (!md) break; if ((t = skill_get_time(skill_id, skill_lv)) > 0) { if( md->deletetimer != INVALID_TIMER ) delete_timer(md->deletetimer, mob_timer_delete); md->deletetimer = add_timer (tick + t, mob_timer_delete, md->bl.id, 0); } mob_spawn(md); } } break;
-
@AnnieRuru another version for boss card to boss card
-
3 hours ago, Sikdope said:
pag nag login ako at pag mali password incorrect nalabas pero pag tama na! failed to connect to server!
dont check Skip Service Selection Screen
-
-
On 9/23/2020 at 1:58 AM, AnnieRuru said:
can only be done with source edits
src/map/mob.cpp | 9 +++++++++ src/map/mob.hpp | 1 + src/map/unit.cpp | 11 +++++++++++ 3 files changed, 21 insertions(+) diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 3e0b54f37..686c30ac1 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -708,6 +708,15 @@ int mob_once_spawn(struct map_session_data* sd, int16 m, int16 x, int16 y, const //"I understand the "Aggressive" part, but the "Can Move" and "Can Attack" is just stupid" - Poki#3 sc_start4(NULL,&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE|MD_CANATTACK|MD_CANMOVE|MD_ANGRY, 0, 60000); } + + if (md != NULL) { + if (mob_id < 0) { + md->special_state.deadbranch = 1; + md->deletetimer = add_timer(gettick()+5000,mob_timer_delete,md->bl.id,0); + } + else + md->special_state.deadbranch = 0; + } return (md) ? md->bl.id : 0; // id of last spawned mob } diff --git a/src/map/mob.hpp b/src/map/mob.hpp index 5b47b8c6f..37921599c 100644 --- a/src/map/mob.hpp +++ b/src/map/mob.hpp @@ -189,6 +189,7 @@ struct mob_data { unsigned int size : 2; //Small/Big monsters. enum mob_ai ai; //Special ai for summoned monsters. unsigned int clone : 1;/* is clone? 1:0 */ + unsigned int deadbranch : 1; /* summon from branch */ } special_state; //Special mob information that does not needs to be zero'ed on mob respawn. struct s_MobState { unsigned int aggressive : 1; //Signals whether the mob AI is in aggressive mode or reactive mode. [Skotlex] diff --git a/src/map/unit.cpp b/src/map/unit.cpp index 15632f201..b42668a1d 100644 --- a/src/map/unit.cpp +++ b/src/map/unit.cpp @@ -2420,6 +2420,17 @@ int unit_attack(struct block_list *src,int target_id,int continuous) if(ud->attacktimer != INVALID_TIMER) return 0; + if (target_id != 0) { + struct block_list *target_bl = map_id2bl(target_id); + if (target_bl->type == BL_MOB) { + struct mob_data *md = map_id2md(target_id); + if (md->special_state.deadbranch == 1 && md->deletetimer != INVALID_TIMER) { + delete_timer(md->deletetimer, mob_timer_delete); + md->deletetimer = add_timer(gettick() + 5000, mob_timer_delete, md->bl.id, 0); + } + } + } + // New action request received, delete previous action request if not executed yet if(ud->stepaction || ud->steptimer != INVALID_TIMER) unit_stop_stepaction(src);
I tested with 5000 = 5 seconds, change them into 60000
i test it but even the monster got hit they gone / teleport
-
1
-
-
On 9/22/2020 at 11:49 AM, Yhaj said:
Hmmm.. I mean where in the status.cpp? It's too many lines there...
Quote -
2 hours ago, Yhaj said:
Hi, where will I put this?
status.cpp
-
2 hours ago, Eraumavez said:
First of all i would like to say thanks for u reply, but it didn't worked (yes i've recompilated).
} else { if ( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO ) { // Don't reflect non-skill attack if has SC_REFLECTSHIELD from Devotion bonus inheritance if (!skill_id && battle_config.devotion_rdamage_skill_only && sc->data[SC_REFLECTSHIELD]->val4) rdamage = 0; else { rdamage += damage * sc->data[SC_REFLECTSHIELD]->val2 / 100; if (rdamage < 1) rdamage = 1; } }
-
1
-
-
58 minutes ago, Sergardo said:
paano maddisable? panu ggwn ty
wait attack speed pala yan
case UNT_GOSPEL: if (rnd() % 100 >= 50 + sg->skill_lv * 5 || ss == bl) break; if (battle_check_target(ss, bl, BCT_PARTY) > 0) { // Support Effect only on party, not guild int heal; int i = rnd() % 13; // Positive buff count int time = skill_get_time2(sg->skill_id, sg->skill_lv); //Duration switch (i) { case 0: // Heal 1000~9999 HP heal = rnd() % 9000 + 1000; clif_skill_nodamage(ss, bl, AL_HEAL, heal, 1); status_heal(bl, heal, 0, 0); break; case 1: // End all negative status status_change_clear_buffs(bl, SCCB_DEBUFFS | SCCB_REFRESH); if (tsd) clif_gospel_info(tsd, 0x15); break; case 2: // Immunity to all status sc_start(ss, bl, SC_SCRESIST, 100, 100, time); if (tsd) clif_gospel_info(tsd, 0x16); break; case 3: // MaxHP +100% sc_start(ss, bl, SC_INCMHPRATE, 100, 100, time); if (tsd) clif_gospel_info(tsd, 0x17); break; case 4: // MaxSP +100% sc_start(ss, bl, SC_INCMSPRATE, 100, 100, time); if (tsd) clif_gospel_info(tsd, 0x18); break; case 5: // All stats +20 sc_start(ss, bl, SC_INCALLSTATUS, 100, 20, time); if (tsd) clif_gospel_info(tsd, 0x19); break; case 6: // Level 10 Blessing sc_start(ss, bl, SC_BLESSING, 100, 10, skill_get_time(AL_BLESSING, 10)); break; case 7: // Level 10 Increase AGI sc_start(ss, bl, SC_INCREASEAGI, 100, 10, skill_get_time(AL_INCAGI, 10)); break; case 8: // Enchant weapon with Holy element sc_start(ss, bl, SC_ASPERSIO, 100, 1, time); if (tsd) clif_gospel_info(tsd, 0x1c); break; case 9: // Enchant armor with Holy element sc_start(ss, bl, SC_BENEDICTIO, 100, 1, time); if (tsd) clif_gospel_info(tsd, 0x1d); break; case 10: // DEF +25% sc_start(ss, bl, SC_INCDEFRATE, 100, 25, 10000); //10 seconds if (tsd) clif_gospel_info(tsd, 0x1e); break; case 11: // ATK +100% sc_start(ss, bl, SC_INCATKRATE, 100, 100, time); if (tsd) clif_gospel_info(tsd, 0x1f); break; case 12: // HIT/Flee +50 sc_start(ss, bl, SC_INCHIT, 100, 50, time); sc_start(ss, bl, SC_INCFLEE, 100, 50, time); if (tsd) clif_gospel_info(tsd, 0x20); break; } } else if (battle_check_target(&unit->bl, bl, BCT_ENEMY) > 0) { // Offensive Effect int i = rnd() % 10; // Negative buff count switch (i) { case 0: // Deal 3000~7999 damage reduced by DEF case 1: // Deal 1500~5499 damage unreducable skill_attack(BF_MISC, ss, &unit->bl, bl, sg->skill_id, sg->skill_lv, tick, i); break; case 2: // Curse sc_start(ss, bl, SC_CURSE, 100, 1, 1800000); //30 minutes break; case 3: // Blind sc_start(ss, bl, SC_BLIND, 100, 1, 1800000); //30 minutes break; case 4: // Poison sc_start2(ss, bl, SC_POISON, 100, 1, ss->id, 1800000); //30 minutes break; case 5: // Level 10 Provoke clif_skill_nodamage(NULL, bl, SM_PROVOKE, 10, sc_start(ss, bl, SC_PROVOKE, 100, 10, INFINITE_TICK)); //Infinite break; case 6: // DEF -100% sc_start(ss, bl, SC_INCDEFRATE, 100, -100, 20000); //20 seconds break; case 7: // ATK -100% sc_start(ss, bl, SC_INCATKRATE, 100, -100, 20000); //20 seconds break; case 8: // Flee -100% sc_start(ss, bl, SC_INCFLEERATE, 100, -100, 20000); //20 seconds break; case 9: // Speed/ASPD -25% sc_start4(ss, bl, SC_GOSPEL, 100, 1, 0, 0, BCT_ENEMY, 20000); //20 seconds break; } } break;
Skill.cpp
-
44 minutes ago, Sergardo said:
opo singapore panu maayos yun?
same problem tayo yun nag lagay ako proxy server ng singapore
-
2 hours ago, Sergardo said:
San ko po makikita yung gospel remove atk bonus
im using latest trunk ng rathena salamat po
case UNT_GOSPEL: if (rnd() % 100 >= 50 + sg->skill_lv * 5 || ss == bl) break; if (battle_check_target(ss, bl, BCT_PARTY) > 0) { // Support Effect only on party, not guild int heal; int i = rnd() % 13; // Positive buff count int time = skill_get_time2(sg->skill_id, sg->skill_lv); //Duration switch (i) { case 0: // Heal 1000~9999 HP heal = rnd() % 9000 + 1000; clif_skill_nodamage(ss, bl, AL_HEAL, heal, 1); status_heal(bl, heal, 0, 0); break; case 1: // End all negative status status_change_clear_buffs(bl, SCCB_DEBUFFS | SCCB_REFRESH); if (tsd) clif_gospel_info(tsd, 0x15); break; case 2: // Immunity to all status sc_start(ss, bl, SC_SCRESIST, 100, 100, time); if (tsd) clif_gospel_info(tsd, 0x16); break; case 3: // MaxHP +100% sc_start(ss, bl, SC_INCMHPRATE, 100, 100, time); if (tsd) clif_gospel_info(tsd, 0x17); break; case 4: // MaxSP +100% sc_start(ss, bl, SC_INCMSPRATE, 100, 100, time); if (tsd) clif_gospel_info(tsd, 0x18); break; case 5: // All stats +20 sc_start(ss, bl, SC_INCALLSTATUS, 100, 20, time); if (tsd) clif_gospel_info(tsd, 0x19); break; case 6: // Level 10 Blessing sc_start(ss, bl, SC_BLESSING, 100, 10, skill_get_time(AL_BLESSING, 10)); break; case 7: // Level 10 Increase AGI sc_start(ss, bl, SC_INCREASEAGI, 100, 10, skill_get_time(AL_INCAGI, 10)); break; case 8: // Enchant weapon with Holy element sc_start(ss, bl, SC_ASPERSIO, 100, 1, time); if (tsd) clif_gospel_info(tsd, 0x1c); break; case 9: // Enchant armor with Holy element sc_start(ss, bl, SC_BENEDICTIO, 100, 1, time); if (tsd) clif_gospel_info(tsd, 0x1d); break; case 10: // DEF +25% sc_start(ss, bl, SC_INCDEFRATE, 100, 25, 10000); //10 seconds if (tsd) clif_gospel_info(tsd, 0x1e); break; case 11: // ATK +100% sc_start(ss, bl, SC_INCATKRATE, 100, 100, time); if (tsd) clif_gospel_info(tsd, 0x1f); break; case 12: // HIT/Flee +50 sc_start(ss, bl, SC_INCHIT, 100, 50, time); sc_start(ss, bl, SC_INCFLEE, 100, 50, time); if (tsd) clif_gospel_info(tsd, 0x20); break; } } else if (battle_check_target(&unit->bl, bl, BCT_ENEMY) > 0) { // Offensive Effect int i = rnd() % 10; // Negative buff count switch (i) { case 0: // Deal 3000~7999 damage reduced by DEF case 1: // Deal 1500~5499 damage unreducable skill_attack(BF_MISC, ss, &unit->bl, bl, sg->skill_id, sg->skill_lv, tick, i); break; case 2: // Curse sc_start(ss, bl, SC_CURSE, 100, 1, 1800000); //30 minutes break; case 3: // Blind sc_start(ss, bl, SC_BLIND, 100, 1, 1800000); //30 minutes break; case 4: // Poison sc_start2(ss, bl, SC_POISON, 100, 1, ss->id, 1800000); //30 minutes break; case 5: // Level 10 Provoke clif_skill_nodamage(NULL, bl, SM_PROVOKE, 10, sc_start(ss, bl, SC_PROVOKE, 100, 10, INFINITE_TICK)); //Infinite break; case 6: // DEF -100% sc_start(ss, bl, SC_INCDEFRATE, 100, -100, 20000); //20 seconds break; case 7: // ATK -100% sc_start(ss, bl, SC_INCATKRATE, 100, -100, 20000); //20 seconds break; case 8: // Flee -100% sc_start(ss, bl, SC_INCFLEERATE, 100, -100, 20000); //20 seconds break; case 9: // Speed/ASPD -25% sc_start4(ss, bl, SC_GOSPEL, 100, 1, 0, 0, BCT_ENEMY, 20000); //20 seconds break; } } break;
Skill.cpp
-
1 minute ago, Sergardo said:
live nka host na
server lcoation if singa malaki talaga delay
-
11 hours ago, Sergardo said:
Paano po mawala yung delay pag nag hide then shadow leap?
Slamat po pre renewal 2015
live server na yan or local server?
-
5 hours ago, Eraumavez said:
how do i make the skill cart termination dont be reflected and ignore skills like NJ_UTSUSEMI
I've trying to do this but it didn't worked.
https://github.com/rathena/rathena/blob/master/src/map/battle.cpp#L7302
if (flag & BF_SHORT) {//Bounces back part of the damage. if ( (skill_get_inf2(skill_id, INF2_ISTRAP) || !status_reflect) && sd && sd->bonus.short_weapon_damage_return ) { rdamage += damage * sd->bonus.short_weapon_damage_return / 100; rdamage = i64max(rdamage,1); } else if( status_reflect && sc && sc->count ) { if( sc->data[SC_REFLECTSHIELD] ) { struct status_change_entry *sce_d; struct block_list *d_bl = NULL;
if ( (skill_get_inf2(skill_id)&INF2_TRAP || !status_reflect) && sd && sd->bonus.short_weapon_damage_return && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO ) {
-
2
-
-
5 hours ago, tokenacc001 said:
can you teach me how to do it? first time doing this. hehe
+ = Added New Line
- = Delete old line
-
-
Produce
Stalker Reject Sword Skill
Ninja Using Dagger Weapon Soul + Final Strike > HP 1 should be dead by Reflect Damage reject sword
//Reject Sword bugreport:4493 by Daegaladh if(wd.damage && tsc && tsc->data[SC_REJECTSWORD] && (src->type!=BL_PC || ( ((TBL_PC *)src)->weapontype1 == W_DAGGER || ((TBL_PC *)src)->weapontype1 == W_1HSWORD || ((TBL_PC *)src)->status.weapon == W_2HSWORD )) && rnd()%100 < tsc->data[SC_REJECTSWORD]->val2 ) { ATK_RATER(wd.damage, 50) status_fix_damage(target,src,wd.damage,clif_damage(target,src,gettick(),0,0,wd.damage,0,DMG_NORMAL,0,false)); clif_skill_nodamage(target,target,ST_REJECTSWORD,tsc->data[SC_REJECTSWORD]->val1,1); if( --(tsc->data[SC_REJECTSWORD]->val3) <= 0 ) status_change_end(target, SC_REJECTSWORD, INVALID_TIMER); }
REFLECT
/*========================================== * Final damage return function *------------------------------------------ * Credits: * Original coder unknown * Initial refactoring by Baalberith * Refined and optimized by helvetica */ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, int64 *dmg, int flag, uint16 skill_id, bool status_reflect){ struct map_session_data* sd; int64 rdamage = 0, damage = *dmg; int max_damage = status_get_max_hp(bl); struct status_change *sc, *ssc; sd = BL_CAST(BL_PC, bl); sc = status_get_sc(bl); ssc = status_get_sc(src); if (flag & BF_SHORT) {//Bounces back part of the damage. if ( (skill_get_inf2(skill_id)&INF2_TRAP || !status_reflect) && sd && sd->bonus.short_weapon_damage_return && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO /*&& skill_id != MO_EXTREMITYFIST*/ ) { rdamage += damage * sd->bonus.short_weapon_damage_return / 100; rdamage = i64max(rdamage,1); } else if( status_reflect && sc && sc->count ) { if( sc->data[SC_REFLECTSHIELD] ) { struct status_change_entry *sce_d; struct block_list *d_bl = NULL; if( (sce_d = sc->data[SC_DEVOTION]) && (d_bl = map_id2bl(sce_d->val1)) && ((d_bl->type == BL_MER && ((TBL_MER*)d_bl)->master && ((TBL_MER*)d_bl)->master->bl.id == bl->id) || (d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce_d->val2] == bl->id)) ) { //Don't reflect non-skill attack if has SC_REFLECTSHIELD from Devotion bonus inheritance if( (!skill_id && battle_config.devotion_rdamage_skill_only && sc->data[SC_REFLECTSHIELD]->val4) || !check_distance_bl(bl,d_bl,sce_d->val3) ) return 0; } } if( sc->data[SC_REFLECTDAMAGE] && !(skill_get_inf2(skill_id)&INF2_TRAP)) { if( rnd()%100 <= sc->data[SC_REFLECTDAMAGE]->val1*10 + 30 ){ max_damage = (int64)max_damage * status_get_lv(bl) / 100; rdamage = (*dmg) * sc->data[SC_REFLECTDAMAGE]->val2 / 100; if( --(sc->data[SC_REFLECTDAMAGE]->val3) < 1) status_change_end(bl,SC_REFLECTDAMAGE,INVALID_TIMER); } } else { if ( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO ) { // Don't reflect non-skill attack if has SC_REFLECTSHIELD from Devotion bonus inheritance if (!skill_id && battle_config.devotion_rdamage_skill_only && sc->data[SC_REFLECTSHIELD]->val4) rdamage = 0; else { rdamage += damage * sc->data[SC_REFLECTSHIELD]->val2 / 100; if (rdamage < 1) rdamage = 1; } } if (sc->data[SC_DEATHBOUND] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO && skill_id != GN_HELLS_PLANT_ATK && !status_bl_has_mode(src,MD_STATUS_IMMUNE)) { if (distance_bl(src,bl) <= 0 || !map_check_dir(map_calc_dir(bl,src->x,src->y), unit_getdir(bl))) { int64 rd1 = 0; rd1 = min(damage,status_get_max_hp(bl)) * sc->data[SC_DEATHBOUND]->val2 / 100; // Amplify damage. *dmg = rd1 * 30 / 100; // Received damage = 30% of amplified damage. clif_skill_damage(src, bl, gettick(), status_get_amotion(src), 0, -30000, 1, RK_DEATHBOUND, sc->data[SC_DEATHBOUND]->val1, DMG_SKILL); skill_blown(bl, src, skill_get_blewcount(RK_DEATHBOUND, 1), unit_getdir(src), BLOWN_NONE); status_change_end(bl, SC_DEATHBOUND, INVALID_TIMER); rdamage += rd1 * 70 / 100; // Target receives 70% of the amplified damage. [Rytech] } } if( sc->data[SC_SHIELDSPELL_DEF] && sc->data[SC_SHIELDSPELL_DEF]->val1 == 2 && !status_bl_has_mode(src,MD_STATUS_IMMUNE) ){ rdamage += damage * sc->data[SC_SHIELDSPELL_DEF]->val2 / 100; if (rdamage < 1) rdamage = 1; } } } } else { if (!status_reflect && sd && sd->bonus.long_weapon_damage_return) { rdamage += damage * sd->bonus.long_weapon_damage_return / 100; if (rdamage < 1) rdamage = 1; } } if (ssc && ssc->data[SC_INSPIRATION]) { rdamage += damage / 100; #ifdef RENEWAL rdamage = cap_value(rdamage, 1, max_damage); #else rdamage = i64max(rdamage,1); #endif } if (sc && sc->data[SC_KYOMU] && (!ssc || !ssc->data[SC_SHIELDSPELL_DEF])) // Nullify reflecting ability except for Shield Spell - Def rdamage = 0; if (sc && sc->data[SC_MAXPAIN]) { rdamage = damage * sc->data[SC_MAXPAIN]->val1 * 10 / 100; } return cap_value(min(rdamage,max_damage),INT_MIN,INT_MAX); }
-
requesting an NPC that will detect below items (minimum of 2) on your inventory then will show an option to trade to version2 items
sample ID #
8001_BLK, Black,
8002_BLU, Blue,
8003_GRN, Green,
8004_GRY, Gray,
8005_ORG, Orange,
8006_PNK, Pink,
8007_PRP, Purple,
8008_RED, Red,
8009_WHT, White,
8010_YLW, Yellow,
Increase Sword / Bow Damage (Solved)
in Source Support
Posted · Edited by Bringer
Problem Solved
//rodatazone says that Overrefined bonuses are part of baseatk //Here we also apply the weapon_atk_rate bonus so it is correctly applied on left/right hands. if(sd) { if (type == EQI_HAND_L) { if(sd->left_weapon.overrefine) damage += rnd()%sd->left_weapon.overrefine+1; if (sd->weapon_atk_rate[sd->weapontype2]) damage += damage * sd->weapon_atk_rate[sd->weapontype2] / 100; } else { //Right hand if(sd->right_weapon.overrefine) damage += rnd()%sd->right_weapon.overrefine+1; if (sd->weapon_atk_rate[sd->weapontype1]) damage += damage * sd->weapon_atk_rate[sd->weapontype1] / 100; } } return damage; }
on hercules there will be
int64 battle_calc_base_damage2 / int64 battle_calc_base_damage2
on rathena i saw this code
static int64 battle_calc_base_damage(struct block_list *src, struct status_data *status, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, int flag)
No Static int64 battle_calc_base_damage2 and i saw this code
/** Calculates overrefine damage bonus and weapon related bonuses (unofficial) * @param sd Player * @param damage Current damage * @param lr_type EQI_HAND_L:left-hand weapon, EQI_HAND_R:right-hand weapon */ static void battle_add_weapon_damage(struct map_session_data *sd, int64 *damage, int lr_type) { if (!sd) return; //rodatazone says that Overrefine bonuses are part of baseatk //Here we also apply the weapon_damage_rate bonus so it is correctly applied on left/right hands. if (lr_type == EQI_HAND_L) { if (sd->left_weapon.overrefine) (*damage) = (*damage) + rnd() % sd->left_weapon.overrefine + 1; if (sd->weapon_damage_rate[sd->weapontype2]) (*damage) += (*damage) * sd->weapon_damage_rate[sd->weapontype2] / 100; } else if (lr_type == EQI_HAND_R) { if (sd->right_weapon.overrefine) (*damage) = (*damage) + rnd() % sd->right_weapon.overrefine + 1; if (sd->weapon_damage_rate[sd->weapontype1]) (*damage) += (*damage) * sd->weapon_damage_rate[sd->weapontype1] / 100; } }
can anyone help me to convert this to latest rathena