Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Guides & Templates
You last visited: Today at 17:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Tutorial] Metin2 - Get Player Position

Discussion on [Tutorial] Metin2 - Get Player Position within the Metin2 Guides & Templates forum part of the Metin2 category.

Reply
 
Old   #1
 
.back's Avatar
 
elite*gold: 26
Join Date: Jul 2017
Posts: 121
Received Thanks: 455
Arrow [Tutorial] Metin2 - Get Player Position


note. I've already released this little tut. on another forum and now i'm posting here as it is, don't blame me.

Hi, after years I decided to go back to Metin2.

So I decided to have fun calling python api functions directly in C++. I don't know if anyone has released a PoC yet, I haven't found anything here, so I'm releasing mine directly.

NOTE: You can get the same result by reversing and hooking functions directly, it's much easier.


1. First off we need to define a struct to hold our coordinates

Code:
struct vec3 {
	double x, y, z;
};
2. Now let's create our function to retrieve the local player position from the Python function

Code:
vec3 GetMainCharacterPosition( PyObject* function ) {
	PyObject* callObject = PyObject_CallObject( function, nullptr );

	/* here we hold the position */
	vec3 position;

	/* check if the result is a tuple with at least 3 items */
	if ( PyTuple_Check( callObject ) && PyTuple_GET_SIZE( callObject ) >= 3 ) {
		/* then we extract them from the tuple */
		PyObject* xObj = PyTuple_GetItem( callObject, 0 );
		PyObject* yObj = PyTuple_GetItem( callObject, 1 );
		PyObject* zObj = PyTuple_GetItem( callObject, 2 );

		/* convert the objects to doubles and assign them to the struct */
		position.x = PyFloat_AsDouble( xObj );
		position.y = PyFloat_AsDouble( zObj );
		position.z = PyFloat_AsDouble( yObj );

		/* then we release the references to the objects */
		Py_DECREF( xObj );
		Py_DECREF( yObj );
		Py_DECREF( zObj );
	}

	Py_DECREF( callObject );

	return position;
}
3. After creating our function, let's call it

Code:
void init( ) {

	sdk::utilities::setup_console( "test output" );

	/* import the python module */
	const auto& py_module = PyImport_ImportModule( "playerm2g2" );

	/* get the function for retrieving the local player position */
	const auto& py_func = PyObject_GetAttrString( py_module, "GetMainCharacterPosition" );

	/* here we will store our temp coords */
	double x, y, z;
	bool ok = true;

	while ( ok ) {
		if ( GetAsyncKeyState( VK_HOME ) & 1 )
			ok = false;

		vec3 local_pos = GetMainCharacterPosition( py_func );
		x = local_pos.x;
		y = local_pos.y;
		z = local_pos.z;

		/* beautiful, innit? */
		if ( x != 0 && y != 0 && z != 0 )
			std::cout << "x: " << x << " | y: " << y << " | z: " << z << std::endl;

		/* avoid excessive cpu usage */
		std::this_thread::sleep_for( std::chrono::milliseconds( 200 ) );
	}

	/* release the references to the objects after the loop */
	Py_DECREF( py_func );
	Py_DECREF( py_module );

	/* cleanup */
	FreeConsole( );
	FreeLibraryAndExitThread( h_module, 0 );

}


BOOLEAN WINAPI DllMain( HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved )
{
	switch ( nReason ) {

	case DLL_PROCESS_ATTACH:
		sdk::utilities::h_module = ( HMODULE )hDllHandle;
		init( );
		break;
	}
	return true;
}
4. Here you go.




If you don't know the Python Functions and Modules, here's a dump

NOTE: THIS DUMP IS FOR GF SERVER ( italy ), MAY BE DIFFERENT FOR PRIVATE SERVERS

