Register for your free account! | Forgot your password?

You last visited: Today at 07:27

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

Advertisement



[Sammelthread]40k function wishes

Discussion on [Sammelthread]40k function wishes within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Closed Thread
 
Old 01/13/2014, 21:26   #31
 
.Inya's Avatar
 
elite*gold: 50
Join Date: Mar 2013
Posts: 2,401
Received Thanks: 1,613
I need more Ideas :P

Add me at skype for more private ideas (if you dont want me to release them)
.Inya is offline  
Old 01/13/2014, 21:27   #32
 
Sphinx²'s Avatar
 
elite*gold: 1918
Join Date: Feb 2008
Posts: 1,368
Received Thanks: 1,287
PHP Code:
       // misc.myqsl_update_query(string) - 'returns 0 for failed and 1 for successfull'
       
int misc_mysql_update_query(lua_StateL) {
        
char szQuery[1024];
        const 
char query lua_tostring(L1);
        
snprintf(szQuerysizeof(szQuery), "%s",query);
        
SQLMsg msg DBManager::instance().DirectQuery(szQuery);
        if(
msg) {
            
lua_pushnumber(L,1);
        } else {
            
sys_err("MySQL Query failed!");
            
lua_pushnumber(L,0);
        }
        
M2_DELETE(msg);
        return 
1;
    }

        
// misc.myqsl_query(string) - 'returns a lua mysql table'
    
int misc_mysql_query(lua_StateL) {
        
int i=0;
        
//MYSQL_FIELD *field;
        //MYSQL_ROW row;
        
char szQuery[1024];
        const 
char query lua_tostring(L1);
        
unsigned long long int num 0;
        
snprintf(szQuerysizeof(szQuery), "%s",query);
        
        
SQLMsg msg DBManager::instance().DirectQuery(szQuery);
        if(
msg) {
            
std::auto_ptr<SQLMsgpmsg(msg);
            
lua_newtable(L);
            while(
MYSQL_ROW row mysql_fetch_row(pmsg->Get()->pSQLResult)) {
                while(
MYSQL_FIELD field = (MYSQL_FIELD*)mysql_fetch_field(pmsg->Get()->pSQLResult) ) {
                    
lua_pushstring(L,field->name);
                    if (
sscanf(row[i],"%llu", &num)) 
                        
lua_pushnumber(Lnum 1.0);
                    else 
                        
lua_pushstring(L,row[i]);
                    
lua_rawset(L, -3);
                    
i++;            
                }
            }
            return 
1;
        } else {
            
sys_err("MySQL Query failed!");
            
lua_pushnumber(L,0);
        }
        return 
0;
    }

        
// misc.myqsl_real_escape_string(string) - 'returns an escaped string'
    
int misc_mysql_real_escape_string(lua_StateL) {
        
charcescapedstring = new char[strlen(lua_tostring(L,1)) * 1];
        
DBManager::instance().EscapeString(cescapedstring,strlen(lua_tostring(L,1))*2+1,lua_tostring(L,1),strlen(lua_tostring(L,1)));
        
lua_pushstring(L,cescapedstring);
        return 
1;
    } 
PHP Code:
        luaL_reg misc_functions[] = 
        {
            {
"mysql_real_escape_string"misc_mysql_real_escape_string},
            {
"mysql_query"misc_mysql_query},
            {
"mysql_update_query"misc_mysql_update_query},
            {
NULLNULL}
        };

        
CQuestManager::instance().AddLuaFunctionTable("misc"misc_functions); 
// Ihr braucht eine neue LUA Function Table namens misc.
// 1. Option - Einfach normale Quest Funktionen adden
// 2. Neue CPP Datei 'questlua_misc.cpp'
Sphinx² is offline  
Thanks
3 Users
Old 01/13/2014, 22:11   #33
 
Dexam™'s Avatar
 
elite*gold: 0
Join Date: Apr 2012
Posts: 165
Received Thanks: 206
Quote:
Originally Posted by .InyaProduction View Post
Du meinst, dass er dann die animation ausführt?
ja genau, dass man die animation sozusagen festlegen kann.
Dexam™ is offline  
Old 01/14/2014, 00:46   #34
 
Sphinx²'s Avatar
 
elite*gold: 1918
Join Date: Feb 2008
Posts: 1,368
Received Thanks: 1,287
Quote:
Originally Posted by Dexam™ View Post
ja genau, dass man die animation sozusagen festlegen kann.
PHP Code:
        // Not tested
        // npc.motion(byte)
    
