Register for your free account! | Forgot your password?

You last visited: Today at 01:49

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

Advertisement



lua event

Discussion on lua event within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old   #1
 
Engelchen89's Avatar
 
elite*gold: 20
Join Date: Mar 2012
Posts: 61
Received Thanks: 1
lua event

ich habe eine frage wie mache ich das in der lua das er an einem bestimmten tag und zeit zb ein buff aktiviert oder beendet aktuell habe ich das so stehen

local current_time = get_os_date( "%Y-%m-%d %H:%M:%S" )
local event_start = '2018-05-01 15:19:00'
local event_end = '2018-05-01 15:20:00'


if current_time > event_start or current_time > event_end then

if current_time > event_start and current_time < event_end then

add_event_state(314012,1)
announce("Der Server Buff wurde Aktiviert")

elseif current_time < event_end then

remove_event_state(314012,1)
announce("Der Server Buff wurde entfernt")


else

announce("Da hat was nicht geklappt, bitte Pruefen")
end

end
Engelchen89 is offline  
Old 05/03/2018, 11:40   #2
 
elite*gold: 0
Join Date: Oct 2017
Posts: 54
Received Thanks: 5
hmmm i hope i got what you mean

you can implement this lua in a function and then you can call this function in on_login.lua whenever a player login the function will be called or in the telecaster there is a table to call a function every period of time
solo69 is offline  
Old 05/03/2018, 12:46   #3
Moderator


 
ThunderNikk's Avatar
 
elite*gold: 1
Join Date: Dec 2012
Posts: 4,918
Received Thanks: 1,492
But theirs will not work I think that is why they asked for help.

There is no...

if

if

do

else

do

else

do

There is only...

if

do

else

do

They are looking for someone to make it work.
ThunderNikk is offline  
Old 05/05/2018, 10:07   #4
 
elite*gold: 0
Join Date: Nov 2016
Posts: 25
Received Thanks: 2
Das würde mich auch interessieren da ich jetzt bei den Events einstellungen bin.

Einer eine Idee ??
Perona2 is offline  
Old 05/07/2018, 14:53   #5
 
Wuthnex's Avatar
 
elite*gold: 0
Join Date: Dec 2015
Posts: 4
Received Thanks: 0
Quote:
Originally Posted by ThunderNikk View Post
But theirs will not work I think that is why they asked for help.

There is no...

if

if

do

else

do

else

do

There is only...

if

do

else

do

They are looking for someone to make it work.
Sonnst alles gesund?
Wuthnex is offline  
Old 05/07/2018, 16:27   #6
 
thefear511's Avatar
 
elite*gold: 0
Join Date: Nov 2012
Posts: 948
Received Thanks: 259
Quote:
Originally Posted by Engelchen89 View Post
ich habe eine frage wie mache ich das in der lua das er an einem bestimmten tag und zeit zb ein buff aktiviert oder beendet aktuell habe ich das so stehen

local current_time = get_os_date( "%Y-%m-%d %H:%M:%S" )
local event_start = '2018-05-01 15:19:00'
local event_end = '2018-05-01 15:20:00'


if current_time > event_start or current_time > event_end then

if current_time > event_start and current_time < event_end then

add_event_state(314012,1)
announce("Der Server Buff wurde Aktiviert")

elseif current_time < event_end then

remove_event_state(314012,1)
announce("Der Server Buff wurde entfernt")


else

announce("Da hat was nicht geklappt, bitte Pruefen")
end

end
search NPC_event_WD_2014_worldcup_contact()
in Npc_event.lua, best lua teacher is the lua itself.
thefear511 is offline  
Old 05/07/2018, 21:58   #7
 
Wuthnex's Avatar
 
elite*gold: 0
Join Date: Dec 2015
Posts: 4
Received Thanks: 0
Quote:
Originally Posted by thefear511 View Post
search NPC_event_WD_2014_worldcup_contact()
in Npc_event.lua, best lua teacher is the lua itself.

Das ist ein NPC bezogenes Event. Jeden Tag zB. ein anders Item.
Wuthnex is offline  
Old 05/07/2018, 22:00   #8
 
Engelchen89's Avatar
 
elite*gold: 20
Join Date: Mar 2012
Posts: 61
Received Thanks: 1
Genau ein npc bezogenes event meine ich nicht sondern das zb montags um sagen wir mal 13 uhr startet ein zufälliges event entweder ein buff oder exp event und an mittwoch zb um 13 uhr endet das wieder
Engelchen89 is offline  
Old 05/13/2018, 15:50   #9
 
thefear511's Avatar
 
elite*gold: 0
Join Date: Nov 2012
Posts: 948
Received Thanks: 259
PHP Code:
function on_server_init()
    
roaming()
    
rare_mob()
    
guardian_spawn()
    
random_respawn()
    
add_global_prop()
    
for_event_by_liveteam() 
    
    
add_random_tiamat_monster()
    
add_random_tiamat_monster()
    
add_random_tiamat_monster()
    
    
local current_time get_os_date"%Y-%m-%d %H:%M:%S" )
    
local event_end '2016-01-25 00:01:00'
    
if  current_time event_end then
        set_env
("game.exp_rate",1.5)
        
set_env("game.chaos_drop_rate",4.5)
    else
        
set_env("game.exp_rate",1)
        
set_env("game.chaos_drop_rate",3)
    
end
end 
i found this somewhere in my files its in server_int.lua
thefear511 is offline  
Reply


Similar Threads Similar Threads
[Realase]Décripteur de fichier lua ressource 7.3 /Décripteur resource file lua 7.3
04/08/2012 - Rappelz Private Server - 5 Replies
Closed
Sehr weit geführte locale_.lua (locale_big5.lua)
08/02/2010 - Metin2 PServer Guides & Strategies - 50 Replies
Abend^^ Habe hier mal selber eine locale_.lua übersetzt! Ich habe mich von anderen localen inspirieren lassen habe sie aber bis auf 6 Zeilen selber geschrieben!! Ich werde sie, wenn ihr mir sagt welche quests die von zeile 300 - 900 sind, noch vervollständigen aber erstes Ziel... Website mit allen Quests zum Ansehen und einzelnen Download! Hoffe konnte euch weiterhelfen! Locale_.lua + skill_group.quest damit auch die Lehrer deutsch sind! Updatestand: 22.01.2010 Version 1: locale_.lua...



All times are GMT +1. The time now is 01:51.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.