#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(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;
}
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
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;
}
Wtf, akupowa zitiert es, du postest es nach 5 Minuten & kriegst dafür 'n thanks o.O...
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