|
You last visited: Today at 19:47
Advertisement
[RELEASE] [C++] pet.is_mine-Questfunction
Discussion on [RELEASE] [C++] pet.is_mine-Questfunction within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
11/07/2015, 11:17
|
#1
|
elite*gold: 222
Join Date: Oct 2012
Posts: 2,369
Received Thanks: 3,390
|
[RELEASE] [C++] pet.is_mine-Questfunction
Funktion:
Gibt zurück, ob du der Besitzer des Pets bist.
Benutzungs-Beispiel:
Code:
when 34001.click with pet.is_mine() begin
Code: (questlua_pet.cpp)
Code:
int pet_is_mine(lua_State* L)
{
CQuestManager& q = CQuestManager::instance();
LPCHARACTER mch = q.GetCurrentCharacterPtr();
LPCHARACTER tch = q.GetCurrentNPCCharacterPtr();
CPetSystem* petSystem = mch->GetPetSystem();
CPetActor* petActor = petSystem->GetByVID(tch->GetVID());
lua_pushboolean(L, tch && tch->IsPet() && petActor && petActor->GetOwner() == mch);
return 1;
}
|
|
|
11/07/2015, 11:23
|
#2
|
elite*gold: 101
Join Date: Mar 2013
Posts: 13,366
Received Thanks: 2,748
|
Metin2 PServer Designs, Websites & Scripts -> Metin2 PServer Gu…
#moved…
|
|
|
11/07/2015, 12:32
|
#3
|
elite*gold: 260
Join Date: Jan 2013
Posts: 178
Received Thanks: 104
|
thanks for that.
I think that you forgot to add this line.
Code:
CPetSystem* petSystem = mch->GetPetSystem();
|
|
|
11/07/2015, 12:34
|
#4
|
elite*gold: 222
Join Date: Oct 2012
Posts: 2,369
Received Thanks: 3,390
|
Quote:
Originally Posted by Metin2 Team
thanks for that.
I think that you forgot to add this line.
Code:
CPetSystem* petSystem = mch->GetPetSystem();
|
ofc  Added, thank you
|
|
|
11/07/2015, 12:39
|
#5
|
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
|
Quote:
Originally Posted by Mr. 'Avenue™
Code:
int pet_is_mine(lua_State* L)
{
CQuestManager& q = CQuestManager::instance();
LPCHARACTER mch = q.GetCurrentCharacterPtr();
LPCHARACTER tch = q.GetCurrentNPCCharacterPtr();
CPetSystem* petSystem = mch->GetPetSystem();
CPetActor* petActor = petSystem->GetByVID(tch->GetVID());
lua_pushboolean(L, tch && tch->IsPet() && petActor && petActor->GetOwner() == mch);
return 1;
}
ofc  Added, thank you
|
If you don't use the variable afterwards, what's the point of adding it?
|
|
|
11/07/2015, 13:28
|
#6
|
elite*gold: 222
Join Date: Oct 2012
Posts: 2,369
Received Thanks: 3,390
|
Quote:
Originally Posted by Mi4uric3
If you don't use the variable afterwards, what's the point of adding it?
|
Es wird doch alles benutzt?
|
|
|
11/07/2015, 14:03
|
#7
|
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
|
Quote:
Originally Posted by Mr. 'Avenue™
Es wird doch alles benutzt? 
|
Ich bin blind. Strg+F hätte vielleicht geholfen
|
|
|
11/07/2015, 14:18
|
#8
|
elite*gold: 1860
Join Date: Jan 2012
Posts: 2,209
Received Thanks: 1,630
|
Nice hätte ich früher gebraucht, aber jetzt ist es zu spät
|
|
|
 |
Similar Threads
|
[R] Questfunction Collection / Extension
02/24/2014 - Metin2 PServer Guides & Strategies - 3 Replies
#closerequest
|
Questfunction
12/20/2013 - Metin2 Private Server - 7 Replies
Hey ich suche gerade ein How to, ich weiß nicht mehr von wem, auf jedenfall ging es darum das er neue Quest functionen hatte, mit denen man auslesen konnte, ob man z.B, eine Waffe, Helm, Kette, usw... an hat.
Suche schon den ganzen morgen, hat vieleicht einer grad den Link?
|
Erweiterte Questfunction
12/15/2013 - Metin2 Private Server - 4 Replies
Moin
Gibt es eine function, mit der man den job(also die Rasse) ändern kann z.B. von Krieger auf Ninja???
|
Questfunction
07/26/2012 - Metin2 Private Server - 6 Replies
Hi community,
I hope that someone can help me...
I'd like to use quest_function 'game.drop_item_with_ownership', but i haven't one part for this function and that's for questlib.lua..
Have someone this part?
Thanks for every help and every advice..
Skurto
|
Wie funktioniert die questfunction?
10/23/2011 - Metin2 Private Server - 0 Replies
Heyho an alle,
Ich habe da ne frage zu einem quest befehl,wo ich es nicht schafe,sie richtig auszuführen.Ich habe schon einiges probiert,getestet aber ohne erfolg.
Meine frage ist nun wie führe ich den quest befehl ordnungsgemäß aus?
__give_char_priv
So wie ich ich gelesen hab,soll dieser befehl einem character etwas geben z.b wie exp,yang usw usw.
|
All times are GMT +1. The time now is 19:49.
|
|