-
Posts
110 -
Joined
-
Last visited
-
Days Won
5 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Den
-
-
Maybe root/colorinfo.py TITLE_RGB_GOOD_1 etc?
-
7 minutes ago, Nero said:
Nothing happens.
My textureset isn't empty. I tried with v24 too, with release and with debug (both of them).
But my problem is not that my textures aren't visible, this is just happening at 5th tab. When I select the first tab, second (with textures), third (with objects) or fourth (with enviornment) it's all ok, the textures and shadows are ok. But when I select the 5th one, my textures and shadows dissapear.I had this problem before. You must have d:/ymir work/special folder to get it working.
- 1
- 1
-
1 hour ago, charparodar said:
Which is the best method?
I thought when I removed the mask of emotions this would be removed too...
Is the quest the best option? If they reset the skills will it remove those too?
For players it almost doesn't matter I think. You can use whatever you want, I'm just saying that some of these methods are just not good looking in code. If I were you I wouldn't do this in quest.
-
There are lots of ways to enable that.
1. Setting language skills to max in quest in which you select your job.
2. Searching for ConvertEmpireText() in server source and commenting it.
3. Searching for conditions with UNIQUE_GROUP_RING_OF_LANGUAGE and SKILL_LANGUAGE1 and changing them.
4. bool CHARACTER::IsEquipUniqueGroup(DWORD dwGroupVnum) const
On the beggining add:
if (dwGroupVnum == UNIQUE_GROUP_RING_OF_LANGUAGE) return true;
Maybe 4th method looks kinda shitty but should do the job.
-
In my client when I'm adding new objects, maps, etc. I have to rename everything to lowercase letters. For example:
folder/Folder/Object.gr2 to folder/folder/object2.gr2
Maybe try this.
-
Didn't test but find in char_battle.cpp:
else if (1 == number(1, iGold10DropPct)) { // // µ· ĆřĹş˝Ä µĺ·Ó // for (int i = 0; i < 10; ++i) { int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax); iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100; iGold *= iGoldMultipler; if (iGold == 0) { continue; } // NOTE: µ· ĆřĹşŔş Á¦ 3ŔÇ ĽŐ Ăł¸®¸¦ ÇĎÁö ľĘŔ˝ if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold))) { pos.x = GetX() + (number(-7, 7) * 20); pos.y = GetY() + (number(-7, 7) * 20); item->AddToGround(GetMapIndex(), pos); item->StartDestroyEvent(); iTotalGold += iGold; // Total gold } } }
Try to remove whole else if and check if it's working (save it somewhere maybe in case it wouldn't work).
@EDIT:
I didn't notice you also want to remove it from bosses. I have no time right now to adjust it but you can try it on your own. You have everything around this else if I gave you higher.
@EDIT2:
char_battle.cpp on the beggining add
#include "../../common/service.h"
common/service.h on the end add
#define DISABLE_YANG_BOMB
char_battle.cpp change in Reward()
if (GetMobRank() >= MOB_RANK_BOSS && !IsStone() && GetMobTable().dwGoldMax != 0) { if (1 == number(1, iGold10DropPct)) iGoldMultipler *= 10; // 1% Č®·ü·Î µ· 10ąč int iSplitCount = number(25, 35); for (int i = 0; i < iSplitCount; ++i) { int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax) / iSplitCount; if (test_server) sys_log(0, "iGold %d", iGold); iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100; iGold *= iGoldMultipler; if (iGold == 0) { continue ; } if (test_server) { sys_log(0, "Drop Moeny MobGoldAmountRate %d %d", CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker), iGoldMultipler); sys_log(0, "Drop Money gold %d GoldMin %d GoldMax %d", iGold, GetMobTable().dwGoldMax, GetMobTable().dwGoldMax); } // NOTE: µ· ĆřĹşŔş Á¦ 3ŔÇ ĽŐ Ăł¸®¸¦ ÇĎÁö ľĘŔ #ifdef DISABLE_YANG_BOMB pkAttacker->GiveGold(iGold / iSplitCount); iTotalGold += iGold; #else if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold))) { pos.x = GetX() + ((number(-14, 14) + number(-14, 14)) * 23); pos.y = GetY() + ((number(-14, 14) + number(-14, 14)) * 23); item->AddToGround(GetMapIndex(), pos); item->StartDestroyEvent(); iTotalGold += iGold; // Total gold } #endif } } // 1% Č®·ü·Î µ·Ŕ» 10°ł ¶łľî ¶ß¸°´Ů. (10ąč µĺ·ÓŔÓ #ifndef DISABLE_YANG_BOMB else if (1 == number(1, iGold10DropPct)) { // // µ· ĆřĹş˝Ä µĺ·Ó // for (int i = 0; i < 10; ++i) { int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax); iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100; iGold *= iGoldMultipler; if (iGold == 0) { continue; } // NOTE: µ· ĆřĹşŔş Á¦ 3ŔÇ ĽŐ Ăł¸®¸¦ ÇĎÁö ľĘŔ˝ if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold))) { pos.x = GetX() + (number(-7, 7) * 20); pos.y = GetY() + (number(-7, 7) * 20); item->AddToGround(GetMapIndex(), pos); item->StartDestroyEvent(); iTotalGold += iGold; // Total gold } } } #endif else { // // ŔĎąÝŔűŔÎ ąć˝ÄŔÇ µ· µĺ·Ó // int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax); iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100; iGold *= iGoldMultipler; int iSplitCount; if (iGold >= 3 && !LC_IsYMIR()) iSplitCount = number(1, 3); else if (GetMobRank() >= MOB_RANK_BOSS) { iSplitCount = number(3, 10); if ((iGold / iSplitCount) == 0) iSplitCount = 1; } else iSplitCount = 1; if (iGold != 0) { iTotalGold += iGold; // Total gold for (int i = 0; i < iSplitCount; ++i) { if (isAutoLoot) { pkAttacker->GiveGold(iGold / iSplitCount); } else if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold / iSplitCount))) { pos.x = GetX() + (number(-7, 7) * 20); pos.y = GetY() + (number(-7, 7) * 20); item->AddToGround(GetMapIndex(), pos); item->StartDestroyEvent(); } } } }
Didn't test. Yang will be added to character's inventory after killing a boss instead of droping on the ground. Let me know if you want it in another way.
- 5
-
First of all if you have any errors with compilation then simply try to google it. Sometimes you will get an answer in several seconds.
You've messed up with braces in
void CInstanceBase::RefreshTextTail()
after
}
#endifadd
}
- 1
-
Maybe try to get next exp instead of current exp?
local up = pc.get_next_exp()
-
char_item.cpp:7580: error: expected unqualified-id before 'if'
char_item,cpp, line 7580, paste the wole function.
-
Hello everyone.
One day I was curious how does normal hit bonus and skill bonus are added to item, so I made a simple simulation as console application from source functions.
Spoiler#include <iostream> #include <stdlib.h> #include <time.h> #include <ctime> #include <cstdlib> #include <windows.h> #define FLT_EPSILON 1.192092896e-07F #define RAND_MAX 0x7fff using namespace std; int number(int from, int to) { if (from > to) { int tmp = from; from = to; to = tmp; } int returnValue = 0; if ((to - from + 1) != 0) { returnValue = ((rand() % (to - from + 1)) + from); } return returnValue; } int MINMAX(int min, int value, int max) { register int tv; tv = (min > value ? min : value); return (max < tv) ? max : tv; } double uniform_random(double a, double b) { return rand() / (RAND_MAX + 1.f) * (b - a) + a; } float gauss_random(float avg, float sigma) { static bool haveNextGaussian = false; static float nextGaussian = 0.0f; if (haveNextGaussian) { haveNextGaussian = false; return nextGaussian * sigma + avg; } else { double v1, v2, s; do { //v1 = 2 * nextDouble() - 1; // between -1.0 and 1.0 //v2 = 2 * nextDouble() - 1; // between -1.0 and 1.0 v1 = uniform_random(-1.f, 1.f); v2 = uniform_random(-1.f, 1.f); s = v1 * v1 + v2 * v2; } while (s >= 1.f || fabs(s) < FLT_EPSILON); double multiplier = sqrtf(-2 * logf(s) / s); nextGaussian = v2 * multiplier; haveNextGaussian = true; return v1 * multiplier * sigma + avg; } } int main() { int iSkillBonus, iNormalHitBonus; unsigned long long counter = 0; srand(time(NULL)); for (;;) { iSkillBonus = MINMAX(-30, (int)(gauss_random(0, 5) + 0.5f), 30); if (abs(iSkillBonus) <= 20) iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4); else iNormalHitBonus = -2 * iSkillBonus + number(1, 5); counter += 1; if (iNormalHitBonus >= 55) ////if normal hit bonus is 55 or higher, the loop will stop break; Sleep(1); //how long you will wait between draws //you can delete this if you want to make it faster cout << "normal hit bonus: " << iNormalHitBonus << endl; cout << "skill bonus: " << iSkillBonus << endl; // } cout << "you've used " << counter << " changes" << endl; system("pause"); return 0; }
Code: https://pastebin.com/xBqCQM9w
Change whatever you want then compile and test. Maybe this will help someone who wants to adjust this.
- 2
- 1
-
Just now, netmarlis said:
Like I've said, slot 204 is the correct one. Are you sure that you edited right inventorywindow.py?
-
7 minutes ago, netmarlis said:
Try on uiinventory.py:
def SelectItemSlot(self, itemSlotIndex): chat.AppendChat(chat.CHAT_TYPE_INFO, "select item slot") if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1: return itemSlotIndex = self.__InventoryLocalSlotPosToGlobalSlotPos(itemSlotIndex) chat.AppendChat(chat.CHAT_TYPE_INFO, "select item slot %d" % itemSlotIndex)
Add chat.AppendChat(chat.CHAT_TYPE_INFO, "select item slot %d" % itemSlotIndex) then try click and show chat. Does slot even highlight when over with item?
-
4 minutes ago, netmarlis said:
game syserlog :
Jun 9 03:15:00.913284 :: vivoxy: USE_ITEM Keten Kemer +9 (inven 1, cell: 2)
Jun 9 03:15:02.72945 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 2)
Jun 9 03:15:02.833393 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0)
Jun 9 03:15:03.511677 :: vivoxy: USE_ITEM Runik Kemer +9 (inven 1, cell: 0)
Jun 9 03:15:04.273109 :: vivoxy: USE_ITEM Keten Kemer +0 (inven 1, cell: 0)https://metin2.download/picture/zlmKdd2HQm9SyFt23U50X7pSSfZ7W30W/.png
But after you click on empty belt slot game chat is showing nothing?
-
52 minutes ago, netmarlis said:
locale/ui = inventorywindow.py https://metin2.download/picture/Bd709umtaAtOQz9RO8LP4jpSbmhO4mTs/.png
In uiinventory.py, function def SelectEmptySlot(self, selectedSlotPos), on the top write like this:
def SelectEmptySlot(self, selectedSlotPos): chat.AppendChat(chat.CHAT_TYPE_INFO, "select empty slot %d" % selectedSlotPos) if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1: return
Then click on belt slot in game and show what you've got on chat.
-
That worked for me.
- 1
-
2 minutes ago, netmarlis said:
root = inventorywindow.py https://metin2.download/picture/HlKVCPMI2D5f60HXhyE1MSRPu9j2yMdy/.png
locale_xx/xx/ui/inventorywindow.py?
-
Just now, netmarlis said:
Maybe you've edited wrong inventorywindow.py? I have one in uiscript and one in locale/ui. That confused me once so maybe check it.
-
1 minute ago, netmarlis said:
Anything in syserr?
-
2 minutes ago, netmarlis said:
https://metin2.download/picture/5GyX7E1yvy09yPwuwGEM9G9jw0wG7016/.png
The problem is still continuing :)
Ah, try to set itemCount to 0:
setItemVNum(204, getItemVNum(204), 0) #setting belt
-
4 minutes ago, netmarlis said:
uiinventory.py : https://metin2.download/picture/hBbOEO7WFF8whWNCXq6pQMB1O2MSKfW4/.png
inventorywindow.py : https://metin2.download/picture/uti2NCJFS6zp78TtviGrmine3v3Bb7cX/.png
syserr.txt error :
0609 01:01:07877 ::
networkModule.py(line:200) SetSelectCharacterPhase
system.py(line:134) __pack_import
system.py(line:110) _process_result
introSelect.py(line:18) <module>
system.py(line:134) __pack_importnetworkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (uiInventory.py, line 751)
0609 01:01:07877 :: ============================================================================================================
0609 01:01:07878 :: Abort!!!!
Tabulations and spaces are really important in python. You must be using them properly like that:
https://metin2.download/picture/2h45kxpGABk8OMqn482Rl0XicMcEVKqL/.png
-
Just now, netmarlis said:
What exactly do i have to do
The easiest way without touching the sashes is:
uiinventory.py (add setItemVNum(204, getItemVNum(204), itemCount)):
inventorywindow.py:
Instead of
{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},
write
{"index":204, "x":39, "y":106, "width":32, "height":32},
-
7 minutes ago, netmarlis said:
Look, you've inserted WEAR_COSTUME_ACCE before so now WEAR_BELT is 24 not 23.
-
Just now, netmarlis said:
Can you explain in more detail
common/length.h in server source:
enum EWearPositions -> WEAR_BELT
My WEAR_BELT is 23.
GameType.h in binary source:
const DWORD c_Equipment_Belt = c_New_Equipment_Start + 2; //should equal server WEAR_BELT + 180, c_New_Equipment_Start equals 201 so 201+2=203
-
5 minutes ago, netmarlis said:
inventorywindow.py
https://metin2.download/picture/QR1MQHvr08X2wFf8TStaeKEQK7dM7uYH/.png
uiinventory.py
https://metin2.download/picture/BnBThB73o6p2q3bVsnI4VYEMnhY7Nnkz/.png
All the same
Hm... Check in your binary source if item.EQUIPMENT_BELT equals WEAR_BELT + 180 on server source side.
Dungeon Function - Jump
in Quest Functions & Features
Posted
I had some problems with this trigger because it happens for every single player on map and it didn't work good for me. Some contitions were executed more than one time. If someone wants here is how to trigger it only for the first player on the dungeon's character list:
In struct FWarpToPosition remove
Then after
in void CDungeon::JumpAll(long lFromMapIndex, int x, int y) dungeon.cpp add
Then do the same for void CDungeon::JumpParty(LPPARTY pParty, long lFromMapIndex, int x, int y) if you want to.
I also made a function that takes current dungeon as argument instead of player but in this case you can't use pc functions in when jump trigger(e.g. pc.get_map_index()) and you have to use only dungeon functions (e.g. d.get_map_index()) so for it wouldn't be good for begginers.