Code:
--- module : background ----
EnableSnow
GlobalPositionToMapInfo
IsMapInfoByMapName
GetRenderShadowTime
Destroy
RegisterEnvironmentData
SetEnvironmentData
GetCurrentMapName
GetPickingPoint
SetCharacterDirLight
RenderCollision
GetHeight
GetRenderedSplatNum
SelectViewDistanceNum
SetViewDistanceSet
GetDistanceSetInfo
SetXMasTree
RegisterDungeonMapName
VisibleGuildArea
DisableGuildArea
SetXMasShowEvent
SetSnowModeOption
EnableSnowMode
SetNightModeOption
GetDayMode
ChangeEnvironmentData
SetSnowTextureModeOption
EnableSnowTextureMode
IsBoomMap
SetFogMode
GetFogMode
CreatePrivateShopPos
DeletePrivateShopPos
IsBattleFieldMap
IsReviveTargetMap
SetLateSummerEvent
GetLateSummerEvent
IsBattleRoyaleMap
IsNewWorldGuildMap
IsPkPeaceZone
IsPKGuildZone
CanPVPMap
CanUseGuildSkillMap
IsGuildBattleMap
IsGuildBattleAreaMap
CanIllustrationPageWarpMap
SetShadowTargetLevel
SetShadowQualityLevel
SetSplatLimit
---------------------------------------
--- module : battleRoyaleMgr ----
IsPCTextTailHided
IsDropItemDialogDisabled
---------------------------------------
--- module : chrmgrm2g ----
SetEmpireNameMode
GetVIDInfo
GetPickedVID
SetPathName
LoadRaceData
LoadLocalRaceData
CreateRace
SelectRace
RegisterAttachingBoneName
RegisterMotionMode
SetMotionRandomWeight
RegisterNormalAttack
ReserveComboAttackNew
RegisterComboAttackNew
RegisterMotionData
RegisterRaceName
RegisterRaceSrcName
RegisterCacheMotionData
SetEmoticon
RegisterEffect
RegisterCacheEffect
SetDustGap
SetHorseDustGap
RegisterTitleName
RegisterNameColor
RegisterTitleColor
SendRequestAutoSystemStart
SetAutoSystemByType
GetAutoSystemByType
SetAutoOnOff
GetAutoOnOff
SetPartyMatchOff
GetPartyMatchOff
SetRaceHeight
IsDead
---------------------------------------
--- module : chr ----
Destroy
Update
Deform
Render
RenderCollision
CreateInstance
DeleteInstance
SelectInstance
HasInstance
IsEnemy
IsNPC
IsHorse
IsShop
IsPartyMember
SetBlendRenderMode
Hide
Show
Pick
SetArmor
ChangeShape
SetRace
SetHair
SetAcce
SetScale
SetVirtualID
SetNameString
SetInstanceType
SetPixelPosition
Refresh
SetMotionMode
SetLoopMotion
BlendLoopMotion
PushOnceMotion
SetRotation
SetRotationAll
GetRace
GetNameByVID
GetGuildID
GetProjectPosition
GetInstanceType
GetBoundBoxOnlyXY
RaceToJob
RaceToSex
GetName
IsStone
testSetAddRenderMode
testSetModulateRenderMode
testSetAddRenderModeRGB
testSetModulateRenderModeRGB
testSetSpecularRenderMode
testRestoreRenderMode
---------------------------------------
--- module : effect ----
RegisterIndexedFlyData
---------------------------------------
--- module : event ----
RegisterEventSet
ClearEventSet
SetRestrictedCount
GetEventSetLocalYPosition
AddEventSetLocalYPosition
InsertTextInline
UpdateEventSet
RenderEventSet
SetEventSetWidth
Skip
IsWait
EndEventProcess
SelectAnswer
GetLineCount
GetTotalLineCount
SetFontColor
SetVisibleStartLine
GetVisibleStartLine
SetEventHandler
SetInterfaceWindow
SetLeftTimeString
QuestButtonClick
Destroy
SetVisibleLineCount
GetLineHeight
SetYPosition
GetProcessedLineCount
AllProcesseEventSet
---------------------------------------
--- module : footballEventModule ----
RequestStatusInfo
RequestUseQuestFlag
---------------------------------------
--- module : guildBattle ----
SetGuildHandler
SetGameHandler
SetGuildBattleHandler
SetStartTime
SetApplicationTime
GetApplicationTime
GetCurrentAreaIndex
GetCurrentAreaOccupyTeamColor
GetOccupyAllAreaInfo
GetPKCount
GetAllGuildName
GuildNameByTeamColor
GetKickedOutTime
AddGuildBattleTeamColorName
CanEnterGuildBattleMap
CanApplyTime
SendGuildBattleEnterRequest
SendGuildBattlePersonalRewardRequest
SendGuildBattleGuildRewardRequest
SendGuildBattleUseMoveAreaScroll
SendGuildBattleStatusBoardOpenCloseRequest
SendGuildBattlePageInfoRequest
SendRankingInfoRequest
SendExitRequest
ResetStatusBoardPos
---------------------------------------
--- module : monsterCard ----
SetMonsterCardAchievHandler
---------------------------------------
--- module : ingameEventSystem ----
SetIngameEventHandler
DestroyInGameEventHandler
GetInGameEventCount
GetInGameEventData
GetInGameEventRewardData
GetInGameEventEndTime
GetInGameEventEnable
SetInGameEventEnable
SendFlowerEventRequestInfo
SendFlowerEventExchange
SendRamadanEventRequestInfo
SendIceCreamEventRequestInfo
---------------------------------------
--- module : item ----
SetUseSoundFileName
SetDropSoundFileName
SelectItem
GetItemName
GetItemNameBySetValue
GetItemNameByVnum
GetItemDescription
GetItemSummary
GetIconImage
GetIconImageFileName
GetItemSize
GetItemType
GetItemSubType
GetItemMaskType
GetItemMaskSubType
GetIBuyItemPrice
GetISellItemPrice
IsAntiFlag
IsFlag
IsWearableFlag
Is1GoldItem
GetLimit
GetAffect
GetValue
GetIconInstance
GetUseType
DeleteIconInstance
IsEquipmentVID
IsRefineScroll
IsDetachScroll
IsKey
IsMetin
CanAddToQuickSlotItem
Pick
IsSealScroll
IsUnSealScrollPlus
IsItemUsedForDragonSoul
IsDragonSoulRelevantItem
GetUnlimitedSealDate
GetRefinedVnum
IsAcceScroll
GetVnum
CheckAffect
GetAffectDuration
GetAttendanceRewardList
IsPossibleChangeLookLeft
IsPossibleChangeLookRight
IsChangeLookClearScroll
IsChangeLookFreePassYangItem
IsWedddingItem
GetPointApply
GetApplyPoint
IsSoulItem
GetDSSetWeight
GetDSBasicApplyCount
GetDSBasicApplyValue
GetDSAdditionalApplyValue
GetAttr67MaterialVnum
GetRefineLevel
HasAffectShouldBeRemovedBeforeEnterMistsIsland
SetPreName
IsSetClearScroll
GetItemListContainsSubstringInName
GetTimePrintOnToolTip
GetCommonRewardData
IsWhiteDragonBlessItem
IsIronDragonBlessItem
---------------------------------------
--- module : mercenary ----
SendMercenaryWindowOpen
SendMercenaryWindowClose
SendMercenaryMissionRefresh
SendMercenaryFire
SendMercenaryCure
SendMercenaryCheckNew
SendMercenaryDrainStart
SendMercenaryDispatchStart
UseItem
SendMercenaryMissionGiveUp
SendMercenaryMissionResultRequest
SendRequestCheckCompleteMission
SendRequestCheckMercenaryInjuryEndTime
GetMercenarySlotData
GetMercenaryDisPatchCheckData
GetMercenaryDrainCheckData
GetMercenaryManageInfoData
GetMercenaryCount
GetMercenaryMissionCount
GetMercenaryLevel
GetMercenaryNextLevelExp
GetMercenaryCureData
GetMercenaryFireData
GetMercenarySpecificity
GetMercenaryState
GetMercenaryInjuryEndTime
GetMercenaryInjuryData
GetActiveData
GetMercenaryExpandSlotCount
GetMissionRegistData
GetMissionInfoData
GetMissionState
GetMissionDispatchBenefit
GetMissionBonusReward
GetMissionNeedActiveSuccessPct
GetMissionNeedActive
MercenaryDrainEnd
MercenaryDispatchSuccess
MercenaryGiveUpSuccess
MercenaryMissionResultEnd
ClearData
SetMercenaryHandler
MercenaryRefreshDispatchSlot
DrainSuccessOff
CheckInventory
CheckResultYang
IsMercenaryItem
IsClearMercenaryQuest
IsMissionCompleteChecking
IsCheckingInjuryEndTime
GetMissionRewardData
---------------------------------------
--- module : nonplayer ----
GetLevelByVID
GetGradeByVID
GetMonsterName
GetElementEnchantsByVID
IsAIFlagByVID
GetVnumByVID
GetElementBuffsByVID
---------------------------------------
--- module : playerm2g2 ----
GetAutoPotionInfo
SetGameWindow
RegisterCacheEffect
SetMouseState
SetMouseFunc
SetMouseMiddleButtonState
SetMainCharacterIndex
GetMainCharacterIndex
GetMainCharacterName
GetMainCharacterPosition
IsMainCharacterIndex
IsActingEmotion
IsPVPInstance
IsSameEmpire
IsChallengeInstance
IsRevengeInstance
IsCantFightInstance
GetCharacterDistance
IsMountingHorse
IsObserverMode
IsPoly
SetAutoCameraRotationSpeed
EndKeyWalkingImmediately
ResetCameraRotation
SetQuickCameraMode
SetSkill
GetSkillIndex
GetSkillSlotIndex
GetSkillGrade
GetSkillLevel
GetSkillCurrentEfficientPercentage
GetSkillNextEfficientPercentage
ClickSkillSlot
ChangeCurrentSkillNumberOnly
ClearSkillDict
GetItemIndex
GetItemFlags
GetItemCount
GetItemCountByVnum
GetItemCountByType
GetItemMetinSocket
GetItemAttribute
GetItemChangedAttribute
GetItemRefineElement
GetItemApplyRandom
GetItemSetValue
GetAuraSlotItemSetValue
GetAcceItemSetValue
IsAntiFlagBySlot
IsSealedItemBySlot
GetItemTypeBySlot
GetItemSubTypeBySlot
GetISellItemPrice
GetName
GetRace
GetPlayTime
SetPlayTime
IsSkillCoolTime
GetSkillCoolTime
IsSkillActive
UseGuildSkill
AffectIndexToSkillIndex
GetEXP
GetStatus
GetElk
GetMoney
GetCheque
GetGem
GetGemShopItemID
GetGemShopRefreshTime
GetGemShopOpenSlotItemCount
GetGemShopOpenSlotCount
SetGemShopWindowOpen
IsGemShopWindowOpen
GetBattlePoint
GetGuildID
GetGuildName
GetAlignmentData
RequestAddLocalQuickSlot
RequestAddToEmptyLocalQuickSlot
RequestDeleteGlobalQuickSlot
RequestMoveGlobalQuickSlotToLocalQuickSlot
RequestUseLocalQuickSlot
LocalQuickSlotIndexToGlobalQuickSlotIndex
GetQuickPage
SetQuickPage
GetLocalQuickSlot
GetGlobalQuickSlot
IsEquipmentSlot
IsDSEquipmentSlot
IsCostumeSlot
IsValuableItem
IsOpenPrivateShop
IsBeltInventorySlot
IsAvailableBeltInventoryCell
GetItemGrade
CanRefine
CanDetach
CanUnlock
CanAttachMetin
IsRefineGradeScroll
ClearTarget
SetTarget
OpenCharacterMenu
IsPartyMember
IsPartyLeader
GetPartyLeaderPid
GetPartyMemberName
GetPartyMemberCount
GetPartyMemberHPPercentage
GetPartyMemberState
GetPartyMemberAffects
RemovePartyMember
ExitParty
GetPKMode
RegisterEmotionIcon
GetEmotionIconImage
SetWeaponAttackBonusFlag
ToggleCoolTime
ToggleLevelLimit
GetTargetVID
SetItemData
SetItemCount
GetItemLink
SlotTypeToInvenType
SendDragonSoulRefine
GetItemSealDate
GetItemUnSealLeftTime
CanSealItem
GetAcceItemID
GetAcceItemSize
GetAcceItemFlags
GetAcceItemMetinSocket
GetAcceItemAttribute
GetAcceItemRefineElement
GetAcceItemApplyRandom
IsAcceWindowEmpty
GetCurrentItemCount
SetAcceRefineWindowOpen
GetAcceRefineWindowOpen
GetAcceRefineWindowType
FineMoveAcceItemSlot
SetAcceActivedItemSlot
FindActivedAcceSlot
FindUsingAcceSlot
CanAcceClearItem
SetItemCombinationWindowActivedItemSlot
GetConbWindowSlotByAttachedInvenSlot
GetInvenSlotAttachedToConbWindowSlot
CanAttachToCombMediumSlot
CanAttachToCombItemSlot
SetSafeZoneAttEnable
GetActivePetItemVNum
GetPetItem
GetPetSkill
GetPetSkillByIndex
GetPetExpPoints
GetPetLifeTime
GetActivePetItemId
GetPetItemVNumInBag
GetActivePetItemLifeMax
SetActivePetItemVNum
CanUsePetCoolTimeCheck
SetOpenMall
SetOpenSafeBox
SetOpenPetHatchingWindow
IsOpenPetHatchingWindow
SetOpenPetNameChangeWindow
IsOpenPetNameChangeWindow
SetOpenPetFeedWindow
IsOpenPetFeedWindow
SetItemPetAttrChangeWindowActivedItemSlot
GetPetAttrChangeWindowSlotByAttachedInvenSlot
GetInvenSlotAttachedToPetAttrChangeWindowSlot
CanAttachToPetAttrChangeSlot
SetAffectImpossibleAttack
WindowTypeToSlotType
GetExtendInvenStage
GetExtendInvenMax
KeySetting
KeySettingClear
IsOpenKeySettingWIndow
SetMiniGameWindowOpen
GetMiniGameWindowOpen
SetMiniGameOkeyNormal
GetMiniGameOkeyNormal
SetAutoSkillSlotIndex
SetAutoPotionSlotIndex
GetAutoSlotIndex
SetAutoSlotCoolTime
GetAutoSlotCoolTime
CheckAutoSlotItem
ClearAutoSKillSlot
ClearAutoPotionSlot
ClearAutoAllSlot
CheckSkillSlotCoolTime
CheckPotionSlotCoolTime
CanStartAuto
EmptySetItemEffect
GetSetItemEffect
SetAttendance
GetAttendance
SetMonsterBackEvent
GetMonsterBackEvent
OnKeyUp
OnKeyDown
GetChangeLookVnum
SetChangeLookWindow
GetChangeLookWindowOpen
GetChangeLookItemID
GetChangeWIndowChangeLookVnum
GetChangeLookItemInvenSlot
GetAcceWindowChangeLookVnum
CanChangeLookClearItem
GetChangeLookFreeYangItemID
GetChangeLookFreeYangInvenSlotPos
SetParalysis
GetMonsterCardMissionInfo
IsMissionDataLoad
GetMissionVec
GetMobEmergenceAreaIndex
GetIllustrationSoloPageMax
GetIllustrationPartyPageMax
GetIllustrationFileLoad
GetIllustrationSoloPageData
GetIllustrationPartyPageData
IsIllustrationDataLoad
SetIllustrationDataLoad
GetIllustrationData
IllustrationSelectModel
IllustrationShow
IllustrationChangeMotion
IllustrationModelRotation
IllustrationModelUpDown
IllustrationModelZoom
IllustrationModelViewReset
GetSortMonsterCardAchievIndex
GetSortMonsterCardAchievSize
GetMonsterCardAchievMonsters
GetMonsterCardAchievRewardByRank
IsMonsterCardNewCheck
SetMonsterCardNewCheck
MyShopDecoShow
SelectShopModel
IsBattleButtonFlush
SetBattleButtonFlush
IsBattleFieldOpen
GetBattleFieldEnable
SetBattleFieldOpen
SetBattleFieldInfo
IsBattleFieldEventOpen
GetBattleFieldEventEnable
GetBattleFieldEvent_StartHour
GetBattleFieldEvent_EndHour
SetBattleFieldEventOpen
SetBattleFieldEventInfo
SetFishEventGame
GetFishEventGame
GetFishEventItemPos
GetAccumulateDamageByVID
IsPartyMatchLoaded
GetPartyMatchInfoMap
IsPartyMatchEnoughItem
PartyMemberVIDToPID
SkillCoolTimeInitialize
YutnoriShow
YutnoriChangeMotion
SetCatchKingGame
GetCatchKingGame
GetItemAcceDrainRateGrade
GetSpecialActionSlot
GetCorrectlySpecialActionSlot
GetEmotionDuration
SetSpecialActionSlot
FindSpecialActionSlot
SetActingEmotionType
GetLoadingTip
CanActMainInstance
IsDead
IsOpenMall
SendPasswordType
SendStorageClose
SendChangePassword
GetStorageLock
GetMiniBossDungeon
SetMiniBossDungeon
SendLuckyBoxAction
FishingStart
FishingQuit
FishingSetBackgroundWaterWindow
FishingSetNavigationAreaWindow
FishingSetGoalCircleWindow
FishingSetTimeGaugeWindow
FishingSetTouchCountWindow
FishingSetTouchCountTextWindow
FishingSetFishWindow
FishingOnClickEvent
FishingSetDebugText1
FishingSetDebugText2
FishingSetDebugText3
FishingIsOnGoing
SetFishingEventWinOpen
IsFishingEventWinOpen
IsFishing
GetAuraItemID
GetAuraItemCount
GetAuraSlotItemFlags
GetAuraSlotItemMetinSocket
GetAuraSlotItemAttribute
GetAuraSlotItemApplyRandom
IsAuraSlotEmpty
GetAuraCurrentItemSlotCount
SetAuraWindowOpen
IsAuraWindowOpen
GetAuraWindowType
FineMoveAuraItemSlot
SetAuraActivedItemSlot
FindActivedAuraSlot
FindUsingAuraSlot
GetAuraLevelForStep
GetAuraNextNeedMaterial
GetAuraNextNeedMaterialCount
GetAuraNextNeedGold
GetAuraRefineInfoExpPer
GetAuraRefineInfoLevel
GetCubeListSize
GetCubeItem
GetItemSlotIndex
GetItemMetinSocketCount
IsMistsIslandOpen
GetMistsIslandOpenTime
SetMistsIslandOpenTime
GetMistsIslandImmediatelyTime
SetMiniGameBNW
GetMiniGameBNW
GetBattleRoyaleEnable
SetBattleRoyaleEnable
IsBattleRoyalePlaying
ChangeFromSetValueToAffect
ChangeFromAffectToSetValue
CanSetItemClear
IsCubeSetAddCategory
CheckItemSetValue
GetWorldBossEnable
SetWorldBossEnable
GetChannel
SetOtherWorldEveEnable
IsOtherWorldEveEnable
SetOtherWorldEnable
IsOtherWorldEnable
GetCurrentWearEquipmentWindow
GetCurrentBeltInventoryWindow
GetCurrentEquipmentSlotType
GetCurrentBeltSlotType
IsEquipmentWindow
IsBaseEquipmentWindow
IsBeltInventoryWindow
IsEquipmentSlotType
IsBaseEquipmentSlotType
IsBeltInventorySlotType
SetCurrentEquipmentPageIndex
SetCubeWindowOpen
SetRefineWindowOpen
SetDragonSoulRefineWindowOpen
SetMailBoxWindowOpen
CountEmptyInventory
PlayerMoveStop
GetEmptyCell
IsAbleAddToQuickSlotWhenUIOpen
CanAuraClearItem
GetSex
IsCorrectItemData
---------------------------------------
--- module : quest ----
GetQuestButtonNoticeCount
GetQuestCount
GetQuestData
GetQuestCounterData
GetQuestIndex
GetQuestLastTime
Clear
---------------------------------------
--- module : ranking ----
GetHighRankingInfoSolo
GetHighRankingInfoParty
GetPartyMemberName
GetMyRankingInfoSolo
GetMyRankingInfoParty
GetMyPartyMemberName
GetRankingInfoSoloSize
GetHighRankingInfoSoloWithGuildName
GetMyRankingInfoSoloWithGuildName
---------------------------------------
--- module : skill ----
LoadSkillData
ClearSkillData
GetSkillName
GetSkillDescription
GetSkillType
GetSkillConditionDescriptionCount
GetSkillConditionDescription
GetSkillAffectDescriptionCount
GetSkillAffectDescription
GetSkillCoolTime
GetSkillNeedSP
GetSkillContinuationSP
GetSkillMaxLevel
GetSkillLevelUpPoint
GetSkillLevelLimit
IsSkillRequirement
GetSkillRequirementData
GetSkillRequireStatCount
GetSkillRequireStatData
CanLevelUpSkill
CheckRequirementSueccess
IsToggleSkill
IsUseHPSkill
IsStandingSkill
CanUseSkill
GetIconImage
GetIconImageNew
GetIconInstanceNew
DeleteIconInstance
GetNewAffectDataCount
GetNewAffectData
GetDuration
GetDurationWithDecimalPoint
GetPetSkillIconImage
GetPetSkillInfo
GetPetSkillIconPath
GetSkillPowerByLevel
GetRoleProficiencyLeaderBonusByLevel
IsNinethSkillVnum
---------------------------------------
--- module : snowflakeStickEvent ----
SendSnowflakeStickEventRequestInfo
SendSnowflakeStickEventRequestExchangeStick
SendSnowflakeStickEventRequestExchangePet
SendSnowflakeStickEventRequestExchangeMount
GetSnowflakeStickUseTime
---------------------------------------
--- module : sportsMatch ----
SetSportsMatchPredictUIHandler
SendUIOpenRequest
SendUseResultItemFlag
SendExchangeResultItemFlag
SendUIClose
SendPredictUIOpen
SendPredictUIClose
GetParticipateTeamInfo
GetTeamTotalCount
SendAppointRequest
SendCheerRequest
IsPredictBlock
GetMatchWinTeamId
SendGiveRewardRequest
ClearWhenEventOff
CommandProcess
IsDataFileLoadSuccess
---------------------------------------
--- module : valentineDayModule ----
RequestStatusInfo
RequestUseQuestFlag
RequestWrapQuestFlag
GetLimitFlagCountByLevel
IsValentineDayEventFlag
---------------------------------------
--- module : yutnoriEvent ----
IsEventOn
SetEventFlag
---------------------------------------
--- module : chatm2g ----
SetChatColor
Clear
Close
CreateChatSet
Update
Render
SetBoardState
SetPosition
SetHeight
SetWidth
ToggleChatMode
EnableChatMode
DisableChatMode
SetEndPos
GetLineCount
GetVisibleLineCount
GetLineStep
AppendChat
AppendChatWithDelay
AppendAutoNoticeChat
EraseAutoNoticeChat
ArrangeShowingChat
CreateWhisper
AppendWhisper
RenderWhisper
SetWhisperBoxSize
SetWhisperPosition
ClearWhisper
InitWhisper
GetLinkFromHyperlink
SetChatFilter
InsertLocaleSet
ClearLocaleSet
SetLocaleCheck
---------------------------------------
--- module : exchange ----
InitTrading
GetElkFromSelf
GetElkFromTarget
GetItemVnumFromSelf
GetItemVnumFromTarget
GetItemCountFromSelf
GetItemCountFromTarget
GetAcceptFromSelf
GetAcceptFromTarget
GetNameFromTarget
GetLevelFromTarget
GetItemMetinSocketFromTarget
GetItemMetinSocketFromSelf
GetItemAttributeFromTarget
GetItemAttributeFromSelf
GetChequeFromSelf
GetChequeFromTarget
GetChangeLookVnumFromSelf
GetChangeLookVnumFromTarget
GetItemRefineElementFromTarget
GetItemRefineElementFromSelf
GetItemApplyRandomFromTarget
GetItemApplyRandomFromSelf
GetItemSetValueFromTarget
GetItemSetValueFromSelf
isTrading
---------------------------------------
--- module : goldenLand ----
SetGoldenLandInterfaceHandler
SetGoldenLandEventHandler
SetGoldenLandInformationBoardHandler
SetGoldenLandOasisShopHandler
SetFindGoldenFruitHandler
SetRewardItem
SetGoldenLandEndTime
IsGoldenLandEnable
ClearFruitCountInfo
SendRequestFruitCountInfo
IsSendRequestFruitCountInfo
SendExitDungeon
GetTreeFruitCount
GetYellowFruitCount
GetOasisShopMerchCount
GetOasisShopMerchInfo
GetRewardItemInfo
SendRequestFindGoldenFruitData
SendRequestOpenCard
SendRequestReset
IsMineTowerSkillProcessing
---------------------------------------
--- module : guild ----
IsGuildEnable
GuildIDToMarkID
GetMarkImageFilenameByMarkID
GetMarkIndexByMarkID
GetGuildID
HasGuildLand
GetGuildName
GetGuildMasterName
GetEnemyGuildName
GetGuildMoney
GetGuildBoardCommentCount
GetGuildBoardCommentData
GetGuildLevel
GetGuildExperience
GetGuildAttendance
GetGuildMemberCount
GetGuildMemberLevelAverage
GetGuildExperienceSummary
GetGuildSkillPoint
GetDragonPowerPoint
GetSkillLevel
SetSkillIndex
GetGradeData
GetGradeName
GetMemberCount
GetMemberData
MemberIndexToPID
IsMember
IsMemberByName
MainPlayerHasAuthority
Destroy
SetWarType
GetWarRecode
GetGuildLadderRanking
GetBaseInfo
GetBaseInfoBankGold
GetbuildingSize
GetbuildingInfo
GetRankingPageInfo
GetRankingInfo
GetSearchGuildRankingInfo
GetApplicantInfo
ClearGuildRanking
ClearApplicant
ClearApplicantGuild
PushBackGuildObjectVnum
ClearGuildObjectList
GetObjectVid
GetObjectXY
GetObjectzRot
GetbuildingInfoChangeWIndow
ClearRedDragonLairRanking
CheckRedDragonLairRanking
GetRedDragonLairRanking
GetDragonLairRankingShowCount
IsDragonLairClearGuild
GetMyDragonLairRanking
GetDonateCountByName
GetMemberAttendanceByName
GetMemberAttendance
SetGuildContentsEnable
IsGuildContentsEnable
---------------------------------------
--- module : guildbank ----
GetCurrentSafeboxSize
GetItemID
GetItemCount
GetItemFlags
GetItemMetinSocket
GetItemAttribute
OpenGuildBank
GetGuildBankInfoSize
GetGuildBankInfoData
GetItemChangeLookVnum
GetItemRefineElement
GetItemApplyRandom
GetItemSetValue
---------------------------------------
--- module : mail ----
GetMailDict
GetMailData
GetMailAddData
GetMailItemData
GetMailItemMetinSocket
GetMailItemAttribute
GetItemChangeLookVnum
GetItemRefineElement
GetItemApplyRandom
GetItemSetValue
---------------------------------------
--- module : messenger ----
RemoveFriend
IsFriendByName
Destroy
RefreshGuildMember
SetMessengerHandler
RemoveBlockFriend
IsBlockFriendByName
GetFriendNames
---------------------------------------
--- module : miniMap ----
SetScale
ScaleUp
ScaleDown
Destroy
Create
Update
Render
Show
Hide
isShow
GetInfo
UpdateAtlas
RenderAtlas
ShowAtlas
HideAtlas
IsAtlas
GetAtlasInfo
GetAtlasSize
RegisterAtlasWindow
UnregisterAtlasWindow
GetGuildAreaID
SetGuildSiteAuctionArea
GetGuildAuctionTime
---------------------------------------
--- module : mount ----
IsMountUpgradeUIOpen
IsMountingHorse
SendMountUpgradeSystemGiveFeed
SendMountUpgradeSystemLevelUp
SendMountUpgradeSystemClose
SendMountUpgradeSystemSkillLevelUp
SetMountHandler
---------------------------------------
--- module : premiumPrivateShop ----
Clear
GetSellingWon
GetSellingYang
GetTotalSellingPrice
---------------------------------------
--- module : safebox ----
GetItemID
GetItemCount
GetItemFlags
GetItemMetinSocket
GetItemAttribute
GetMoney
GetMallItemID
GetMallItemCount
GetMallItemMetinSocket
GetMallItemAttribute
GetMallSize
GetItemChangeLookVnum
GetMallItemChangeLookVnum
IsSealedMallItem
GetItemRefineElement
GetMallItemRefineElement
GetItemApplyRandom
GetMallItemApplyRandom
GetItemSetValue
GetMallItemSetValue
---------------------------------------
--- module : shop ----
Open
Close
IsOpen
IsPrivateShop
IsMainPlayerPrivateShop
GetItemID
GetItemCount
GetItemPrice
GetItemMetinSocket
GetItemAttribute
GetTabCount
GetAntiSell
IsNonNPCShop
GetTabName
GetTabCoinType
GetLimitMaxPoint
SetUsablePoint
GetUsablePoint
GetItemCheque
GetPrivateShopItemCheque
GetSaveItemPriceData
SetSaveItemPriceData
ClearPrivateShopStock
AddPrivateShopItemStock
DelPrivateShopItemStock
GetPrivateShopItemPrice
BuildPrivateShop
GetPrivateShopSearchResult
GetPrivateShopSearchResultCount
GetPrivateShopSearchResultMaxCount
GetPrivateShopSearchResultPage
GetPrivateShopSelectItemVnum
GetPrivateShopSelectItemChrVID
GetPrivateShopSelectItemMetinSocket
GetPrivateShopSelectItemAttribute
SetNameDialogOpen
GetNameDialogOpen
GetItemChangeLookVnum
GetPrivateShopItemChangeLookVnum
IsLimitedItemShop
GetLimitedCount
GetLimitedPurchaseCount
GetItemRefineElement
GetPrivateShopItemRefineElement
GetLimitLevel
GetItemApplyRandom
GetPrivateShopItemApplyRandom
GetItemSetValue
GetPrivateShopItemSetValue
---------------------------------------
--- module : sungmaheeGate ----
SetSungmaheeGateHandler
SetGameHandler
SetMiniMapHandler
SetSungmaheeGateState
SendRequestOpenAchiev
SendCloseAchiev
SendGetAchievReward
---------------------------------------
--- module : textTail ----
Clear
UpdateAllTextTail
UpdateShowingTextTail
Render
ShowCharacterTextTail
ShowItemTextTail
GetPosition
IsChat
ArrangeTextTail
HideAllTextTail
ShowAllTextTail
Pick
SelectItemName
EnablePKTitle
RegisterInfoTail
Initialize
---------------------------------------
--- module : pack ----
Exist
Get
---------------------------------------
--- module : app ----
IsDevStage
SetHairColorEnable
SetArmorSpecularEnable
SetWeaponSpecularEnable
SetSkillEffectUpgradeEnable
SetTwoHandedWeaponAttSpeedDecreaseValue
SetCameraMaxDistance
SetMinFog
SetFrameSkip
GetImageInfo
UpdateGame
RenderGame
Loop
Create
Exit
Abort
SetMouseHandler
IsExistFile
GetFileList
SetCamera
GetCamera
GetTime
GetGlobalTime
GetGlobalTimeStamp
GetUpdateFPS
GetRenderFPS
MovieRotateCamera
MoviePitchCamera
MovieZoomCamera
MovieResetCamera
GetAvailableTextureMemory
GetRenderTime
GetUpdateTime
GetFaceSpeed
GetFaceCount
SetGlobalCenterPosition
SetCenterPosition
GetCursorPosition
GetRandom
InitWebPage
ReloadWebPage
ShowWebPage
MoveWebPage
HideWebPage
IsPressed
SetCursor
GetCursor
ShowCursor
HideCursor
IsShowCursor
IsLiarCursorOn
GetRotatingDirection
GetDegreeDifference
SetDefaultFontName
SetGuildSymbolPath
EnableSpecialCameraMode
SetDefaultCamera
SetCameraSetting
OpenTextFile
CloseTextFile
GetTextFileLineCount
GetTextFileLine
GetLocalePath
GetLocalePathOrigin
ForceSetLocale
LoadLocaleData
GetDefaultCodePage
GetFontFromCodePage
IsVisibleNotice
EnableTestServerFlag
IsEnableTestServerFlag
SetGuildMarkPath
OnLogoUpdate
OnLogoRender
OnLogoOpen
OnLogoClose
GetTimeString
GetLocalTime
LoadLocaleAddr
GetLocaleName
SetCameraSpeed
SaveCameraSetting
LoadCameraSetting
SetcmrZ
IllustratedCreate
MyShopDecoBGCreate
YutnoriCreate
GetLoginType
SetReloadLocale
GetReloadLocale
ReloadLocaConfig
GetTextLength
GetTextWidth
GetTextLineByWidth
---------------------------------------
--- module : ime ----
EnableCaptureInput
DisableCaptureInput
SetMax
SetUserMax
SetText
GetText
GetCodePage
GetCandidateCount
GetCandidate
GetCandidateSelection
GetReading
GetReadingError
EnableIME
DisableIME
SetNumberMode
SetStringMode
AddExceptKey
ClearExceptKey
MoveLeft
MoveRight
MoveHome
MoveEnd
SetCursorPosition
Delete
PasteString
PasteBackspace
PasteReturn
PasteTextFromClipBoard
EnablePaste
SetCheckWidth
SetMovableEditLineMode
---------------------------------------
--- module : snd ----
PlaySound
PlaySound3D
FadeInMusic
FadeOutMusic
FadeOutAllMusic
FadeLimitOutMusic
StopAllSound
SetMusicVolume
SetSoundVolumef
SetSoundVolume
SetSoundScale
SetAmbienceSoundScale
---------------------------------------
--- module : systemSetting ----
GetWidth
GetHeight
SetInterfaceHandler
DestroyInterfaceHandler
GetMusicVolume
GetSoundVolume
SetMusicVolume
SetSoundVolumef
IsSoftwareCursor
SetViewChatFlag
IsViewChat
SetAlwaysShowNameFlag
IsAlwaysShowName
SetShowDamageFlag
IsShowDamage
SetShowSalesTextFlag
IsShowSalesText
GetShadowTargetLevel
SetShadowTargetLevel
GetShadowQualityLevel
SetShadowQualityLevel
SetNightModeOption
GetNightModeOption
SetSnowModeOption
GetSnowModeOption
SetSnowTextureModeOption
GetSnowTextureModeOption
SetShowMobAIFlag
IsShowMobAIFlag
SetShowMobLevel
IsShowMobLevel
IsDiceChatShow
SetDiceChatShow
GetStructureViewMode
SetStructureViewMode
GetCameraMode
SetCameraMode
---------------------------------------
--- module : m2netm2g ----
EnableChatInsultFilter
ClearServerInfo
SetMapIndex
SetChannelName
SetServerName
GetMapIndex
GetChannelNumber
GetChannelCount
GetChannelName
GetServerInfo
PreserveServerCommand
GetPreservedServerCommand
StartGame
IsTest
SetMarkServer
IsChatInsultIn
IsInsultIn
UploadMark
UploadSymbol
GetGuildID
GetEmpireID
GetMainActorRace
GetMainActorEmpire
GetMainActorSkillGroup
GetAccountCharacterSlotDataInteger
GetAccountCharacterSlotDataString
GetFieldMusicFileName
GetFieldMusicVolume
SetLoginInfo
GetLoginID
SetPhaseWindow
ClearPhaseWindow
SetServerCommandParserWindow
SetAccountConnectorHandler
SetHandler
SetTCPRecvBufferSize
SetTCPSendBufferSize
SetUDPRecvBufferSize
DirectEnter
LogOutGame
ExitGame
ExitApplication
ExitGameLanguageChange
MoveChannelGame
ConnectTCP
ConnectToAccountServer
SendChinaMatrixCardPacket
SendRunupMatrixCardPacket
SendSelectEmpirePacket
SendSelectCharacterPacket
SendChangeNamePacket
SendCreateCharacterPacket
SendDestroyCharacterPacket
SendEnterGamePacket
SendItemUsePacket
SendItemUseToItemPacket
SendItemDropPacketNew
SendGoldDropPacketNew
SendItemMovePacket
SendGiveItemPacket
Disconnect
SendChatPacket
SendWhisperPacket
SendPrivateShopClose
SendShopEndPacket
SendShopBuyPacket
SendShopSellPacketNew
SendExchangeStartPacket
SendExchangeItemAddPacket
SendExchangeElkAddPacket
SendExchangeAcceptPacket
SendExchangeExitPacket
SendOnClickPacket
RegisterEmoticonType
SendMessengerAddByVIDPacket
SendMessengerAddByNamePacket
SendMessengerRemovePacket
SendMessengerBlockAddByVIDPacket
SendMessengerBlockAddByNamePacket
SendMessengerBlockRemovePacket
SendMessengerBlockRemoveByVIDPacket
SendPartyInvitePacket
SendPartyInviteAnswerPacket
SendPartyExitPacket
SendPartyRemovePacket
SendPartySetStatePacket
SendPartyUseSkillPacket
SendPartyParameterPacket
SendSafeboxCheckinPacket
SendSafeboxCheckoutPacket
SendSafeboxItemMovePacket
SendMallCheckoutPacket
SendAnswerMakeGuildPacket
SendQuestInputStringPacket
SendQuestInputStringLongPacket
SendQuestConfirmPacket
SendGuildAddMemberPacket
SendGuildChangeGradeNamePacket
SendGuildChangeGradeAuthorityPacket
SendGuildOfferPacket
SendGuildDonatePacket
SendGuildDonateOpenPacket
SendGuildDonateClosePacket
SendGuildPostCommentPacket
SendGuildDeleteCommentPacket
SendGuildRefreshCommentsPacket
SendGuildChangeMemberGradePacket
SendGuildUseSkillPacket
SendGuildChangeMemberGeneralPacket
SendGuildInviteAnswerPacket
SendGuildChargeGSPPacket
SendGuildDepositMoneyPacket
SendGuildWithdrawMoneyPacket
SendGuildMemberOut
SendGuildChangeMaster
SendGuildLandAbandon
SendGuildBankClose
SendGuildBankCheckin
SendGuildBankCheckOut
SendGuildBankMove
SendGuildBankInfoOpen
GuildBankInfoOpen
SendGuildGoldInOut
SendGuildGoldInOutWindowOpen
SendGuildAttendancePacket
SendAcceRefineCheckIn
SendAcceRefineCheckOut
SendAcceRefineAccept
SendAcceRefineCanCle
SendPetFeedPacket
SendPetHatchingPacket
SendPetHatchingWindowPacket
SendPetNameChangeWindowPacket
SendPetNameChangePacket
CheckUsePetItem
SendPetLearnSkill
SendPetDeleteSkill
SendPetDeleteAllSkill
SendPetAttrDetermine
SendChangePetPacket
SendPetWindowType
SendPetSkillUpgradeRequest
SendPetSkillUpgrade
SendItemCombinationPacket
SendItemCombinationPacketCancel
SendSkillBookCombinationPacket
SendChagedItemAttributePacket
SendPrivateShopSearchInfo
SendPrivateShopSearchInfoSub
SendPrivateShopSerchBuyItem
ClosePrivateShopSearchWindow
SendRefinePacket
SendRefineElementPacket
SendSelectItemPacket
SetPacketSequenceMode
SetEmpireLanguageMode
SendExtendInvenUpgrade
SendExtendInvenButtonClick
SendMiniGameRumiStart
SendMiniGameRumiHandCardClick
SendMiniGameRumiDeckCardClick
SendMiniGameRumiFieldCardClick
SendMiniGameRumiExit
SendMiniGameRumiRequestQuestFlag
OpenKeyChangeWindow
SendRequestGuildList
SendRequestSearchGuild
SendRequestApplicant
SendRequestApplicantList
SendRequestApplicantGuildList
SendRequestGuildInfos
SendMiniGameAttendanceButtonClick
SendMiniGameAttendanceRequestData
SendMiniGameAttendanceRequestRewardList
SendRequestEventQuest
SendChangeLookCheckIn
SendChangeLookCheckOut
SendChangeLookAccept
SendChangeLookCanCle
SendChangeLookCheckInFreeYangItem
SendChangeLookCheckOutFreeYangItem
SendMissionMessage
SendIllustrationMessage
SendAchievMessage
SendAchievApplyRegistMessage
SendMyShopDecoState
SendMyShopDecoSet
SendUseFishBox
SendDropFishEventBlock
SendAddFishBox
SendRequestFishEventBlock
SendPartyMatchSearch
SendPartyMatchCancel
SendGemShopClose
SendGemShopBuy
SendRequestRefresh
SendSelectmetinstone
SendSlotAdd
SetPvPOnOffControl
GetPvPOnOffControl
SendMiniGameYutnoriStart
SendMiniGameYutnoriGiveup
SendMiniGameYutnoriProb
SendMiniGameYutThrow
SendMiniGameYutMove
SendMiniGameCharClick
SendMiniGameRequestComAction
SendMiniGameYutReward
SendMiniGameYutRequestQuestFlag
SendMailBoxClose
SendPostWriteConfirm
SendPostWrite
SendPostGetItems
RequestPostAddData
SendPostDelete
SendPostAllDelete
SendPostAllGetItems
SendMiniGameCatchKingStart
SendMiniGameCatchKingClickHand
SendMiniGameCatchKingReward
SendMiniGameCatchKingRequestQuestFlag
GetSelectPage
GetCharCount
GetCashSlotMax
IsHackUserAccount
SendSelectPage
SendEmotionPlay
SendEmotionAllow
SendCommandPacket
SendAttr67ClosePacket
SendAttr67AddPacket
SendPetRevive
SendMiniGameRouletteClose
SendMiniGameRouletteStart
SendMiniGameRouletteRequest
SendMiniGameRouletteEnd
SendAuraRefineCheckIn
SendAuraRefineCheckOut
SendAuraRefineAccept
SendAuraRefineCanCle
SendCubeClose
SendCubeMake
SendMistsIsland
SendMiniGameBNWDonate
SendMiniGameBNWDonateRankOpen
SendMiniGameBNWRewardShopOpen
SendMiniGameBNWStart
SendMiniGameBNWClose
SendMiniGameBNWGiveup
SendMiniGameBNWReady
SendMiniGameBNWCardThrow
SendMiniGameBNWReward
SendBattleRoyaleApplication
SendBattleRoyaleApplicationCancel
SendBattleRoyaleStart
SendBattleRoyaleExit
SendBattleRoyaleRanking
SendPassiveAttrOpen
SendPassiveAttrClose
SendPassiveAttrCharge
SendPassiveAttrAdd
SendPassiveAttrActivateDeactivate
SendPassiveAttrChangePage
SetSetCreateEnable
GetSetCreateEnable
SendPrivateShopSearchInfoByVnum
SendWorldBossGetReward
SendWorldBossRanking
SendWorldBossRequestInfo
SendSungmaheeTowerCloseEnterUI
SendSungmaheeTowerRequestRankDataByFloor
SendSungmaheeTowerDungeonEnter
SendSungmaheeTowerDungeonExit
SendPremiumPrivateShopUIClose
SendPremiumPrivateShopModify
SendPremiumPrivateShopModifyStateItemTakeOut
SendPremiumPrivateShopModifyStateItemMove
SendPremiumPrivateShopModifyStateItemAdd
SendPremiumPrivateShopCloseStateItemTakeOut
SendPremiumPrivateShopReOpen
SendPremiumPrivateShopClose
SendPremiumPrivateShopTaxAdjustment
SendLootingSettings
SendSecretDungeonCreateAnswerPacket
SendSecretDungeonEnterAnswerPacket
SendOtherWorldDungeonExit
SendOtherWorldEventRequestInfo
SendOtherWorldExchange
---------------------------------------
--- module : ServerStateChecker ----
Create
Update
Request
SetAuth
AddChannel
Initialize
---------------------------------------
--- module : rootlib ----
isExist
moduleImport
---------------------------------------
--- module : dbg ----
LogBox
Trace
Tracen
TraceError
RegisterExceptionString
---------------------------------------
--- module : wndMgr ----
SetMouseHandler
SetScreenSize
GetScreenWidth
GetScreenHeight
AttachIcon
SetAttachingFlag
SetDisableDeattach
GetHyperlink
OnceIgnoreMouseLeftButtonUpEvent
Register
RegisterSlotWindow
RegisterGridSlotWindow
RegisterTextLine
RegisterEditLine
RegisterMoveTextLine
RegisterMarkBox
RegisterImageBox
RegisterExpandedImageBox
RegisterAniImageBox
RegisterMoveImageBox
RegisterMoveScaleImageBox
RegisterButton
RegisterRadioButton
RegisterToggleButton
RegisterDragButton
RegisterBox
RegisterBar
RegisterLine
RegisterBar3D
RegisterCircle
RegisterNumberLine
RegisterRenderTarget
RegisterFishEventGridSlotWindow
Destroy
AddFlag
IsRTL
SetName
GetName
SetTop
Show
Hide
IsShow
IsRendering
SetParent
SetPickAlways
IsFocus
SetFocus
KillFocus
Lock
Unlock
SetWindowSize
SetWindowPosition
GetWindowWidth
GetWindowHeight
GetWindowLocalPosition
GetWindowGlobalPosition
GetWindowRect
SetWindowHorizontalAlign
SetWindowVerticalAlign
GetChildCount
IsPickedWindow
IsIn
GetMouseLocalPosition
GetMousePosition
SetLimitBias
UpdateRect
SetClippingMaskRect
SetClippingMaskWindow
AppendSlot
ArrangeSlot
ClearSlot
ClearAllSlot
HasSlot
SetSlot
SetSlotCount
SetSlotCountNew
SetSlotCoolTime
SetSlotCoolTimeColor
SetSlotCoolTimeInverse
SetCantMouseEventSlot
SetCanMouseEventSlot
SetUnusableSlotOnTopWnd
SetUsableSlotOnTopWnd
GetSlotGlobalPosition
GetSlotLocalPosition
ActivateSlot
DeactivateSlot
EnableSlot
DisableSlot
ShowSlotBaseImage
HideSlotBaseImage
SetSlotStyle
SetSlotBaseImage
SetSlotScale
SetBaseImageScale
SetCorverButtonScale
SetCoverButton
EnableCoverButton
DisableCoverButton
SetAlwaysRenderCoverButton
AppendSlotButton
AppendRequirementSignImage
ShowSlotButton
HideSlotButton
HideAllSlotButton
ShowRequirementSign
HideRequirementSign
RefreshSlot
SetUseMode
SetUsableItem
GetSlotCount
LockSlot
UnlockSlot
IsLockSlot
ClearWheelTopWindow
SetWheelTopWindow
SetColor
SetMax
SetHorizontalAlign
SetVerticalAlign
SetSecret
SetOutline
SetFeather
SetMultiLine
SetText
SetFontName
SetFontColor
SetLimitWidth
GetText
GetTextSize
ShowCursor
HideCursor
GetCursorPosition
GetTextLineCount
DisableEnterToken
SetLineHeight
GetLineHeight
SetNumber
SetNumberHorizontalAlignCenter
SetNumberHorizontalAlignRight
SetPath
MarkBox_SetImage
MarkBox_SetImageFilename
MarkBox_Load
MarkBox_SetIndex
MarkBox_SetScale
MarkBox_SetDiffuseColor
LoadImage
SetDiffuseColor
SetButtonDiffuseColor
IsDIsable
GetWidth
GetHeight
LeftRightReverseImageBox
SetCoolTimeImageBox
SetStartCoolTimeImageBox
SetScale
SetOrigin
SetRotation
SetRenderingRect
SetRenderingMode
SetDelay
AppendImage
SetSlotDiffuseColor
SetAniImgScale
SetRenderingRectWithScale
ResetFrame
MoveStart
MoveStop
GetMove
SetMovePosition
SetMoveSpeed
SetMaxScale
SetMaxScaleRate
SetScalePivotCenter
SetUpVisual
SetOverVisual
SetDownVisual
SetDisableVisual
GetUpVisualFileName
GetOverVisualFileName
GetDownVisualFileName
Flash
EnableFlash
DisableFlash
Enable
Disable
Over
LeftRightReverse
Down
SetUp
IsDown
SetRestrictMovementArea
SetButtonScale
GetButtonImageWidth
GetButtonImageHeight
SetSlotCoverImage
EnableSlotCoverImage
IsActiveSlot
SetSlotImage
SetSecondSlotCoverImage
EnableSecondSlotCoverImage
SetRenderTarget
SetAlwaysToolTip
SetPickedAreaRender
SetSlotType
SetMovableMode
InitMovableModeValues
ResetMovableModeValues
GetMovableRectToRender
SetHyperLinkImpossible
---------------------------------------
--- module : grpText ----
SetFontName
SetFontColor
SetOutline
GetSplitingTextLineCount
GetSplitingTextLine
---------------------------------------
--- module : grpImage ----
Render
SetPosition
Generate
GenerateFromHandle
Delete
SetDiffuseColor
GetWidth
GetHeight
GetGraphicImagePointer
---------------------------------------
--- module : grp ----
InitScreenEffect
ClearDepthBuffer
GenerateColor
PopState
PushState
SetPerspective
SetColor
SetCursorPosition
RenderLine
RenderBox
RenderRoundBox
RenderBar
RenderGradationBar
SaveScreenShot
SaveScreenShotToPath
SetInterfaceRenderState
SetGameRenderState
SetViewport
RestoreViewport
SetOmniLight
CreateTextBar
CreateBigTextBar
DestroyTextBar
RenderTextBar
TextBarTextOut
TextBarSetTextColor
TextBarGetTextExtent
ClearTextBar
SetTextBarClipRect
GetEffectOnOffLevel
GetPrivateShopOnOffLevel
GetDropItemOnOffLevel
GetPetOnOffStatus
GetNPCNameOnOffStatus
SetEffectOnOffLevel
SetPrivateShopOnOffLevel
SetDropItemOnOffLevel
SetPetOnOffStatus
SetNPCNameOnOffStatus
---------------------------------------
--- module : utils ----
---------------------------------------
--- module : uiUserSituationNotice ----
---------------------------------------
--- module : uiUploadMark ----
---------------------------------------
--- module : uiTest ----
---------------------------------------
--- module : uiSystemOption ----
---------------------------------------
--- module : uiSpecialGacha ----
---------------------------------------
--- module : uiSelectMusic ----
---------------------------------------
--- module : uiselectitemEx ----
---------------------------------------
--- module : uiselectitem ----
---------------------------------------
--- module : uiSecretDungeon ----
---------------------------------------
--- module : uiScriptLocale ----
---------------------------------------
--- module : uiQuest ----
---------------------------------------
--- module : uiPopupNotice ----
---------------------------------------
--- module : uiPointReset ----
---------------------------------------
--- module : uiPlayerGauge ----
---------------------------------------
--- module : uiPickMoney ----
---------------------------------------
--- module : uiPickETC ----
---------------------------------------
--- module : uiPhaseCurtain ----
---------------------------------------
--- module : uiMountUpgradeSystem ----
---------------------------------------
--- module : uiMonsterCard ----
---------------------------------------
--- module : uiMiniGameRoulette ----
---------------------------------------
--- module : uiMapNameShower ----
---------------------------------------
--- module : uiLuckyBox ----
---------------------------------------
--- module : uiItemCombination ----
---------------------------------------
--- module : uiGuildPopup ----
---------------------------------------
--- module : uiGuildList ----
---------------------------------------
--- module : uiGuildDragonLairRanking ----
---------------------------------------
--- module : uiGemShop ----
---------------------------------------
--- module : uiGameButton ----
---------------------------------------
--- module : uiFootballEvent ----
---------------------------------------
--- module : uiFishingGame ----
---------------------------------------
--- module : uiEquipmentDialog ----
---------------------------------------
--- module : uiDutchAuction ----
---------------------------------------
--- module : uiCharacterDetails ----
---------------------------------------
--- module : uiChangeLook ----
---------------------------------------
--- module : uiCandidate ----
---------------------------------------
--- module : uiAura ----
---------------------------------------
--- module : uiAttr67Add ----
---------------------------------------
--- module : uiAttachMetin ----
---------------------------------------
--- module : uiAcce ----
---------------------------------------
--- module : system ----
---------------------------------------
--- module : serverCommandParser ----
---------------------------------------
--- module : Prototype ----
---------------------------------------
--- module : playerSettingModule ----
---------------------------------------
--- module : musicInfo ----
---------------------------------------
--- module : logininfo ----
---------------------------------------
--- module : introLogo ----
---------------------------------------
--- module : introLoading ----
---------------------------------------
--- module : exception ----
---------------------------------------
--- module : debugInfo ----
---------------------------------------
--- module : colorInfo ----
---------------------------------------
--- module : _codecs ----
register
lookup
encode
decode
escape_encode
escape_decode
utf_8_encode
utf_8_decode
utf_7_encode
utf_7_decode
utf_16_encode
utf_16_le_encode
utf_16_be_encode
utf_16_decode
utf_16_le_decode
utf_16_be_decode
utf_16_ex_decode
utf_32_encode
utf_32_le_encode
utf_32_be_encode
utf_32_decode
utf_32_le_decode
utf_32_be_decode
utf_32_ex_decode
unicode_escape_encode
unicode_escape_decode
unicode_internal_encode
unicode_internal_decode
raw_unicode_escape_encode
raw_unicode_escape_decode
latin_1_encode
latin_1_decode
ascii_encode
ascii_decode
charmap_encode
charmap_decode
charmap_build
readbuffer_encode
charbuffer_encode
mbcs_encode
mbcs_decode
register_error
lookup_error
---------------------------------------
--- module : _locale ----
setlocale
localeconv
strcoll
strxfrm
_getdefaultlocale
---------------------------------------
--- module : audioop ----
max
minmax
avg
maxpp
avgpp
rms
findfit
findmax
findfactor
cross
mul
add
bias
ulaw2lin
lin2ulaw
alaw2lin
lin2alaw
lin2lin
adpcm2lin
lin2adpcm
tomono
tostereo
getsample
reverse
ratecv
---------------------------------------
--- module : binascii ----
a2b_uu
b2a_uu
a2b_base64
b2a_base64
a2b_hqx
b2a_hqx
b2a_hex
a2b_hex
hexlify
unhexlify
rlecode_hqx
rledecode_hqx
crc_hqx
crc32
a2b_qp
b2a_qp
---------------------------------------
--- module : imageop ----
crop
scale
grey2mono
grey2grey2
grey2grey4
dither2mono
dither2grey2
mono2grey
grey22grey
grey42grey
tovideo
rgb2rgb8
rgb82rgb
rgb2grey
grey2rgb
---------------------------------------
--- module : parser ----
ast2tuple
ast2list
compileast
compilest
expr
isexpr
issuite
suite
sequence2ast
sequence2st
st2tuple
st2list
tuple2ast
tuple2st
_pickler
---------------------------------------
--- module : _sha256 ----
sha256
sha224
---------------------------------------
--- module : _sha512 ----
sha512
sha384
---------------------------------------
--- module : _sha ----
new
---------------------------------------
--- module : _symtable ----
symtable
---------------------------------------
--- module : _codecs_cn ----
getcodec
---------------------------------------
--- module : _codecs_hk ----
getcodec
---------------------------------------
--- module : _codecs_iso2022 ----
getcodec
---------------------------------------
--- module : _codecs_jp ----
getcodec
---------------------------------------
--- module : _codecs_kr ----
getcodec
---------------------------------------
--- module : _codecs_tw ----
getcodec
---------------------------------------
--- module : _multibytecodec ----
__create_codec
---------------------------------------
--- module : _subprocess ----
GetStdHandle
GetCurrentProcess
DuplicateHandle
CreatePipe
CreateProcess
TerminateProcess
GetExitCodeProcess
WaitForSingleObject
GetVersion
GetModuleFileName
---------------------------------------
--- module : msvcrt ----
heapmin
locking
setmode
open_osfhandle
get_osfhandle
kbhit
getch
getche
putch
ungetch
getwch
getwche
putwch
ungetwch
---------------------------------------
Have Fun!
.back is offline  
Thanks
9 Users
Old 06/01/2023, 10:05   #2
 