int npc_motion(lua_StateL) {
        if (!
lua_isnumber(L1))
        {
            
sys_err("QUEST : wrong argument");
            return 
0;
        }
        
        
CQuestManagerCQuestManager::instance();
        
LPCHARACTER npc q.GetCurrentNPCCharacterPtr();
        if (
npc && npc->IsPC()) {
            
BYTE motionid lua_tonumber(L1);
            
npc->Motion(motionid);
            
lua_pushboolean(L1);
        } else {
            
lua_pushboolean(L0);
        }
        return 
1;
    } 
PHP Code:
 "motion",            npc_motion            }, 
Ich habe es nicht getestet.
Sphinx² is offline  
Thanks
2 Users
Old 01/14/2014, 09:39   #35
 
.Inya's Avatar
 
elite*gold: 50
Join Date: Mar 2013
Posts: 2,401
Received Thanks: 1,613
Quote:
Originally Posted by Sphinx² View Post
PHP Code:
        // Not tested
        // npc.motion(byte)
    
int npc_motion(lua_StateL) {
        if (!
lua_isnumber(L1))
        {
            
sys_err("QUEST : wrong argument");
            return 
0;
        }
        
        
CQuestManagerCQuestManager::instance();
        
LPCHARACTER npc q.GetCurrentNPCCharacterPtr();
        if (
npc && npc->IsPC()) {
            
BYTE motionid lua_tonumber(L1);
            
npc->Motion(motionid);
            
lua_pushboolean(L1);
        } else {
            
lua_pushboolean(L0);
        }
        return 
1;
    } 
PHP Code:
 "motion",            npc_motion            }, 
Ich habe es nicht getestet.
#added
.Inya is offline  
Old 01/14/2014, 13:11   #36
 
elite*gold: 0
Join Date: Sep 2012
Posts: 66
Received Thanks: 25
Maybe a Questfunction to get the result of a duel?

pc.get_duel_result()

Dont know if it work without some input like EnemyID or something
Sujino is offline  
Old 01/14/2014, 13:39   #37
 
elite*gold: 200
Join Date: Apr 2012
Posts: 577
Received Thanks: 290
Diese Sektion muss sterben bevor das weitergeht^^
MartPwnS is offline  
Old 01/14/2014, 13:45   #38
 
.Inya's Avatar
 
elite*gold: 50
Join Date: Mar 2013
Posts: 2,401
Received Thanks: 1,613
Quote:
Originally Posted by MartPwnS View Post
Diese Sektion muss sterben bevor das weitergeht^^
Und selber im Hintergrund an der Source arbeiten stimmts? Diese Sektion hat sich keineswegs aufgrund der Source verschlimmert (bis jetzt) es gab diese Paar Tage Aufruhr beim Release und gut ist. Nehmen wir die Situation wie sie momentan ist.
Was ich für einen Zusammenbruch halte ist die Situation, in der die ersten Kiddys rausfinden, wie man die Exe compiled und Viren einbauen. Dann ist die Sektion dem Untergang geweiht. Trotzdem arbeite ich an dem von mir angekündigten Projekt weil mittlerweile ist hier echt.. naja ich sprechs nicht aus. Liegt aber nicht an der Source
.Inya is offline  
Thanks
1 User
Old 01/14/2014, 13:58   #39
 
elite*gold: 0
Join Date: Aug 2013
Posts: 12
Received Thanks: 21
Quote:
Originally Posted by .InyaProduction View Post
Was ich für einen Zusammenbruch halte ist die Situation, in der die ersten Kiddys rausfinden, wie man die Exe compiled [...]
Coole Idee. Gleich mal ein Tutorial anfertigen
.N0N4M3. is offline  
Old 01/14/2014, 14:00   #40
 
.Inya's Avatar
 
elite*gold: 50
Join Date: Mar 2013
Posts: 2,401
Received Thanks: 1,613
Quote:
Originally Posted by .N0N4M3. View Post
Coole Idee. Gleich mal ein Tutorial anfertigen
Mach doch dann müssen sie erst nochmal rausfinden wie man nen Virus anfertigt und den in den clienten bekommt ohne dass der Virenscanner den in stücke reißt
.Inya is offline  
Old 01/14/2014, 14:08   #41
 
lollo_9_1's Avatar
 
elite*gold: 100
Join Date: Jun 2009
Posts: 168
Received Thanks: 711
Quote:
Originally Posted by Sphinx² View Post
Code:
					if (sscanf(row[i],"%llu", &num))
Bugs are coming -> Everything that begins with a digit will turn into a number 127.0.0.1 -> "127" || "4all" -> "4"
lollo_9_1 is offline  
Old 01/14/2014, 14:21   #42
 
