-
Posts
72 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Heathcliff
-
-
Hey!
Thanks for sharing this with us!
There is a little mistake in char.cpp with this line:out.percent_exp = (BYTE)MINMAX(0, GetExp() * 100 / GetNextExp(), 100);
GetExp() function has DWORD (unsigned long) data type, which range is 0 to 4 294 967 295.
If you multiply your current exp (if it's bigger than 42 949 672) with 100, you will get 0, because of it's overflowing.
You can convert it to int64_t (long long).out.percent_exp = MINMAX(0, (int64_t)GetExp() * 100 / GetNextExp(), 100);
- 4
-
Heey, thanks for check.
I'm using that too from the originally released "freebsd9.2_with_source" title.
All the time I thought there is some mistake in my source somewhere, but actually nothing is wrong. .
As you said, there is no calling that points to the IsMaskedItem() function, but my game core is loading it anyway, cause if it has been found, then it will be loaded instatly.
Literally I thinked about everything, and I missed the easiest thing in this situation
By the way thanks, that you checked out your files too.
This mistery has been solved and my misery has been goneSpoiler- 1
-
Hey yoo!
This little thing allows you to make new regen files called: regen_once.txt (you can rename it to anything).
Modification is using an already existing function called: regen_load_in_file, which has been used by quests.
You can use it, to generate some monsters / npcs at the server startup which don't have any respawn time, so if you kill them, they won't appear until a new server restart, or manually reloading your regens if you have those functions.
In common/service.h - Add:#define ENABLE_REGEN_ONCE
In game/src/sectree_manager.cpp - Search:snprintf(szFilename, sizeof(szFilename), "%s/%s/regen.txt", c_pszMapBasePath, szMapName); regen_load(szFilename, setting.iIndex, setting.iBaseX, setting.iBaseY);
Add under:#ifdef ENABLE_REGEN_ONCE snprintf(szFilename, sizeof(szFilename), "%s/%s/regen_once.txt", c_pszMapBasePath, szMapName); regen_load_in_file(szFilename, setting.iIndex, setting.iBaseX, setting.iBaseY); #endif
In game/src/regen.cpp - Search:snprintf(szFilename, sizeof(szFilename), "%sregen.txt", mbMapDataContainer[lMapIndex]->szBaseName); regen_load(szFilename, lMapIndex, mbMapDataContainer[lMapIndex]->base_x, mbMapDataContainer[lMapIndex]->base_y);
Add under:#ifdef ENABLE_REGEN_ONCE snprintf(szFilename, sizeof(szFilename), "%sregen_once.txt", mbMapDataContainer[lMapIndex]->szBaseName); regen_load_in_file(szFilename, lMapIndex, mbMapDataContainer[lMapIndex]->base_x, mbMapDataContainer[lMapIndex]->base_y); #endif
If you done it, you can create regen_once.txt with some mobs, and place it to your map folder next to regen.txt. If you don't place it in every map folder, you will get some syserr that says it can't find regen_once.txt. It won't cause any problem. It just inform you, that you didn't create that file for certain maps.- 4
- 1
-
Hey Guys!
I'm using TXT protos and today I noticed a weird thing. In the most of the time, servers using an item several times with different properties. So pick an item that exist on every servers: Dragon God Life.
This item exist 6 times in default item_proto.txt with different IDs. So if we want to modify the item (like make it stackable, or make it tradeable, or something like that) which takes place at: 39017 ID. Guess what?
It just NOTHING happens at all. Why? Cause this item which has UNIQUE ID, using the same proto values as 71027 does. So if you want to modify 39017 you need to modify 71027 FOR NO REASON.
If you delete the "MAIN" item (which in that case is 71027), then try to generate 39017 with /item command, You will see an item with no name and the ID will be 71027. --> LINK
And this is just one example. There is a bunch of these items in the default files are working like that. It seems they're connected somehow, but I didn't find any clue neither in server source, nor in client source.
My question is:
Have you guys ever noticed these kind of weird things about some items and if yes, did you find why is this shit happens? OR this little thing only exist for me?
Show some mercy for my english skills pls- 1
- 1
-
Hey!
In char_state.cpp: Search and remove or comment:#ifdef ENABLE_MOUNT_COSTUME_SYSTEM if (IsMount()) return; #endif
- 1
-
It's better with icons I think
- 1
- 1
-
In char_item.cpp, search:
if (iWearCell < 0) return false;
Add under:
if (iWearCell == WEAR_BODY) { int ArmorUseTime = GetQuestFlag("prevent_wallhack.armor_use_time"); if (ArmorUseTime) { if (get_global_time() < ArmorUseTime /* limit */) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't equip armor so fast")); return false; } else SetQuestFlag("prevent_wallhack.armor_use_time", get_global_time() + 3); } }
In inpug_login.cpp, search:ch->StartCheckSpeedHackEvent();
Add under:
ch->SetQuestFlag("prevent_wallhack.armor_use_time", get_global_time());
It works 100%. I'm using this too
The other two I posted was just a freakin' junk, so sorry for that.
Have a nice day guys!- 1
-
Try to debug your game.core with gdb, and show the output to us.
-
All of your docs you shared are expired on Pastebin mate.
-
19 hours ago, Cunoo said:
Why? Just repair item_list.txt... Client is not trash can..
19 hours ago, Zeke said:Better let a bug crash your client than fixing it with that "fixing" lines. can item been with blank image? logic says no. let it crash to find where you missing files ^^
Client still inform you that you have icon problems with xy item, and your client won't crash bcs of this small "error". This correction is just for not flooding it every second if you have missing icon. It will inform you once, and set a default image for it as I mentioned before.
- 1
-
I've never seen those files, but good to know, I'm not the only one, who hates those floods
-
Hello Guys!
I was so frustated with my syserr floods (%s ĆÄŔĎŔĚ ľř˝Ŕ´Ď´Ů.CItemData::__SetIconImage) when an item has no icon.With this correction the client will only notice you once per item that has no image, and set a default icon for them, so you can drop it to the ground from your inventory, instead of giving attention to make them a new icon, or copy/paste an existing image.
SpoilerIn GameLib/ItemData.h search:
TraceError("%s ĆÄŔĎŔĚ ľř˝Ŕ´Ď´Ů.CItemData::__SetIconImage",c_szFileName); m_pIconImage = NULL;
And replace m_pIconImage = NULL; with:
m_pIconImage = (CGraphicSubImage*)CResourceManager::Instance().GetResourcePointer("icon/item/blank.tga");
Download:
Again, is not a big deal and my English is bad as always
Have a nice day guys!- 40
- 1
- 1
- 1
- 12
- 1
- 20
-
On 10/28/2018 at 6:43 PM, Co0L said:
For those who have the same problem. Instead of this:
startNumber = 0 for slot in self.quickslot: for i in xrange(4): slotNumber = i+startNumber (Type, Position) = player.GetLocalQuickSlot(slotNumber) if player.IsSkillCoolTime(Position): (coolTime, elapsedTime) = player.GetSkillCoolTime(Position) slot.SetSlotCoolTime(slotNumber, coolTime, elapsedTime) cooldownDelay = 0 cooldown = int(coolTime-elapsedTime+cooldownDelay) self.cooldownText[slotNumber].SetOutline() self.cooldownText[slotNumber].SetText("%d" % cooldown) cooldown = str(cooldown) self.cooldownText[slotNumber].SetPosition((7, 2, -1)[len(cooldown) - 1],0) self.cooldownText[slotNumber].Show() else: self.cooldownText[slotNumber].Hide() startNumber += 4
Use this:
startNumber = 0 for slot in self.quickslot: for i in xrange(4): slotNumber = i+startNumber (Type, Position) = player.GetLocalQuickSlot(slotNumber) if player.IsSkillCoolTime(Position) and player.SLOT_TYPE_SKILL == Type: (coolTime, elapsedTime) = player.GetSkillCoolTime(Position) slot.SetSlotCoolTime(slotNumber, coolTime, elapsedTime) cooldownDelay = 0 cooldown = int(coolTime-elapsedTime+cooldownDelay) self.cooldownText[slotNumber].SetOutline() self.cooldownText[slotNumber].SetText("%d" % cooldown) cooldown = str(cooldown) self.cooldownText[slotNumber].SetPosition((7, 2, -1)[len(cooldown) - 1],0) self.cooldownText[slotNumber].Show() else: self.cooldownText[slotNumber].Hide() startNumber += 4
- 1
-
That's not bad, but let's walk closer to your target, and use the skill. You will notice, it's triggering twice. Or this was happening only for me?
-
You'll get one more good idea from me guys
- 1
-
Add the d.new_jump_party inside the quest_function file
-
-
Don't remove the whole condition
Just this line: if not name in constInfo.ALREADY_NOTIFY_LIST:
and this line: constInfo.ALREADY_NOTIFY_LIST.append(name) -
Then check what you did wrong
-
SpoilerQuote
There is one bug. When player goes online first time it works, but when relog or teleport the message dont show up again. You have to restart client after that it works again.
How to fix that?
Remove these lines:
Spoiler- if not name in constInfo.ALREADY_NOTIFY_LIST:
- constInfo.ALREADY_NOTIFY_LIST.append(name)
- ALREADY_NOTIFY_LIST = []
It's not a bug btw
Regards -
#_#
I made it like this some months ago:
case USE_EXTEND_TIME: { LPITEM item2; if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell))) return false; if (item2->IsExchanging() || item2->IsEquipped()) return false; if (item2->GetType() != ITEM_COSTUME || (item2->GetSubType() != COSTUME_BODY && item2->GetSubType() != COSTUME_HAIR && item2->GetSubType() != COSTUME_MOUNT && item2->GetSubType() != COSTUME_WEAPON)) return false; int extendTime = (item2->GetSocket(0) + item->GetValue(0)) - get_global_time(); if (extendTime >= item2->GetDuration()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("COSTUME_LIMIT_REACHED_MAX")); return false; } item2->SetSocket(0, item2->GetSocket(0) + item->GetValue(0)); item->SetCount(item->GetCount() - 1); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("COSTUME_TIME_LIMIT_EXTENDED")); } break;
-
Thank you maaan. I love your works so much
- 2
-
13 hours ago, Fleurius said:
How can i block GMs from attacking monsters? Thank you
In char_battle.cpp:
SpoilerSearch:
bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type)
Add under:
if (GetGMLevel() > GM_PLAYER && GetRaceNum() > 7) return false;
- 1
-
Good idea!
Kill Bar Like FPS Games
in Features & Metin2 Systems
Posted
Hi, first of all thanks for @ Mali for contributing a lot to this community!
Wolfman part
Search:
Add under:
Size and position part
Search:
Change:
Gifs
Short text:
Long text:
For claw image you can reuse something from your client like I did