-
Activity
-
5
-
0
Looking for Someone to create the queries etc for armors and weapons
Hello I am looking for someone who will create the queries from the ground up and item proto etc everything required to implement a few armor and weapon sets for my server such as these - https://imgur.com/a/sUwencb Paid service obviously Contact me on discord for more info - whait#7061 -
13
Official Private Shop Search
From where get this Cheque-System that are used in this system -
944
[40250] Reference Serverfile + Client + Src [15 Available Languages]
Hi tmp4, I was trying to increase the pull range by editing FuncAggregateMonster. But it seems that there is something other than the DISTANCE_APPROX check limiting the max range. struct FuncAggregateMonster { LPCHARACTER m_ch; FuncAggregateMonster(LPCHARACTER ch) { m_ch = ch; } void operator()(LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { LPCHARACTER ch = (LPCHARACTER) ent; if (ch->IsPC()) return; if (!ch->IsMonster()) return; if (ch->GetVictim()) return; if (DISTANCE_APPROX(ch->GetX() - m_ch->GetX(), ch->GetY() - m_ch->GetY()) < 20000) if (ch->CanBeginFight()) { ch->AddAffect(AFFECT_MOV_SPEED, POINT_MOV_SPEED, 700, AFF_MOV_SPEED_POTION, 500, 0, true); ch->BeginFight(m_ch); } } } }; I added a movementspeed Affect and got very weird behaviour. The movementspeed bonus is applied to mobs way further than the "standard" pull range, yet no mobs outside of the standard pull range get aggressive towards my character. Do you know what's causing this? EDIT: Oh and I am posting this here, because the same code snipped works on other serverfiles. -
79
GUI Teleport System
Working With press button, but how can i add under indevtory button? -
0
inventory slot marking system cant compile
Hey guys! As i have mentioned in the title i have problems with compiling client src for inventory slot marking system. Server src is fine but in client src i get errorr that arg4 is not member of class exchange_packet... where can i add the member ? -
8
Inventory Bug
syserr is empty.. refreshbagslot I have it like this def SetInventoryPage(self, page): self.inventoryTab[self.inventoryPageIndex].SetUp() self.inventoryPageIndex = page self.inventoryTab[self.inventoryPageIndex].Down() self.RefreshBagSlotWindow() and def RefreshBagSlotWindow(self): getItemVNum=player.GetItemIndex getItemCount=player.GetItemCount setItemVNum=self.wndItem.SetItemSlot for i in xrange(self.wndItem.GetSlotCount()): self.wndItem.DeactivateSlot(i) for i in xrange(player.INVENTORY_PAGE_SIZE): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i) itemCount = getItemCount(slotNumber) # itemCount == 0이면 소켓을 비운다. if 0 == itemCount: self.wndItem.ClearSlot(i) continue elif 1 == itemCount: itemCount = 0 itemVnum = getItemVNum(slotNumber) setItemVNum(i, itemVnum, itemCount) ## 자동물약 (HP: #72723 ~ #72726, SP: #72727 ~ #72730) 특수처리 - 아이템인데도 슬롯에 활성화/비활성화 표시를 위한 작업임 - [hyo] if constInfo.IS_AUTO_POTION(itemVnum): # metinSocket - [0] : 활성화 여부, [1] : 사용한 양, [2] : 최대 용량 metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)] if slotNumber >= player.INVENTORY_PAGE_SIZE*self.inventoryPageIndex: slotNumber -= player.INVENTORY_PAGE_SIZE*self.inventoryPageIndex isActivated = 0 != metinSocket[0] if isActivated: self.wndItem.ActivateSlot(slotNumber) potionType = 0; if constInfo.IS_AUTO_POTION_HP(itemVnum): potionType = player.AUTO_POTION_TYPE_HP elif constInfo.IS_AUTO_POTION_SP(itemVnum): potionType = player.AUTO_POTION_TYPE_SP usedAmount = int(metinSocket[1]) totalAmount = int(metinSocket[2]) player.SetAutoPotionInfo(potionType, isActivated, (totalAmount - usedAmount), totalAmount, self.__InventoryLocalSlotPosToGlobalSlotPos(i)) else: self.wndItem.DeactivateSlot(slotNumber) if app.WJ_ENABLE_TRADABLE_ICON: self.RefreshMarkSlots(i) self.__HighlightSlot_Refresh() self.wndItem.RefreshSlot() if self.wndBelt: self.wndBelt.RefreshSlot() if app.WJ_ENABLE_TRADABLE_ICON: map(lambda wnd:wnd.RefreshLockedSlot(), self.bindWnds) def RefreshEquipSlotWindow(self): getItemVNum=player.GetItemIndex getItemCount=player.GetItemCount setItemVNum=self.wndEquip.SetItemSlot for i in xrange(player.EQUIPMENT_PAGE_COUNT): slotNumber = player.EQUIPMENT_SLOT_START + i itemCount = getItemCount(slotNumber) if itemCount <= 1: itemCount = 0 setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount) if app.ENABLE_NEW_EQUIPMENT_SYSTEM: for i in xrange(player.NEW_EQUIPMENT_SLOT_COUNT): slotNumber = player.NEW_EQUIPMENT_SLOT_START + i itemCount = getItemCount(slotNumber) if itemCount <= 1: itemCount = 0 setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount) print "ENABLE_NEW_EQUIPMENT_SYSTEM", slotNumber, itemCount, getItemVNum(slotNumber) self.wndEquip.RefreshSlot() if self.wndCostume: self.wndCostume.RefreshCostumeSlot() def RefreshItemSlot(self): self.RefreshBagSlotWindow() self.RefreshEquipSlotWindow() -
63
Metin2 Dev - Changelogs
Duplicate posts (warns, topics, PM's...) are resolved 2FA re-enabled IP Board Upgrade IPS 4.7.0 Beta 10 (Dev Build)- 2
-
-
-
9
-
-
Recently Browsing
- No registered users viewing this page.
Question
ZoomDown 2
Hello, I was trying to add a system named "Chest Search System" and I have a problem when I try to compile game source.
cmd_general.cpp:3153:23: error: no matching constructor for initialization of
'std::vector<LPITEM>' (aka 'vector<CItem *>')
std::vector <LPITEM> item_gets(NULL);
^ ~~~~
/usr/include/c++/v1/vector:479:40: note: candidate constructor not viable: no
known conversion from 'nullptr_t' to 'const std::__1::vector<CItem *,
std::__1::allocator<CItem *> >::allocator_type' (aka 'const
std::__1::allocator<CItem *>') for 1st argument
_LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a)
^
/usr/include/c++/v1/vector:491:14: note: candidate constructor not viable: no
known conversion from 'nullptr_t' to 'std::__1::vector<CItem *,
std::__1::allocator<CItem *> >::size_type' (aka 'unsigned int') for 1st
argument
explicit vector(size_type __n);
^
/usr/include/c++/v1/vector:534:5: note: candidate constructor not viable: no
known conversion from 'nullptr_t' to 'const std::__1::vector<CItem *,
std::__1::allocator<CItem *> >' for 1st argument
vector(const vector& __x);
^
/usr/include/c++/v1/vector:541:5: note: candidate constructor not viable: no
known conversion from 'nullptr_t' to
'initializer_list<std::__1::vector<CItem *, std::__1::allocator<CItem *>
>::value_type>' (aka 'initializer_list<CItem *>') for 1st argument
vector(initializer_list<value_type> __il);
^
/usr/include/c++/v1/vector:547:5: note: candidate constructor not viable: no
known conversion from 'nullptr_t' to 'std::__1::vector<CItem *,
std::__1::allocator<CItem *> >' for 1st argument
vector(vector&& __x)
^
/usr/include/c++/v1/vector:498:9: note: candidate constructor template not
viable: requires 2 arguments, but 1 was provided
vector(_InputIterator __first,
^
/usr/include/c++/v1/vector:506:9: note: candidate constructor template not
viable: requires at least 3 arguments, but 1 was provided
vector(_InputIterator __first, _InputIterator __last, const allo...
^
/usr/include/c++/v1/vector:513:9: note: candidate constructor template not
viable: requires 2 arguments, but 1 was provided
vector(_ForwardIterator __first,
^
/usr/include/c++/v1/vector:520:9: note: candidate constructor template not
viable: requires at least 3 arguments, but 1 was provided
vector(_ForwardIterator __first, _ForwardIterator __last, const ...
^
/usr/include/c++/v1/vector:473:5: note: candidate constructor not viable:
requires 0 arguments, but 1 was provided
vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
^
/usr/include/c++/v1/vector:495:5: note: candidate constructor not viable:
requires 2 arguments, but 1 was provided
vector(size_type __n, const_reference __x);
^
/usr/include/c++/v1/vector:535:5: note: candidate constructor not viable:
requires 2 arguments, but 1 was provided
vector(const vector& __x, const allocator_type& __a);
^
/usr/include/c++/v1/vector:544:5: note: candidate constructor not viable:
requires 2 arguments, but 1 was provided
vector(initializer_list<value_type> __il, const allocator_type& __a);
^
/usr/include/c++/v1/vector:555:5: note: candidate constructor not viable:
requires 2 arguments, but 1 was provided
vector(vector&& __x, const allocator_type& __a);
^
/usr/include/c++/v1/vector:496:5: note: candidate constructor not viable:
requires 3 arguments, but 1 was provided
vector(size_type __n, const_reference __x, const allocator_type& __a);
^
1 error generated.
gmake: *** [Makefile:96: .obj/cmd_general.o] Error 1
Here is cmd_general.cpp code:
//Add
// Box Search System
ACMD(do_search_cofres){
int posicion = 0;
bool g_item_cofres = false;
const char *line;
char arg1[256], arg2[256];
line = two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2));
if (0 == arg1[0])
return;
int slot = atoi(arg2);
LPITEM item = ch->GetItem(TItemPos(INVENTORY, slot));
if(NULL == item){
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SHOP_SEARCH_REASON_NULL"));
return;
}
DWORD dwBoxVnum = item->GetVnum();
DWORD dwBoxCount = item->GetCount();
std::vector <DWORD> dwVnums;
std::vector <DWORD> dwCounts;
std::vector <LPITEM> item_gets(NULL);
int count = 0;
const std::string& strArg1 = std::string(arg1);
if (ch->InformationSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count))
{
g_item_cofres = true;
}
if (g_item_cofres == false || dwBoxVnum == 50300){
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SHOP_SEARCH_NO_CHEST"));
return;
}
if (strArg1 == "search"){
if (ch->InformationSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count))
{
for (int i = 0; i < count; i++)
{
ch->ChatPacket(CHAT_TYPE_COMMAND, "search_cofre_ids %d %d", dwVnums,dwCounts);
}
ch->ChatPacket(CHAT_TYPE_COMMAND,"search_cofre_refresh");
}
}
else if(strArg1 == "open"){
if (item->GetType() == ITEM_TREASURE_BOX)
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SHOP_SEARCH_REASON_KEY"));
return;
}
if (ch->GiveItemFromSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count))
{
ch->RemoveSpecifyItem(dwBoxVnum, 1);
for (int i = 0; i < count; i++){
switch (dwVnums)
{
case CSpecialItemGroup::GOLD:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RECEIVED_GOLD"), dwCounts);
break;
case CSpecialItemGroup::EXP:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("MYSTERIOUS_LIGHT"));
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RECEIVED_EXP"), dwCounts);
break;
case CSpecialItemGroup::MOB:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RECEIVED_MONSTER"));
break;
case CSpecialItemGroup::SLOW:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RED_SMOKE_SPEED"));
break;
case CSpecialItemGroup::DRAIN_HP:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("BOX_EXPLODED"));
break;
case CSpecialItemGroup::POISON:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("GREEN_SMOKE"));
break;
#ifdef ENABLE_WOLFMAN_CHARACTER
case CSpecialItemGroup::BLEEDING:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("CHEST_BLOOD"));
break;
#endif
case CSpecialItemGroup::MOB_GROUP:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RECEIVED_MONSTER"));
break;
default:
if (item_gets)
{
if (dwCounts > 1)
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ITEM_RECEIVED_COUNT"), item_gets->GetName(), dwCounts);
else
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ITEM_RECEIVED"), item_gets->GetName());
}
}
}
ch->ChatPacket(CHAT_TYPE_COMMAND,"search_cofre_refresh_open");
}
}
else if(strArg1 == "all"){
if (item->GetType() == ITEM_TREASURE_BOX)
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SHOP_SEARCH_REASON_KEY"));
return;
}
for (int i = 0; i < dwBoxCount; i++){
if (ch->GiveItemFromSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count))
{
ch->RemoveSpecifyItem(dwBoxVnum, 1);
switch (dwVnums)
{
case CSpecialItemGroup::GOLD:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RECEIVED_GOLD"), dwCounts);
break;
case CSpecialItemGroup::EXP:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("MYSTERIOUS_LIGHT"));
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RECEIVED_EXP"), dwCounts);
break;
case CSpecialItemGroup::MOB:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RECEIVED_MONSTER"));
break;
case CSpecialItemGroup::SLOW:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RED_SMOKE_SPEED"));
break;
case CSpecialItemGroup::DRAIN_HP:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("BOX_EXPLODED"));
break;
case CSpecialItemGroup::POISON:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("GREEN_SMOKE"));
break;
#ifdef ENABLE_WOLFMAN_CHARACTER
case CSpecialItemGroup::BLEEDING:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("CHEST_BLOOD"));
break;
#endif
case CSpecialItemGroup::MOB_GROUP:
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RECEIVED_MONSTER"));
break;
default:
if (item_gets)
{
if (dwCounts > 1)
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ITEM_RECEIVED_COUNT"), item_gets->GetName(), dwCounts);
else
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ITEM_RECEIVED"), item_gets->GetName());
}
}
}
}
ch->ChatPacket(CHAT_TYPE_COMMAND,"search_cofre_refresh_open");
}
}
// End
Thanks, Sincerly,
ZoomDown
Link to comment
Share on other sites
Top Posters For This Question
2
1
Popular Days
Aug 29
1
Aug 30
1
Aug 25
1
Top Posters For This Question
ZoomDown 2 posts
Distraught 1 post
Popular Days
Aug 29 2020
1 post
Aug 30 2020
1 post
Aug 25 2020
1 post
Popular Posts
ZoomDown
Hello, I was trying to add a system named "Chest Search System" and I have a problem when I try to compile game source. Here is cmd_general.cpp code: Thanks, Sincerly, ZoomDown
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now