Register for your free account! | Forgot your password?

You last visited: Today at 22:03

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

Advertisement



quest frage

Discussion on quest frage within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2011
Posts: 2,903
Received Thanks: 1,262
quest frage

Hey Com,
Da ich auch nicht der bro in sachen LUA bin wollte ich mal was fragen

PHP Code:
quest ingame_coins begin
    state start begin
        when 30352.
use begin
            say_title
("Coins auffüller")
            
say("Coins auffüllen?")
            
local s=select("Ja""Nein")
            if 
s==2 then 
                
return 
            
end
            
if pc.count_item(item.vnum)==0 then 
                chat
("CHEATER"
                return 
            
end
            local DB_USER 
"root"
            
local DB_PASS "!!!ANPASSEN!!!"
            
local WERT 5000
            local ID 
pc.get_account_id()
            
local QUERY "UPDATE account.account SET coins = coins + "..WERT.." WHERE id = "..ID..";"
            
os.execute("mysql --host=localhost --user="..DB_USER.." --password="..DB_PASS.." --execute='"..QUERY.."'")
            
pc.remove_item(item.vnum1)
        
end
    end
end 
Und zwar das macht ja jemanden coins ist ja klar so
jezt wollte ich fragen wie ich coins abfrage zB wv coins er hat
bzw mir insgesamt mal jemand erklärt mir das mal wie man was über mysql abfragt und den wert dann auch ausgibt in say

also zb
say(" du hast 600 coins")

mfg
£αšεℜ™ is offline  
Old 03/11/2012, 16:39   #2
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
Wirst du so einfach nicht hinbekommen, dafür gibts zB die Schnittstelle von Hanashi oder meine Questliberweiterung

PHP Code:
quest ingame_coins begin 
    state start begin 
        when 30352.
use begin 
            say_title
("Coins auffüller"
            
say("Coins auffüllen?"
            
local s=select("Ja""Nein"
            if 
s==2 then  
                
return  
            
end 
            
if pc.count_item(item.vnum)==0 then  
                chat
("CHEATER")  
                return  
            
end 
            local DB_USER 
"root" 
            
local DB_PASS "!!!ANPASSEN!!!" 
            
local WERT 5000 
            local ID 
pc.get_account_id() 
            
local QUERY "UPDATE account.account SET coins = coins + "..WERT.." WHERE id = "..ID..";" 
            
os.execute("mysql --host=localhost --user="..DB_USER.." --password="..DB_PASS.." --execute='"..QUERY.."'"
            
pc.remove_item(item.vnum1
            
local q mysql_query("SELECT coins from account.account WHERE id = "..ID,DB_USER,DB_PASS,nil,"localhost")
            if 
type(q) == "string" then return end -- FEHLER
            say
("Du hast "..q.coins[1].." Coins.")
        
end 
    end 
end 
Mijago is offline  
Thanks
1 User
Old 03/11/2012, 16:42   #3
 
elite*gold: 0
Join Date: Jan 2011
Posts: 2,903
Received Thanks: 1,262
bin immer up to date bei deiner questlib
Ich wollte halt nur fragen ob mir das mal einer sagen kann wie ich das ganze einsezte mit dem mysql
£αšεℜ™ is offline  
Old 03/11/2012, 16:56   #4
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
Habe ich ja mit rein gemacht, sieh es dir mal an
Mijago is offline  
Reply


Similar Threads Similar Threads
[QUEST FRAGE ] Kill Quest
12/26/2011 - Metin2 Private Server - 5 Replies
Moin ich wollte gerade eine quest schreibe (genaueres sage ich nicht) Mit welchem Befehl kann einer Quest gesagt werden, dass der letzte Kill gespeichert werden soll bitte um schnelle rueckmeldung
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
[FRAGE]Quest befehl frage
12/24/2010 - Metin2 Private Server - 0 Replies
Moin, da ich noch ned so gut in questen bin wollte ich mal fragen wie ich den befehl ensetze: next_time_set() muss der befehl nach der handlung sein z.b. pc.give_item(vnum) next_time_set(10) und die 10 dann 10 minuten ist und ich muss dann ja vor der handlung
[Frage]GM Mode Quest/Admin ist Online quest
10/25/2010 - Metin2 Private Server - 1 Replies
Hey ich habe eine Kurze frage und zwar möchte ich lieber doppelt sicher sein und habe noch eine Quest gefunden die /admin_test flag 0 alle paar sek. schreibt und dazu auf der Letzen seite hat einer geschrieben das angezeigt wird sprich xxxx ist nun für eure Fragen und Probleme verfügbar+ diesen /event_flag test 0 cmd nur wie bzw wo füg ich das sein ich habe kein passenden Thread zu gefunden.. Dort auf der letzen seite:...



All times are GMT +2. The time now is 22:03.


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.