Register for your free account! | Forgot your password?

You last visited: Today at 11:58

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

Advertisement



[RLS] Check duel function.

Discussion on [RLS] Check duel function. within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
fcsk_aim's Avatar
 
elite*gold: 100
Join Date: Dec 2014
Posts: 93
Received Thanks: 51
#delete

At the request of a friend, I wrote a function to check duel between two players.

If you find any bugs let me to know.

Open pvp.h search for : Find(DWORD dwCRC); under add :

PHP Code:
Code:
     bool            HasDuel(LPCHARACTER pkChar);
Open pvp.cpp end of the file add:

PHP Code:
Code:
bool CPVPManager::HasDuel(LPCHARACTER pkChar) { 
    CPVPSetMap::iterator it = m_map_pkPVPSetByID.find(pkChar->GetPlayerID()); 
     
    if (it != m_map_pkPVPSetByID.end()) { 
        itertype(it->second) it2 = it->second.begin(); 
         
        while (it2 != it->second.end()) { 
            CPVP * pvp = *it2++; 
            if (pvp->IsFight()) 
                return true; 
        } 
    } 
    return false; 
}
Just a little note:
If some idiots from turkmmo or other boards repost this. Please add credits.

With this you can block red potion in a duel , horse in duel.. .. and soo on..

Original topic here.
fcsk_aim is offline  
Thanks
4 Users
Old 02/17/2016, 10:45   #2
 
elite*gold: 260
Join Date: Jan 2013
Posts: 178
Received Thanks: 104
Quote:
At the request of a friend, I wrote a function to check duel between two players.

If you find any bugs let me to know.

Open pvp.h search for : Find(DWORD dwCRC); under add :

PHP Code:
     bool            HasDuel(LPCHARACTER pkChar); 
Open pvp.cpp end of the file add:

