Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 5:46 pm

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 1365 posts ]  Go to page 1, 2, 3, 4, 5 ... 55  Next
Author Message
 Post subject: Unbreakable items
PostPosted: Sat Nov 01, 2008 11:39 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
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


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Sun Nov 02, 2008 12:46 am 
Offline
Regular
User avatar

Joined: Sun Jun 24, 2007 2:45 am
Posts: 62
Location: Texas, USA
Can't you just remove the code? Well, I suppose if you want perfect and imperfect items then you would use something like this..

_________________
Image
Image


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Sun Nov 02, 2008 9:37 am 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
Yer, this is for both breakable and unbreakable items. If you want every item to be unbreakable, just remove that part.


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Sun Nov 02, 2008 5:17 pm 
Offline
Regular
User avatar

Joined: Wed Jul 30, 2008 4:32 pm
Posts: 44
All items with 0 durability are supposed to be unbreakable, right?
If I set their durability to 0, they never break.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Sun Nov 02, 2008 5:33 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
Looks like unbreakable items have a dur of -1

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Sun Nov 02, 2008 5:33 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
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


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Wed Dec 01, 2021 8:12 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 6:56 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Econ


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 6:57 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
64.4


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 6:58 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Bett


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 6:59 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Bett


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:00 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Serg


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:01 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Inva


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:02 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Mejo


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:03 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
XVII


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:05 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Geor


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:06 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Cash


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:07 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Wind


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:08 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Care


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:09 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Tesc


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:10 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Luxo


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:11 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Fisk


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:12 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
JOHA


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:14 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Jewe


Top
 Profile  
 
 Post subject: Re: Unbreakable items
PostPosted: Thu Dec 30, 2021 7:15 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489554
Clas


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1365 posts ]  Go to page 1, 2, 3, 4, 5 ... 55  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group