pewpew5 1 Posted September 5, 2022 Share Posted September 5, 2022 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 More sharing options...
Premium EnKor 42 Posted September 8, 2022 Premium Share Posted September 8, 2022 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 More sharing options...
Solution pewpew5 1 Posted September 16, 2022 Author Solution Share Posted September 16, 2022 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now