Cripplez

Member
  • Content Count

    60
  • Joined

  • Last visited

Community Reputation

5 Neutral

About Cripplez

  • Rank
    Friendly

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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));
  3. Cripplez

    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
  4. 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
  5. 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
  6. Cripplez

    solved

    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
  7. 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
  8. 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
  9. Cripplez

    solved

    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.
  10. 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.
  11. Cripplez

    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.
  12. 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
  13. 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
  14. Cripplez

    solved

    Thank you, this is perfect
  15. Cripplez

    solved

    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