Jump to content

Recommended Posts

Based to this function

 

function say2(str,dx)
    
local maxl,actl,pat = dx or 50,0,'(.-)(%[.-%])()'
    
local result,nb,lastPos,outp = {},0,0,''
    
if string.find(str, pat) ~= nil then 
        
for part, dos,pos in string.gfind(str, pat) do 
            
nb = nb + 2
            
if part ~= '' then result[nb-1] = part else nb = nb -1 end
            result
[nb] = dos
            lastPos 
= pos 
        end 
    end 
    result
[nb+1] = string.sub(str,lastPos)
    
table.foreach(result,function(i,l)
        if 
string.find(l,pat) then 
            outp 
= outp..l 
        
else
            for 
le in string.gfind(l,'((%S+)%s*)') do 
                if 
actl + string.len(le) > maxl then 
                    outp 
= outp..'[ENTER]' 
                    
actl = 0 
                end 
                outp 
= outp..le 
                actl 
= actl + string.len(le) 
            
end 
        end
    end
)
    
say(outp)
end 

 

 

Right now, the function just does a automatic word wrap after 50 letters. I am looking for some change, which would be like this:

The first 4 lines, there will be the word wrap after 20 letters. After that each line will wrap after 50 letters. Once 10 lines total are reached, there should be a auto "wait()" placed.

I would offer $50,00 for this.

 

Link to comment
https://metin2.dev/topic/11170-lua-code-offering-money-service-request/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.