Register for your free account! | Forgot your password?

You last visited: Today at 18:18

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

Advertisement



pc.is_trade0 [CPP]

Discussion on pc.is_trade0 [CPP] within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Closed Thread
 
Old   #1
 
I'm Kaito!'s Avatar
 
elite*gold: 5
Join Date: Aug 2015
Posts: 151
Received Thanks: 91
pc.is_trade0 [CPP]

Ich möchte heute eine Questfunktion releasen die abfragt ob der Spieler gerade handelt, wenn nicht -> false wenn doch -> true.

I'm Kaito! is offline  
Thanks
1 User
Old 08/17/2015, 08:25   #2

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Nützlich, allerdings müsste man an der Stelle nicht erst den aktuellen character in ch ablegen.

Code:
int pc_is_trade0(lua_State* L)
	{
		lua_pushboolean(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetExchange()!=NULL);
		return 1;
	}
rollback is offline  
Old 08/17/2015, 08:36   #3
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
WTf , it's marty function from his source
MrLibya is offline  
Thanks
5 Users
Old 08/17/2015, 10:41   #4
 
.Risan.'s Avatar
 
elite*gold: 30
Join Date: Jul 2010
Posts: 1,627
Received Thanks: 1,450
Das ist besser!
That is better!

PHP Code:
    int pc_is_trade0(lua_StateL)
    {
        
LPCHARACTER ch CQuestManager::instance().GetCurrentCharacterPtr();
        
        if (!
ch)
        {
            
sys_err("pc_is_trade0 FATALL ERROR : No Character Answer!");
            
lua_pushboolean(LFalse);
            return 
1;
        }
        
lua_pushboolean(Lch->GetExchange()!=NULL);
        return 
1;
    } 
.Risan. is offline  
Thanks
6 Users
Old 08/17/2015, 10:44   #5

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Quote:
Originally Posted by .Risan. View Post
Das ist besser!
That is better!

PHP Code:
    int pc_is_trade0(lua_StateL)
    {
        
LPCHARACTER ch CQuestManager::instance().GetCurrentCharacterPtr();
        
        if (!
ch)
        {
            
sys_err("pc_is_trade0 FATALL ERROR : No Character Answer!");
            
lua_pushboolean(LFalse);
            return 
1;
        }
        
lua_pushboolean(Lch->GetExchange()!=NULL);
        return 
1;
    } 
Beim Fehler würde nil eher passen, weil das in Lua bei jeglichen Fehlern zurückgegeben wird. Ansonsten sieht das schon deutlich besser aus
rollback is offline  
Thanks
1 User
Old 08/17/2015, 14:14   #6
 
BizepsSupportAccount's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 1,015
Received Thanks: 498
Quote:
Originally Posted by I'm Kaito! View Post
Ich möchte heute eine Questfunktion releasen die abfragt ob der Spieler gerade handelt, wenn nicht -> false wenn doch -> true.

Hast du nicht gelernt eigene Sachen zu releasen?

Was erhoffst du dir durch diesem Release, dass die Leute denken du kannst C++ ?
BizepsSupportAccount is offline  
Thanks
1 User
Old 08/17/2015, 14:35   #7

 
elite*gold: 1
Join Date: Apr 2014
Posts: 586
Received Thanks: 144
egal wie es ist, es wurde jetzt released und ausserdem haben hier ja auch genug leute "ihre" varriante released.
~> Thalion ッ <~ is offline  
Old 08/17/2015, 16:24   #8


 
Nectix's Avatar
 
elite*gold: 26
The Black Market: 135/0/0
Join Date: Apr 2012
Posts: 23,018
Received Thanks: 3,060
Quote:
Originally Posted by MrLibya View Post
WTf , it's marty function from his source
Hätte gern ein Statement diesbezüglich.
Bis dahin ist hier zu.

#closed
Nectix is offline  
Thanks
1 User
Closed Thread




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


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.