Register for your free account! | Forgot your password?

You last visited: Today at 11:52

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE]Mail on Metin2!

Discussion on [RELEASE]Mail on Metin2! within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2007
Posts: 16
Received Thanks: 293
[RELEASE]Mail on Metin2!

Today i relese one of my favorites scripts.
It's a mail system (like all the other mmorpg) written in lua.

Script for writing
Code:
divisore = "New Message"
directory = "shared_data/locale/english/quest/object/"
function invia_lettera ( nick, nome, corpo )
    fp,err = io.open( directory.."mail/"..nome..".txt" )
    if err then
        io.output ( directory.."mail/"..nome..".txt" )
        io.write ( "*******Sender*******\n")
        io.write ( "****** "..nick.." ******")
        io.write ( corpo )
        io.write ( "\n************************")
        io.close()
    else
        io.close(fp)
        fhs = io.open ( directory.."mail/"..nome..".txt" , "a" )
        fhs:write( "\n"..divisore.."\n" )
        fhs:write ( "*******Sender*******\n")
        fhs:write( "****** "..nick.." ******" )
        fhs:write( corpo )
        fhs:write ( "\n************************")
        io.close(fhs)
    end
end --function

    local nome
    local corpo_lettera = ""
    say_title ( "Postino" )
    say ( "Vuoi inviare una lettera?" )
    local scelta = select ( "Si" , "No" )
    if scelta == 2 then
    else
        say_title ( "Postman" )
        say ( "Enter the recipient's nickname!" )
        say ( "Remember to pay attention to upper and lower case" )
        nome = tostring(input ())
        if nome == "" then
            say ( "......." )
        else
            local contatore = 0
            say_title ( "Postman" )
            say ( "Write the letter's body" )
            while ( true ) do
                contatore = contatore + 1
                corpo_lettera = corpo_lettera.."\n"..tostring(input())
                say ( "Need other space?" )
                local scelta1 = select ( "Yes!" , "No, thanks!" )
                if scelta1 == 2 then
                    break
                end
                if contatore == 11 then
                    say_title ( "Postman" )
                    say_reward ( "Last available line!" )
                elseif contatore >= 12 then
                    break
                end
            end
                local oink = pc.get_name()
                invia_lettera ( oink, nome, corpo_lettera )
                say_title ( "Postman" )
                say ( "Your email has been sent successfully!" )
                say ( "Thanks!" )
                say ( "" )
        end
    end
Script for reading

Code:
divisore = "New Message"
directory = "shared_data/locale/english/quest/object/"
fp,err=io.open(directory.."mail/"..pc.get_name()..".txt")
if not err then
    a=0  --linee del messaggio
    for line in io.lines(directory.."mail/"..pc.get_name()..".txt") do
        a = a+ 1
        if line == divisore then
            a = a - 1
            break
            end
    end
    say ( "You received a messages" )
    say ( "want you read?" )
    say ( "I remember you that once read, the messge will be deleted" )
    local scelta = select ( "Read!" , "No!" )
    if scelta == 2 then return
    else
    for b=0, a-1 do
            say ( fp:read() )
    end
    end
    stringa = ""
    local contatorey = 0
    while true do
        local ci = fp:read()
            if ci == nil then
                break
            elseif (ci == divisore) and contatorey == 0 then
            else
                contatorey = contatorey+1
                stringa = stringa..ci.."\n"
            end
    end
    if stringa == "" then
        os.remove(directory.."mail/"..pc.get_name()..".txt")
    else
    io.close(fp)
    fhs = io.open (directory.."mail/"..pc.get_name()..".txt" , "w" )
    fhs:write(stringa)
    fhs:close()
    end
else
    say_title ( "Postman" )
    say ( "At the moment there are no mails for you!" )
end
Script letter with message count

