-
Posts
837 -
Joined
-
Days Won
392 -
Feedback
100%
Community Answers
-
xP3NG3Rx's post in Hide weapon while emotion is acting was marked as the answer
AttackProcess(); MovementProcess(); m_GraphicThingInstance.MotionProcess(IsPC()); // Hide weapon: GetCurrentMotionIndex public version of the __GetCurrentMotionIndex in gamelib\\ActorInstance.h if (m_GraphicThingInstance.GetCurrentMotionIndex() < CRaceMotionData::NAME_CLAP || m_GraphicThingInstance.GetCurrentMotionIndex() == CRaceMotionData::NAME_DIG) { if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON) != m_adwPart[CRaceData::PART_WEAPON]) { m_GraphicThingInstance.AttachWeapon(m_adwPart[CRaceData::PART_WEAPON]); CItemData* pItemData; if (CItemManager::Instance().GetItemDataPointer(m_adwPart[CRaceData::PART_WEAPON], &pItemData)) __GetRefinedEffect(pItemData); } } else if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON)) { m_GraphicThingInstance.AttachWeapon(0); __ClearWeaponRefineEffect(); } // EOF Hide weapon if (IsMountingHorse()) { m_kHorse.m_pkActor->HORSE_MotionProcess(FALSE); } Give a try with this, just put in the CInstanceBase::Update make it fit over there, and don't forget to make a public function for the GetCurrentMotionIndex.
-
xP3NG3Rx's post in Searching official function: GetElementByVID (PythonPlayerModule.cpp) was marked as the answer
I don't think so that this will help you, but here it is what you asked for.
Btw this code has been completely removed after the renewal of the pendant system. They changed the way of the system, for monsters the values are inside the mob_proto, and for players: the second parameter of the CPythonNetworkStream::SendTargetPacket function requests the data which will be loaded from the server through packet (CPythonNetworkStreamPhaseGame.cpp[CPythonNetworkStream::RecvTargetPacket] --> game.py[ShowTargetElementEnchant] --> uitarget.py[ShowElementImg]).
-
xP3NG3Rx's post in Binary functions: "GetSlotLocalPosition" & "GetSlotGlobalPosition" was marked as the answer
Firts of all I think the section is wrong where you opened the topic.
Secondly Pete's code for LocalPos is also wrong.
Here is the right one:
-
xP3NG3Rx's post in Private Shop sell button removal? was marked as the answer
## uiShop.py def Open(self, vid): import chr isPrivateShop = chr.IsNPC(vid) == 0 if player.IsMainCharacterIndex(vid): isMainPlayerPrivateShop = True self.btnBuy.Hide() self.btnSell.Hide() self.btnClose.Show() else: isMainPlayerPrivateShop = False if isPrivateShop: self.vid = vid self.btnBuy.SetPosition(0, 295) self.btnBuy.SetWindowHorizontalAlignCenter() self.btnBuy.Show() self.btnSell.Hide() self.btnClose.Hide()
This depends on your shop system too. The actortype of your shops are cannot be NPC type. Otherwise you need to change the value of the isPrivateShop variable.
-
xP3NG3Rx's post in Effect around character was marked as the answer
Sure.
This is the hidden content, please Sign In or Sign Up ymir work\effect\etc\soul\
-
xP3NG3Rx's post in Stream module was marked as the answer
That is the class pointer of the MainStream class.
networkModule.py:
introLogin.py:
-
xP3NG3Rx's post in Small bug with belt system was marked as the answer
The system was written like that, it modify the CoverButton image of the slot and don't reset back to the base.
Open your uiInventory.py and search the RefreshSlot function of the BeltInventoryWindow class, and replace it with this:
def RefreshSlot(self): getItemVnum=player.GetItemIndex for i in xrange(item.BELT_INVENTORY_SLOT_COUNT): slotNumber = item.BELT_INVENTORY_SLOT_START + i self.wndBeltInventorySlot.SetCoverButton(slotNumber, "d:/ymir work/ui/game/quest/slot_button_01.sub",\ "d:/ymir work/ui/game/quest/slot_button_01.sub",\ "d:/ymir work/ui/game/quest/slot_button_01.sub",\ "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False) self.wndBeltInventorySlot.SetItemSlot(slotNumber, getItemVnum(slotNumber), player.GetItemCount(slotNumber)) self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, True) if player.IsAvailableBeltInventoryCell(slotNumber): self.wndBeltInventorySlot.EnableCoverButton(slotNumber) else: self.wndBeltInventorySlot.DisableCoverButton(slotNumber) self.wndBeltInventorySlot.RefreshSlot()
-
xP3NG3Rx's post in Decrypt (Mob_Proto) was marked as the answer
Here is in xml:
https://mega.co.nz/#!2ZFljQhL!f1K1d2ZEMz7F8Dc2MkpdulG411oSS2jGtU9NrBXTBYc
Syntax:
<MobDef Vnum="101" Name="??" LocalizedName="Căo Selvagem" Type="0" Rank="0" BattleType="0" Level="1" Size="0" DropGoldMin="0" DropGoldMax="0" Experience="15" MaxHP="126" RegenCycle="6" RegenPercent="7" Defense="4" AIFlags="0" RaceFlag="1" ImmuneFlag="0" Str="3" Dex="6" Con="5" Int="2" DamageMin="20" DamageMax="24" AttackSpeed="100" MovingSpeed="100" AggressiveHPPct="0" AggressiveSight="2000" AttackRange="175" EnchantCurse="0" EnchantSlow="0" EnchantPoison="0" EnchantStun="0" EnchantCritical="0" EnchantPenetrate="0" ResistSword="0" ResistTwohand="0" ResistDagger="0" ResistBell="0" FesistFan="0" ResistBow="0" ResistFire="0" ResistElect="0" ResistMagic="0" ResistWind="0" ResistPoison="0" ResistBleeding="0" ResurrectionVnum="0" DropItemVnum="0" MountCapacity="0" OnClickType="0" Empire="0" Folder="stray_dog" DamMultiply="1.000000" SummonVnum="0" DrainSP="0" MonsterColor="0" PolymorphItemVnum="0" SkillVnum0="0" SkillLevel0="0" SkillVnum1="0" SkillLevel1="0" SkillVnum2="0" SkillLevel2="0" SkillVnum3="0" SkillLevel3="0" SkillVnum4="0" SkillLevel4="0" BerserkPoint="0" StoneSkinPoint="0" GodSpeedPoint="0" DeathBlowPoint="0" RevivePoint="0" /> -
xP3NG3Rx's post in pet.is_mine() quest function was marked as the answer
int pet_is_mine(lua_State* L) { CQuestManager& q = CQuestManager::instance(); LPCHARACTER mch = q.GetCurrentCharacterPtr(); LPCHARACTER tch = q.GetCurrentNPCCharacterPtr(); CPetSystem* petSystem = mch->GetPetSystem(); CPetActor* petActor = petSystem->GetByVID(tch->GetVID()); // ~ DEBUG Messages: /* sys_log(0, "mch->GetVID : %d", mch->GetVID()); sys_log(0, "npc->GetVID : %d", npc->GetVID()); sys_log(0, "petSystem : %s", (petSystem ? "True":"False")); sys_log(0, "petActor : %s", (petActor ? "True":"False")); sys_log(0, "npc->IsPet() : %s", (npc->IsPet() ? "True":"False")); if (petActor) sys_log(0, "petActor->GetOwner()->GetVID() : %d", petActor->GetOwner()->GetVID()); */ lua_pushboolean(L, tch && tch->IsPet() && petActor && petActor->GetOwner() == mch); return 1; } I'm using this and works completely.
-
xP3NG3Rx's post in Get a string of constinfo from c++ was marked as the answer
Try this:
PyObject *pMod = PyImport_AddModule("constInfo"); PyObject *pVal = PyObject_GetAttrString(pMod, "Test"); char* var = PyString_AsString(pVal); Py_DECREF(pVal); printf("Test is: %s", var); -
xP3NG3Rx's post in [SG]Launcher problems was marked as the answer
http://metin2dev.org/board/topic/3355-trouble-with-compiled-binary-client/
-
xP3NG3Rx's post in Trouble with compiled binary (Client) was marked as the answer
Or just set in the new global variables into: ScriptLib/PythonLauncher.cpp
bool CPythonLauncher::Create(const char* c_szProgramName) { //.... PyObject * builtins = PyImport_ImportModule("__builtin__"); PyModule_AddIntConstant(builtins, "TRUE", 1); PyModule_AddIntConstant(builtins, "True", 1); PyModule_AddIntConstant(builtins, "true", 1); PyModule_AddIntConstant(builtins, "FALSE", 0); PyModule_AddIntConstant(builtins, "False", 0); PyModule_AddIntConstant(builtins, "false", 0); //... -
xP3NG3Rx's post in Set Color in uiTextLine was marked as the answer
Jesus Christ.
AppendTextLine is a method of uiTooltip.Tooltip() class object.
You can use two methods of TextLine to make a colored line:
class TextLine(Window): def SetFontColor(self, red, green, blue): wndMgr.SetFontColor(self.hWnd, red, green, blue) def SetPackedFontColor(self, color): wndMgr.SetFontColor(self.hWnd, color) The packed color is that what the grp module can generate to you with the GenerateColor method.
For example(lightgreen): packed_color = grp.GenerateColor(105./255, 1., 75./255, 1.)
Usage:
text = ui.TextLine() #text.SetParent(self) text.SetDefaultFontName() text.SetPosition(16, 77) text.SetPackedFontColor(grp.GenerateColor(105./255, 1., 75./255, 1.)) #text.SetFontColor(105/255., 255./255, 75./255) text.SetText("This is a green message") text.Show()