.back's Avatar
 
elite*gold: 26
Join Date: Jul 2017
Posts: 121
Received Thanks: 455
Quote:
Originally Posted by DarkzyGR View Post
Can you please give us the whole code?
this already is the whole code
.back is offline  
Old 06/01/2023, 23:07   #3



 
cypher's Avatar
 
elite*gold: 600
The Black Market: 1061/0/0
Join Date: Sep 2008
Posts: 10,541
Received Thanks: 3,083
Arrow Metin2 Hacks, Bots, Cheats, Exploits & Macros -> Metin2 Guides & T…

#moved
cypher is online now  
Old 06/06/2023, 23:10   #4
 
elite*gold: 0
Join Date: Jun 2009
Posts: 70
Received Thanks: 149
Always good to see tutorials like this for new people to learn.

I few remarks for improvements:
At this point I itnk you will be limited to python functions by using this method. So I would rather inject a python script and call functions from there.
Also, I would avoid creating a new thread and calling game functions directly, i have experienced weird crashes because of the use of multiple threads. Metin2 was not designed to work with multiple threads so you might encounter race conditions in another functions that may crash the game.
martinx1 is offline  
Thanks
2 Users
Old 06/10/2023, 01:16   #5
 
.back's Avatar
 
elite*gold: 26
Join Date: Jul 2017
Posts: 121
Received Thanks: 455
Quote:
Originally Posted by martinx1 View Post
Always good to see tutorials like this for new people to learn.

