Register for your free account! | Forgot your password?

You last visited: Today at 16:02

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

Advertisement



[source]Full PetSystem

Discussion on [source]Full PetSystem within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Closed Thread
 
Old   #1
 
balika01's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 179
Received Thanks: 350
[source]Full PetSystem

#closed because lot of people sent me "please help", "how to add to game"....
balika01 is offline  
Thanks
2 Users
Old 08/11/2012, 11:13   #2
 
[The]Domco's Avatar
 
elite*gold: 45
Join Date: Mar 2011
Posts: 253
Received Thanks: 239
Okay, but how i can add this function to the game file ?
[The]Domco is offline  
Thanks
1 User
Old 08/11/2012, 11:26   #3
 
akupowa's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 70
Received Thanks: 75
Quote:
Originally Posted by balika01 View Post
Hello everybody!

Here the source:
Code:
int __fastcall quest__pet_summon(int a1)
{
	//- get datas from lua -- read vnum and name
	int mobvnum = lua_tonumber(a1, 1);
	const char* mobname = lua_tostring(a1, 2);
	//- get character position
	int spawn_mapindex = *(_DWORD *)(a1 + 220 + 32)/*character_mapindex*/;
	int spawn_x = *(_DWORD *)(a1 + 220 + 48)/*character_x_on_map*/ + number_ex(-20, 20, (int)"pets", 10)/*random number*/;
	int spawn_y = *(_DWORD *)(a1 + 220 + 52)/*character_y_on_map*/ + number_ex(-20, 20, (int)"pets", 10)/*random number*/;
	int spawn_z = *(_DWORD *)(a1 + 220 + 56)/*character_z_on_map*/;
	int spawn_rotate = *(_DWORD *)(a1 + 220 + 2344) + 180.0/*character_rotate_on_map*/;
	//- create mob
	int mobid = CHARACTER_MANAGER__SpawnMob(0,mobvnum,spawn_mapindex,spawn_x,spawn_y,spawn_z,0,spawn_rotate,0);
	//- set mob name
	std__string__assign(0, 0, mobid + 260, (int)mobname, strlen(mobname));
	//- show mob
	if (!CHARACTER__Show(mobid,spawn_mapindex,spawn_x,spawn_y,spawn_z,0))
	{
	//- if not showed the mob:
		//- remove mob
		CHARACTER_MANAGER__DestroyCharacter(a1, 0, singleton_CHARACTER_MANAGER___ms_singleton, mobid);
		//- send error to syserr
		sys_err((int)"PetSummon", 192, "cannot show monster", 137591780);
		//- return 0 -- exit func
		return 0;
	}
	//- attach mob to character
	CHARACTER__SetRider(a1, 0, mobid, a1 + 220);
	//- return whit spawned mob id (id of the mob on map)
	lua_pushnumber(a1, mobid);
	return 1;
}

int __fastcall quest__pet_unsummon(int a1)
{
	//- get datas from lua -- read spawned mob id (id of the mob on map)
	int mobid = lua_tonumber(a1, 1);
	//- return if mobid is 0 -- exit func
	if ( !mobid ) return 0;
	//- deattach mob from character
	CHARACTER__SetRider(a1, 0, mobid, 0);
	//- remove mob
	CHARACTER_MANAGER__DestroyCharacter(a1, 0, singleton_CHARACTER_MANAGER___ms_singleton, mobid);
	// return -- end of func
	return 0;
}
is it from the new game file?
akupowa is offline  
Old 08/11/2012, 11:43   #4
 
XxxGaGaxxX's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 1,469
Received Thanks: 957
Quote:
Originally Posted by balika01 View Post
#closed because lot of people sent me "please help", "how to add to game"....
Why you don't help them then?^^

Let me guess, you've just copied this Source from another Forum and post it here, but you don't know how to add it yourself...
XxxGaGaxxX is offline  
Thanks
1 User
Old 08/11/2012, 11:51   #5
 
[The]Domco's Avatar
 
elite*gold: 45
Join Date: Mar 2011
Posts: 253
Received Thanks: 239
Eh .. I Only know ho to edit old functions but i dont know how to add new so -.-
[The]Domco is offline  
Old 08/11/2012, 13:23   #6
 
elite*gold: 0
Join Date: Nov 2009
Posts: 53
Received Thanks: 5
Quote:
Originally Posted by Creator7111 View Post
Eh .. I Only know ho to edit old functions but i dont know how to add new so -.-
Maybe you have to add it to the pseudocode and recompile it...
xKri is offline  
Old 08/11/2012, 13:27   #7
 
[The]Domco's Avatar
 
elite*gold: 45
Join Date: Mar 2011
Posts: 253
Received Thanks: 239
Quote:
Originally Posted by xKri View Post
Maybe you have to add it to the pseudocode and recompile it...
How ?
[The]Domco is offline  
Old 08/11/2012, 13:28   #8

 
elite*gold: 1
Join Date: Jan 2009
Posts: 3,037
Received Thanks: 2,361
Quote:
Originally Posted by Creator7111 View Post
Eh .. I Only know ho to edit old functions but i dont know how to add new so -.-
i think it should be the same as you will add a new function in the client.
NiiceOne is offline  
Old 08/11/2012, 13:31   #9
 
