Setmount

From Hercules Wiki
Jump to: navigation, search

Syntax

  • setmount {<flag>};
  • checkmount()

Description

If <flag> is MOUNT_NONE (or 0) this command will remove the mount from the character.

Otherwise it gives the invoking character the desired combat mount, where allowed by their class and skills.

If no flag is specified, the mount is automatically chosen according to the character's class and skills.

The following flag values are accepted:

 	MOUNT_NONE:
 	   - Dismount
 	MOUNT_PECO:
 	   - PecoPeco (Knight series class)
 	   - GrandPeco (Crusader series class)
 	   - Gryphon (Royal Guard)
 	MOUNT_WUG:
 	   - Warg (Ranger)
 	MOUNT_MADO:
 	   - Mado Gear (Mechanic)
 	MOUNT_DRAGON:
 	MOUNT_DRAGON_GREEN:
 	MOUNT_DRAGON_BROWN:
 	MOUNT_DRAGON_GRAY:
 	MOUNT_DRAGON_BLUE:
 	MOUNT_DRAGON_RED:
 	   - Dragon (Rune Knight)
 	   if MOUNT_DRAGON is specified, a the default (green) dragon will be used.

Unlike 'setfalcon' and 'setcart' this will not work at all if they aren't of a class which can ride a mount.

The accompanying function will return 0 if the invoking character is not on a mount, and a non-zero value (according to the above constants) if they are.
Note: in case of dragons, the returned value will always be MOUNT_DRAGON, regardless of color.

Example

 	if (checkmount())
 		mes "Leave your mount outside! No riding mounts on the floor here!";
 
 	if (checkmount() == MOUNT_DRAGON)
 		mes "Wow, your dragon is cool! Can I pet it?";