Jump to content

Recommended Posts

Posted

Ich will machen das der Skill Heal und Slim Potion Pitcher +100% mehr machen. habe schon  in  src / map / (skill.c)

gesucht aber finde da nicht wirklich was, und wen ich was finden würde wüste ich sicher nicht wie ich +100% mache kann wäre nett wen jemand ne kurze Erklärung hätte oder so 

 

Danke im Voraus  /kis

Posted

Die Berechnung für den Heal Skill findest du in ../src/map/skill.c

		#ifdef RENEWAL
            /**
             * Renewal Heal Formula
             * Formula: ( [(Base Level + INT) / 5] x 30 ) x (Heal Level / 10) x (Modifiers) + MATK
             **/
            hp = (status_get_lv(src) + status_get_int(src)) / 5 * 30  * skill_lv / 10;
		#else
			hp = ( status_get_lv(src) + status_get_int(src) ) / 8 * (4 + ( skill_id == AB_HIGHNESSHEAL ? ( sd ? pc_checkskill(sd,AL_HEAL) : 10 ) : skill_lv ) * 8);
		#endif

Einfach nach "hp = (status_get_lv(src) + status_get_int(src)) / 5 * 30 * skill_lv / 10;" suchen.

Darunter kommen noch ein paar kleine Anpassungen des HP-Wertes, spiel einfach mal ein wenig damit rum. Dann speichern und neu kompilieren.

 

 

Für Potion Pitcher ist das ganze schon ein wenig versteckter. Die Berechnung ist in der selben Datei, aber dieses mal in der Funktion skill_castend_nodamage_id. Und in dieser Funktion gibt es dann einen Block der so beginnt:

	case AM_BERSERKPITCHER:
	case AM_POTIONPITCHER: {

So ziemlich am Ende dieses Blocks wird dann mit der folgenden Zeile geheilt:

status_heal(bl,hp,sp,0);

Da "+100%" ja eigentlich nur verdoppeln heißt, kannst du daraus folgendes machen:

status_heal(bl,hp*2,sp,0);

Dann auch wieder speichern und neu kompilieren.

 

 

 

Denk auch bitte an die Config (../conf/battle/skill.conf) in der der maximale Heal-Wert angegeben wird.

// Level and Strength of "MVP heal". When someone casts a heal of this level or
// above, the heal formula is bypassed and this value is used instead.
max_heal: 9999
Posted

hmn ja also das mit Heal geht 

 

evtl kann mann ja

 

int hp = potion_hp, sp = potion_sp;
			hp = hp * (100 + (tstatus->vit<<1))/100;
			sp = sp * (100 + (tstatus->int_<<1))/100;

 

zu

 

int hp = potion_hp, sp = potion_sp;
			hp = hp * (100 + (tstatus->vit<<1))/50;
			sp = sp * (100 + (tstatus->int_<<1))/50;

 

machen oder soo kp.....

Posted

Einfach hier:

 

    case AM_BERSERKPITCHER:
    case AM_POTIONPITCHER: {
 
...
 
            status_heal(bl,hp,sp,0);
        }
        break;
    case AM_CP_WEAPON:

 

Umändern auf hp*2 bzw wenn du es für SP auch willst sp*2.

Posted (edited)

habe ich ja .... jedoch geht es nicht

 

case AM_POTIONPITCHER: {
			int i,x,hp = 0,sp = 0,bonus=100;
			if( dstmd && dstmd->class_ == MOBID_EMPERIUM ) {
				map_freeblock_unlock();
				return 1;
			}
			if( sd ) {
				x = skill_lv%11 - 1;
				i = pc_search_inventory(sd,skill_db[skill_id].itemid[x]);
				if( i < 0 || skill_db[skill_id].itemid[x] <= 0 ) {
					clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
					map_freeblock_unlock();
					return 1;
				}
				if(sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill_db[skill_id].amount[x]) {
					clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
					map_freeblock_unlock();
					return 1;
				}
				if( skill_id == AM_BERSERKPITCHER ) {
					if( dstsd && dstsd->status.base_level < (unsigned int)sd->inventory_data[i]->elv ) {
						clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
						map_freeblock_unlock();
						return 1;
					}
				}
				potion_flag = 1;
				potion_hp = potion_sp = potion_per_hp = potion_per_sp = 0;
				potion_target = bl->id;
				run_script(sd->inventory_data[i]->script,0,sd->bl.id,0);
				potion_flag = potion_target = 0;
				if( sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ALCHEMIST )
					bonus += sd->status.base_level;
				if( potion_per_hp > 0 || potion_per_sp > 0 ) {
					hp = tstatus->max_hp * potion_per_hp / 100;
					hp = hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
					if( dstsd ) {
						sp = dstsd->status.max_sp * potion_per_sp / 100;
						sp = sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
					}
				} else {
					if( potion_hp > 0 ) {
						hp = potion_hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
						hp = hp * (100 + (tstatus->vit<<1)) / 100;
						if( dstsd )
							hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
					}
					if( potion_sp > 0 ) {
						sp = potion_sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
						sp = sp * (100 + (tstatus->int_<<1)) / 100;
						if( dstsd )
							sp = sp * (100 + pc_checkskill(dstsd,MG_SRECOVERY)*10) / 100;
					}
				}

				if (sd->itemgrouphealrate[IG_POTION]>0) {
					hp += hp * sd->itemgrouphealrate[IG_POTION] / 100;
					sp += sp * sd->itemgrouphealrate[IG_POTION] / 100;
				}

				if( (i = pc_skillheal_bonus(sd, skill_id)) ) {
					hp += hp * i / 100;
					sp += sp * i / 100;
				}
			} else {
				hp = (1 + rnd()%400) * (100 + skill_lv*10) / 100;
				hp = hp * (100 + (tstatus->vit<<1)) / 100;
				if( dstsd )
					hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
			}
			if( dstsd && (i = pc_skillheal2_bonus(dstsd, skill_id)) ) {
				hp += hp * i / 100;
				sp += sp * i / 100;
			}
			if( tsc && tsc->count ) {
				if( tsc->data[SC_CRITICALWOUND] ) {
					hp -= hp * tsc->data[SC_CRITICALWOUND]->val2 / 100;
					sp -= sp * tsc->data[SC_CRITICALWOUND]->val2 / 100;
				}
				if( tsc->data[SC_DEATHHURT] ) {
					hp -= hp * 20 / 100;
					sp -= sp * 20 / 100;
				}
				if( tsc->data[SC_WATER_INSIGNIA] && tsc->data[SC_WATER_INSIGNIA]->val1 == 2 ) {
					hp += hp / 10;
					sp += sp / 10;
				}
			}
			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
			if( hp > 0 || (skill_id == AM_POTIONPITCHER && sp <= 0) )
				clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
			if( sp > 0 )
				clif_skill_nodamage(NULL,bl,MG_SRECOVERY,sp,1);
#ifdef RENEWAL
			if( tsc && tsc->data[SC_EXTREMITYFIST2] )
				sp = 0;
#endif
			status_heal(bl,hp*2,sp,0);
		}
Edited by EL Dragon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...