Pаylasici's Avatar
 
elite*gold: 99
Join Date: Aug 2009
Posts: 4,296
Received Thanks: 5,092
Quote:
Originally Posted by balika01 View Post
#closed because lot of people sent me "please help", "how to add to game"....
PHP Code:
int __fastcall quest__pet_summon(int a1)
{
    
//- get datas from lua -- read vnum and name
    
int mobvnum lua_tonumber(a11);
    const 
charmobname lua_tostring(a12);
    
//- get character position
    
int spawn_mapindex = *(_DWORD *)(a1 220 32)/*character_mapindex*/;
    
int spawn_x = *(_DWORD *)(a1 220 48)/*character_x_on_map*/ number_ex(-2020, (int)"pets"10)/*random number*/;
    
int spawn_y = *(_DWORD *)(a1 220 52)/*character_y_on_map*/ number_ex(-2020, (int)"pets"10)/*random number*/;
    
int spawn_z = *(_DWORD *)(a1 220 56)/*character_z_on_map*/;
    
int spawn_rotate = *(_DWORD *)(a1 220 2344) + 180.0/*character_rotate_on_map*/;
    
//- create mob
    
int mobid CHARACTER_MANAGER__SpawnMob(0,mobvnum,spawn_mapindex,spawn_x,spawn_y,spawn_z,0,spawn_rotate,0);
    
//- set mob name
    
std__string__assign(00mobid 260, (int)mobnamestrlen(mobname));
    
//- show mob
    
if (!CHARACTER__Show(mobid,spawn_mapindex,spawn_x,spawn_y,spawn_z,0))
    {
    
//- if not showed the mob:
        //- remove mob
        
CHARACTER_MANAGER__DestroyCharacter(a10singleton_CHARACTER_MANAGER___ms_singletonmobid);
        
//- send error to syserr
        
sys_err((int)"PetSummon"192"cannot show monster"137591780);
        
//- return 0 -- exit func
        
return 0;
    }
    
//- attach mob to character
    
CHARACTER__SetRider(a10mobida1 220);
    
//- return whit spawned mob id (id of the mob on map)
    
lua_pushnumber(a1mobid);
    return 
1;
}

