Jump to content

xUniverse

Member
  • Posts

    31
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

xUniverse last won the day on November 24 2018

xUniverse had the most liked content!

About xUniverse

  • Birthday August 3

Informations

  • Gender
    Not Telling

Social Networks

  • Skype
    live:ianduniverseonlyone
  • Website

Recent Profile Visitors

642 profile views

xUniverse's Achievements

Contributor

Contributor (5/16)

  • Dedicated
  • Reacting Well
  • First Post
  • Collaborator
  • Conversation Starter

Recent Badges

18

Reputation

  1. I've modified the CInstanceBase::__Assassin_SetEunhyeongAffect(bool isVisible) in InstanceBaseEffect.cpp. 1. If the player have the affect: the function destroys (with __EffectContainer_Destroy) all effects. 2. If the affect ends: I've created two new functions (RefreshRefinedEffect and RefreshAffectEffect) that "reload" the attached effects again. For the moment the only bug I found is: if you login with the affect, all effects will be shown again...
  2. I've modified the CInstanceBase::__Assassin_SetEunhyeongAffect(bool isVisible) in InstanceBaseEffect.cpp. 1. If the player have the affect: the function destroys (with __EffectContainer_Destroy) all effects. 2. If the affect ends: I've created two new functions (RefreshRefinedEffect and RefreshAffectEffect) that "reload" the attached effects again. For the moment the only bug I found is: if you login with the affect, all effects will be shown again... Does anyone have another idea?
  3. Did you edit OnUpdate of uiPhaseCurtain.py? You must change OnUpdate from game.py And my last reply had an error, I've just edited it (you must add Main() before app.UpdateGame() and before app.SetFrameSkin(1))
  4. This is the code of register environment based on time from VegaS, Paste the three functions at the end of game.py (without self between parenthesis! ) def getModule(): self.EnvironmentData = { # Explanation: # 16 - (16:00:00 - 16:59:59) # "d:/ymir work/environment/capedragonhead.msenv" - Environment what will be set on this time. # You can add how many environments you want. 4: "d:/ymir work/environment/metin2_map_n_flame_dragon_01.msenv", 8: "d:/ymir work/environment/mtthunder.msenv", 12: "d:/ymir work/environment/bayblacksand.msenv", 16: "d:/ymir work/environment/capedragonhead.msenv", 20: "d:/ymir work/environment/snowm02.msenv", 22: "d:/ymir work/environment/trent02.msenv" } return self.EnvironmentData # Returns the dict with all items def getHour(): return ((app.GetGlobalTimeStamp() / 60) / 60 % 24) # Returns the hour from server timestamp (loaded by TPacketGCTime) def Main(): for key, c_pszName in getModule().iteritems(): if getHour() is key and app.IsExistFile(c_pszName): # Checks if current hour is equal with index from dict EnvironmentData and it checks if environment exists (file .msenv) in pack. background.RegisterEnvironmentData(0, c_pszName) # Set the environment background.SetEnvironmentData(0) Then go to def OnUpdate(self) and put Main() before app.UpdateGame(): def OnUpdate(self): Main() app.UpdateGame() #... Finally go to def OnOpen(self) and do the same: def Open(self): Main() app.SetFrameSkip(1) #... I've not tested it. Give a try and tell me if it works!
  5. This is what you want? (the delay is because I've tested in a online sv and my conection is bad)
  6. 1. Where did you put those functions? at the end of file? 2. Paste your OnUpdate(self) and your Open(self)
  7. An idea, open uiTarget.py 1. To fix the position of the (?) button, check the function SetEnemyVID(self, vid): def SetEnemyVID(self, vid): (...) if app.ENABLE_SEND_TARGET_INFO: (textWidth, textHeight) = self.name.GetTextSize() self.infoButton.SetPosition(textWidth + 25, 12) # HERE self.infoButton.SetWindowHorizontalAlignLeft() # self.vnum = vnum self.infoButton.Show() 2. (not tested) To fix the align of the item names, go to the class InfoBoard(ui.ThinBoard), check the init of class ItemListBoxItem(ui.ListBoxExNew.Item) and add: if app.ENABLE_SEND_TARGET_INFO: class InfoBoard(ui.ThinBoard): class ItemListBoxItem(ui.ListBoxExNew.Item): def __init__(self, width): ui.ListBoxExNew.Item.__init__(self) image = ui.ExpandedImageBox() image.SetParent(self) image.Show() self.image = image nameLine = ui.TextLine() nameLine.SetParent(self) nameLine.SetPosition(32 + 5, 0) ## nameLine.SetWindowHorizontalAlignRight() #add this line nameLine.SetHorizontalAlignRight() #add this line ## nameLine.Show() self.nameLine = nameLine self.SetSize(width, 32 + 5) ########## And: Is better to respect different cultures and languages
  8. Nice work. I liked so much all stuff, particularly the pets and the weapons with their pretty effects. Do you make a special price for all christmas stuff 2018?
  9. You can't open any shop (npc shop, offline shop, etc)? or it only happens after that you try to open a npc shop? It happens after you add the offline shop system? So you must check the offline shop source. Probably you should start by checking the common functions of shop and npc shops (or trades in general).
  10. So you can define a new function, before def __GetAttributeColor(self, index, value) like this: def __AppendItemRarity(self, attrSlot): RareList = ["Common","Uncommon","Rare","Legendary","Epic","From other universe"] idxRarity = 0 if 0 != attrSlot: for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM): type = attrSlot[i][0] value = attrSlot[i][1] if value == 0: continue # HERE IS WHERE YOU MUST CHECK THE VALUES AND TYPES # # you have type and value, so you can increase idxRarity # like you want # ............... # The next lines is if idxRarity between 0 and 100 if idxRarity == 0: self.AppendTextLine(RareList[0], self.COLOR_RARE_0) elif idxRarity < 20: self.AppendTextLine(RareList[1], self.COLOR_RARE_1) elif idxRarity < 40: self.AppendTextLine(RareList[2], self.COLOR_RARE_2) elif idxRarity < 60: self.AppendTextLine(RareList[3], self.COLOR_RARE_3) elif idxRarity < 80: self.AppendTextLine(RareList[4], self.COLOR_RARE_4) else: self.AppendTextLine(RareList[5], self.COLOR_RARE_5) Search: self.__AppendAttributeInformation(attrSlot) And add after: self.__AppendItemRarity(attrSlot) And don't forget to define the colors in class ToolTip(ui.ThinBoard). ############ Some tips: - You can make a dictionary with some types and ranges of values to simplify. - You can use the same condition in attributes with "same values" (for example in defenses against weapons). ############ Example (i did it to test) :
  11. Idk if I understand your question, but if I did -> Search: self.__AppendAttributeInformation(attrSlot) You will find more than one match (for weapon, armor, belt, rings, costume), so select it like you want (in this case costume). Then make a new line and add something like: self.AppendTextLine("some text...", self.MY_NEW_COLOR) And finally search NORMAL_COLOR in class ToolTip(ui.ThinBoard), make a new line and define MY_NEW_COLOR: NORMAL_COLOR = grp.GenerateColor(0.7607, 0.7607, 0.7607, 1.0) MY_NEW_COLOR = grp.GenerateColor(0.6863, 0.9725, 0.3216, 1.0) And change the color like you want...
  12. Uhmmm, maybe the problem is in void CInstanceBase::RefreshState(DWORD dwMotIndex, bool isLoop), check this function
  13. It doesn't remove the spawn. The spawn continues. See that: else if (p->m_table.bType == CHAR_TYPE_NPC || p->m_table.bType == CHAR_TYPE_WARP || p->m_table.bType == CHAR_TYPE_GOTO) doesn't include CHAR_TYPE_MONSTER and monsters are spawned. ------------------------------------- What it does? Basically we don't add the position of npc with vnum 9004 to m_mapNPCPosition[lMapIndex] (it isn't related with the spawn), so when the game send the packet of npc's positions in each map, it will not contain the position of npc with vnum 9004 and it isn't marked in atlas. You can prove this by seeing the next functions: InsertNPCPosition in sectree_manager.cpp: void SECTREE_MANAGER::InsertNPCPosition(long lMapIndex, BYTE bType, const char* szName, long x, long y) { m_mapNPCPosition[lMapIndex].push_back(npc_info(bType, szName, x, y)); } And SendNPCPosition in the same file: void SECTREE_MANAGER::SendNPCPosition(LPCHARACTER ch) { LPDESC d = ch->GetDesc(); if (!d) return; long lMapIndex = ch->GetMapIndex(); if (m_mapNPCPosition[lMapIndex].empty()) return; TEMP_BUFFER buf; TPacketGCNPCPosition p; p.header = HEADER_GC_NPC_POSITION; p.count = m_mapNPCPosition[lMapIndex].size(); TNPCPosition np; // TODO m_mapNPCPosition[lMapIndex] 를 보내주세요 itertype(m_mapNPCPosition[lMapIndex]) it; for (it = m_mapNPCPosition[lMapIndex].begin(); it != m_mapNPCPosition[lMapIndex].end(); ++it) { np.bType = it->bType; strlcpy(np.name, it->name, sizeof(np.name)); np.x = it->x; np.y = it->y; buf.write(&np, sizeof(np)); } p.size = sizeof(p) + buf.size(); if (buf.size()) { d->BufferedPacket(&p, sizeof(TPacketGCNPCPosition)); d->Packet(buf.read_peek(), buf.size()); } else d->Packet(&p, sizeof(TPacketGCNPCPosition)); } Then go to client -> ../UserInterface/PythonNetworkStreamPhaseGame.cpp and see CPythonNetworkStream::RecvNPCList() bool CPythonNetworkStream::RecvNPCList() { TPacketGCNPCPosition kNPCPosition; if (!Recv(sizeof(kNPCPosition), &kNPCPosition)) return false; assert(int(kNPCPosition.size)-sizeof(kNPCPosition) == kNPCPosition.count*sizeof(TNPCPosition) && "HEADER_GC_NPC_POSITION"); CPythonMiniMap::Instance().ClearAtlasMarkInfo(); for (int i = 0; i < kNPCPosition.count; ++i) { TNPCPosition NPCPosition; if (!Recv(sizeof(TNPCPosition), &NPCPosition)) return false; CPythonMiniMap::Instance().RegisterAtlasMark(NPCPosition.bType, NPCPosition.name, NPCPosition.x, NPCPosition.y); } return true; } If you can see at the start we get the packet of npc position and in the last lines we mark the position in the atlas: CPythonMiniMap::Instance().RegisterAtlasMark(NPCPosition.bType, NPCPosition.name, NPCPosition.x, NPCPosition.y);
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.