-
Posts
41 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Ropen
-
-
hello there
i have a problem with Block System - Messenger From @ Mali
that I can't unblock someone if he not online in the game( if he is online it works fine )
I checked this but didn't find a solution
could any one help?void MessengerManager::__RemoveFromBlockList(const std::string& account, const std::string& companion) { m_BlockRelation[account].erase(companion); m_InverseBlockRelation[companion].erase(account); LPCHARACTER ch = CHARACTER_MANAGER::instance().FindPC(account.c_str()); LPDESC d = ch ? ch->GetDesc() : NULL; if (d) ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s is no longer blocked."), companion.c_str()); }
void MessengerManager::RemoveFromBlockList(const std::string& account, const std::string& companion) { if (companion.size() == 0) return; char szCompanion[CHARACTER_NAME_MAX_LEN + 1]; DBManager::instance().EscapeString(szCompanion, sizeof(szCompanion), companion.c_str(), companion.length()); DBManager::instance().Query("DELETE FROM messenger_block_list%s WHERE `account` = '%s' AND `companion` = '%s'", get_table_postfix(), account.c_str(), szCompanion); __RemoveFromBlockList(account, companion); TPacketGGMessenger p2ppck; p2ppck.bHeader = HEADER_GG_MESSENGER_BLOCK_REMOVE; strlcpy(p2ppck.szAccount, account.c_str(), sizeof(p2ppck.szAccount)); strlcpy(p2ppck.szCompanion, companion.c_str(), sizeof(p2ppck.szCompanion)); P2P_MANAGER::instance().Send(&p2ppck, sizeof(TPacketGGMessenger)); }
-
8 hours ago, Syreldar said:
..?
when kill with npc.is_pc() and pc.is_gm() and pc.get_map_index() == 182 begin local my_vid = pc.get_vid(); pc.select(npc.get_vid()); -- notice("You've been killed by a GM. You'll be warped to your village.") warp_to_village(); -- pc.select(my_vid); end -- when
Works well, thank you
-
hello every one
I tried to do quest function as shown below
int npc_is_gm(lua_State* L) { LPCHARACTER npc = CQuestManager::instance().GetCurrentNPCCharacterPtr(); lua_pushboolean(L, npc->GetGMLevel() >= GM_HIGH_WIZARD); return 1; } int npc_get_gm_level(lua_State* L) { LPCHARACTER npc = CQuestManager::instance().GetCurrentNPCCharacterPtr(); lua_pushnumber(L, npc->GetGMLevel()); return 1; }
But it didn't work in quest , does any one know where is the problem?
The purpose of the function is to create a quest that will send the player to the city if he is killed by GMwhen death with npc.is_gm() begin if game.get_event_flag("send_home") == 1 and pc.get_map_index() == 182 then warp_to_village() end end
@ Syreldar Maybe you can help at this
-
----------------
# edit
Based on the last error in server syserr , I came to the conclusion that the problem is precisely here
else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_USE_ARROW_DAMAGE)) { LPITEM pkBow, pkArrow; if (1 == GetArrowAndBow(&pkBow, &pkArrow, 1)) { pkSk->SetPointVar("atk", CalcArrowDamage(this, this, pkBow, pkArrow, true)); // this line is the problem } else { pkSk->SetPointVar("atk", 0); } }
but i don't know why it's make a core
pkSk->SetPointVar("atk", CalcArrowDamage(this, this, pkBow, pkArrow, true));
It seems logical
Chanel SyserrSYSERR: Aug 6 13:13:07 :: CalcMeleeDamage: CalcMeleeDamage should not handle bows (name: xABOLOMA1) SYSERR: Aug 6 13:15:19 :: operator(): CFuncShoot: I don't know this type [255] of range attack. SYSERR: Aug 6 13:17:58 :: Select: wrong QUEST_SELECT request! : 5475 SYSERR: Aug 6 13:21:49 :: operator(): CFuncShoot: I don't know this type [255] of range attack.
-
dose any one know why this game core ?
char.cpp :
char_skill.cpp :
event.cpp :--------
#0 msg
#1 msg
#3 msg
#4 msg
#5 msg
Its a PvP Server . And there are no monsters except 4 types, with a total 20 monsters in all the game , also the hydra is not used in the server ,
I only have the first and second empires active no maps else . -
On 7/27/2022 at 6:33 PM, Jira said:
just add -Wno-invalid-source-encoding
ex)
CFLAGS = -m32 -g -Wall -O2 -pipe -fexceptions -std=c++17 -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG -Wno-invalid-source-encoding
thx bro its works good for encoding
but can i stop it for all warning ? like that warning----
edit
thx i used -Wno-unused-private-field
- 1
-
Just now, WeedHex said:
Change file encoding
i can't do that in all files there is LC_TEXT will corrupted , and i want to disable warning any way
-
hello
dose any one know how can i stop clang warning in compiler ?I tried this solution but it didn't work
#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" // your code for which the warning gets suppressed #pragma clang diagnostic pop
that is my makefile from game
-
if i used mysql_direct_query like that
local name = input(); mysql_direct_query("UPDATE player.player SET block_map = '1' WHERE name = "..name.."");
could i use mysql_direct_query to get block_map value ? and relying on it block the player like that ?
local myname = pc.get_name() ; local results, ret = mysql_direct_query(string.format("SELECT `block_map` FROM `player`.`player` WHERE `name` = '%s' LIMIT 1;", myname)); if (results > 0) then say ("u can't enter") else pc.warp( 947100 , 169800 ) end -- if/else
Is it an effective method ? or will there be problems ?
-
so if i want to check i will use
pc.getf ?
if pc.getf ("map_control", "cannot_enter") == 1 then say(" u can't enter the map ") else pc.warp( 947100 , 169800 ) end
about mysql_direct_query
My experience with it , not enough so I don't like to risk using it now
-
hi dev's
i asked how can i block a player from entering a map by using pc.setqf and pc.getqf
by give him a pc.setqf from input
ex :
i will use that check in quest
if pc.getqf("cannot_enter") == 1 then say(" u can't enter the map ") else pc.warp( 947100 , 169800 ) end
now i want to give a player ( not me ) a ( pc.setqf ) from input by typing his name
quest test begin state start begin when 10581.chat." Block Player " with pc.is_gm() begin say_event_title(mob_name(10581)) say() say(" type the name of the player which u want to block here ") local name = input(); ---------------------------- Error 404 ): ---------------------------------- -- How can i set a pc.setqf("cannot_enter", 1) -- for the name from input ? end end end
-
1 minute ago, Syreldar said:
You're free to use semicolons if you like them. Lua doesn't rly care.
They're also used to write multiple statements in a single line, I do regardless cause they're one of my many signatures and don't change the code's flow.
yeah , i think WeedHex means my previous attempts
this one
command("code ",name," 1")
-
1 minute ago, WeedHex said:
Do not use parentheses and semicolons...
It was a desperate attempt
-
I understand now , thank you
-
if i select a plyer and cilick on the item that i use in quest could " the selected player " being my variable in command ?
I think this does it [ target.pc() ] -
1 minute ago, Syreldar said:
name = tonumber(input())
Your input only accepts numerical values and you didn't make any input validation.
If "name" is supposed to be the name of a player this will never work because of that. It should be:
name = input()
and then add some validation to check if the name exist and the player is online, if necessary.
i didn't recognize it
it works Perfect now
thnx alotcan i get the target name as avariable to the command ?
-
2 minutes ago, Syreldar said:
It depends, what are you trying to do? What's the command supposed to send/receive?
command("code "..name.." 1"); command(string.format("code %s 1", name));
These are both written with valid syntax and do the same thing.
Thank you for caring
its a voice chat system the code syntax is
voice_chat [name] [id]
so i type quest in this way
quest private_voice_chat begin state start begin when 40003.use begin say_event_title(item_name(40003)) say() say_light_blue(" type the receiver name ") say() name = tonumber(input()) say_event_title(item_name(40003)) say() say_light_blue(" choose voice ") say() local voice = select(" voice 1 ", " voice 2 ", " cancel ") if voice == 1 then command(string.format("voice_chat %s 1", name)); elseif voice == 2 then command(string.format("voice_chat %s 2", name)); else return end end end end
but it didn't work
if i used code in game /voice_chat [name] [id]
it works
-
hi there
i asked if there is any way to add variable from input to command in the quest
i tried to make it like that
-- name is a input variable command("code "..name.." 1") command("code ",name," 1") command("code "+name+" 1") local test = command("code ") chat(test..name.." ") local test = command("code ") + name + " 1" chat(test)
the code was not executed correctly in the game
any one know the solution ?thnx alot
-
Some help if you can guys
-
Hi devs ,
I would like to upgrade the View Equipment system to get the character's points such as HP , SP , Str , magic attack , magic defense,..etc.
Details in this window
https://metin2.download/picture/9YN65fishsoBt0qQKm8q53IjXfyHy3pf/.jpgI tried to use as ex :
self.GetChild("MATT_Value").SetText(self.__GetTotalMagAtkText()) def __GetTotalMagAtkText(self): minMagAtk=player.GetStatus(player.MAG_ATT)+player.GetStatus(player.MIN_MAGIC_WEP) maxMagAtk=player.GetStatus(player.MAG_ATT)+player.GetStatus(player.MAX_MAGIC_WEP) if minMagAtk==maxMagAtk: return "%d" % (minMagAtk) else: return "%d-%d" % (minMagAtk, maxMagAtk)
But it showed the details of my character, not the target
https://metin2.download/picture/G6CB4Jn680gw10hm981g6S8L8ovpgXhe/.jpg
Does anyone know a way to do this?thnx all
-
On 9/18/2021 at 7:15 PM, AutodesK said:
mob proto, on yang and rank mobs
can you explain more ?
Because I took a full proto line from another client that does not have this issue and nothing has changed -
Hi dev's
How can I stop this ?
-
16 hours ago, Chookez said:
I was a little confused yesterday, it seems.
PythonMinimap.cpp
Search this:
else if (pkInstEach->IsNPC()
Change to:
else if (pkInstEach->IsNPC() && !pkInstEach->IsInvisibility())
And then add this to this function:
if (pkInstEach->IsPet() || pkInstEach->IsMount()) continue;
Like this:
Its done. Now open InstanceBase.cpp
Search this function:
void CInstanceBase::GetBoundBox(D3DXVECTOR3 * vtMin, D3DXVECTOR3 * vtMax)
After this function add this:
BOOL CInstanceBase::IsPet() { if (GetRace() >= 34001 && GetRace() <= 34021) return true; return false; } BOOL CInstanceBase::IsMount() { if (GetRace() >= 20101 && GetRace() <= 20109) return true; return false; }
Here you can change how long they are hidden, by ID.
Now open: InstanceBase.h
Search this:
void SetDuelMode(DWORD type);
Add after:
BOOL IsPet(); BOOL IsMount();
thnx bro , done .
-
Official Transmutation / Change Look
in Features & Metin2 Systems
Posted
can u share ur
i have same problem in costume weapon too