- 0
-
Activity
-
0
Average Damage Roll Probabilities
Hello guys. I have a question I hope somebody can help me about this. How does average damage bonus rolls work? I mean is the probability of rolling %60 average damage is equal to rolling %12 average damage? Or probability of rolling %27 is equal to probability of rolling %-10? When a average damage bonus is rolling, does every number have the same probability with others? Or rolling %10 is easier than %58? Thanks for your attention! -
2
-
3
-
4
State of Private Server Metin2?
I know they did some legal action on some servers thats why I wanna know how is it right now -
4
State of Private Server Metin2?
Ah that one, well as you can see that was almost 5 years ago. They did cancel most of P-Server footage on YouTube but that is about it. Did not cancel any server directly whatsoever. -
35
[Work in Progress] QuantumCore
they can't take down the core source code, but they can still take down any pserver (use of the client,use of assets, ...) -
-
17
Advanced GR2 Tool
One thing.. Why this fuc**** string with _new..? Just simply replace is better or easy for code and managment save in new folder like this input xx. gr2 drag on. exe and output folder/xx.gr2... Btw. For other.. You can ctrl+c 1, 3, 4 and ctrl+v -
4
State of Private Server Metin2?
That is new Where have they published this claim? Other than that, P-Server situation did not change much. Still getting more attention than Gameforge servers.
-
-
Recently Browsing
No registered users viewing this page.
Question
ZoomDown 0
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 post
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.