Code:
divisore = "New Message"
directory="shared_data/locale/english/quest/object/"
fp,err=io.open(directory.."mail/"..pc.get_name()..".txt")
if not err then
    local a=1  --linee del messaggio
    for line in io.lines(directory.."mail/"..pc.get_name()..".txt") do
        if line == divisore then
            a = a + 1
        end
    end
    if a == 1 then
    send_letter ( "Do you have a mail!" )
    else
    send_letter ( "Do you have "..tostring(a).." mails!" )
    end
    io.close(fp)
end
Configuration

At the beginning of the three scripts, there are two variables to configure:

-directory: Is your directory of "object", start from the shared folder of the games

-divisore: Is a magic word that is used to split multiple messages. Invent a phrase or a word enough imaginative, that users do not ever write in their mail.

You also need to create a folder called "mail", in object.

How Work

The script writes and reads the txt file named with the nickname of the recipient, the text file will be placed in the folder "mail" that you have created. These files contain all the messages that receives precisely the user (the script, thanks to "divisore", enables the reception of multiple messages).
If there are more messages, the script read a message at a time, once you read a message it is deleted from the txt ... if it does not contain more message, the file is deleted automaticity.
Of course, thanks to the files saved on the server...we can send messages to anyone even if offline or from another kingdom.
The writer has available up to 12 lines.
In this script the sending is free and requires no object or limitation of any kind, it is not difficult to add a check and I know that you know it.

This time I had to write much more than other guides, so I apologize for my bad english (helped by google <. <).
I hope you are able to understand something.
If someone can translate into german, i add the translation there. (thank you).
If someone know the italian and would translate from , is better!

For any question, i'm here!
gabss is offline  
Thanks
26 Users
Old 10/17/2011, 19:24   #2
 
elite*gold: 0
Join Date: Feb 2010
Posts: 1,567
Received Thanks: 420
N1!
.Fail´ is offline  
Old 10/17/2011, 19:26   #3
 
plechito's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 1,016
Received Thanks: 2,476
Good! Thanks
plechito is offline  
Old 10/17/2011, 19:31   #4
 
xCPx's Avatar
 
elite*gold: 20
Join Date: Jun 2011
Posts: 2,897
Received Thanks: 3,336
was sagt man dazu

Tja RealFreak,jetzt musst du ja keine Angst mehr haben,dass ich dein Offline Pn System release
xCPx is offline  
Thanks
1 User
Old 10/17/2011, 19:39   #5
 
.Nagato's Avatar
 
elite*gold: 1
Join Date: Mar 2011
Posts: 1,473
Received Thanks: 1,382
******* nice!
.Nagato is offline  
Old 10/17/2011, 20:17   #6
 
xCPx's Avatar
 
elite*gold: 20
Join Date: Jun 2011
Posts: 2,897
Received Thanks: 3,336
Quote:
Originally Posted by DaRealFreak View Post
Hab netmal eines xD
Weißte ist mir ansich sowieso scheiß egal, wird sowieso bald public wie man alle Clienten entpackt, hasts wohl ein paar zu viele gegeben, wird gerade sowieso überall weitergegeben xD
Kenn inzwischen 20-30 Leute damit.

Trotzdem ist es mir sowas von waynetrain

Aber probier mal an Dateien wie soundarranger.exe zu kommen, deine Methode wird da nicht klappen^^

Dazu weiß es Ymir inzwischen auch und wird wahrscheinlich was dagegen unternehmen^^

B2T:
Nais xD
ijemand hat mal zu mir gesagt,dass du das celestia offline pn system geschrieben hast
das hab ich mit nem araber zsm nachgecoded

ich hab die soundarranger.exe

Und das alles entpack ding weiß ich wie man fixxt ^^
Danke dafür an Dre4m^^
xCPx is offline  
Old 10/17/2011, 20:51   #7

 
IgorGlock's Avatar
 
elite*gold: 1862
Join Date: Jan 2009
Posts: 3,725
Received Thanks: 7,671
That's like a FlyFF

Es ist ja wie bei FlyFF
IgorGlock is offline  
Old 10/17/2011, 21:53   #8
 
