![]() |
Change The Item Break System - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Change The Item Break System (/showthread.php?tid=884) |
Change The Item Break System - JokeofWeek - 19-04-2007 Alright. So as you may have noticed, with Mirage, when an item breaks, it takes it away. What did tutorial will do is, instead of making it so you lose them item, it'll just make it so that it has to be repaired before you can re-equip it! Note : This does not cover shields as they cannot break! If you want to add this to shields, you have to add the durability code and all that by yourself ![]() This is a real simple tutorial, but I just thought I'd share it with you guys ![]() ![]() So first, for the weapon. Find function GetPlayerDamage and look for the line : Code: Call PlayerMsg(index, "Your " & Trim$(Item(GetPlayerInvItemNum(index, WeaponSlot)).name) & " has broken.", Yellow) And replace that TakeItem call with this : Code: Call SetPlayerWeaponSlot(index, 0) Very good! Now I noticed that you can still equip the broken item, so in the handle if statement for the packet "useitem", look for the line Code: Call SetPlayerWeaponSlot(index, InvNum) Which is in the Case ITEM_TYPE_WEAPON, and add the following before it : [code] If Int(GetPlayerInvItemDur(index, InvNum)) - Matt - 19-04-2007 Great idea. I always was annoyed by the breaking stuff, I'll def add this. - Da Undead - 20-04-2007 Highlights: [code]If Int(GetPlayerInvItemDur(Index, InvNum)) - JokeofWeek - 20-04-2007 [quote="Da Undead"]Highlights: [code]If Int(GetPlayerInvItemDur(Index, InvNum)) - Da Undead - 20-04-2007 alright i'll try it, thnx - JokeofWeek - 20-04-2007 Dave Wrote:End Select helps too, usually. Aha, yeah that's true, added it to his fix :lol: |