Jump to content

Jhedzkie

Members
  • Posts

    297
  • Joined

  • Last visited

Community Answers

  1. Jhedzkie's post in Add a status change when getting hit was marked as the answer   
    i think you can put it after every attack.
     
    battle.c
    struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,uint16 skill_id,uint16 skill_lv,int count) { struct Damage d; switch(attack_type) { case BF_WEAPON: d = battle_calc_weapon_attack(bl,target,skill_id,skill_lv,count); break; case BF_MAGIC: d = battle_calc_magic_attack(bl,target,skill_id,skill_lv,count); break; case BF_MISC: d = battle_calc_misc_attack(bl,target,skill_id,skill_lv,count); break; default: ShowError("battle_calc_attack: unknown attack type! %d\n",attack_type); memset(&d,0,sizeof(d)); break; } if( d.damage + d.damage2 < 1 ) { //Miss/Absorbed //Weapon attacks should go through to cause additional effects. if (d.dmg_lv == ATK_DEF /*&& attack_type&(BF_MAGIC|BF_MISC)*/) // Isn't it that additional effects don't apply if miss? d.dmg_lv = ATK_MISS; d.dmotion = 0; } else // Some skills like Weaponry Research will cause damage even if attack is dodged d.dmg_lv = ATK_DEF; // ->>> maybe put it here? return d; }  
    just a thought tho. not so sure about it.
  2. Jhedzkie's post in browedit crashes after calculating lightmap was marked as the answer   
    thanks. i'll try to edit it for the mean time. i will be giving feedbacks later.

    removed all stuff. succeeded. i guess i just have to remake my map. as painful as it can be. thanks for the tip anyway.
  3. Jhedzkie's post in Is Last MAC checking possible? was marked as the answer   
    i believe this is achievable by integrating harmony.
  4. Jhedzkie's post in R> NPC THAT COMBINES ITEM, was marked as the answer   
    assuming you already know the format how to start an npc, here's the sample code.
    (if not, you might want to read about scripting before you proceed. you might not want to count on anybody here to feed you what you would always need.)

    map_name,123,123,4<tab>script<tab>NameOfNpc<tab>826,{ mes "[NameOfNpc]"; mes ""; next; if(countitem(909) > 99 && countitem(910) > 99) { mes "[NameOfNpc]"; mes "Trade your jellopies and garlets for an oridecon?"; switch(select("Yes","No")) { case 1: delitem 909, 100; delitem 910, 100; getitem 984, 1; next; mes "-trade success-"; close; break; case 2: mes "-trade cancelled-"; close; break; } } else // if(!countitem(909) > 99 && !countitem(910) > 99) { mes "[NameOfNpc]"; mes "Please do come back if you gather the items..."; close; } }
    that one's for the full npc.
    if you want a one-click-npc, this one's for you.

    map_name,123,123,4<tab>script<tab>NameOfNpc<tab>826,{ if(countitem(909) > 99 && countitem(910) > 99) { delitem 909, 100; delitem 910, 100; getitem 984, 1; Emotion e_no1; end; } else // if(!countitem(909) > 99 && !countitem(910) > 99) { Emotion e_swt; end; } }
    * please do correct me if there is something wrong with my coding.
×
×
  • Create New...