lolor2's Avatar
 
elite*gold: 135
Join Date: Oct 2007
Posts: 1,088
Received Thanks: 210
Quote:
Originally Posted by .InyaProduction View Post
Und selber im Hintergrund an der Source arbeiten stimmts? Diese Sektion hat sich keineswegs aufgrund der Source verschlimmert (bis jetzt) es gab diese Paar Tage Aufruhr beim Release und gut ist. Nehmen wir die Situation wie sie momentan ist.
Was ich für einen Zusammenbruch halte ist die Situation, in der die ersten Kiddys rausfinden, wie man die Exe compiled und Viren einbauen. Dann ist die Sektion dem Untergang geweiht. Trotzdem arbeite ich an dem von mir angekündigten Projekt weil mittlerweile ist hier echt.. naja ich sprechs nicht aus. Liegt aber nicht an der Source
Ich glaube sogar das sie sich noch mehr zusammengeschweißt hat zumindest ist es ja bei uns so stimmts?
viele Menschen viele Länder und dennoch keine Streitereien so wie wir es mögen
lolor2 is offline  
Old 01/14/2014, 14:29   #43
 
.Inya's Avatar
 
elite*gold: 50
Join Date: Mar 2013
Posts: 2,401
Received Thanks: 1,613
Quote:
Originally Posted by lolor2 View Post
Ich glaube sogar das sie sich noch mehr zusammengeschweißt hat zumindest ist es ja bei uns so stimmts?
viele Menschen viele Länder und dennoch keine Streitereien so wie wir es mögen
Joa die truppe ist schon ganz lustig :P vorallem kann ich da gleich mal mein Englisch ein wenig auffrischen ^-^ Und endlich mal keiner dabei der sich beschwert wenn man sich in der gruppe übers coden unterhält weil er nix versteht xD
.Inya is offline  
Old 01/14/2014, 16:01   #44
 
Sphinx²'s Avatar
 
elite*gold: 1918
Join Date: Feb 2008
Posts: 1,368
Received Thanks: 1,287
Quote:
Originally Posted by lollo_9_1 View Post
Bugs are coming -> Everything that begins with a digit will turn into a number 127.0.0.1 -> "127" || "4all" -> "4"
Uhm... I will test it.
If its true I will rewrite it.
Sphinx² is offline  
Thanks
1 User
Old 01/14/2014, 16:16   #45
 
elite*gold: 200
Join Date: Apr 2012
Posts: 577
Received Thanks: 290
könnt ihr ja gerne machen, aber ein forum wie epvp ist da einfach der falsche Platz, soll jetzt keine Fremdwerbung sein, aber sucht euch doch ein privates Forum, dass euch im Problemfall nichts passieren kann
MartPwnS is offline  
Closed Thread


Similar Threads Similar Threads
Running Function 2 after Function 1 finished
09/15/2013 - AutoIt - 3 Replies
Hey, its me again. Im stuck on a problem since yesterday and as much as i hate to ask for help, i really dont know what else to try. I want Function 2 to run after Function 1 has finished. I tried GuiCtrlSetOnEvent and MsgLoop, but i dont really understand it. I tried to read tutorials but they didnt help at all. The line that are underline is what im talking about. I want gamestart() to run first and when its finished, i want iniviteteam() to run. #AutoIt3Wrapper_UseX64=n...
90 cap with ur wishes
07/10/2013 - SRO Private Server - 14 Replies
hey epvp community i detected to open an 90 cap server so you can write here should it old school ? only chin? or both races .. with costum edits or not tell me all ur wishes for the perfekt 90 cap server :) we will open the server when we got 50 player MAX THEY WANT TO play on it
[SAMMELTHREAD]Function
03/25/2013 - Metin2 PServer Guides & Strategies - 14 Replies
Functions ; function IsString(txt) if(txt == "") then return elseif(tostring(txt) != nil) then return 1 else return 0 end end
[Sammelthread]Pserver Tabels/Function und ihre Funktionen
02/15/2013 - 4Story - 4 Replies
Da viele Anfragen nach den und den Funktionen von Tabellen und Functions gibt hab ich mal ein Sammelthread aufgemacht Bitte keine Fragen hier /Please No Questions here Ich fang mal an TCASHTESTTABLE: um Leuten Cash zu geben TACCOUNT: Liste der Accounts TCHARTABLE(in TGLOBAL) Zuständig für die Anzeige der Accounts bei der Server Übersicht TCHARTABLE(in TGAME)



All times are GMT +1. The time now is 07:27.


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.