Jump to content

Recommended Posts

Hello guys,
Does anyone know how to make elixir be able to use it after 5 seconds? Because now players click it and their HP bugs after spamming it . Can anyone help me ?
Thanks!

โ€œ๐“๐“ต๐“ต ๐”€๐“ฎ ๐“ฑ๐“ช๐“ฟ๐“ฎ ๐“ฝ๐“ธ ๐“ญ๐“ฎ๐“ฌ๐“ฒ๐“ญ๐“ฎ ๐“ฒ๐“ผ ๐”€๐“ฑ๐“ช๐“ฝ ๐“ฝ๐“ธ ๐“ญ๐“ธ ๐”€๐“ฒ๐“ฝ๐“ฑ ๐“ฝ๐“ฑ๐“ฎ ๐“ฝ๐“ฒ๐“ถ๐“ฎ ๐“ฝ๐“ฑ๐“ช๐“ฝ ๐“ฒ๐“ผ ๐“ฐ๐“ฒ๐“ฟ๐“ฎ๐“ท ๐“พ๐“ผ.โ€ ~ ๐“–๐“ช๐“ท๐“ญ๐“ช๐“ต๐“ฏ ๐“ฝ๐“ฑ๐“ฎ ๐“–๐“ป๐“ฎ๐”‚

Link to comment
https://metin2.dev/topic/29649-how-to-stop-spam-elixir/
Share on other sites

  • Honorable Member
6 minutes ago, ReFresh said:

You can do that by pc.setqf via quest:

ย 

Hidden Content

ย 

ย  Hide contents
		when 27100.use begin
			if pc.getqf("purple_elixir") > get_time() then
				syschat("This elixir is already activated, you have to wait 10 minutes before next use.")
			else
				affect.add_collect(7, 10, 60*10) -- you can edit the time before next use here
				pc.setqf("purple_elixir", get_time() +60*10) -- you can edit the time before next use here
				pc.remove_item(item.vnum, 1)
			end
		end

ย 

ย 

ย 

That is not how it works.
"*.use" triggers only work if the item's type is 18 (ITEM_QUEST), while a Potion/Elixir's type is 3.

Edited by Syreldar
  • Metin2 Dev 1

ย 

"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
https://metin2.dev/topic/29649-how-to-stop-spam-elixir/#findComment-152181
Share on other sites

  • Active+ Member
2 minutes ago, Syreldar said:

"*.use" triggers only work if the item's type is 18 (ITEM_QUEST), while a Potion/Elixir's type is 3.

Sure, I forgot to mention that. But it will work, if you change the item type to 18.

I'll be always helpful!ย ย ๐Ÿ˜‰

Link to comment
https://metin2.dev/topic/29649-how-to-stop-spam-elixir/#findComment-152182
Share on other sites

  • Forum Moderator
3 hours ago, ReFresh said:

Sure, I forgot to mention that. But it will work, if you change the item type to 18.

No, it will unfortunately not work at all, you are removing the item as well as adding a "POINT_SP" affect out of nowhere and do not effectively return when the chrono is still running.

First of all, @Jimmermania, if you have an HP bug triggered by the Elixir, you should look forward to fixing this bug INSTEAD of adding a workaround with the elixir.

https://metin2.download/video/W9vALm1ShrWHRgT7m1ILDYMUJsUq627p/.mp4

ย 

However, a correct way to fix that would be to use the "PulseManager" library (courtesy of @ martysama0134). So basically you add

This is the hidden content, please
into your project and include it (#include "PulseManager.h").

This is the hidden content, please

ย 

Edited by Gurgarath
Core X - External 2 Internal
  • Metin2 Dev 36
  • Good 3
  • Love 1
  • Love 9

Gurgarath
coming soon
My Services

Link to comment
https://metin2.dev/topic/29649-how-to-stop-spam-elixir/#findComment-152183
Share on other sites

  • Active+ Member

@Gurgarathย And how you would do that globally for all newly added elixirs (for example for 50 new elixirs with different vnums), if my way is not effective? My way worked for me years ago.

I'll be always helpful!ย ย ๐Ÿ˜‰

Link to comment
https://metin2.dev/topic/29649-how-to-stop-spam-elixir/#findComment-152184
Share on other sites

  • Forum Moderator
2 minutes ago, ReFresh said:

@Gurgarathย And how you would do that globally for all newly added elixirs (for example for 50 new elixirs with different vnums), if my way is not effective? My way worked for me years ago.

In his case your remove the add_affect from your quest, and pass it to item type 18 and remove the remove item and basically just transform your quest into a setqf check which isn't that worth overall (even more for a 5sec check). Using my method you just have to use "case item_vnum:" and it will get the job done

Edited by Gurgarath
  • Good 1

Gurgarath
coming soon
My Services

Link to comment
https://metin2.dev/topic/29649-how-to-stop-spam-elixir/#findComment-152185
Share on other sites

@ Gurgarathย and @ Syreldarย and @ ReFresh, thanks for your answers. You really helped me a lot.

  • Love 2

โ€œ๐“๐“ต๐“ต ๐”€๐“ฎ ๐“ฑ๐“ช๐“ฟ๐“ฎ ๐“ฝ๐“ธ ๐“ญ๐“ฎ๐“ฌ๐“ฒ๐“ญ๐“ฎ ๐“ฒ๐“ผ ๐”€๐“ฑ๐“ช๐“ฝ ๐“ฝ๐“ธ ๐“ญ๐“ธ ๐”€๐“ฒ๐“ฝ๐“ฑ ๐“ฝ๐“ฑ๐“ฎ ๐“ฝ๐“ฒ๐“ถ๐“ฎ ๐“ฝ๐“ฑ๐“ช๐“ฝ ๐“ฒ๐“ผ ๐“ฐ๐“ฒ๐“ฟ๐“ฎ๐“ท ๐“พ๐“ผ.โ€ ~ ๐“–๐“ช๐“ท๐“ญ๐“ช๐“ต๐“ฏ ๐“ฝ๐“ฑ๐“ฎ ๐“–๐“ป๐“ฎ๐”‚

Link to comment
https://metin2.dev/topic/29649-how-to-stop-spam-elixir/#findComment-152192
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.