- Katılım
- 30 Eki 2015
- Konular
- 1
- Mesajlar
- 112
- Online süresi
- 6h 41m
- Reaksiyon Skoru
- 12
- Altın Konu
- 0
- TM Yaşı
- 10 Yıl 7 Ay 20 Gün
- Başarım Puanı
- 49
- MmoLira
- 34
- DevLira
- 0
HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
Paylaşım icin teşekkürler
- Katılım
- 16 May 2020
- Konular
- 24
- Mesajlar
- 311
- Online süresi
- 2mo 8d
- Reaksiyon Skoru
- 150
- Altın Konu
- 0
- TM Yaşı
- 6 Yıl 1 Ay
- Başarım Puanı
- 94
- MmoLira
- 11,726
- DevLira
- 24
LİNK KIRILMIŞ ELİNDE OLAN VARMI HALA ?
- Katılım
- 22 Mar 2015
- Konular
- 5
- Mesajlar
- 107
- Çözüm
- 1
- Online süresi
- 15d 22h
- Reaksiyon Skoru
- 25
- Altın Konu
- 0
- TM Yaşı
- 11 Yıl 2 Ay 26 Gün
- Başarım Puanı
- 102
- MmoLira
- 3,532
- DevLira
- 0
I have had this system for many years, it even had a function that asked if you wanted to show the other player the team, if they rejected it, it would not show the rival team and vice versa, over time I adapted it. at 40k, although I could not do the request function, I still leave you here a functional guide, I also leave everything for the request to have if someone finishes it and makes it functional, otherwise it is great (this version only shows equipment not outfit , since if you want to hide the outfit you have the hidden costume).
1- Open Char.cpp (Source game) and search:
Now save and go to char.h and search:
Now Src client search NetStream.cpp on EterLib and search:
Now go to PythonNetworkStream.h and look if you have this:
Now go to client root and edit game.py and search:

