Mirage Source
http://miragesource.net/forums/

Unbreakable items
http://miragesource.net/forums/viewtopic.php?f=183&t=4676
Page 1 of 55

Author:  Joost [ Sat Nov 01, 2008 11:39 pm ]
Post subject:  Unbreakable items

Allow the dur scrollbar to go to -1

You might have to change the way dur is dimmed somewhere, but yeah, this works. And you don't need another var to increase the size of the item file.
Code:
Sub DamageEquipment(ByVal Index As Long, ByVal EquipmentSlot As Equipment)
Dim Slot As Long
   
    Slot = GetPlayerEquipmentSlot(Index, EquipmentSlot)
   
    If Slot > 0 And GetPlayerInvItemDur(Index, Slot) > -1 Then
        Call SetPlayerInvItemDur(Index, Slot, GetPlayerInvItemDur(Index, Slot) - 1)
           
        If GetPlayerInvItemDur(Index, Slot) = 0 Then
            Call PlayerMsg(Index, "Your " & Trim$(Item(GetPlayerInvItemNum(Index, Slot)).Name) & " has broken.", Yellow)
            Call TakeItem(Index, GetPlayerInvItemNum(Index, Slot), 0)
        Else
            If GetPlayerInvItemDur(Index, Slot) <= 5 And GetPlayerInvItemDur(Index, Slot) > 0 Then
                Call PlayerMsg(Index, "Your " & Trim$(Item(GetPlayerInvItemNum(Index, Slot)).Name) & " is about to break!", Yellow)
            End If
        End If
    End If

Author:  wisefire [ Sun Nov 02, 2008 12:46 am ]
Post subject:  Re: Unbreakable items

Can't you just remove the code? Well, I suppose if you want perfect and imperfect items then you would use something like this..

Author:  Joost [ Sun Nov 02, 2008 9:37 am ]
Post subject:  Re: Unbreakable items

Yer, this is for both breakable and unbreakable items. If you want every item to be unbreakable, just remove that part.

Author:  Kraft [ Sun Nov 02, 2008 5:17 pm ]
Post subject:  Re: Unbreakable items

All items with 0 durability are supposed to be unbreakable, right?
If I set their durability to 0, they never break.

Author:  Rian [ Sun Nov 02, 2008 5:33 pm ]
Post subject:  Re: Unbreakable items

Looks like unbreakable items have a dur of -1

Author:  Joost [ Sun Nov 02, 2008 5:33 pm ]
Post subject:  Re: Unbreakable items

If GetPlayerInvItemDur(Index, Slot) = 0 Then
Call PlayerMsg(Index, "Your " & Trim$(Item(GetPlayerInvItemNum(Index, Slot)).Name) & " has broken.", Yellow)
Call TakeItem(Index, GetPlayerInvItemNum(Index, Slot), 0)
Else


So judging from this part of the code, I'd say they do break.


Use this code and set dur to -1 to make it infinite

Author:  wanai [ Wed Dec 01, 2021 8:12 am ]
Post subject:  Re: Unbreakable items

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо

Author:  wanai [ Thu Dec 30, 2021 6:56 pm ]
Post subject:  Re: Unbreakable items

Econ

Author:  wanai [ Thu Dec 30, 2021 6:57 pm ]
Post subject:  Re: Unbreakable items

64.4

Author:  wanai [ Thu Dec 30, 2021 6:58 pm ]
Post subject:  Re: Unbreakable items

Bett

Author:  wanai [ Thu Dec 30, 2021 6:59 pm ]
Post subject:  Re: Unbreakable items

Bett

Author:  wanai [ Thu Dec 30, 2021 7:00 pm ]
Post subject:  Re: Unbreakable items

Serg

Author:  wanai [ Thu Dec 30, 2021 7:01 pm ]
Post subject:  Re: Unbreakable items

Inva

Author:  wanai [ Thu Dec 30, 2021 7:02 pm ]
Post subject:  Re: Unbreakable items

Mejo

Author:  wanai [ Thu Dec 30, 2021 7:03 pm ]
Post subject:  Re: Unbreakable items

XVII

Author:  wanai [ Thu Dec 30, 2021 7:05 pm ]
Post subject:  Re: Unbreakable items

Geor

Author:  wanai [ Thu Dec 30, 2021 7:06 pm ]
Post subject:  Re: Unbreakable items

Cash

Author:  wanai [ Thu Dec 30, 2021 7:07 pm ]
Post subject:  Re: Unbreakable items

Wind

Author:  wanai [ Thu Dec 30, 2021 7:08 pm ]
Post subject:  Re: Unbreakable items

Care

Author:  wanai [ Thu Dec 30, 2021 7:09 pm ]
Post subject:  Re: Unbreakable items

Tesc

Author:  wanai [ Thu Dec 30, 2021 7:10 pm ]
Post subject:  Re: Unbreakable items

Luxo

Author:  wanai [ Thu Dec 30, 2021 7:11 pm ]
Post subject:  Re: Unbreakable items

Fisk

Author:  wanai [ Thu Dec 30, 2021 7:12 pm ]
Post subject:  Re: Unbreakable items

JOHA

Author:  wanai [ Thu Dec 30, 2021 7:14 pm ]
Post subject:  Re: Unbreakable items

Jewe

Author:  wanai [ Thu Dec 30, 2021 7:15 pm ]
Post subject:  Re: Unbreakable items

Clas

Page 1 of 55 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/