Dr. Dorian's Avatar
 
elite*gold: 36
Join Date: Jan 2009
Posts: 348
Received Thanks: 159
kann vll mal jemand ein screen reinstellen wie das IG aussieht
wär echt nett
Dr. Dorian is offline  
Old 10/17/2011, 22:35   #9
 
elite*gold: 65
The Black Market: 111/0/3
Join Date: May 2011
Posts: 1,280
Received Thanks: 1,153
Nice...
Thx given...

#Edit: 400 Post
Lord Elinoy is offline  
Old 10/18/2011, 11:37   #10
 
elite*gold: 0
Join Date: Sep 2011
Posts: 1,218
Received Thanks: 706
Sowas ist nice wenigtest gibt es nich ein paar Leute die was gutes Releasen und nicht son müll der seit 1nem Jahr public ist

#Thx given
.Restince is offline  
Thanks
1 User
Old 10/18/2011, 11:50   #11
 
elite*gold: 0
Join Date: Apr 2010
Posts: 223
Received Thanks: 41
Wo fügt man diese Scripts denn ein?
BackBlack1 is offline  
Old 10/18/2011, 13:04   #12
 
elite*gold: 198
Join Date: Mar 2011
Posts: 835
Received Thanks: 263
Das hat er unten geschrieben
ƬheGame is offline  
Old 10/18/2011, 14:25   #13
 
elite*gold: 0
Join Date: Oct 2007
Posts: 16
Received Thanks: 293
This is an example of how-to install:

here i've changed the directory. I have not tested because it is just an example (but should work), for any problem let me know but in english please because i don't understand german ç_ç
gabss is offline  
Old 10/18/2011, 14:37   #14
 
elite*gold: 198
Join Date: Mar 2011
Posts: 835
Received Thanks: 263
I can translate it for u just send me a pm
ƬheGame is offline  
Old 10/18/2011, 18:30   #15
 
elite*gold: 0
Join Date: Oct 2010
Posts: 73
Received Thanks: 2
I made it much more easier without .txt-files.
Tofus is offline  
Reply


Similar Threads Similar Threads
[Release][SRC] E-Mail Extractor
07/16/2011 - Coding Releases - 2 Replies
{E-Mail Extractor - by Lizzaran} http://s1.directupload.net/images/110715/js9mvtii .jpg (For download scroll down) Hey folks, today i was searching for a simply E-Mail Extractor (files), but i didnt find a free & good one, so i decided to make my own. I'm a nice guy, so i will give you all the source code without any shitty surveys. Features:
[RELEASE] 10 Minuten Mail Liste
04/10/2011 - Off Topic - 12 Replies
Hey , ich hab mir mal gedacht das ich hier ne Liste reinstelle mit 10 minuten mails. Wenn ihr nicht wisst was das ist , hier die erklärung : Also , das ist eine E-Mail ohne sich anzumelden. Wie zb bei web.de , da muss man sich anmelden. Hier wird die E-Mail per knopfdruck erstellt :D So könnt ihr genügend S4 Accounts machen für Hacks usw.
[Release]E-Mail Newsletter Schreiber
03/16/2011 - Metin2 PServer Guides & Strategies - 14 Replies
Hey, mit diesem netten Tool könnt ihr Newsletter an eure Spieler schreiben :) Ihr müsst einfach im gleichen Ordner eine Datei namens "email.txt" erstellen und da folgendes reinschreiben: spieleradresse || Accountname spieleradresse2 || accountname2 . . . .
[Release] Mail - Station 1.0 by Visonar
08/25/2010 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 36 Replies
Guten Tag, heute möchte ich euch meinen neuen Bot vorstellen: Mail - Station 1.0 by Visonar Wie der Name schon sagt ist es ein Bot rund um private Nachrichten. Er informiert, aber beantwortet auch die PN's.



All times are GMT +1. The time now is 11:52.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.