Jump to content
×
×
  • Create New...
  • 0

Need help making a quest "0% exp if item equipped"


pewpew5

Question

Hello sorry to bother you guys again! But can yah help me with making a file.quest that checks if an emotion mask is equipped and if so block exp gain.

My first question is i have seen suggestions of pc.block_exp(), the input on the function is true = block and false = unblock?

my second question is how do i check if a certain item is equipped using the functions from the function list?

 

 

 

Link to comment
Share on other sites

  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

2 answers to this question

Recommended Posts

  • 0

Ultimatly i was using the XXXX.use the wrong way.

the anti exp ring  code that works great is this

quest antiexpring begin
    state start begin
        when 40002.use with pc.getqf("antiexp") == 0 begin 
            local anti = pc.get_exp()
            pc.setqf("exp", anti)
            pc.setqf("antiexp", 1)
            timer("antiexptimer", 1)
            chat("Anti Exp Enabled")
        end
        when 40002.use with pc.getqf("antiexp") == 1 begin
            pc.setqf("antiexp", 0)
            chat("Anti Exp Disabled")
        end
        when kill with pc.getqf("antiexp") == 1 begin
            local exp = pc.get_exp()
            pc.give_exp2(-exp+pc.getqf("exp"))
        end
        when party_kill with pc.getqf("antiexp") == 1 begin
            local exp = pc.get_exp()
            pc.give_exp2(-exp+pc.getqf("exp"))
        end

        when antiexptimer.timer with pc.getqf("antiexp") == 1 begin
            local exp = pc.get_exp()
            pc.give_exp2(-exp+pc.getqf("exp"))
        end
    end
end

Link to comment
Share on other sites

  • 1
  • Premium
On 9/5/2022 at 9:20 PM, pewpew5 said:

Hello sorry to bother you guys again! But can yah help me with making a file.quest that checks if an emotion mask is equipped and if so block exp gain.

My first question is i have seen suggestions of pc.block_exp(), the input on the function is true = block and false = unblock?

my second question is how do i check if a certain item is equipped using the functions from the function list?

 

 

 

Maybe this help:

####  Src/game/char.cpp

Spoiler
///in: 		case POINT_EXP:

//Search:
				[...]
				else
				{
					if (gPlayerMaxLevel <= GetLevel())
						return;

					if (test_server)
						ChatPacket(CHAT_TYPE_INFO, "You have gained %d exp.", amount);
                                                     
//Add after:
                    LPITEM pItem = GetWear(WEAR_WEAPON);
					if (NULL != pItem && pItem->GetVnum() == 10){
						return;
					}                                

 

 

 

 

 

 

 

 

if pc.get_sex() == true and npc.get_sex() == false then
	npc.purge()
end

 

Link to comment
Share on other sites

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Metin2 Dev Github
  • Activity

    1. 0

      max level exp

    2. 8

      Quest States Core Crash Item Dupe Bug Fix

    3. 23

      Umbra / Soft4Win / SNap! scammer exposed!

    4. 46

      Ship Defense (Hydra Dungeon)

    5. 10

      Rodnia Glory | A REAL SPEED SERVER | Start 02.09.2022

    6. 0

      Avery seeks an experienced team manager

    7. 0

      Wear (use) item only on specific map

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.