I few remarks for improvements:
At this point I itnk you will be limited to python functions by using this method. So I would rather inject a python script and call functions from there.
Also, I would avoid creating a new thread and calling game functions directly, i have experienced weird crashes because of the use of multiple threads. Metin2 was not designed to work with multiple threads so you might encounter race conditions in another functions that may crash the game.
Hi, thanks for ur suggestion

While testing I've already experienced crashes, but some crashes could be avoided by clearing references, obviously this is not the best way to interact with it, as you said it's better to inject a python script and do everything directly in python.

But ye, could be useful to someone that is trying to update old projects :P
.back is offline  
Thanks
3 Users
Old 09/29/2023, 09:40   #6
 
elite*gold: 0
Join Date: Sep 2023
Posts: 2
Received Thanks: 5
For me, it took a few weeks to learn how to compile this code. So maybe you'll find some tips
1) Download Visual Studio Community 2022
Visual Studio 2022 takes up a lot of disk space for me, so I've chosen essential options.
Check:
Desktop development with C++
MSVC v143 - VS 2022 C++ x64/x86 build tools
Windows 11 SDK (10.0.22621.0)
You can create simple console application to check if visual studio works.

2) Download Python27

3) Create a new project -> Dynamic-Link-Library (DLL)
a) Change Debug to Release
b) Change x64 to x86
c) Debug -> HereIsNameOfYourProject DebugProperties
d) VC++ Directories -> Include Directories:
add path (check where you have Python27\include) -> C:\Python27\include
e) VC++ Directories -> Library Directories:
add path (check where you have Python27\libs) -> C:\Python27\libs
f) Linker -> Input -> Additional Dependencies
add python27.lib