int __fastcall quest__pet_unsummon(int a1)
{
    
//- get datas from lua -- read spawned mob id (id of the mob on map)
    
int mobid lua_tonumber(a11);
    
//- return if mobid is 0 -- exit func
    
if ( !mobid ) return 0;
    
//- deattach mob from character
    
CHARACTER__SetRider(a10mobid0);
    
//- remove mob
    
CHARACTER_MANAGER__DestroyCharacter(a10singleton_CHARACTER_MANAGER___ms_singletonmobid);
    
// return -- end of func
    
return 0;

Pаylasici is offline  
Thanks
7 Users
Old 08/11/2012, 13:52   #10
 
elite*gold: 0
Join Date: Nov 2009
Posts: 53
Received Thanks: 5
Quote:
Originally Posted by Creator7111 View Post
How ?
You can get the pseudocode of the gamefile by IDA disassembler.
Then add the code of pet system (i don't know where) in the source and recompile it on freebsd.



I'm not sure that it's the correct way, but I'll try
xKri is offline  
Old 08/11/2012, 13:54   #11
 
XxxGaGaxxX's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 1,469
Received Thanks: 957
Quote:
Originally Posted by killerblümchen1999 View Post
PHP Code:
int __fastcall quest__pet_summon(int a1)
{
    
//- get datas from lua -- read vnum and name
    
int mobvnum lua_tonumber(a11);
    const 
charmobname lua_tostring(a12);
    
//- get character position
    
int spawn_mapindex = *(_DWORD *)(a1 220 32)/*character_mapindex*/;
    
int spawn_x = *(_DWORD *)(a1 220 48)/*character_x_on_map*/ number_ex(-2020, (int)"pets"10)/*random number*/;
    
int spawn_y = *(_DWORD *)(a1 220 52)/*character_y_on_map*/ number_ex(-2020, (int)"pets"10)/*random number*/;
    
int spawn_z = *(_DWORD *)(a1 220 56)/*character_z_on_map*/;
    
int spawn_rotate = *(_DWORD *)(a1 220 2344) + 180.0/*character_rotate_on_map*/;
    
//- create mob
    
int mobid CHARACTER_MANAGER__SpawnMob(0,mobvnum,spawn_mapindex,spawn_x,spawn_y,spawn_z,0,spawn_rotate,0);
    
//- set mob name
    
std__string__assign(00mobid 260, (int)mobnamestrlen(mobname));
    
//- show mob
    
if (!CHARACTER__Show(mobid,spawn_mapindex,spawn_x,spawn_y,spawn_z,0))
    {
    
//- if not showed the mob:
        //- remove mob
        
CHARACTER_MANAGER__DestroyCharacter(a10singleton_CHARACTER_MANAGER___ms_singletonmobid);
        
//- send error to syserr
        
sys_err((int)"PetSummon"192"cannot show monster"137591780);
        
//- return 0 -- exit func
        
return 0;
    }
    
//- attach mob to character
    
CHARACTER__SetRider(a10mobida1 220);
    
//- return whit spawned mob id (id of the mob on map)
    
lua_pushnumber(a1mobid);
    return 
1;
}

int __fastcall quest__pet_unsummon(int a1)
{
    
//- get datas from lua -- read spawned mob id (id of the mob on map)
    
int mobid lua_tonumber(a11);
    
//- return if mobid is 0 -- exit func
    
if ( !mobid ) return 0;
    
//- deattach mob from character
    
CHARACTER__SetRider(a10mobid0);
    
//- remove mob
    
CHARACTER_MANAGER__DestroyCharacter(a10singleton_CHARACTER_MANAGER___ms_singletonmobid);
    
// return -- end of func
    
return 0;


Wtf, akupowa zitiert es, du postest es nach 5 Minuten & kriegst dafür 'n thanks o.O...
XxxGaGaxxX is offline  
Old 08/11/2012, 16:05   #12
 
Pаylasici's Avatar
 
elite*gold: 99
Join Date: Aug 2009
Posts: 4,296
Received Thanks: 5,092
Quote:
Originally Posted by XxxGaGaxxX View Post

Wtf, akupowa zitiert es, du postest es nach 5 Minuten & kriegst dafür 'n thanks o.O...
Weil ich es kann...

Nein Spaß, ich habe seinen Beitrag schon vorher zitiert, nur nach
wenigen Minuten meinen Beitrag abgesendet.
Pаylasici is offline  
Thanks
1 User
Old 08/11/2012, 19:07   #13
 
elite*gold: 0
Join Date: Feb 2011
Posts: 27
Received Thanks: 4
help!

How can i add this code to the game file ?
kwiatmix is offline  
Old 08/11/2012, 19:09   #14
 
elite*gold: 0
Join Date: Aug 2010
Posts: 6
Received Thanks: 2
haha kwiatmix o kurwa
matuszny1987 is offline  
Old 08/11/2012, 19:09   #15
 
Pаylasici's Avatar
 
elite*gold: 99
Join Date: Aug 2009
Posts: 4,296
Received Thanks: 5,092
It's not possible to add new functions to the "Game Binary" with the natural way.
Pаylasici is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
Hilfe beim Petsystem
07/29/2012 - Metin2 Private Server - 2 Replies
Hallo Das andere Thread ist irgendwie untergegangen also nochmal und diesmal hoffe ich auf Hilfe !... ich habe das Pet System nach Anleitung eingefügt, Gamefile gepatcht, npclist eingetragen und Mob_Proto Ich kann den Phönix auch rufen nur jetzt kommt das Proplem Ist man in einer Gilde kommt das Pet nicht Ist man Leader einer Gilde kommt das Pet nicht
[PETSYSTEM]DE like brauche hilfe ;(
05/18/2012 - Metin2 Private Server - 0 Replies
Hey, also ich bräuchte mal hilfe, weil will das Pet system einfügen > De like.. also das man seinen pferd noch rufen kann.. und das pet dan ( wen man aufm siegel klickt ) hinter dir her läuft, laut diesem Release: http://www.elitepvpers.com/forum/metin2-pserver-gu ides-strategies/1589070-release-pet-system-alterna tive-full.html ist das nicht der fall.. weil hier ersetzt das Pet den Pferd und somit hat man ab nem bestimmten pferde lvl kein Pferd mehr sondern nur den Pet! und meine frage ist:...
Petsystem Problem
04/13/2012 - Metin2 Private Server - 14 Replies
Habe alles wie hier gemacht: www.elitepvpers.com/forum/metin2-pserver-guides-s trategies/1589070-release-pet-system-alternative-f ull.html wenn ich jetzt mein Pferdelevel auf 30 mache und mein Pferd rufe mit z.b. /horse_summon müsste es zu 100% kommen da ich GM bin doch dann steht dort das,dass Pferderufen fehlgeschlagen ist. Wenn mein Pferd auf Lvl 1 ist kann ich es so rufen und es klappt wo liegt der Fehler?
[RELEASE(SOURCE CODE)]-- KabBOT2 v1 Full Source(vb6)
10/07/2011 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 106 Replies
I've been meaning to post this for awhile but I pretty much forgot about it. I've been getting quite a few requests for it so I decided to finally get around to posting it. #1. So here you go, Just have or Download Visual Basic 6, you need to update it to VbRuntime 6 Service Pack 6. #2. Run the file name KabBOT.vbp. #3. Enjoy. 100% Virus Free VirusTotal.com report. VirusTotal - Free Online Virus, Malware and URL Scanner



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


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.