Jump to content
Phishing - Beware of identity theft... ×
  • 0

[HELP]Anti_Exp


A4Tech

Question

i tried to add the anti_exp ring ... however the quest is working fine but once i activated it then try to kill a mob ... i suddenly gain like 20/30 levels ... why ?

 

Quote
-- Anti-Exp Ring by Shogun for WoM (c) 2013
quest exp_curse begin
	state start begin
		when 70210.use begin
			pc.setqf("lastexp",pc.get_exp())
			syschat("You are under the curse of the goddess. You will gain no experience.")
			set_state(use)
		end
	end
	
	state use begin
		when 70210.use begin
			syschat("You lifted the curse of the goddess. You gain experience again.")
			set_state(start)
		end
		
		when login begin
			syschat("You are currently under the curse of the goddess and gain no experience.")
		end
		
		when kill or party_kill begin
			local current = pc.get_exp()
			local doll = pc.count_item(70210)
			if doll == 0 then
				syschat("The curse of the Goddess has lifted. You will gain Experience again.")
				set_state(start)
			end
			if current < pc.getqf("lastexp") then
				pc.setqf("lastexp",current)
			end
			if not npc.is_pc() then
				local dif = pc.get_exp()-pc.getqf("lastexp")
				pc.give_exp2(-dif)
			end
		end
	end
end

 

Link to comment
Share on other sites

  • Answers 6
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

6 answers to this question

Recommended Posts

  • 0
  • Premium
when 70210.use begin
want to block???
if yes:

if pc.get_exp() < 1999999999 then
   pc.give_exp2(-pc.get_exp())
else
    pc.give_exp2(-1999999999)
    pc.give_exp2(-pc.get_exp())
    pc.block_exp()
end 

Wanto to sblock? 
 pc.unblock_exp()

 

 

Link to comment
Share on other sites

  • 0
  • Premium
On 11/10/2018 at 12:38 AM, A4Tech said:

i tried to add the anti_exp ring ... however the quest is working fine but once i activated it then try to kill a mob ... i suddenly gain like 20/30 levels ... why ?

 

 

Because that is not any exp blocker at all.

If you want to block exp, make a ring like that sure, but having it to change the value of a quest_flag, for example:

BLOCK_EXP 1    to turn it on

BLOCK_EXP 0   to turn it off

 

And then in your source, at CASE_EXP:

You check if the player has a quest_flag of BLOCK_EXP = 1, if the player does, then you do a return at the begining so that it ignores all the exp processing.

Thats the only way to really block exp gain, the one you added was used before source appeared and it was already crap, because if the exp you gain is higher then your exp required to level up, you will level up first and then it will remove you the exp.

Link to comment
Share on other sites

  • 0
9 hours ago, tierrilopes said:

Because that is not any exp blocker at all.

If you want to block exp, make a ring like that sure, but having it to change the value of a quest_flag, for example:

BLOCK_EXP 1    to turn it on

BLOCK_EXP 0   to turn it off

 

And then in your source, at CASE_EXP:

You check if the player has a quest_flag of BLOCK_EXP = 1, if the player does, then you do a return at the begining so that it ignores all the exp processing.

Thats the only way to really block exp gain, the one you added was used before source appeared and it was already crap, because if the exp you gain is higher then your exp required to level up, you will level up first and then it will remove you the exp.

@tierrilopes is it possible to tell me how can i exactly add the block_exp and the case_exp in my source ? because i am not expert in those things and thank you in advance.

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.