Register for your free account! | Forgot your password?

You last visited: Today at 18:12

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

Advertisement



[RLS]Auto Message <3

Discussion on [RLS]Auto Message <3 within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2013
Posts: 154
Received Thanks: 507
[RLS]Auto Message <3





I know this is shared with the system but.The system isn't fully working.

I made new a one ^.^

PHP Code:
quest automessage begin
    state start begin
        
        
function lastmessage()
            
local file,err io.open("locale/germany/automessage.txt","rb")
            if(
errthen
                
return 1
            end
            
for line in file:lines() do
                return 
line
            end
            
if(line == ""then
                
return 0
            end
        end
        
        
function write(message)
            
local file,err io.open("locale/germany/automessage.txt","w")
            if(
errthen
                local file 
io.output(io.open("locale/germany/automessage.txt","w"))
                
file:write(message)
                
file:flush()
                
file:close()
            else
                
file:write(message)
                
file:flush()
                
file:close()
            
end
        end
        
        
function delete()
            
local file,err io.open("locale/germany/automessage.txt","w")
            if(
errthen
                
return 0
            end
            file
:write("")
            
file:flush()
            
file:close()
        
end
        
        when letter with pc
.is_gm() begin
            send_letter
("Auto Message Settings. ")
        
end
        when button 
or info begin
            say_title
("Auto Message Settings: ")
            
say("")
            ---
            
say("Welcome the automated message system. ")
            if(
automessage.lastmessage() == 0then
                say
("Last message: Not specified yet. ")
            else
                
say("Last Message : "..automessage.lastmessage())
            
end
            say
("What would you like to do now? ")
            
say("")
            
local s select("Write message","Delete the message","Close")
            if(
== 1then
                say_title
("Write Message: ")
                
say("")
                ---
                
say("What is the new message? ")
                
say("")
                
local r tostring(input())
                if(
== "" or == nilthen
                    say_title
("Error: ")
                    
say("")
                    ---
                    
say_reward("An error has occurred. ")
                    return
                
end
                say_title
("Write Message: ")
                
say("")
                ---
                
say("Your message has been successfully")
                
say("updated.Thanks see you again. ")
                
say("it will appear on your 60 minutes. ")
                
automessage.write(r)
                
server_timer("notices",60*60)
            elseif(
== 2then
                say_title
("Delete message: ")
                
say("")
                ---
                
say("Your message has been successfully")
                
say("deleted.Thanks see you again. ")
                
clear_server_timer("notices")
                
clear_server_timer("notice")
                
automessage.delete()
            
end
        end
        
        when notices
.server_timer begin
            local notice 
automessage.lastmessage()
            if(
notice == 0then
                clear_server_timer
("notices")
                
clear_server_timer("notice")
                return
            
end
            notice_all
(notice)
            
server_timer("notice",60*60)
        
end
        
        when notice
.server_timer begin
            local notice 
automessage.lastmessage()
            if(
notice == 0then
                clear_server_timer
("notices")
                
clear_server_timer("notice")
                return
            
end
            notice_all
(notice)
            
server_timer("notices",60*60)
        
end
    end
end 
Quote:
Originally Posted by gkilah View Post
Add to quest_functions
Code:
close
flush
io.open
io.output
lines
write
Mfg HaveBeen <3



HaveBeen™ is offline  
Thanks
26 Users
Old 05/20/2013, 09:53   #2
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
Why don't you use server-loop-timer?
Mijago is offline  
Thanks
2 Users
Old 05/20/2013, 09:55   #3
 
Splinglol's Avatar
 
elite*gold: 50
Join Date: Aug 2012
Posts: 535
Received Thanks: 284
If this works, it's really nice!
Splinglol is offline  
Thanks
1 User
Old 05/20/2013, 10:29   #4
 
Stαgє6's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 2,018
Received Thanks: 1,471
Thanks 4 share
Stαgє6 is offline  
Old 05/20/2013, 10:34   #5


 
Zevion's Avatar
 
elite*gold: 906
Join Date: Sep 2009
Posts: 17,295
Received Thanks: 4,399
Really nice work.
Thanks for Sharing.
Zevion is offline  
Thanks
1 User
Old 05/20/2013, 10:59   #6
 
elite*gold: 0
Join Date: Mar 2013
Posts: 154
Received Thanks: 507
Quote:
Originally Posted by Mijago View Post
Why don't you use server-loop-timer?
If you want to use,but I don't want to use it.
Thanks for comment.
HaveBeen™ is offline  
Thanks
1 User
Old 05/20/2013, 11:03   #7
 
૯xcitĕ's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 90
Received Thanks: 37
wow thank you
૯xcitĕ is offline  
Thanks
1 User
Old 05/20/2013, 11:23   #8
 
thehero09's Avatar
 
elite*gold: 0
Join Date: Jun 2012
Posts: 125
Received Thanks: 13
Thx
Saol kanka
thehero09 is offline  
Thanks
1 User
Old 05/20/2013, 11:59   #9

 
olieg's Avatar
 
elite*gold: 3
Join Date: Feb 2012
Posts: 926
Received Thanks: 341
Nice think, well done!
olieg is offline  
Thanks
1 User
Old 05/20/2013, 12:06   #10
 
.PolluX's Avatar
 
elite*gold: 81
Join Date: Nov 2012
Posts: 975
Received Thanks: 531
WoW, thank you!
I missed those servermessages in metin2 a long time (i know there was a way with quest but i think its better with a txt file in which the messages are)

Maybe you can connect this quest to database so that there is a table in which the messages are.
but thanks 4 share
.PolluX is offline  
Thanks
1 User
Old 05/20/2013, 12:31   #11
 
elite*gold: 12
Join Date: Jan 2013
Posts: 79
Received Thanks: 508
Danke! Funktioniert
.Wildfire is offline  
Thanks
1 User
Old 05/20/2013, 14:30   #12

 
elite*gold: 1143
Join Date: Jun 2012
Posts: 800
Received Thanks: 399
Very nice. Thx 4 share.
x'Kyubi is offline  
Thanks
1 User
Old 05/20/2013, 17:15   #13
 
elite*gold: 0
Join Date: Nov 2012
Posts: 5
Received Thanks: 0
how this workes ? can you explain plz
ziizoomule is offline  
Old 05/20/2013, 19:53   #14
 
elite*gold: 0
Join Date: Mar 2013
Posts: 154
Received Thanks: 507
Quote:
Originally Posted by ziizoomule View Post
how this workes ? can you explain plz
The principle of operation is simple.

Step 1 => Enter the Message
Step 2 => After 60 minutes,you can see announcement type.
HaveBeen™ is offline  
Old 05/20/2013, 20:32   #15
 
elite*gold: 0
Join Date: Aug 2012
Posts: 741
Received Thanks: 210
Thank you du lappen
HeroOfMetin is offline  
Reply


Similar Threads Similar Threads
Auto Message
06/23/2012 - Off Topic - 11 Replies
Ich werfe mal einfach eine kleine Umfrage in den Raum : Würde es sich lohnen einfach einen Auto-Message-Bot zu erstellen, der den User sofort nach der Registration mit einer Nachricht andchreibt, mit folgendem Inhalt : "Guten Tag Elitepvper Member, schön, dass du den Weg zu uns gefunden hast.. Für Fragen ; FAQ .. Sowas halt vom inhaltlichen Sinn her. Für die Englischen Benutzer das selbe. Nur eine kleine Anregung ;)
auto-setup message -_-
11/16/2011 - Technical Support - 6 Replies
hi epvp users i have a little problem every 1/2 second something po ups with the message Auto-setup its verry annoying and cant play games or something else -_- does any one knows this pleas help i really apriciate it ;-) greetz superzeth
Auto Send message
04/19/2010 - SRO Private Server - 4 Replies
hailed know that is a program that one message and send it and I 'd like who knows where you DOWNLOAD please datimi a link I need



All times are GMT +2. The time now is 18:12.


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.