4) Copy paste code:
Code:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
#include <Python.h>
#include <thread>
#include <iostream>

struct vec3 {
    double x, y, z;
};

vec3 GetMainCharacterPosition(PyObject* function) {
    PyObject* callObject = PyObject_CallObject(function, nullptr);

    /* here we hold the position */
    vec3 position;

    /* check if the result is a tuple with at least 3 items */
    if (PyTuple_Check(callObject) && PyTuple_GET_SIZE(callObject) >= 3) {
        /* then we extract them from the tuple */
        PyObject* xObj = PyTuple_GetItem(callObject, 0);
        PyObject* yObj = PyTuple_GetItem(callObject, 1);
        PyObject* zObj = PyTuple_GetItem(callObject, 2);

        /* convert the objects to doubles and assign them to the struct */
        position.x = PyFloat_AsDouble(xObj);
        position.y = PyFloat_AsDouble(zObj);
        position.z = PyFloat_AsDouble(yObj);

        /* then we release the references to the objects */
        Py_DECREF(xObj);
        Py_DECREF(yObj);
        Py_DECREF(zObj);
    }

    Py_DECREF(callObject);

    return position;
}

void init() {

    //sdk::utilities::setup_console("test output");
    AllocConsole();
    freopen_s((FILE**)stdout, "CONOUT$", "w", stdout);
    std::cout << "test output" << std::endl;

    /* import the python module */
    //const auto& py_module = PyImport_ImportModule("playerm2g2");
    const auto& py_module = PyImport_ImportModule("rGuOnaAeJR");    // Check your module using program: Metin2 DragoDumper 
    if (py_module == nullptr) {
        std::cout << "py_module = nullptr\n";
        FreeConsole();
        return;
    }

    /* get the function for retrieving the local player position */
    const auto& py_func = PyObject_GetAttrString(py_module, "GetMainCharacterPosition");

    /* here we will store our temp coords */
    double x, y, z;
    bool ok = true;

    while (ok) {
        if (GetAsyncKeyState(VK_HOME) & 1)
            ok = false;

        vec3 local_pos = GetMainCharacterPosition(py_func);
        x = local_pos.x;
        y = local_pos.y;
        z = local_pos.z;

        /* beautiful, innit? */
        if (x != 0 && y != 0 && z != 0)
            std::cout << "x: " << x << " | y: " << y << " | z: " << z << std::endl;

        /* avoid excessive cpu usage */
        std::this_thread::sleep_for(std::chrono::milliseconds(200));
    }

    /* release the references to the objects after the loop */
    Py_DECREF(py_func);
    Py_DECREF(py_module);

    /* cleanup */
    FreeConsole();
    //FreeLibraryAndExitThread(h_module, 0);
}

