Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

[Dungeon Quest] How to use npc.set_vid_damage_mul


Cripplez

Question

 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

2 answers to this question

Recommended Posts

  • 0

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
  • Love 1
  • Good 1

when you return 0 and server doesn't boot:

unknown.png

Link to comment
Share on other sites

  • 0
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.