Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Select horse
Author Message
Coruja
Sphere Developer
*****

Posts: 853
Likes Given: 4
Likes Received: 200 in 164 posts
Joined: Jul 2012
Reputation: 6

Dimension Shard

Post: #11
RE: Select horse
try using this

Code:
[FUNCTION horse]
SYSMESSAGE @88 Select the horse you want to see ...
TARGETF horse_callback

[FUNCTION horse_callback]
IF (<ARGO.ISCHAR>)
  IF (<ARGO.FLAGS> & statf_onhorse)
    // if char is mounted, ARGO will be this char and not the mount, so switch it to the mount
    ARGO=<ARGO.FINDLAYER.layer_horse.MORE2>
  ENDIF
  IF (<ARGO.BODY> == c_horse_gray) || (<ARGO.BODY> == c_horse_brown_dk) || (<ARGO.BODY> == c_horse_brown_lt)
    SRC.SYSMESSAGE horse
    return 1
  ELIF (<ARGO.BODY> == c_llama)
    SRC.SYSMESSAGE llama
    return 1
  ELIF (<ARGO.BODY> == c_ostard_desert) || (<ARGO.BODY> == c_ostard_frenzied) || (<ARGO.BODY> == c_ostard_forest)
    SRC.SYSMESSAGE ostard
    return 1
  ENDIF
ENDIF
SRC.SYSMESSAGE @38 Not a horse.
04-10-2019 05:12 AM
Find all posts by this user Like Post Quote this message in a reply
redblack
Apprentice
*

Posts: 25
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2017
Reputation: 0



Post: #12
RE: Select horse
No it doesn't work.
maybe try to give me an example applied to the code I wrote in the previous post.

Thanks for the reply
04-11-2019 02:49 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 853
Likes Given: 4
Likes Received: 200 in 164 posts
Joined: Jul 2012
Reputation: 6

Dimension Shard

Post: #13
RE: Select horse
this is already a example based on your code, but of course this code above is only for testing purposes, it only have some few mount IDs and after target the mount it will just say the mount name, so you must include your mount IDs on "IF ()" lines and replace "SYSMESSAGE llama" lines with your custom code to make it open these dialogs d_gump_llama, d_gump_horse, etc
04-11-2019 04:33 AM
Find all posts by this user Like Post Quote this message in a reply
redblack
Apprentice
*

Posts: 25
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2017
Reputation: 0



Post: #14
RE: Select horse
I have tried but it does not work, moreover in console from error on this:
ARGO = <ARGO.FINDLAYER.layer_horse.MORE2>
so when I ride the horse the message "Not a horse" comes out

thank you
04-11-2019 02:15 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

This forum uses Lukasz Tkacz MyBB addons.