-
Posts
147 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by r00t
-
-
This map and mobs are made and selled by Plechito... if you buyed from him, ask him
-
Maybe the chest contain a weapon, so you need 2 perpendicular slot for a sword and 3 for a great sword. It's just a alternative way to say "you don't have space in your inventory"
-
Hello, i share my little fix (call it system is impossible ) to add automatically 4 bonus to all weapons and armor subtypes... i'm just bored to see "Reinforce Item" on sale from NPCs.
Of course you can extend to add 5 bonus, in my case i prefer add only 4 bonus and to leave "Blessing Marble" dropped from mob.
Work with items dropped from mob, items bought from NPCs, items created with /i command.In common/CommonDefine.h add
Spoiler#define __4_BONUS_DEFAULT__
In game/item.cppSpoilerInside "void CItem::AlterToMagicItem()" function find:
if (number(1, 100) <= iSecondPct) PutAttribute(aiItemMagicAttributePercentLow); if (number(1, 100) <= iThirdPct) PutAttribute(aiItemMagicAttributePercentLow);
Replace with:
#ifdef __4_BONUS_DEFAULT__ if ((GetType() == ITEM_WEAPON) || (GetType() == ITEM_ARMOR)) { PutAttribute(aiItemMagicAttributePercentHigh); // Second bonus PutAttribute(aiItemMagicAttributePercentHigh); // Third bonus PutAttribute(aiItemMagicAttributePercentHigh); // Fourth bonus } else { if (number(1, 100) <= iSecondPct) PutAttribute(aiItemMagicAttributePercentLow); if (number(1, 100) <= iThirdPct) PutAttribute(aiItemMagicAttributePercentLow); } #else if (number(1, 100) <= iSecondPct) PutAttribute(aiItemMagicAttributePercentLow); if (number(1, 100) <= iThirdPct) PutAttribute(aiItemMagicAttributePercentLow); #endif
In game/item_manager.cppSpoilerInside "LPITEM ITEM_MANAGER::CreateItem(DWORD vnum, DWORD count, DWORD id, bool bTryMagic, int iRarePct, bool bSkipSave)" function find:
if (bTryMagic) { if (iRarePct == -1) iRarePct = table->bAlterToMagicItemPct; if (number(1, 100) <= iRarePct) item->AlterToMagicItem(); }
Replace with:
if (bTryMagic) { #ifdef __4_BONUS_DEFAULT__ if ((item->GetType() == ITEM_WEAPON) || (item->GetType() == ITEM_ARMOR)) { item->AlterToMagicItem(); } else { #endif if (iRarePct == -1) iRarePct = table->bAlterToMagicItemPct; if (number(1, 100) <= iRarePct) item->AlterToMagicItem(); #ifdef __4_BONUS_DEFAULT__ } #endif }
In game/questlua_game.cppSpoilerInside "game_drop_item" function, find:
LPITEM item = ITEM_MANAGER::instance().CreateItem(item_vnum, count);
Replace with:
#ifdef __4_BONUS_DEFAULT__ LPITEM item = ITEM_MANAGER::instance().CreateItem(item_vnum, count, 0, true); #else LPITEM item = ITEM_MANAGER::instance().CreateItem(item_vnum, count); #endif
Inside "game_drop_item_with_ownership" function, find:item = ITEM_MANAGER::instance().CreateItem((DWORD) lua_tonumber(L, 1));
Replace with:
#ifdef __4_BONUS_DEFAULT__ item = ITEM_MANAGER::instance().CreateItem((DWORD) lua_tonumber(L, 1), 1, 0, true); #else item = ITEM_MANAGER::instance().CreateItem((DWORD) lua_tonumber(L, 1)); #endif
Still in "game_drop_item_with_ownership" function, find:item = ITEM_MANAGER::instance().CreateItem((DWORD) lua_tonumber(L, 1), (int) lua_tonumber(L, 2));
Replace with:
#ifdef __4_BONUS_DEFAULT__ item = ITEM_MANAGER::instance().CreateItem((DWORD) lua_tonumber(L, 1), (int) lua_tonumber(L, 2), 0, true); #else item = ITEM_MANAGER::instance().CreateItem((DWORD) lua_tonumber(L, 1), (int) lua_tonumber(L, 2)); #endif
Inside "game_drop_item_with_ownership_and_dice" function, find:item = ITEM_MANAGER::instance().CreateItem((DWORD) lua_tonumber(L, 1), (int) lua_tonumber(L, 2));
Replace with:
#ifdef __4_BONUS_DEFAULT__ item = ITEM_MANAGER::instance().CreateItem((DWORD) lua_tonumber(L, 1), (int) lua_tonumber(L, 2), 0, true); #else item = ITEM_MANAGER::instance().CreateItem((DWORD) lua_tonumber(L, 1), (int) lua_tonumber(L, 2)); #endif
In game/shop.cpp
SpoilerInside "int CShop::Buy(LPCHARACTER ch, BYTE pos)" function, find:
item = ITEM_MANAGER::instance().CreateItem(r_item.vnum, r_item.count);
Replace with:
#ifdef __4_BONUS_DEFAULT__ item = ITEM_MANAGER::instance().CreateItem(r_item.vnum, r_item.count, 0, true); #else item = ITEM_MANAGER::instance().CreateItem(r_item.vnum, r_item.count); #endif
A good combination is to implement also this:- 2
- 1
-
About Ch1 Core2 that doesn't start, maybe problem can be in your start script or miss hardlink to gamecore.
Why do you setup IP in this way?- 1
-
You put the folder "christmas_2016_mammoth" in wrong place (npc or npc2 folder inside ymir work).
- 1
-
Client give you some error on syserr?
- 1
-
Why do you want to add c ++ code if this option is already present? When a player chooses the skills then you take the skills to the level you want (M or G or P) whit "pc.set_skill_level".
- 1
-
@server/game/char.cpp
Find:
void CHARACTER::PointsPacket()
Check if you added in this function
pack.points[POINT_GEM] = GetGem();- 1
-
What u mean with "not work" ? Compiling error or what?
- 1
- 1
-
@Mei Just for have shared this AMAZING work with us you deserve a BIG BIG thank you!
- 1
-
VNUM_STONE_AGAINST_WARRIOR is declared somewhere?
- 1
-
Someone can make/have txt from item and mob proto from official locale?
- 1
-
You miss to refresh gold in uiinventory
- 1
-
14 hours ago, Krzychu20 said:
actually i had another special database where i store my values, anyway i make it on my own way, in server game i added if statement with item value range and if value is in range, then i do select query and set attr, like for weapon etc so all working on server side, and people can't do anything with that on client side
Query? For tooltip? It's db killer...if i move mouse in-out the slot 20times for second...db do 20query! 10player do this and you have 200query...
Edit:better solution is to read new attr direct on boot (so you need to change sql select on db and add new values in items structure in client/server)...now you can read all informations from cache
- 1
- 1
-
As i know, player not receive atk when level up but just HP.
- 1
-
First point: yes, protect your eix/epk is important...you can "integrate" in client exe all eix files but can be a possibility that people extract eix from exe
Second point: as i know (maybe) M2Bob need to start himself a client exe but if you find a way to start client ONLY with patcher you block it
- 1
- 1
-
In mob proto, atm dont remember what colum (is where you find NO_MOVE), add CRUSHER
- 1
-
Wrong position of code in packet...client think is weapon instead of sash and viceversa
-
C++ and Python...and something else
- 1
-
Did you try to use other pc2 pack?
-
Are you sure error is made by GF or OnGame? They just administrate server where metin is started, no more. Source is prerogative of Ymir...so mistake (if it was) is mabe by their
-
What do you mean?
-
17 hours ago, tierrilopes said:
Don't do those stuff using -exp.
Example why:
You need 600exp to level up, you kill a mob that gives 650 exp, you will level up first and then the remove exp will take place.
True story.
Make this system in source is very easy if you have unknolegde... or google can help you "metin2 anti exp c++"
- 1
-
Oh God... this is Metin2! More is distance between attacker and victim, less is damage. There is a system, made from GF (or Ymir or whatever you want) that remove this problem: Quiver.
Anyway... a fast solution is:
#Battle.cpp #Search: int CalcArrowDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, LPITEM pkBow, LPITEM pkArrow, bool bIgnoreDefense) #In this function find: int iPercent = 100 - (iGap * 5); #Replace with: iPercent = 100;
Mob no move
in Community Support - Questions & Answers
Posted · Edited by r00t
Check on DB, in mob_proto did you set "NOMOVE" in ai_flag ?