BOOL APIENTRY DllMain(HMODULE hModule,
    DWORD  ul_reason_for_call,
    LPVOID lpReserved
)
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH: {
        //sdk::utilities::h_module = (HMODULE)hDllHandle;
        init();
        FreeLibraryAndExitThread(hModule, 0);
    }break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

5) Check name of your module
Here you'll find program to dump Python Functions and Modules:


6) Build program, it's not exe so if it worked you'll find this line in console:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

7) Download program to inject dll, I use Extreme Injector (antivirus will block it)

8) Inject HereIsNameOfYourProject.dll to metin2client.exe

I wrote these steps but you'll find your own problems, errors, crashes which you have to fix. Maybe better if you start with small steps like:
I) Inject simple dll without Python.h to metin2, which only show message
II) Try to compile simple console program using in C++ Python.

I could made mistake in here, so use my stuff as tip.
bochunator is offline  
Thanks
5 Users
Old 11/06/2023, 20:32   #7
 
elite*gold: 0
Join Date: Sep 2023
Posts: 11
Received Thanks: 0
Quote:
Originally Posted by bochunator View Post
For me, it took a few weeks to learn how to compile this code. So maybe you'll find some tips
1) Download Visual Studio Community 2022
Visual Studio 2022 takes up a lot of disk space for me, so I've chosen essential options.
Check:
Desktop development with C++
MSVC v143 - VS 2022 C++ x64/x86 build tools
Windows 11 SDK (10.0.22621.0)
You can create simple console application to check if visual studio works.

