Jump to content

Rotciv

Members
  • Content Count

    18
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    Rotciv reacted to banhelba2019 in Create Ground Skill   
    Also im working on a formula to apply effects, normally if u try to use specialeffects function. . . 
    case AM_WATER: clif_specialeffect(src,54,1); clif_specialeffect(bl,208,AREA); sc_start(src,bl,SC_SOAKED,100,skill_lv,skill->get_time2(skill_id,skill_lv)); break; When you try to use this , if you kill the monster with the skill the effects wont even show and really makes it ugly so what i did is i turn it into a 1 damage MISC skill . . . 
    skill.db
    { Id: 726 Name: "AM_HARVEST" Description: "Harvest" MaxLevel: 10 Range: 2 Hit: "BDT_SKILL" SkillType: { Place: true } SkillInfo: { IgnoreLandProtector: true AllowReproduce: true } AttackType: "Misc" Element: "Ele_Weapon" DamageType: { SplashArea: true IgnoreFlee: true } NumberOfHits: -3 AfterCastActDelay: { Lv1: 0 Lv2: 0 Lv3: 0 Lv4: 0 Lv5: 3000 } AfterCastWalkDelay: { Lv1: 2000 Lv2: 0 Lv3: 0 Lv4: 0 Lv5: 3000 } SkillData1: 1000 SkillData2: 50000 CoolDown: 0 Requirements: { SPCost: 15 } Unit: { Id: 0x86 Range: 1 Interval: 1000 Target: "Enemy" Flag: { UF_SKILL: true } } },  
    Anyways since the skill only deals 1 damage the effect will apply every time . . . .
    But what i did is i made a Status similar to burning (Burning makes numbers appear over your head, poison doesnt) . . . the status actually deals all my damage, so i can kill mobs using special effect funtion, with access to the 1000+ effects in your effects_doc. 
    status.h Gotta declare your new SC add it at the bottom
    // Summoner SC_SUHIDE, SC_SU_STOOP, SC_SPRITEMABLE, SC_CATNIPPOWDER, SC_SV_ROOTTWIST, SC_BITESCAR, SC_ARCLOUSEDASH, SC_TUNAPARTY, SC_SHRIMP, // 650 SC_FRESHSHRIMP, SC_DRESS_UP, // Rodex SC_DAILYSENDMAILCNT, // Clan System SC_CLAN_INFO, SC_HARVESTED, In your status.c
    add_sc( AM_HARVEST , SC_HARVESTED ); this is where all the other skills are just look for SM_PROVOKE or something lol 
    case SC_FOGWALL: case SC_FROSTMISTY: case SC_BURNING: case SC_HARVESTED: case SC_MARSHOFABYSS: place it here
    and here
    nullpo_retr(true, sc); if (sc->data[SC_REFRESH]) { if (type >= SC_COMMON_MIN && type <= SC_COMMON_MAX) // Confirmed. return true; // Immune to status ailements switch (type) { case SC_DEEP_SLEEP: case SC__CHAOS: case SC_BURNING: case SC_HARVESTED: case SC_STUN: case SC_SLEEP: case SC_CURSE: case SC_STONE: case SC_POISON: case SC_BLIND: case SC_SILENCE: case SC_BLOODING: and here
    } else if (sc->data[SC_INSPIRATION]) { if (type >= SC_COMMON_MIN && type <= SC_COMMON_MAX) return true; // Immune to status ailements switch (type) { case SC_POISON: case SC_BLIND: case SC_STUN: case SC_SILENCE: case SC__CHAOS: case SC_STONE: case SC_SLEEP: case SC_BLOODING: case SC_CURSE: case SC_HARVESTED: case SC_BURNING: case SC_FROSTMISTY: case SC_FREEZE: case SC_COLD: (Im actually not 100% on what OPT s do but i placed it here
    opt_flag = 1; switch(type) { case SC_STONE: case SC_FREEZE: case SC_STUN: case SC_SLEEP: case SC_BURNING: case SC_HARVESTED: case SC_WHITEIMPRISON: case SC_COLD: sc->opt1 = 0; break; Looking through this again i just realized i didnt use SC_BURNING but actually made it a poison lmao... but it works its up to you to test it and clean it and learn it........... this is just some random way to apply skill damage with ALL THE EFFECTS and make COMPLETLY NEW SKILLS 
    case SC_POISON: if (st->hp <= max(st->max_hp / 10, sce->val4)) //Stop damaging after 25% HP left. break; FALLTHROUGH case SC_HARVESTED: case SC_DPOISON: if (--(sce->val3) > 0) { if (sc->data[SC_SLOWPOISON] != NULL) { sc_timer_next(1000 + tick, status->change_timer, bl->id, data); return 0; } if (sce->val2 != 0 && bl->type == BL_MOB) { struct block_list* src = map->id2bl(sce->val2); if (src != NULL) mob->log_damage(BL_UCAST(BL_MOB, bl), src, sce->val4); } map->freeblock_lock(); status_zap(bl, sce->val4, 0); if (sc->data[type] != NULL) { // Check if the status still last (can be dead since then). sc_timer_next(1000 + tick, status->change_timer, bl->id, data); } map->freeblock_unlock(); return 0; } break; case SC_POISON: case SC_DPOISON: data.tick = sc->data[i]->val3 * 1000; break; case SC_HARVESTED: data.tick = sc->data[i]->val3 * 1000; break; case SC_FEAR: case SC_LEECHESEND: data.tick = sc->data[i]->val4 * 1000; break;  
    I hope you grasp my idea here, you can even make a formula that takes all your stats into account but im still working on make a REAL meta formula not something that just does 1000 more damge every skill level.  . . ill post that some day 
    Super experimental post.
    Summed up : 
    " using specialeffect funtion, doesnt show the effect when YOU KILL THE MOB WITH THE SKILL, so long as it still has HP the effect will show, So making a 1 damage skill and giving it a very specific damage formula ( Poison in this case cause this is in my farming minigame but YOU CAN MAKE A DAMAGE FORMULA BY CALLING ATK MARK STR LEVEL ETC ETC ) Just look at SC_BURNING " 
    Look ill even show you an example 
    case SC_BURNING: if( --(sce->val4) > 0 ) { struct block_list *src = map->id2bl(sce->val3); int damage = 1000 + 3 * status_get_max_hp(bl) / 100; // Deals fixed (1000 + 3%*MaxHP) map->freeblock_lock(); clif->damage(bl,bl,0,0,damage,1,BDT_MULTIENDURE,0); //damage is like endure effect with no walk delay status->damage(src, bl, damage, 0, 0, 1); if( sc->data[type]){ // Target still lives. [LimitLine] sc_timer_next(3000 + tick, status->change_timer, bl->id, data); } map->freeblock_unlock(); return 0; } break; case SC_LOCKEDB: if( --(sce->val4) > 0 ) { struct block_list *src = map->id2bl(sce->val3); int damage = (100 - (st->def)) * (50 * (sce->val1)); map->freeblock_lock(); clif->damage(bl,bl,0,0,damage/100,1,BDT_MULTIENDURE,0); //damage is like endure effect with no walk delay status->damage(src, bl, damage/100, 0, 0, 1); map->freeblock_unlock(); return 0; } break; Look at INT DAMAGE = 
    Val1 is my SKILL LEVEL 
    and im calling the TARGET DEFENSE. . . . So Yes this skill does damage and does less damage based on the targets defence and my skill level....
     
    Super experimental 
    Good luck with this part , its really ugly but its all i could figure out for now 
     
    Oh if you dont know how to make a skill MISC damage, just copy TF_THROWSTONE and go in the battle.c and and copy it there too 
     
  2. Upvote
    Rotciv reacted to meko in Keep an object Coordinates   
    in the second skill, lookup for nearby BL_SKILL units (with map->foreachinarea) and then you will get a struct block_list so cast it to a struct skill_unit (with BL_UCAST) and check that su->group->skill_id matches the id of the first skill and then you can get the location with su->bl.x and su->bl.y
×
×
  • Create New...

Important Information

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