Register for your free account! | Forgot your password?

You last visited: Today at 03:38

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

Advertisement



Quest - Sleep

Discussion on Quest - Sleep within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1


 
elite*gold: 1810
Join Date: Jan 2012
Posts: 2,208
Received Thanks: 1,630
Quest - Sleep

Moin,

ich möchte gerne eine Quest machen, die am Anfang solange wartet, bis man mehr als 0 TP hat, bis sie fortfährt. Wenn ich eine While Do Schleife mache, kackt der Server sofort ab, weil permanent Anfragen gesendet werden ohne Sleep. Könnte man jetzt so ein Sleep irgendwie einbauen bzw. gibt es sowas?

Also ich habe eine Func gefunden, aber wenn da ein sleep aktiv ist, pausiert nicht nur die Quest, sondern der ganze Server O.o.

Das wäre die Funktion:
PHP Code:
function delay_s(delay)
   
delay delay or 1
   local time_to 
os.time() + delay
   
while os.time() < time_to do end
end

In der Quest
delay_s() 
Ich hoffe, ihr könnt mir weiterhelfen.
MaxChri is offline  
Old 06/10/2015, 17:47   #2

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Manchmal ist es viel einfacher als man denkt ...

Code:
when login begin
	loop_timer("timer1", 1)
end
when timer1.timer with pc.get_hp() > 0 begin
	cleartimer("timer1")
	--[wenn der Spieler mehr als 0 HP hat]
end
rollback is offline  
Thanks
2 Users
Old 06/10/2015, 17:59   #3


 
elite*gold: 1810
Join Date: Jan 2012
Posts: 2,208
Received Thanks: 1,630
Quote:
Originally Posted by It's me, 1093 View Post
Manchmal ist es viel einfacher als man denkt ...

Code:
when login begin
	loop_timer("timer1", 1)
end
when timer1.timer with pc.get_hp() > 0 begin
	cleartimer("timer1")
	--[wenn der Spieler mehr als 0 HP hat]
end
Dankeschön Sorry kannte cleartimer noch nicht.
MaxChri is offline  
Reply


Similar Threads Similar Threads
[ClownSro] Cap 110 |New System| New Quest| Free 1 Million silk |New Title Quest|
11/01/2014 - SRO PServer Advertising - 6 Replies
http://www11.0zz0.com/2014/07/13/02/812260850.png | Welcome to CLownSro • Pve Server • Fair Gameplay | Opening: 13-07-2014 Time: 18:00 ~ 20:00 +1 GMT CLown Website Facebook Page http://www13.0zz0.com/2014/07/13/02/148368929.png Server Features
[SPECIAL TEAM_WARP QUEST]'nd Metin2 Sweet Time Quest's Icons and News
01/27/2013 - Metin2 PServer Guides & Strategies - 22 Replies
deleted!
Compile all quest without quest's files list // Kompilieren Sie alle Quest ohne Quest
07/17/2011 - Metin2 PServer Guides & Strategies - 3 Replies
ENGLISH Hello dear community, this is a very simple guide but at the same time useful. How to compile ALL quest in the folder "quest" without the files list in the file "locale_list"? Easy! Open the file "make" and replace the content of the file with this: for f in *.quest; do ./qc $f; done Oki. Now set the 0777 permission to the file. Finally open a SSH client and sign in. Write the command: cd /game_file_folder



All times are GMT +1. The time now is 03:39.


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