1- Open Char.cpp (Source game) and search:
add now:m_pkPartyRequestEvent = NULL;
Search now:// VIEW_EQUIP
m_pkViewEquipRequestEvent = NULL;
// END_OF_VIEW_EQUIP
add:event_cancel(&m_pkFireEvent);
event_cancel(&m_pkPartyRequestEvent);
//DELAYED_WARP
event_cancel(&m_pkWarpEvent);
event_cancel(&m_pkCheckSpeedHackEvent);
//END_DELAYED_WARP
Search now:// VIEW_EQUIP
event_cancel(&m_pkViewEquipRequestEvent);
// END_OF_VIEW_EQUIP
and after of function add:void CHARACTER:etermineDropMetinStone()
search :// VIEW_EQUIP_FUNC
EVENTINFO(TViewEquipEventInfo)
{
DWORD dwGuestPID;
DWORD dwTargetPID;
TViewEquipEventInfo() : dwGuestPID( 0 ), dwTargetPID( 0 ) { }
} ;
EVENTFUNC(view_equip_request_event)
{
TViewEquipEventInfo * info = dynamic_cast<TViewEquipEventInfo *>( event->info );
if ( info == NULL )
{
sys_err( "view_equip_request_event> <Factor> Null pointer" );
return 0;
}
LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(info->dwGuestPID);
if (ch)
{
sys_log(0, "ViewEquipRequestEvent %s", ch->GetName());
ch->ChatPacket(CHAT_TYPE_COMMAND, "ViewEquipRequestDenied");
ch->SetViewEquipRequestEvent(NULL);
}
return 0;
}
bool CHARACTER::RequestToViewEquip(LPCHARACTER pTarget)
{
if (!pTarget)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't make a request because target player is not online."));
return false;
}
if (m_pkViewEquipRequestEvent)
return false;
if (!IsPC() || !pTarget->IsPC())
return false;
if (pTarget->IsBlockMode(BLOCK_EQUIPMENT_REQUEST))
return false;
TViewEquipEventInfo* info = AllocEventInfo<TViewEquipEventInfo>();
info->dwGuestPID = GetPlayerID();
info->dwTargetPID = pTarget->GetPlayerID();
SetViewEquipRequestEvent(event_create(view_equip_request_event, info, PASSES_PER_SEC(10)));
pTarget->ChatPacket(CHAT_TYPE_COMMAND, "ViewEquipRequest %u", (DWORD) GetVID());
return true;
}
void CHARACTER:enyToViewEquip(LPCHARACTER guest)
{
sys_log(1, "DenyToViewEquip %s guest %s %p", GetName(), guest->GetName(), get_pointer(guest->m_pkViewEquipRequestEvent));
if (!guest->m_pkViewEquipRequestEvent)
return;
TViewEquipEventInfo * info = dynamic_cast<TViewEquipEventInfo *>(guest->m_pkViewEquipRequestEvent->info);
if (!info)
{
sys_err( "CHARACTER:enyToViewEquip> <Factor> Null pointer" );
return;
}
if (info->dwGuestPID != guest->GetPlayerID())
return;
if (info->dwTargetPID != GetPlayerID())
return;
event_cancel(&guest->m_pkViewEquipRequestEvent);
guest->ChatPacket(CHAT_TYPE_COMMAND, "ViewEquipRequestDenied");
}
void CHARACTER::AcceptToViewEquip(LPCHARACTER guest)
{
sys_log(1, "AcceptToViewEquip %s guest %s %p", GetName(), guest->GetName(), get_pointer(guest->m_pkViewEquipRequestEvent));
if (!guest->m_pkViewEquipRequestEvent)
return;
TViewEquipEventInfo * info = dynamic_cast<TViewEquipEventInfo *>(guest->m_pkViewEquipRequestEvent->info);
if (!info)
{
sys_err( "CHARACTER::AcceptToViewEquip> <Factor> Null pointer" );
return;
}
if (info->dwGuestPID != guest->GetPlayerID())
return;
if (info->dwTargetPID != GetPlayerID())
return;
event_cancel(&guest->m_pkViewEquipRequestEvent);
SendEquipment(guest);
return;
}
and replace with:void CHARACTER::SendEquipment(LPCHARACTER ch)
void CHARACTER::SendEquipment(LPCHARACTER ch)
{
TPacketViewEquip p;
p.header = HEADER_GC_VIEW_EQUIP;
p.vid = GetVID();
int pos[19] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 19, 20, 21, 22, 23, 24, 25, 26 };
for (int i = 0; i < 19; i++)
{
LPITEM item = GetWear(pos);
if (item)
{
p.equips.vnum = item->GetVnum();
p.equips.count = item->GetCount();
thecore_memcpy(p.equips.alSockets, item->GetSockets(), sizeof(p.equips.alSockets));
thecore_memcpy(p.equips.aAttr, item->GetAttributes(), sizeof(p.equips.aAttr));
}
else
{
p.equips.vnum = 0;
}
}
ch->GetDesc()->Packet(&p, sizeof(p));
}
Now save and go to char.h and search:
add:void SetPartyRequestEvent(LPEVENT pkEvent) { m_pkPartyRequestEvent = pkEvent; }
save now and go to cmd_general and search;// VIEW_EQUIP_FUNC
public:
bool RequestToViewEquip(LPCHARACTER pTarget);
void DenyToViewEquip(LPCHARACTER guest);
void AcceptToViewEquip(LPCHARACTER guest);
void SetViewEquipRequestEvent(LPEVENT pkEvent) { m_pkViewEquipRequestEvent = pkEvent; }
protected:
LPEVENT m_pkViewEquipRequestEvent;
// END_OF_VIEW_EQUIP_FUNC
after the function if you have ACMD(do_view_equip) replace or addACMD(do_ride)
now save and go to packet.h and search:ACMD(do_view_equip)
{
if (ch->GetLevel() <= 14)
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Esta funcion se desbloquea a nivel 15."));
return;
}
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));
if (*arg1)
{
DWORD vid = 0;
str_to_number(vid, arg1);
LPCHARACTER tch = CHARACTER_MANAGER::instance().Find(vid);
if (!tch)
return;
if (!tch->IsPC())
return;
if ((tch->IsGM()) || (!test_server && tch->IsGM()))
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("El jugador %s tiene esta funcion bloqueada!"), tch->GetName());
return;
}
tch->SendEquipment(ch);
}
}
// VIEW_EQUIP_FUNC
ACMD(do_view_equip_request)
{
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));
if (!*arg1)
return;
DWORD vid = 0;
str_to_number(vid, arg1);
LPCHARACTER tch = CHARACTER_MANAGER::instance().Find(vid);
if (tch)
if (!ch->RequestToViewEquip(tch))
ch->ChatPacket(CHAT_TYPE_COMMAND, "ViewEquipRequestDenied");
}
ACMD(do_view_equip_request_accept)
{
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));
if (!*arg1)
return;
DWORD vid = 0;
str_to_number(vid, arg1);
LPCHARACTER tch = CHARACTER_MANAGER::instance().Find(vid);
if (tch)
ch->AcceptToViewEquip(tch);
}
ACMD(do_view_equip_request_deny)
{
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));
if (!*arg1)
return;
DWORD vid = 0;
str_to_number(vid, arg1);
LPCHARACTER tch = CHARACTER_MANAGER::instance().Find(vid);
if (tch)
ch->DenyToViewEquip(tch);
}
// END_OF_VIEW_EQUIP_FUNC
add:HEADER_GC_REFINE_INFORMATION_OLD = 95,
now search:HEADER_GC_VIEW_EQUIP = 99,
add:typedef struct SEquipmentItemSet
{
DWORD vnum;
BYTE count;
long alSockets[ITEM_SOCKET_MAX_NUM];
TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
} TEquipmentItemSet;
Now save and go to cmd.cpp and search:typedef struct pakcet_view_equip
{
BYTE header;
DWORD vid;
struct
{
DWORD vnum;
BYTE count;
long alSockets[ITEM_SOCKET_MAX_NUM];
TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
} equips[19];
} TPacketViewEquip;
add if you don't have o replace:ACMD(do_stat_reset);
search :ACMD(do_view_equip);
// VIEW_EQUIP_FUNC
ACMD(do_view_equip_request);
ACMD(do_view_equip_request_accept);
ACMD(do_view_equip_request_deny);
// END_OF_VIEW_EQUIP_FUNC
add:{ "xmas_santa", do_xmas, SCMD_XMAS_SANTA, POS_DEAD, GM_HIGH_WIZARD },
Save and compile new Game// VIEW_EQUIP_FUNC
{ "view_equip", do_view_equip_request, 0, POS_DEAD, GM_PLAYER },
{ "view_equip_accept", do_view_equip_request_accept, 0, POS_DEAD, GM_PLAYER },
{ "view_equip_deny", do_view_equip_request_deny, 0, POS_DEAD, GM_PLAYER },
// END_OF_VIEW_EQUIP_FUNC
Now Src client search NetStream.cpp on EterLib and search:
add o check if have the same value:stringList[98] = "HEADER_GC_OBSERVER_MOVE";
now go to packet in UserInterface and search:stringList[99] = "HEADER_GC_VIEW_EQUIP";
check or add:HEADER_GC_OBSERVER_MOVE = 98,
search:HEADER_GC_VIEW_EQUIP = 99,
add o replace:typedef struct SEquipmentItemSet
{
DWORD vnum;
BYTE count;
long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
} TEquipmentItemSet;
Now go to PythonNetworkStream.cpp and search:typedef struct pakcet_view_equip
{
BYTE header;
DWORD dwVID;
TEquipmentItemSet equips[19];
} TPacketGCViewEquip;
addSet(HEADER_GC_CHANNEL, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCChannel), STATIC_SIZE_PACKET));
Now go to PythonNetworkSteamPhaseGame.cpp and search:Set(HEADER_GC_VIEW_EQUIP, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCViewEquip), STATIC_SIZE_PACKET));
addcase HEADER_GC_CHANNEL:
ret = RecvChannelPacket();
break;
Search and replace:case HEADER_GC_VIEW_EQUIP:
ret = RecvViewEquipPacket();
break;
bool CPythonNetworkStream::RecvViewEquipPacket()
{
TPacketGCViewEquip kViewEquipPacket;
if (!Recv(sizeof(kViewEquipPacket), &kViewEquipPacket))
return false;
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OpenEquipmentDialog", Py_BuildValue("(i)", kViewEquipPacket.dwVID));
for (int i = 0; i < 19; ++i)
{
TEquipmentItemSet & rItemSet = kViewEquipPacket.equips;
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetEquipmentDialogItem", Py_BuildValue("(iiii)", kViewEquipPacket.dwVID, i, rItemSet.vnum, rItemSet.count));
for (int j = 0; j < ITEM_SOCKET_SLOT_MAX_NUM; ++j)
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetEquipmentDialogSocket", Py_BuildValue("(iiii)", kViewEquipPacket.dwVID, i, j, rItemSet.alSockets[j]));
for (int k = 0; k < ITEM_ATTRIBUTE_SLOT_MAX_NUM; ++k)
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetEquipmentDialogAttr", Py_BuildValue("(iiiii)", kViewEquipPacket.dwVID, i, k, rItemSet.aAttr[k].bType, rItemSet.aAttr[k].sValue));
}
return true;
}
Now go to PythonNetworkStream.h and look if you have this:
Compile .exe now.bool RecvViewEquipPacket();
Now go to client root and edit game.py and search:
add# PRIVATE_SHOP_PRICE_LIST
"MyShopPriceList" : self.__PrivateShop_PriceList,
# END_OF_PRIVATE_SHOP_PRICE_LIST
search:# VIEW_EQUIP_FUNC
"ViewEquipRequest" : self.__ViewEquipRequest,
"ViewEquipRequestDenied" : self.__ViewEquipRequestDenied,
# END_OF_VIEW_EQUIP_FUNC
add:def __PartyRequestDenied(self):
self.PopupMessage(localeInfo.PARTY_REQUEST_DENIED)
Now go to uitarget.py and search;# VIEW_EQUIPMENT_FUNC
def __ViewEquipRequest(self, vid):
vid = int(vid)
partyRequestQuestionDialog = uiCommon.QuestionDialog()
partyRequestQuestionDialog.SetText("Permites a " + chr.GetNameByVID(vid) + " ver tu equipo?")
partyRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
partyRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
partyRequestQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.__AnswerViewEquipRequest(arg))
partyRequestQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.__AnswerViewEquipRequest(arg))
partyRequestQuestionDialog.Open()
partyRequestQuestionDialog.vid = vid
self.partyRequestQuestionDialog = partyRequestQuestionDialog
def __AnswerViewEquipRequest(self, answer):
if not self.partyRequestQuestionDialog:
return
vid = self.partyRequestQuestionDialog.vid
if answer:
net.SendChatPacket("/view_equip_accept " + str(vid))
else:
net.SendChatPacket("/view_equip_deny " + str(vid))
self.partyRequestQuestionDialog.Close()
self.partyRequestQuestionDialog = None
def __ViewEquipRequestDenied(self):
self.PopupMessage("Peticion denegada.")
# END_OF_VIEW_EQUIPMENT_FUNC
addself.buttonDict[localeInfo.TARGET_BUTTON_EXIT_OBSERVER].SAFE_SetEvent(self.__OnExitObserver)
now search:self.buttonDict[localeInfo.TARGET_BUTTON_VIEW_EQUIPMENT].SAFE_SetEvent(self.__OnViewEquipment)
add:def __OnExitObserver(self):
net.SendChatPacket("/observer_exit")
and now you have the systemdef __OnViewEquipment(self):
net.SendChatPacket("/view_equip " + str(self.vid))

- Katılım
- 24 Eki 2020
- Konular
- 5
- Mesajlar
- 16
- Online süresi
- 16d 9h
- Reaksiyon Skoru
- 3
- Altın Konu
- 0
- TM Yaşı
- 5 Yıl 7 Ay 24 Gün
- Başarım Puanı
- 45
- MmoLira
- 1,047
- DevLira
- 0
broken link !
- Durum
- Üzgünüz bu konu cevaplar için kapatılmıştır...
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 1
- Görüntüleme
- 211
- Cevaplar
- 37
- Görüntüleme
- 2K
- Cevaplar
- 33
- Görüntüleme
- 7K
- Cevaplar
- 65
- Görüntüleme
- 12K




etermineDropMetinStone()
