Jump to content

[Dungeon Quest] How to use npc.set_vid_damage_mul


Recommended Posts

 Hello, I'm making a dungeon quest with a boss that reduce his damage when you destroy a metin stone, but I don't understand how to use this function:
npc.set_vid_damage_mul or npc.set_vid_attack_mul

for example this is what I'm doing but it's not working, do i need to do it with set_unique spawn or how would be the correct way to make it work? Thank you

        when spawn_final_boss.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.spawn_mob(1095, 350, 500);
                npc.set_vid_damage_mul(1095, 8)
            end
        end
        
        when 8110.kill begin
            d.setf("reduce_damage", d.getf("reduce_damage")+1);
            local stone_killed = d.getf("reduce_damage")
            npc.set_vid_damage_mul(1095, 8 - stone_killed)
            d.notice("Boss damage has been reduced.")
        end

 

Link to comment
Share on other sites

  • Developer

You're confusing vnum (virtual number) with vid (virtual ID). That is why it does not work.

The quest-function d.spawn_mob() returns, on successful spawn, the vid of the monster spawned, so you must store that value in a dungeon flag and use it in your npc.set_vid_attack_mul() and npc.set_vid_damage_mul() quest-functions.

Now, what'd they do specifically:
- npc.set_vid_attack_mul: alters the damage multiplier of the monster's hits. The higher the value, the higher the hit damage it will give.
- npc.set_vid_damage_mul: this is another multiplier and, unlike what you may think, does not reduce the monster's damage, it weakens it by increasing the damage it takes.

Edited by PACI
  • Good 1
  • Love 1

when you return 0 and server doesn't boot:

unknown.png

Link to comment
Share on other sites

8 hours ago, PACI said:

You're confusing vnum (virtual number) with vid (virtual ID). That is why it does not work.

The quest-function d.spawn_mob() returns, on successful spawn, the vid of the monster spawned, so you must store that value in a dungeon flag and use it in your npc.set_vid_attack_mul() and npc.set_vid_damage_mul() quest-functions.

Now, what'd they do specifically:
- npc.set_vid_attack_mul: alters the damage multiplier of the monster's hits. The higher the value, the higher the hit damage it will give.
- npc.set_vid_damage_mul: this is another multiplier and, unlike what you may think, does not reduce the monster's damage, it weakens it by increasing the damage it takes.

Thank you for the answer, so I did a test like this:

	when spawn_final_boss.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.spawn_mob(1095, 350, 500);
                npc.set_vid_attack_mul(1095, 8)
            end
        end
        
        when 8110.kill begin
            d.setf("add_attack", d.getf("add_attack")+1);
            local stone_killed = d.getf("add_attack")
            npc.set_vid_attack_mul(1095, 8 - stone_killed)
            d.notice("Boss damage has been reduced.")
        end

 

Now the damage of the boss increase (or decrease when i destroy a metin stone in my case) only for the basic normal attacks, this function doest not affect the damage of his skills, the have always the same damage. Do you know what should be modified in the server source to apply the increase damage to skills too?

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.