Jump to content

Recommended Posts

Hello. I want to check map index to make something like, when you go in map2 and you equip A type of item, like level 54 accesories, to give you some bonuses. Like 500k hp or something. And when you are back in map1 you have the normal bonuses. Can someone help me?

Edited by saispednb
  • Think 1
Link to comment
https://metin2.dev/topic/33162-bonus-on-map-index/
Share on other sites

If you still want it:

quest MapBonusQuest begin
    state start begin
        when login or levelup or enter with pc.get_level() >= 30 begin
            local earringsAccessoryCell = 6
            if pc.get_map_index() == 3 or pc.get_map_index() == 23 or pc.get_map_index() == 43 then
                if pc.get_wear(earringsAccessoryCell) == 17109 then
                    affect.add_collect(apply.MAX_HP, 500, 60 * 60 * 24 * 365 * 60)
                    syschat("500 HP boost for equipping a level 32 earring in Map 2.")
                end
            else
                affect.remove_collect(apply.MAX_HP, 500)
                syschat("Back to Map 1. Bonuses removed.")
            end
        end
    end

end
  • Good 1
Link to comment
https://metin2.dev/topic/33162-bonus-on-map-index/#findComment-167821
Share on other sites

1 hour ago, realmoulinrouge said:

If you still want it:

quest MapBonusQuest begin
    state start begin
        when login or levelup or enter with pc.get_level() >= 30 begin
            local earringsAccessoryCell = 6
            if pc.get_map_index() == 3 or pc.get_map_index() == 23 or pc.get_map_index() == 43 then
                if pc.get_wear(earringsAccessoryCell) == 17109 then
                    affect.add_collect(apply.MAX_HP, 500, 60 * 60 * 24 * 365 * 60)
                    syschat("500 HP boost for equipping a level 32 earring in Map 2.")
                end
            else
                affect.remove_collect(apply.MAX_HP, 500)
                syschat("Back to Map 1. Bonuses removed.")
            end
        end
    end

end

doesn't work

Link to comment
https://metin2.dev/topic/33162-bonus-on-map-index/#findComment-167823
Share on other sites

  • 3 weeks later...
  • Active Member

This quest will work only if you equip the item before teleporting to the specified map index. If you equip the item after arriving on the map, it will not work.

The best way to do this is to check map index in EquipTo() or ModifyPoints() methods in item.cpp and apply points/add affect.

Edited by jking
Link to comment
https://metin2.dev/topic/33162-bonus-on-map-index/#findComment-168276
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.