Snap Posted May 3, 2012 Posted May 3, 2012 I want to make a player that will be immune to frost by using this build : 45 base MDEF + 110 Luk = No Frost Sorry for my bad english pls help. up Quote
malufett Posted May 3, 2012 Posted May 3, 2012 use this setting pc_max_status_def: 185 however this may affect other statuses better use this... @status.c if (sd) tick>>=1; //Half duration for players. case SC_STONE: case SC_FREEZE: sc_def = 3 +status->mdef; +if(sd && type == SC_FREEZE && sc_def >= 51 && status->luk >= 110) + sc_def = battle_config.pc_max_sc_def; break; then recompile 1 Quote
Snap Posted May 4, 2012 Author Posted May 4, 2012 I cant see this i am using eAthena 15087M bump Quote
malufett Posted May 4, 2012 Posted May 4, 2012 use the Ctrl+F(Find) function or the Ctrl+G(Go To) function [line:4623] Quote
Mystery Posted May 4, 2012 Posted May 4, 2012 (edited) I swear Frost is a Renewal Status.. How can it be in the eAthena emulator? Unless you mean "Freeze" like malu wrote in the codebox lol Edited May 4, 2012 by Mysterious Quote
Snap Posted May 5, 2012 Author Posted May 5, 2012 I can only see this //Adjust tick according to status resistances if( !(flag&(1|4)) ) { tick = status_get_sc_def(bl, type, rate, tick, flag); if( !tick ) return 0; } undead_flag = battle_check_undead(status->race,status->def_ele); //Check for inmunities / sc fails switch (type) { case SC_FREEZE: case SC_STONE: //Undead are immune to Freeze/Stone if (undead_flag && !(flag&1)) return 0; case SC_SLEEP: case SC_STUN: if (sc->opt1) return 0; //Cannot override other opt1 status changes. [skotlex] break; case SC_SIGNUMCRUCIS: //Only affects demons and undead element (but not players) if((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC) return 0; break; Quote
malufett Posted May 5, 2012 Posted May 5, 2012 wew.... seriously you can't find this piece of code?? //Applies SC defense to a given status change. //Returns the adjusted duration based on flag values. //the flag values are the same as in status_change_start. int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int tick, int flag) { int sc_def, tick_def = 0; struct status_data* status; struct status_change* sc; struct map_session_data *sd; nullpo_ret(bl); //Status that are blocked by Golden Thief Bug card or Wand of Hermod if (status_isimmune(bl)) switch (type) { case SC_DECREASEAGI: case SC_SILENCE: case SC_COMA: case SC_INCREASEAGI: case SC_BLESSING: case SC_SLOWPOISON: case SC_IMPOSITIO: case SC_AETERNA: case SC_SUFFRAGIUM: case SC_BENEDICTIO: case SC_PROVIDENCE: case SC_KYRIE: case SC_ASSUMPTIO: case SC_ANGELUS: case SC_MAGNIFICAT: case SC_GLORIA: case SC_WINDWALK: case SC_MAGICROD: case SC_HALLUCINATION: case SC_STONE: case SC_QUAGMIRE: case SC_SUITON: return 0; } sd = BL_CAST(BL_PC,bl); status = status_get_status_data(bl); switch (type) { case SC_STUN: case SC_POISON: case SC_DPOISON: case SC_SILENCE: case SC_BLEEDING: sc_def = 3 +status->vit; break; case SC_SLEEP: sc_def = 3 +status->int_; break; case SC_DECREASEAGI: if (sd) tick>>=1; //Half duration for players. case SC_STONE: case SC_FREEZE: sc_def = 3 +status->mdef; break; case SC_CURSE: //Special property: inmunity when luk is greater than level or zero if (status->luk > status_get_lv(bl) || status->luk == 0) return 0; else sc_def = 3 +status->luk; tick_def = status->vit; break; case SC_BLIND: sc_def = 3 +(status->vit + status->int_)/2; break; case SC_CONFUSION: sc_def = 3 +(status->str + status->int_)/2; break; case SC_ANKLE: if(status->mode&MD_BOSS) // Lasts 5 times less on bosses tick /= 5; sc_def = status->agi / 2; break; case SC_MAGICMIRROR: case SC_ARMORCHANGE: if (sd) //Duration greatly reduced for players. tick /= 15; //No defense against it (buff). default: //Effect that cannot be reduced? Likely a buff. if (!(rand()%10000 < rate)) return 0; return tick?tick:1; } if (sd) { if (battle_config.pc_sc_def_rate != 100) sc_def = sc_def*battle_config.pc_sc_def_rate/100; if (sc_def < battle_config.pc_max_sc_def) sc_def += (battle_config.pc_max_sc_def - sc_def)* status->luk/battle_config.pc_luk_sc_def; else sc_def = battle_config.pc_max_sc_def; if (tick_def) { if (battle_config.pc_sc_def_rate != 100) tick_def = tick_def*battle_config.pc_sc_def_rate/100; } } else { if (battle_config.mob_sc_def_rate != 100) sc_def = sc_def*battle_config.mob_sc_def_rate/100; if (sc_def < battle_config.mob_max_sc_def) sc_def += (battle_config.mob_max_sc_def - sc_def)* status->luk/battle_config.mob_luk_sc_def; else sc_def = battle_config.mob_max_sc_def; if (tick_def) { if (battle_config.mob_sc_def_rate != 100) tick_def = tick_def*battle_config.mob_sc_def_rate/100; } } sc = status_get_sc(bl); if (sc && sc->count) { if (sc->data[sC_SCRESIST]) sc_def += sc->data[sC_SCRESIST]->val1; //Status resist else if (sc->data[sC_SIEGFRIED]) sc_def += sc->data[sC_SIEGFRIED]->val3; //Status resistance. } //When no tick def, reduction is the same for both. if( !tick_def && type != SC_STONE ) //Recent tests show duration of petrify isn't reduced by MDEF. [inkfish] tick_def = sc_def; //Natural resistance if (!(flag&8)) { rate -= rate*sc_def/100; //Item resistance (only applies to rate%) if(sd && SC_COMMON_MIN <= type && type <= SC_COMMON_MAX) { if( sd->reseff[type-SC_COMMON_MIN] > 0 ) rate -= rate*sd->reseff[type-SC_COMMON_MIN]/10000; if( sd->sc.data[sC_COMMONSC_RESIST] ) rate -= rate*sd->sc.data[sC_COMMONSC_RESIST]->val1/100; } } if (!(rand()%10000 < rate)) return 0; //Why would a status start with no duration? Presume it has //duration defined elsewhere. if (!tick) return 1; //Rate reduction if (flag&2) return tick; tick -= tick*tick_def/100; // Changed to 5 seconds according to recent tests [Playtester] if (type == SC_ANKLE && tick < 5000) tick = 5000; return tick<=0?0:tick; } then how come there is a tick = status_get_sc_def(bl, type, rate, tick, flag); line in your code???? Quote
Snap Posted May 5, 2012 Author Posted May 5, 2012 I really did my best but i can't find that code that you told me! Quote
malufett Posted May 5, 2012 Posted May 5, 2012 ok..if your using Visual Studio right click this part 'status_get_sc_def(bl, type, rate, tick, flag);' then select 'Go to Definition' then it will redirect you to the location of the code..if you can't still find it upload your status.c and I will be the one to do it... Quote
Snap Posted May 5, 2012 Author Posted May 5, 2012 Here! http://www.mediafire.com/?87ecm93uwyp7u38 Quote
BenZac Posted June 11, 2012 Posted June 11, 2012 malufett.. how if i want my server dont want to be frozen if they char have int ==100? what to edit in src? Quote
Mystery Posted June 11, 2012 Posted June 11, 2012 (edited) malufett.. how if i want my server dont want to be frozen if they char have int ==100? what to edit in src? You take the same code: if (sd) tick>>=1; //Half duration for players. case SC_STONE: case SC_FREEZE: sc_def = 3 +status->mdef; +if(sd && type == SC_FREEZE && sc_def == 51 && status->luk == 110) + sc_def = battle_config.pc_max_sc_def; break; and change luk to INT and 110 to 100: if (sd) tick>>=1; //Half duration for players. case SC_STONE: case SC_FREEZE: sc_def = 3 +status->mdef; +if(sd && type == SC_FREEZE && sc_def == 51 && status->int == 100) + sc_def = battle_config.pc_max_sc_def; break; Should work the same way. Edited June 11, 2012 by Mysterious Quote
BenZac Posted June 12, 2012 Posted June 12, 2012 ok thanks ! I go try now! *bump i got error when compiling sir.. help *Bump Quote
BenZac Posted June 12, 2012 Posted June 12, 2012 yes compile no error..but still.. i sg / froze jack to int 100+ char still got frozen =_= Quote
Oxxy Posted June 12, 2012 Posted June 12, 2012 sc_def = 3 +status->mdef; sc_def == 51 && status->luk == 110 Understand? You need 51 base mdef + 110 luk i think. Quote
BenZac Posted June 12, 2012 Posted June 12, 2012 understand. ok my problem solved.. Thanks to all who helping me out ! Quote
yohann21 Posted January 2, 2013 Posted January 2, 2013 @malufet didnt work to me i try to change luk == 400 and i make my chr into 200 luk they didnt frost pls help me ;( Quote
Question
Snap
I want to make a player that will be immune to frost by using this build :
45 base MDEF + 110 Luk = No Frost
Sorry for my bad english pls help.
up
19 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.