PHP Code:
bool CPVPManager::HasDuel(LPCHARACTER pkChar) {
    
CPVPSetMap::iterator it m_map_pkPVPSetByID.find(pkChar->GetPlayerID());
    
    if (
it != m_map_pkPVPSetByID.end()) {
        
itertype(it->secondit2 it->second.begin();
        
        while (
it2 != it->second.end()) {
            
CPVP pvp = *it2++;
            if (
pvp->IsFight())
                return 
true;
        }
    }
    return 
false;


Just a little note:
If some idiots from turkmmo or other boards repost this. Please add credits.

With this you can block red potion in a duel , horse in duel.. .. and soo on..

Original topic here.
...........................
Metin2 Team is offline  
Thanks
2 Users
Old 02/17/2016, 11:38   #3
 
fcsk_aim's Avatar
 
elite*gold: 100
Join Date: Dec 2014
Posts: 93
Received Thanks: 51
Quote:
Originally Posted by Metin2 Team View Post
...........................
You are idiot?
fcsk_aim is offline  
Old 02/17/2016, 11:41   #4
 
elite*gold: 0
Join Date: Aug 2009
Posts: 1,421
Received Thanks: 1,367
Quote:
Originally Posted by fcsk_aim View Post
You are idiot?
because he filled the thread again? do not think so ...

blackout85 is offline  
Old 02/17/2016, 11:42   #5
 
fcsk_aim's Avatar
 
elite*gold: 100
Join Date: Dec 2014
Posts: 93
Received Thanks: 51
Quote:
Originally Posted by blackout85 View Post
because he filled the thread again? do not think so ...

You are idiot too ?
What's your problem ?
fcsk_aim is offline  
Old 02/17/2016, 11:55   #6
 
elite*gold: 0
Join Date: Aug 2009
Posts: 1,421
Received Thanks: 1,367
that you have deleted the thread
blackout85 is offline  
Old 02/17/2016, 13:19   #7
 
elite*gold: 0
Join Date: Mar 2013
Posts: 30
Received Thanks: 7
What is the function that i need to use on lua?..
mipuzzanoipiedi95 is offline  
Old 02/17/2016, 14:03   #8
 
fcsk_aim's Avatar
 
elite*gold: 100
Join Date: Dec 2014
Posts: 93
Received Thanks: 51
Quote:
Originally Posted by mipuzzanoipiedi95 View Post
What is the function that i need to use on lua?..
You can't use in .lua this function.
You need to use CPVPManager::instance()
fcsk_aim is offline  
Old 02/17/2016, 14:04   #9
 
elite*gold: 0
Join Date: Apr 2015
Posts: 428
Received Thanks: 361
's a function to try out if someone is in a duel with someone else.

Your script is the greatest garbage i've ever seen...
#Metho is offline  
Old 02/17/2016, 15:51   #10
 
elite*gold: 0
Join Date: Jan 2014
Posts: 268
Received Thanks: 373
Quote:
Originally Posted by Lord Metho View Post
's a function to try out if someone is in a duel with someone else.

Your script is the greatest garbage i've ever seen...
It's not even near by being garbage.... I don't know your sources but this script does it work and isn't even bad written. But nevermind, the script of xCPx is of course muuuch better

Kind Regards,
Lefloyd
Lefloyd is offline  
Old 02/17/2016, 16:37   #11
 
elite*gold: 0
Join Date: May 2012
Posts: 22
Received Thanks: 1
Quote:
Originally Posted by fcsk_aim View Post
At the request of a friend, I wrote a function to check duel between two players.

If you find any bugs let me to know.

Open pvp.h search for : Find(DWORD dwCRC); under add :

PHP Code:
Code:
     bool            HasDuel(LPCHARACTER pkChar);
Open pvp.cpp end of the file add:

PHP Code:
Code:
bool CPVPManager::HasDuel(LPCHARACTER pkChar) { 
    CPVPSetMap::iterator it = m_map_pkPVPSetByID.find(pkChar->GetPlayerID()); 
     
    if (it != m_map_pkPVPSetByID.end()) { 
        itertype(it->second) it2 = it->second.begin(); 
         
        while (it2 != it->second.end()) { 
            CPVP * pvp = *it2++; 
            if (pvp->IsFight()) 
                return true; 
        } 
    } 
    return false; 
}
Just a little note:
If some idiots from turkmmo or other boards repost this. Please add credits.

With this you can block red potion in a duel , horse in duel.. .. and soo on..

Original topic here.
على شحم ترجمها لو انك بطل
propc is offline  
Old 02/17/2016, 16:45   #12
 
elite*gold: 0
Join Date: Apr 2015
Posts: 428
Received Thanks: 361
Quote:
Originally Posted by propc View Post
على شحم ترجمها لو انك بطل
استخدام الترجمة جوجل!

@Lefloyd Naja ich sag' mal nix, er meint's gut... von dem her will ich mal nicht so sein und gebe ihm ein Thanks für die Arbeit; hätte xCPx das gemacht, hätte ich ihn grün und blau geschlagen :3
#Metho is offline  
Old 02/17/2016, 16:52   #13
 
fcsk_aim's Avatar
 
elite*gold: 100
Join Date: Dec 2014
Posts: 93
Received Thanks: 51
Quote:
Originally Posted by Lord Metho View Post
استخدام الترجمة جوجل!

@Lefloyd Naja ich sag' mal nix, er meint's gut... von dem her will ich mal nicht so sein und gebe ihm ein Thanks für die Arbeit; hätte xCPx das gemacht, hätte ich ihn grün und blau geschlagen :3
He just open a .txt and copy/paste.
fcsk_aim is offline  
Thanks
1 User
Old 02/17/2016, 23:21   #14
 
elite*gold: 0
Join Date: Dec 2013
Posts: 14
Received Thanks: 3
PHP Code:
LPCHARACTER ch quest::CQuestManager::instance().GetCurrentCharacterPtr();
if (
CPVPManager::instance().HasDuel(ch->GetName()))
{
    return 
false;
    

er meckert das ich die funktion falsch aufrufe ?
AnalyzeTM is offline  
Old 02/18/2016, 03:21   #15
 
elite*gold: 0
Join Date: Aug 2009
Posts: 1,421
Received Thanks: 1,367
HasDuel(ch->GetName()) -> HasDuel(ch)

du musst den LPCHARACTER übergeben nicht den Namen
blackout85 is offline  
Reply


Similar Threads Similar Threads
[Request]Client function check if inventory full..
12/29/2014 - Metin2 Private Server - 0 Replies
Hello dear comunity, How you can see in the subject i`m interested on makeing a function that checks if inventory is full ..Im using Daroo 2013 client,python 22. Until now i tyed this but dosn`t work for Slot in xrange(player.INVENTORY_PAGE_SIZE*2): ItemValue = player.GetItemIndex(Slot) if ItemValue > 0: chat.AppendChat(chat.CHAT_TYPE_INFO, "Inventory FULLL!") return How it would be correct? :handsdown:
Game Check Client Version Function + DIF [Like Pong]
05/07/2014 - Metin2 PServer Guides & Strategies - 47 Replies
Hello community. What is this function? This function allows to notify update your client. All new binaries no longer using pong. Just using this finger print instead. When client version(.exe) not equal with game file client version, game automatically will kick player with a notice. (In 10 Second.) I think this function is more useful than pong. So, if you encrypt good your client you can use this like pong...
[LUA-FUNCTION] Check coordinate on a map.
03/15/2013 - Metin2 PServer Guides & Strategies - 22 Replies
Hello community. Here is original thread ( just prototype ): Check Range - Controllo Coordinate - Inforge.net With this LUA function you can check your player coordinates. Add this function to questlib.lua



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


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.