Jump to content
  • 0

Custom Halter Lead Bug


LewL

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.02
  • Content Count:  84
  • Reputation:   1
  • Joined:  01/08/20
  • Last Seen:  

i made a custom halter lead by copying it's item script

The Original

  - Id: 12622
    AegisName: Boarding_Halter
    Name: Reins Of Mount
    Type: Usable
    Flags:
      NoConsume: true
    Jobs:
      All: true
      Gunslinger: false
    Delay:
      Duration: 3000
      Status: All_Riding_Reuse_Limit
    Trade:
      Override: 100
      NoDrop: true
      NoTrade: true
      NoSell: true
      NoCart: true
      NoGuildStorage: true
      NoMail: true
      NoAuction: true
    Script: |
      setmounting();
    UnEquipScript: |
      if (ismounting()) setmounting();
 
i made 1 for Gunslinger
  - Id: 33014
    AegisName: Motorcycle_Key
    Name: Motorcycle Key
    Type: Usable
    Flags:
      NoConsume: true
    Jobs:
      Gunslinger: true
    Trade:
      Override: 100
      NoDrop: true
      NoTrade: true
      NoSell: true
      NoCart: true
      NoGuildStorage: true
      NoMail: true
      NoAuction: true
    Script: |
      setmounting();
    UnEquipScript: |
      if (ismounting()) setmounting();
the one i made for Gunslinger is working fine when i use it but when im on the mount and tried to use it again the mount wouldn't be release/remove
how do i fix it?
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  661
  • Reputation:   670
  • Joined:  11/12/12
  • Last Seen:  

Heya,

The Reins of Mount has special exceptions in the source. By default, while you are on a mount, you cannot use any item, and this includes the Reins of Mount itself. That is why there is an exception made for the item, and why you need to add an exception for your custom item as well.

In pc.cpp, look for "ITEMID_REINS_OF_MOUNT" in the pc_useitem function. Change 

if( nameid != ITEMID_REINS_OF_MOUNT && sd->sc.data[SC_ALL_RIDING] )

to

if( nameid != ITEMID_REINS_OF_MOUNT && nameid != 33014 && sd->sc.data[SC_ALL_RIDING] )

(Or in any other way you'd prefer, this is the most straightforward one I suppose.)

You may also want to look at other exceptions from ITEMID_REINS_OF_MOUNT and apply them too for yours. Goodluck!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...