Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 11:57

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

Advertisement



[QUEST/LUA]Function eines State´s aufrufen

Discussion on [QUEST/LUA]Function eines State´s aufrufen within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
Conrew's Avatar
 
elite*gold: 124
Join Date: Feb 2012
Posts: 302
Received Thanks: 135
[QUEST/LUA]Function eines State´s aufrufen

Guten Tag Epvp,

ich habe eine Frage die sich auf die Syntax von der Metin2 Quest Api und/oder auf die von Lua bezieht.

Hier mein Frage:

Wie kann ich eine Funktion, die in einem anderen state geschrieben steht, aus dem start state aufrufen ?

Beispiel:

Code:
state start begin
		when 99999.use begin
			say_title("Funktion aufrufen!")
			state2.func()
		end
	end
state state2 begin
               function func()
                       say_title("Erfolgreich")
               end
 end
Ich würde mich freuen wenn mir einer von euch helfen könnte.

MFG Conrew
Conrew is offline  
Old 07/03/2013, 17:12   #2


 
Benhero's Avatar
 
elite*gold: 964
Join Date: Mar 2008
Posts: 2,629
Received Thanks: 1,636
Hau die Funktion in die Questlib.lua rein dann kannst du sie überall aufrugen ohne questnamen davor..

Greatz Benhero
Benhero is offline  
Thanks
1 User
Old 07/03/2013, 17:39   #3
 
Conrew's Avatar
 
elite*gold: 124
Join Date: Feb 2012
Posts: 302
Received Thanks: 135
Quote:
Originally Posted by Benhero View Post
Hau die Funktion in die Questlib.lua rein dann kannst du sie überall aufrugen ohne questnamen davor..

Greatz Benhero
Danke Ich wollte das nicht mit der Questlib.lua machen, weil es ziemlich viele Funktionen sind^^ Aber du hast mich auf die Idee mit dem Questnamen gebracht, hatte ich schon vergessen^^

So habe ich es jetzt gemacht:
Code:
quest irgendwas begin
state start begin
		when 99999.use begin
			say_title("Funktion aufrufen!")
			irgendwas.func()
		end
	end
state state2 begin
               function func()
                       say_title("Erfolgreich")
               end
 end
end
Conrew is offline  
Reply


Similar Threads Similar Threads
Python - Über Taskbar-Button Quest aufrufen?
05/08/2013 - Metin2 Private Server - 5 Replies
Hallo, habe in der Taskbar einen neuen Button hinzugefügt. Wie bekomme ich es nun hin, dass, wenn ich auf den Button klicke, Ingame eine Quest aufgerufen wird? Spieler klickt Button -> Informations Quest wird Ingame angezeigt. Lg
[PYTHON]Function in game aufrufen?
04/23/2013 - Metin2 Private Server - 4 Replies
Hey, kann man in (metin) Python irgendwie von einer uiscript py datei aus eine Function in der game.py ausführen? Vielen Dank für jede Hilfe Das schon versucht: import game
Quest's state reset to 'start' after relog
03/15/2013 - Metin2 Private Server - 1 Replies
After i relog to game or change char or just change map my quest's states reset to start. I did this little quest for test. quest state_test begin state start begin function s_set_state() say("set state") local x = select("1", "2", "3", "4", "5", "start", "cancel") if x == 6 then return
Quest Function
03/08/2012 - CO2 Private Server - 5 Replies
I have a question for the following code posted below. I managed to add albetro's Quest functions/actions on a source based on Impulse/Hybrids work. It was a success, however there seems to be an issue when attempting to run the packet properly. When logging in I can see the quest list but they all say (Completed) as in I can't take the quests nor use a pathfinder for them. A simple solution would be helpful as I feel this works yet it doesn't. { ...
Gm Quest State edit for
08/02/2010 - Metin2 PServer Guides & Strategies - 11 Replies
I want to show you some to command change quest states Sorry but my english is worst To cancel a mission: /setqf name_status 0 See ongoing system: /gete (0 is not open, 1 is turned on) See the person did the task: /getq Then immediately load quest and tasks: /reload q, /setqf collect_quest_lv "number". Duration 0



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


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.