Jump to content

[HELP]Anti_Exp


Recommended Posts

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

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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