Jump to content
×
×
  • Create New...

Anti Exp Ring and Voodoo Armband


Shogun

Recommended Posts

  • Premium

M2 Download Center

This is the hidden content, please
( Internal )

Today I release two small quests made by me a long time ago.

 

 

Goddess Doll

 

The first is an anti-experience ring that prevents you from gaining exp from mobs when used. Using it again disables the effect. Be aware that the quest substracts the gained exp after it has been received so if the exp from a mob is enough to reach the next level, you will level up!

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

Voodoo Armband

 

The Voodoo Armband is a fun item which lets you convert players into an ugly creature for a few minutes.

quest polyplayer begin
	state start begin
		when 70111.use begin
			local start_count = pc.count_item(item.get_vnum()) -- to prevent usage of bugs only
			say_title("Voodoo Armband:")
			say("")
			say("Enter the name of the player you want to curse:")
			say("")
			local name = input()
			local vid = find_pc_by_name(name)
			if name == "" then
				return
			elseif name == pc.get_name() then
				say_title("Ring of Curse:")
				say("")
				say("You can not curse yourself.")
				say("")
				return
			elseif vid == 0 then
				say_title("Ring of Curse:")
				say("")
				say("This player is not online or does not exist.")
				say("")
				return
			elseif not pc.is_near_vid(vid, 50) then
				say_title("Ring of Curse:")
				say("")
				say("The player is too far away.")
				say("")
				return
			end
			
			if pc.count_item(item.get_vnum()) != start_count then
				return
			end
			
			local myvid = pc.select(vid)
			vnums = {2101, 20016, 20002, 11000, 5001, 992, 1301, 1303, 2191, 5161, 5162, 5163}
			i = number(1,12)
			pc.polymorph(vnums[i], 5*60)
			syschat("You have been cursed.")
			local victim = pc.get_name()
			pc.select(myvid)
			
			say_title("Voodoo Armband:")
			say("")
			say("The player "..victim.." is now cursed for 5 minutes.")
			say("")
			
			item.remove()
			
			
		end
	end
end

These items should be normally present in your client yet unused. If anybody needs I can post the item_proto entries etc.

  • Metin2 Dev 2
  • Love 11

Currently working on my FreeBSD blog:

FreeBSD is Fun, practical tutorials and articles

⚠️                Are you under attack?               ⚠️

Link to comment
Share on other sites

  • 2 weeks later...

Guys this anti_exp ring is very very dangerous.

When the player use the exp ring before a level up like 10.9k exp of 11k exp and he activate the exp ring.

After a kill he gains the next level and the exp will be setted by the quest.

After this he kills again a mob and have the (- exp + the next exp).

 

You have to freeze the exp function of the character like this (not the full code):

void CHARACTER::SetExp(DWORD exp)	{ 
	if(!ExpDisabled()) {
		m_points.exp = exp;	
	}
}

Kind regards

Sphinx

Link to comment
Share on other sites

Guys this anti_exp ring is very very dangerous.

When the player use the exp ring before a level up like 10.9k exp of 11k exp and he activate the exp ring.

After a kill he gains the next level and the exp will be setted by the quest.

After this he kills again a mob and have the (- exp + the next exp).

 

..code..

 

Kind regards

Sphinx

 

Not true, if the player has less EXP after killing an enemy compared to what he had before, the flag gets set to that new EXP instead.

 

Quote:

if current < pc.getqf("lastexp") then
    pc.setqf("lastexp",current)
end
Link to comment
Share on other sites

  • 1 year later...

Guys this anti_exp ring is very very dangerous.

When the player use the exp ring before a level up like 10.9k exp of 11k exp and he activate the exp ring.

After a kill he gains the next level and the exp will be setted by the quest.

After this he kills again a mob and have the (- exp + the next exp).

 

You have to freeze the exp function of the character like this (not the full code):

void CHARACTER::SetExp(DWORD exp)	{ 
	if(!ExpDisabled()) {
		m_points.exp = exp;	
	}
}

Kind regards

Sphinx

Could you release the full code?
I want the ring when used to set the exp to 0 without receiving any exp.
And when used again, give to the player the exp he had before.

Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...
  • 6 months later...
On 2016. 08. 12. at 0:07 PM, Metin2Place said:

Voodoo doesn't work for me. When I click on the item doesn't happen anything, I don't even get the message. Anyone know why?

Hello,Check item antiflag :)
Item is not activ......
Search another item in itemproto (client & serverside) are avaliable or work in clicking (brave cape) copy antiflag and paste u item...
Best Regards,

787292068_Nvtelen.png.6faa7b0bbb3398fd29

Link to comment
Share on other sites

  • 1 month later...

What antiflag should it have?

La 16.02.2017 la 0:10, [007]DawisHU a spus:

Hello,Check item antiflag :)
Item is not activ......
Search another item in itemproto (client & serverside) are avaliable or work in clicking (brave cape) copy antiflag and paste u item...
Best Regards,

What antiflag should have?

Link to comment
Share on other sites

  • Premium
On 15/4/2017 at 10:51 AM, Metin2Place said:

What antiflag should it have?

What antiflag should have?

type 18 of course, the antiflag has nothing to do with it.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Metin2 Dev Github
  • Activity

    1. 1

      Metin2 Privat Server selfmade

    2. 1

      Costumes

    3. 1

      Costumes

    4. 0

      game.core (Thank you in advance for your help.)

    5. 1

      [Help] Problem with the system I added

    6. 7

      Serversource build win32

    7. 1

      Extended blend system

    8. 7

      Serversource build win32

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.