2) Download Python27

3) Create a new project -> Dynamic-Link-Library (DLL)
a) Change Debug to Release
b) Change x64 to x86
c) Debug -> HereIsNameOfYourProject DebugProperties
d) VC++ Directories -> Include Directories:
add path (check where you have Python27\include) -> C:\Python27\include
e) VC++ Directories -> Library Directories:
add path (check where you have Python27\libs) -> C:\Python27\libs
f) Linker -> Input -> Additional Dependencies
add python27.lib

4) Copy paste code:
Code:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
#include <Python.h>
#include <thread>
#include <iostream>

struct vec3 {
    double x, y, z;
};

vec3 GetMainCharacterPosition(PyObject* function) {
    PyObject* callObject = PyObject_CallObject(function, nullptr);

    /* here we hold the position */
    vec3 position;

    /* check if the result is a tuple with at least 3 items */
    if (PyTuple_Check(callObject) && PyTuple_GET_SIZE(callObject) >= 3) {
        /* then we extract them from the tuple */
        PyObject* xObj = PyTuple_GetItem(callObject, 0);
        PyObject* yObj = PyTuple_GetItem(callObject, 1);
        PyObject* zObj = PyTuple_GetItem(callObject, 2);

        /* convert the objects to doubles and assign them to the struct */
        position.x = PyFloat_AsDouble(xObj);
        position.y = PyFloat_AsDouble(zObj);
        position.z = PyFloat_AsDouble(yObj);

        /* then we release the references to the objects */
        Py_DECREF(xObj);
        Py_DECREF(yObj);
        Py_DECREF(zObj);
    }

    Py_DECREF(callObject);

    return position;
}

void init() {

    //sdk::utilities::setup_console("test output");
    AllocConsole();
    freopen_s((FILE**)stdout, "CONOUT$", "w", stdout);
    std::cout << "test output" << std::endl;

    /* import the python module */
    //const auto& py_module = PyImport_ImportModule("playerm2g2");
    const auto& py_module = PyImport_ImportModule("rGuOnaAeJR");    // Check your module using program: Metin2 DragoDumper 
    if (py_module == nullptr) {
        std::cout << "py_module = nullptr\n";
        FreeConsole();
        return;
    }

    /* get the function for retrieving the local player position */
    const auto& py_func = PyObject_GetAttrString(py_module, "GetMainCharacterPosition");

    /* here we will store our temp coords */
    double x, y, z;
    bool ok = true;

    while (ok) {
        if (GetAsyncKeyState(VK_HOME) & 1)
            ok = false;

        vec3 local_pos = GetMainCharacterPosition(py_func);
        x = local_pos.x;
        y = local_pos.y;
        z = local_pos.z;

        /* beautiful, innit? */
        if (x != 0 && y != 0 && z != 0)
            std::cout << "x: " << x << " | y: " << y << " | z: " << z << std::endl;

        /* avoid excessive cpu usage */
        std::this_thread::sleep_for(std::chrono::milliseconds(200));
    }

    /* release the references to the objects after the loop */
    Py_DECREF(py_func);
    Py_DECREF(py_module);

    /* cleanup */
    FreeConsole();
    //FreeLibraryAndExitThread(h_module, 0);
}

