Cripplez
-
Posts
118 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Cripplez
-
-
11 hours ago, displayjokes said:
Not sure if it works, but it should. (i did not test)
Good luck ^^
Thank you!
It works perfectly
-
Hello, I'm tryong to understand how the Party Heal should work, I think I have everything in the server side and client side but the button doesn't show up.
When should it be ready for use the first time?
Does this works normally for you?
// Party Heal Update if (!m_bPartyHealReady) { if (!m_bCanUsePartyHeal && m_iLeadership >= 18) m_dwPartyHealTime = get_dword_time(); m_bCanUsePartyHeal = m_iLeadership >= 18; DWORD PartyHealCoolTime = (m_iLeadership >= 40) ? PARTY_HEAL_COOLTIME_SHORT * 60 * 1000 : PARTY_HEAL_COOLTIME_LONG * 60 * 1; if (m_bCanUsePartyHeal) { if (get_dword_time() > m_dwPartyHealTime + PartyHealCoolTime) { m_bPartyHealReady = true; // send heal ready if (0) if (GetLeaderCharacter()) GetLeaderCharacter()->ChatPacket(CHAT_TYPE_COMMAND, "PartyHealReady"); } } }
EDIT:
I removed the" if (0) " and it works fine, thank you
-
Hello, I would like to remove the dialog page that ask you if you are sure to attach the metin stone to the armor/weapon, I'd like that the stone is immediatly added to the item when you place the stone on the item.
I tried to make some changes in uiattachmetin.py but I couldn't do it, it should immetiadly do this part when you place the stone:
def Accept(self):
net.SendItemUseToItemPacket(self.metinItemPos, self.targetItemPos)
snd.PlaySound("sound/ui/metinstone_insert.wav")
self.Close()import dbg import player import item import net import snd import ui import uiToolTip import localeInfo class AttachMetinDialog(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.__LoadScript() self.metinItemPos = 0 self.targetItemPos = 0 def __LoadScript(self): try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "uiscript/attachstonedialog.py") except: import exception exception.Abort("AttachStoneDialog.__LoadScript.LoadObject") try: self.board = self.GetChild("Board") self.titleBar = self.GetChild("TitleBar") self.metinImage = self.GetChild("MetinImage") self.GetChild("AcceptButton").SetEvent(ui.__mem_func__(self.Accept)) self.GetChild("CancelButton").SetEvent(ui.__mem_func__(self.Close)) except: import exception exception.Abort("AttachStoneDialog.__LoadScript.BindObject") oldToolTip = uiToolTip.ItemToolTip() oldToolTip.SetParent(self) oldToolTip.SetPosition(15, 38) oldToolTip.SetFollow(False) oldToolTip.Show() self.oldToolTip = oldToolTip newToolTip = uiToolTip.ItemToolTip() newToolTip.SetParent(self) newToolTip.SetPosition(230 + 20, 38) newToolTip.SetFollow(False) newToolTip.Show() self.newToolTip = newToolTip self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close)) def __del__(self): ui.ScriptWindow.__del__(self) def Destroy(self): self.ClearDictionary() self.board = 0 self.titleBar = 0 self.metinImage = 0 self.toolTip = 0 def CanAttachMetin(self, slot, metin): if item.METIN_NORMAL == metin: if player.METIN_SOCKET_TYPE_SILVER == slot or player.METIN_SOCKET_TYPE_GOLD == slot: return True elif item.METIN_GOLD == metin: if player.METIN_SOCKET_TYPE_GOLD == slot: return True def Open(self, metinItemPos, targetItemPos): self.metinItemPos = metinItemPos self.targetItemPos = targetItemPos metinIndex = player.GetItemIndex(metinItemPos) itemIndex = player.GetItemIndex(targetItemPos) self.oldToolTip.ClearToolTip() self.newToolTip.ClearToolTip() item.SelectItem(metinIndex) ## Metin Image try: self.metinImage.LoadImage(item.GetIconImageFileName()) except: dbg.TraceError("AttachMetinDialog.Open.LoadImage - Failed to find item data") ## Old Item ToolTip metinSlot = [] for i in xrange(player.METIN_SOCKET_MAX_NUM): metinSlot.append(player.GetItemMetinSocket(targetItemPos, i)) self.oldToolTip.AddItemData(itemIndex, metinSlot) ## New Item ToolTip item.SelectItem(metinIndex) metinSubType = item.GetItemSubType() metinSlot = [] for i in xrange(player.METIN_SOCKET_MAX_NUM): metinSlot.append(player.GetItemMetinSocket(targetItemPos, i)) for i in xrange(player.METIN_SOCKET_MAX_NUM): slotData = metinSlot[i] if self.CanAttachMetin(slotData, metinSubType): metinSlot[i] = metinIndex break self.newToolTip.AddItemData(itemIndex, metinSlot) self.UpdateDialog() self.SetTop() self.Show() def UpdateDialog(self): newWidth = self.newToolTip.GetWidth() + 230 + 15 + 20 newHeight = self.newToolTip.GetHeight() + 98 if localeInfo.IsARABIC(): self.board.SetPosition( newWidth, 0 ) (x,y) = self.titleBar.GetLocalPosition() self.titleBar.SetPosition( newWidth - 15, y ) self.board.SetSize(newWidth, newHeight) self.titleBar.SetWidth(newWidth-15) self.SetSize(newWidth, newHeight) (x, y) = self.GetLocalPosition() self.SetPosition(x, y) def Accept(self): net.SendItemUseToItemPacket(self.metinItemPos, self.targetItemPos) snd.PlaySound("sound/ui/metinstone_insert.wav") self.Close() def Close(self): self.Hide()
-
Does anyone have a gr2 model of a treasure chest? I'd like to use it as an NPC, thank you
-
1 hour ago, Vanilla said:
Thank you very much!!!
I did like this and it seems it is works perfectly, with full inventory i receive the item with drop owership, otherwise it goes to a new slot
if (prob <= prt->prob) { LPITEM pkNewItem = ITEM_MANAGER::instance().CreateItem(result_vnum, 1, 0, false); int pos = GetEmptyInventory(item->GetSize()); if (pkNewItem) { ITEM_MANAGER::CopyAllAttrTo(item, pkNewItem); LogManager::instance().ItemLog(this, pkNewItem, "REFINE SUCCESS", pkNewItem->GetName()); //BYTE bCell = item->GetCell(); // DETAIL_REFINE_LOG NotifyRefineSuccess(this, item, IsRefineThroughGuild() ? "GUILD" : "POWER"); DBManager::instance().SendMoneyLog(MONEY_LOG_REFINE, item->GetVnum(), -cost); item->SetCount(item->GetCount() - 1); //ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (REFINE SUCCESS)"); // END_OF_DETAIL_REFINE_LOG //pkNewItem->AddToCharacter(this, TItemPos(INVENTORY, bCell)); if ((pos = GetEmptyInventory(item->GetSize())) != -1) { pkNewItem->AddToCharacter(this, TItemPos(INVENTORY, pos)); ITEM_MANAGER::instance().FlushDelayedSave(pkNewItem); } else { PIXEL_POSITION pos = GetXYZ(); LPITEM pkNewItem = ITEM_MANAGER::instance().CreateItem(result_vnum, 1, 0, false); ITEM_MANAGER::instance().FlushDelayedSave(pkNewItem); pkNewItem->AddToGround(GetMapIndex(), pos); pkNewItem->SetOwnership(this); pkNewItem->StartDestroyEvent(); pos.x += number(-7, 7) * 20; pos.y += number(-7, 7) * 20; } sys_log(0, "Refine Success %d", cost); pkNewItem->AttrLog(); //PointChange(POINT_GOLD, -cost); sys_log(0, "PayPee %d", cost); PayRefineFee(cost); sys_log(0, "PayPee End %d", cost); } }
- 2
-
I made some changes and now when the refine fails it correcly remove only one stone instead of all the stack.
But when I succesfully refine the stone it remove all the stack of stones and give me the new stone.
The problem should be here, because I think the new stone replace the position of the old item instead of going in another free space of my inventory, understand what I mean?
this is the code from char_item.cpp
if (prob <= prt->prob) { LPITEM pkNewItem = ITEM_MANAGER::instance().CreateItem(result_vnum, 1, 0, false); if (pkNewItem) { ITEM_MANAGER::CopyAllAttrTo(item, pkNewItem); LogManager::instance().ItemLog(this, pkNewItem, "REFINE SUCCESS", pkNewItem->GetName()); BYTE bCell = item->GetCell(); // DETAIL_REFINE_LOG NotifyRefineSuccess(this, item, IsRefineThroughGuild() ? "GUILD" : "POWER"); DBManager::instance().SendMoneyLog(MONEY_LOG_REFINE, item->GetVnum(), -cost); item->SetCount(item->GetCount() - 1); //ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (REFINE SUCCESS)"); // END_OF_DETAIL_REFINE_LOG // ***** I THINK THE PROBLEM COULD BE HERE ***** pkNewItem->AddToCharacter(this, TItemPos(INVENTORY, bCell)); ITEM_MANAGER::instance().FlushDelayedSave(pkNewItem); sys_log(0, "Refine Success %d", cost); pkNewItem->AttrLog(); //PointChange(POINT_GOLD, -cost); sys_log(0, "PayPee %d", cost); PayRefineFee(cost); sys_log(0, "PayPee End %d", cost); } else { // DETAIL_REFINE_LOG sys_err("cannot create item %u", result_vnum); NotifyRefineFail(this, item, IsRefineThroughGuild() ? "GUILD" : "POWER"); // END_OF_DETAIL_REFINE_LOG } } else { DBManager::instance().SendMoneyLog(MONEY_LOG_REFINE, item->GetVnum(), -cost); NotifyRefineFail(this, item, IsRefineThroughGuild() ? "GUILD" : "POWER"); item->AttrLog(); // ***** THIS CORRECLY REMOVE ONLY ONE STONE WHEN REFINE FAIL ***** item->SetCount(item->GetCount() - 1); //ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (REFINE FAIL)"); //PointChange(POINT_GOLD, -cost); PayRefineFee(cost); }
I think I should change this part so instead of going the the same inventory space of the refined item it should go to a new inventory free space
Do you know how this part should be coded? Thank you
pkNewItem->AddToCharacter(this, TItemPos(INVENTORY, bCell));
46 minutes ago, Vanilla said:With upgrade you mean refining them?
If that's the case than look at the way metin2 handles refining. If I'm not mistaken the item gets removed and then a new, refined one, is given to the player with same attributes/etc.. But it's just from my memory. That'd explain why your stone stack is missing because the refinement shouldn't check for a higher quantity, usually it was just meant for single equipment to be used with.
-
When I use a skill with the knockback flag on a Metin Stone its position changes, do you know how can i make that metin Stones are immune to knockback effect? Thank you
-
Hello, I have a problem with stackable Stones, when I try to attach a stack of 200 Stones to an armor/weapon it correctly attach only one and i have 199 stones in inventory, but when I try to upgrade a stones from a stack of 200 they are all removed instead of one, do you know how can I fix this? Thank you
-
Hello,
I would like to change the % HP you have when you respawn. Now it is 0%, i would like to set it to 100% (or if it is possible with a different %, like 30%) instead of have 0 HP and wait the the potions heals you
Do you know where I can find this and change it? Thank you!
EDIT:
Here it is the solution
-
Thank you guys!
I found this too on char_affect.cpp
if (GetPoint(POINT_HP_RECOVERY) > 0) { if (GetMaxHP() <= GetHP()) { PointChange(POINT_HP_RECOVERY, -GetPoint(POINT_HP_RECOVERY)); } else { int iVal = MIN(GetPoint(POINT_HP_RECOVERY), GetMaxHP() * 7 / 100); PointChange(POINT_HP, iVal); PointChange(POINT_HP_RECOVERY, -iVal); } }
I changed the " * 7 / 100 " part with 2 / 100 so now i should get 2% of hp with automatic potion with each tick of heal
- 1
-
HI, i would like to reduce the % of HP i recover from automatic potion,
for example if I have 45.000 hp with automatic potion i recover about 3.000 hp each second (about 7% of total hp)
how can i reduce the HP i receive with the automatic potion? maybe instead of 7% with 3%
thank you
-
Hello, I would like to remove the minimap, the one on the top right of the screen (like in the screenshot) and that you can't open it, like in the devil's catacomb.
How can I do this? Thank you
-
5 hours ago, Moț said:
if you remove stamina, why you'll use skills?
Do you mean how I use skills?
I dont want to remove stamina, just that actions like run dont make the Yellow bar go down, so it is always full.
-
Hello, i would like to disable the stamina, I want that you never run out of "energy". Do you know how I can do it? Thanks
I mean this yellow bar under the MP.
-
Hi, i tried to use this weapon set but i think it is missing the dds files of the weapon in the download, they are "white" in game.
- 1
-
Hi,
I receive the gold from the mob directly in my "inventory", but sometimes mob and boss drop extra gold to the ground, i would like to know how to remove all the extra gold they can drop. Thank you
this is just an example
- 1
-
Hi, I would need a quest that start when you kill mobs, and based on your level, drop different item.
But i don't know if something like this may cause too much lag and should be better doing it ina different way
This is an example of what i would need to do:
quest test_drop begin state start begin when kill with not npc.is_pc() begin -- not sure how to do this part, if mob is 10 level > or < than pc_leven then return return else local drop math.random(1, 10000) local items1 = {101, 102, 103, 104, 105, 106} local items2 = {201, 202, 203, 204, 205, 206} local items3 = {301, 302, 303, 304, 305, 306} local items4 = {401, 402, 43, 404, 405, 406} local items5 = {501, 502, 503, 504, 505, 506} if drop <= 100 then if pc.get_level() > 19 and pc.get_level() < 40 then game.drop_item_with_ownership(items1[number(1, table.getn(items1))]) elseif pc.get_level() > 39 and pc.get_level() < 60 then game.drop_item_with_ownership(items2[number(1, table.getn(items2))]) elseif pc.get_level() > 59 and pc.get_level() < 80 then game.drop_item_with_ownership(items3[number(1, table.getn(items3))]) elseif pc.get_level() > 79 and pc.get_level() < 99 then game.drop_item_with_ownership(items4[number(1, table.getn(items4))]) elseif pc.get_level() > 99 then game.drop_item_with_ownership(items5[number(1, table.getn(items5))]) else return end end end end end
-
1 hour ago, Nirray said:
InstanceBase.cpp in client source
float CInstanceBase::__GetBowRange() { float fRange = 2500.0f - 100.0f; if (__IsMainInstance()) { IAbstractPlayer& rPlayer=IAbstractPlayer::GetSingleton(); fRange += float(rPlayer.GetStatus(POINT_BOW_DISTANCE)); } return fRange; }
no idea right now where it is in server side source
Thank you, this is perfect
-
Yes this calculate the damage based on your distance, but i want to change the distance that an assassin can use the bow, if he is too far from the target he needs to come closer to shoot the arrow
-
Hi, I would like to reduce the maximum bow distance that an assassin can shoot with the bow.
If for example the max distance is 2500, i would like to reduce it to 1100/1200, but i can't find where it is this thing
Does anyone of you know it? Thank you
- 1
-
VegaS helped me on AnyDesk and he resolved the problem! Now everything works perfect, he even added a list of the mount that can be used in dungeon if i want.
Thank you again!
-
5 hours ago, VegaS™ said:
You added it wrong, not inside of GetHorseLevel > 0, outside of condition.
if (ch->GetHorseLevel() > 0) { DWORD pid = ch->GetPlayerID(); if (pid != 0 && CHorseNameManager::instance().GetHorseName(pid) == NULL) db_clientdesc->DBPacket(HEADER_GD_REQ_HORSE_NAME, 0, &pid, sizeof(DWORD)); //@fix horse_level update at login ch->SetHorseLevel(ch->GetHorseLevel()); ch->SkillLevelPacket(); } #ifdef ENABLE_BLOCK_RIDING_IN_DUNGEON if (ch && ch->GetDungeon()) { if (ch->IsHorseRiding()) { ch->StopRiding(); ch->HorseSummon(false); } if (ch->FindAffect(AFFECT_MOUNT)) { ch->RemoveAffect(AFFECT_MOUNT); ch->RemoveAffect(AFFECT_MOUNT_BONUS); } } #endif
Okay
I tried like this but when i'm riding a mount it still doesn't make me unmount it with the horse it is perfect
-
Hi,
I'd like to make that with a specific vnum (like 299, 399, 499 ecc) the
int iSkillBonus =
int iNormalHitBonus =will be different, I don't think this is the right way to do it, it is just an example to explain how i'd like to do it
Thank you
void CItemAddonManager::ApplyAddonTo(int iAddonType, LPITEM pItem) { if (!pItem) { sys_err("ITEM pointer null"); return; } //FOR EXAMPLE SOMETHING LIKE THIS: switch (item->GetVnum()) { case 299: case 399: case 499: case 599: int iSkillBonus = MINMAX(-40, (int) (gauss_random(0, 5) + 0.5f), 40); int iNormalHitBonus = 0; if (abs(iSkillBonus) <= 30) iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4); else iNormalHitBonus = -2 * iSkillBonus + number(1, 5); pItem->RemoveAttributeType(APPLY_SKILL_DAMAGE_BONUS); pItem->RemoveAttributeType(APPLY_NORMAL_HIT_DAMAGE_BONUS); pItem->AddAttribute(APPLY_NORMAL_HIT_DAMAGE_BONUS, iNormalHitBonus); pItem->AddAttribute(APPLY_SKILL_DAMAGE_BONUS, iSkillBonus); } //ELSE IF THE VNUM ISN'T ABOVE, DO THIS ATTRIBUTE int iSkillBonus = MINMAX(-30, (int) (gauss_random(0, 5) + 0.5f), 30); int iNormalHitBonus = 0; if (abs(iSkillBonus) <= 20) iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4); else iNormalHitBonus = -2 * iSkillBonus + number(1, 5); pItem->RemoveAttributeType(APPLY_SKILL_DAMAGE_BONUS); pItem->RemoveAttributeType(APPLY_NORMAL_HIT_DAMAGE_BONUS); pItem->AddAttribute(APPLY_NORMAL_HIT_DAMAGE_BONUS, iNormalHitBonus); pItem->AddAttribute(APPLY_SKILL_DAMAGE_BONUS, iSkillBonus); }
-
11 hours ago, VegaS™ said:
Not tested, but you can try to do something like:
- Srcs/Server/game/src/questlua_horse.cpp
// Search in horse_summon function: bool bFromFar = lua_isboolean(L, 1) ? lua_toboolean(L, 1) : false; // Add before: #ifdef ENABLE_BLOCK_RIDING_IN_DUNGEON if (ch && ch->GetDungeon() && ch->IsHorseRiding()) { ch->StopRiding(); ch->HorseSummon(false); return 0; } #endif
- Srcs/Server/game/src/questlua_pc.cpp
// Search in pc_mount_bonus function: LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); // Add after: #ifdef ENABLE_BLOCK_RIDING_IN_DUNGEON if (ch && ch->GetDungeon() && ch->FindAffect(AFFECT_MOUNT)) { ch->RemoveAffect(AFFECT_MOUNT); ch->RemoveAffect(AFFECT_MOUNT_BONUS); return 0; } #endif
- Srcs/Server/game/src/input_login.cpp
// Search in CInputLogin::Entergame(LPDESC d, const char * data) for: if (ch->GetHorseLevel() > 0) { DWORD pid = ch->GetPlayerID(); if (pid != 0 && CHorseNameManager::instance().GetHorseName(pid) == NULL) db_clientdesc->DBPacket(HEADER_GD_REQ_HORSE_NAME, 0, &pid, sizeof(DWORD)); } // Add after: #ifdef ENABLE_BLOCK_RIDING_IN_DUNGEON if (ch && ch->GetDungeon()) { if (ch->IsHorseRiding()) { ch->StopRiding(); ch->HorseSummon(false); } if (ch->FindAffect(AFFECT_MOUNT)) { ch->RemoveAffect(AFFECT_MOUNT); ch->RemoveAffect(AFFECT_MOUNT_BONUS); } } #endif
- Srcs/Server/game/service.h
Thank you, it is working for horse, but not for the mount
Maybe is because first the game read if i'm riding and make me StopRiding, but if I login in a map while i was riding a mount, the game doesn't immediatly know I'm riding and update my character riding 1 second later? Sometimes when i login with a mount i see my character standing and 1 second later i am riding again my mount
I'm not sure if i did this part as you write in your message, maybe the problem is here?
Spoilerif (ch->GetHorseLevel() > 0) { DWORD pid = ch->GetPlayerID(); if (pid != 0 && CHorseNameManager::instance().GetHorseName(pid) == NULL) db_clientdesc->DBPacket(HEADER_GD_REQ_HORSE_NAME, 0, &pid, sizeof(DWORD)); //@fix horse_level update at login ch->SetHorseLevel(ch->GetHorseLevel()); ch->SkillLevelPacket(); #ifdef ENABLE_BLOCK_RIDING_IN_DUNGEON if (ch && ch->GetDungeon()) { if (ch->IsHorseRiding()) { ch->StopRiding(); ch->HorseSummon(false); } if (ch->FindAffect(AFFECT_MOUNT)) { ch->RemoveAffect(AFFECT_MOUNT); ch->RemoveAffect(AFFECT_MOUNT_BONUS); } } #endif }
Registration page php 7.2
in Community Support - Questions & Answers
Posted
Hello,
I'm trying to add a registration page to my website but it's not working. It's a really old script that i used years ago and I think it needed php 5.2 because it used the function "mysql_" instead of "mysqli_"
Now on my new site I have only php 7.2, do you have a working registration script that I could use? Thank you