Jump to content

Function - No more [ENTER ] in your quests


serex

Recommended Posts

  • Premium

M2 Download Center

This is the hidden content, please
( Internal )

Are you tired of write [ENTER] in all your text or use 20 says for write a simple text?

Me, yes.

So I coded a funcion wich solve this problem.

The difference between this function and the normal "say" is that this search for the last word of the line, and dont cut this word like the normal "say" do.

Add to your questlib.lua

function say2(msg)
	msg_size = string.len(msg)
	if msg_size > 59 then
		local i = 59
		last_word = nil
		while last_word == nil and i > 0 do
			if string.sub(msg,i,i) == " " or string.sub(msg,i,i) == "." or string.sub(msg,i,i) == "," then
				last_word = i
			end
			i = i-1
		end
		if i == 0 then
			last_word = 59
		end
		say(string.sub(msg,0,last_word))
		say2(string.sub(msg,last_word+1))
	else
		say(msg)
	end
end

Add to your quest_functions:

say2

 

And now use say2 instead of say in your quests!

  • Metin2 Dev 3
  • Love 10
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Announcements



  • Similar Content

  • Activity

    1. 0

      Moving server from FreeBSD 11.2 to 13.2 - lib needed

    2. 0

      I just implemented some costumes and they are not visible

    3. 0

      Skill Tree Problem

    4. 97

      Ulthar SF V2 (TMP4 Base)

    5. 5

      Client Crashes through Offline Shop (Ikarus)

    6. 5

      VIVY-WORLD2 - FARM TO THE TOP

    7. 0

      ToolTip Bug?

    8. 0

      Skill tree build erorr

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.