BOOL APIENTRY DllMain(HMODULE hModule,
    DWORD  ul_reason_for_call,
    LPVOID lpReserved
)
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH: {
        //sdk::utilities::h_module = (HMODULE)hDllHandle;
        init();
        FreeLibraryAndExitThread(hModule, 0);
    }break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

5) Check name of your module
Here you'll find program to dump Python Functions and Modules:


6) Build program, it's not exe so if it worked you'll find this line in console:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

7) Download program to inject dll, I use Extreme Injector (antivirus will block it)

8) Inject HereIsNameOfYourProject.dll to metin2client.exe

I wrote these steps but you'll find your own problems, errors, crashes which you have to fix. Maybe better if you start with small steps like:
I) Inject simple dll without Python.h to metin2, which only show message
II) Try to compile simple console program using in C++ Python.

I could made mistake in here, so use my stuff as tip.

Hi it works but i have a small problem.When i injected this dll game crashes like 5-10 minutes.C++ Runtime error how can i fix that ?
raceshow is offline  
Old 12/28/2023, 14:36   #8
 
elite*gold: 0
Join Date: Sep 2023
Posts: 2
Received Thanks: 5
Quote:
Originally Posted by martinx1 View Post
Always good to see tutorials like this for new people to learn.

I few remarks for improvements:
At this point I itnk you will be limited to python functions by using this method. So I would rather inject a python script and call functions from there.
Also, I would avoid creating a new thread and calling game functions directly, i have experienced weird crashes because of the use of multiple threads. Metin2 was not designed to work with multiple threads so you might encounter race conditions in another functions that may crash the game.
This is an explanation of why the game is crashing. I believe this is a dead end. I am not certain, but perhaps the correct solution is to unpack the root and make direct changes to the game there. Currently, I have given up because I did not find a solution, and I will not ask someone smarter than me for help.
bochunator is offline  
Old 12/28/2023, 15:42   #9
 
dave_m's Avatar
 
elite*gold: 0
Join Date: May 2023
Posts: 65
Received Thanks: 11
Its cool I just wonder why do you call it in such a complicated way?
Cant you just write python code directly and execute it, e.g.:
dbg.LogBox(playerm2g2.GetMainCharacterPosition())
?
dave_m is offline  
Old 01/26/2024, 14:33   #10
 
Metin2Gherla's Avatar
 
elite*gold: 0
Join Date: Jun 2023
Posts: 6
Received Thanks: 2
thx , this is nice
Metin2Gherla is offline  
Old 04/25/2024, 00:03   #11
 
elite*gold: 0
Join Date: Apr 2024
Posts: 3
Received Thanks: 1
Quote:
Originally Posted by martinx1 View Post

At this point I itnk you will be limited to python functions by using this method. So I would rather inject a python script and call functions from there.
The way you do it in your bot? With the exLib.dll and then the script.dll?
Can you further explain why is it better?
I've been trying to learn a little bit everyday so I don't need to depend on someone else's bot in the future.
metin2botlearner is offline  
Thanks
1 User
Old 09/06/2024, 13:22   #12
 
- Mystic's Avatar
 
elite*gold: 0
Join Date: Mar 2020
Posts: 10
Received Thanks: 4
Quote:
Originally Posted by bochunator View Post
For me, it took a few weeks to learn how to compile this code. So maybe you'll find some tips
1) Download Visual Studio Community 2022
Visual Studio 2022 takes up a lot of disk space for me, so I've chosen essential options.
Check:
Desktop development with C++
MSVC v143 - VS 2022 C++ x64/x86 build tools
Windows 11 SDK (10.0.22621.0)
You can create simple console application to check if visual studio works.

2) Download Python27

3) Create a new project -> Dynamic-Link-Library (DLL)
a) Change Debug to Release
b) Change x64 to x86
c) Debug -> HereIsNameOfYourProject DebugProperties
d) VC++ Directories -> Include Directories:
add path (check where you have Python27\include) -> C:\Python27\include
e) VC++ Directories -> Library Directories:
add path (check where you have Python27\libs) -> C:\Python27\libs
f) Linker -> Input -> Additional Dependencies
add python27.lib

4) Copy paste code:
Code:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
#include <Python.h>
#include <thread>
#include <iostream>

struct vec3 {
    double x, y, z;
};

vec3 GetMainCharacterPosition(PyObject* function) {
    PyObject* callObject = PyObject_CallObject(function, nullptr);

    /* here we hold the position */
    vec3 position;

    /* check if the result is a tuple with at least 3 items */
    if (PyTuple_Check(callObject) && PyTuple_GET_SIZE(callObject) >= 3) {
        /* then we extract them from the tuple */
        PyObject* xObj = PyTuple_GetItem(callObject, 0);
        PyObject* yObj = PyTuple_GetItem(callObject, 1);
        PyObject* zObj = PyTuple_GetItem(callObject, 2);

        /* convert the objects to doubles and assign them to the struct */
        position.x = PyFloat_AsDouble(xObj);
        position.y = PyFloat_AsDouble(zObj);
        position.z = PyFloat_AsDouble(yObj);

        /* then we release the references to the objects */
        Py_DECREF(xObj);
        Py_DECREF(yObj);
        Py_DECREF(zObj);
    }

    Py_DECREF(callObject);

    return position;
}

void init() {

    //sdk::utilities::setup_console("test output");
    AllocConsole();
    freopen_s((FILE**)stdout, "CONOUT$", "w", stdout);
    std::cout << "test output" << std::endl;

    /* import the python module */
    //const auto& py_module = PyImport_ImportModule("playerm2g2");
    const auto& py_module = PyImport_ImportModule("rGuOnaAeJR");    // Check your module using program: Metin2 DragoDumper 
    if (py_module == nullptr) {
        std::cout << "py_module = nullptr\n";
        FreeConsole();
        return;
    }

    /* get the function for retrieving the local player position */
    const auto& py_func = PyObject_GetAttrString(py_module, "GetMainCharacterPosition");

    /* here we will store our temp coords */
    double x, y, z;
    bool ok = true;

    while (ok) {
        if (GetAsyncKeyState(VK_HOME) & 1)
            ok = false;

        vec3 local_pos = GetMainCharacterPosition(py_func);
        x = local_pos.x;
        y = local_pos.y;
        z = local_pos.z;

        /* beautiful, innit? */
        if (x != 0 && y != 0 && z != 0)
            std::cout << "x: " << x << " | y: " << y << " | z: " << z << std::endl;

        /* avoid excessive cpu usage */
        std::this_thread::sleep_for(std::chrono::milliseconds(200));
    }

    /* release the references to the objects after the loop */
    Py_DECREF(py_func);
    Py_DECREF(py_module);

    /* cleanup */
    FreeConsole();
    //FreeLibraryAndExitThread(h_module, 0);
}

BOOL APIENTRY DllMain(HMODULE hModule,
    DWORD  ul_reason_for_call,
    LPVOID lpReserved
)
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH: {
        //sdk::utilities::h_module = (HMODULE)hDllHandle;
        init();
        FreeLibraryAndExitThread(hModule, 0);
    }break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

5) Check name of your module
Here you'll find program to dump Python Functions and Modules:


6) Build program, it's not exe so if it worked you'll find this line in console:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

7) Download program to inject dll, I use Extreme Injector (antivirus will block it)

8) Inject HereIsNameOfYourProject.dll to metin2client.exe

I wrote these steps but you'll find your own problems, errors, crashes which you have to fix. Maybe better if you start with small steps like:
I) Inject simple dll without Python.h to metin2, which only show message
II) Try to compile simple console program using in C++ Python.

I could made mistake in here, so use my stuff as tip.
Just a heads up: I encountered several unresolved external symbol __imp__ errors while attempting to compile the code. After investigating, I realized that I had mistakenly installed Python 2.7 64-bit instead of the 32-bit version.

Make sure to install Python 2.7 32-bit version!
- Mystic is offline  
Old 09/09/2024, 23:18   #13
 
elite*gold: 0
Join Date: Jan 2009
Posts: 27
Received Thanks: 2
Hi, i followed everything. But everytime i inject it, i get this output from cmd:

test output
py_module = nullptr
lugge2 is offline  
Old 11/27/2024, 21:56   #14
 
elite*gold: 0
Join Date: Sep 2020
Posts: 3
Received Thanks: 0
Same here. Could you help us out?
MoppyS is offline  
Old 01/03/2025, 00:46   #15
 
dave_m's Avatar
 
elite*gold: 0
Join Date: May 2023
Posts: 65
Received Thanks: 11
Quote:
Originally Posted by lugge2 View Post
Hi, i followed everything. But everytime i inject it, i get this output from cmd:

test output
py_module = nullptr
The "player" module might have different names on different servers.
Some have "player", some have "playerm2g2" and some might have just random names like "masndgasodpw". So you need to check whether the module name exists.
dave_m is offline  
Reply


Similar Threads Similar Threads
Function to return current player position
11/18/2018 - GW Bots - 0 Replies
I'm currently working on the Boreal chest farm bot which from time to time get stuck behind the npc next to the gate. I want to add a check of the current position of the players character. So i could check the range between the player and a fix point to change the way he is using to run outside. My problem is i cant find a function to return "Current Player Position" Hope someone could help me :)
Finding current position of a player
01/07/2018 - DarkOrbit - 10 Replies
Hello! Is it possible to find the map of any player who is online? Edit: I mean something other than writing him in chat, adding him in contact list, joining his clan with another accout, etc.
Start Player Position
04/08/2010 - WoW Private Server - 1 Replies
Hi Weis einer wo man die Start Player Position verendern kann oder wie man es machen kann? Mangos v0.3.7.5 danke
How to get X/Y position
03/01/2009 - SRO Hacks, Bots, Cheats & Exploits - 14 Replies
Download: http://www.drewbenton.net/sro/0x33/demo/xy.../xypo sition.zip Watch the first video link, it shows you everything you may want to know. If you guys have any questions, feel free to ask. This is a public release so feel free to share it. ======================= Quote from 0x33 http://www.0x33.org/forum/showthread.php?t=9664



All times are GMT +1. The time now is 17:22.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.