public class 1000_Pet_Commands extends Object
====================== |1000.- Pet commands.| ======================
| 构造器和说明 |
|---|
1000_Pet_Commands() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
bpet()
bpet;
birthpet;
This command opens up a pet hatching window on the client connected to the
invoking character.
|
void |
getpetinfo()
getpetinfo(<type>{,<char_id>})
This function will return pet information for the pet the invoking character
currently has active.
|
void |
makepet()
makepet <pet id>;
This command will create a pet egg and put it in the invoking character's
inventory.
|
void |
pet()
pet <pet id>;
catchpet <pet id>;
This command is used in all the item scripts for taming items.
|
bpet;
birthpet;
This command opens up a pet hatching window on the client connected to the
invoking character. It is used in item script for the pet incubators and will
let the player hatch an owned egg. If the character has no eggs, it will just
open up an empty incubator window.
This is still usable outside item scripts.
pet <pet id>;
catchpet <pet id>;
This command is used in all the item scripts for taming items. Running this
command will make the pet catching cursor appear on the client connected to the
invoking character, usable on the monsters with the specified pet ID number. It
will still work outside an item script.
If the <pet id> is PET_CATCH_UNIVERSAL the item will attempt to catch the targeted
monster as long as it is in the pet database and does not have the MD_STATUS_IMMUNE
monster mode.
If the <pet id> is PET_CATCH_UNIVERSAL_ITEM the item will attempt to catch the targeted
monster as long as it is in the pet database and the targeted monster requires the lure
item used.
See 'doc/mob_db_mode_list.txt' for more information about monster modes.
A full list of pet IDs can be found inside 'db/(pre-)re/pet_db.txt'.
makepet <pet id>;
This command will create a pet egg and put it in the invoking character's
inventory. The kind of pet is specified by pet ID numbers listed in
'db/(pre-)re/pet_db.txt'. The egg is created exactly as if the character just successfully
caught a pet in the normal way.
// This will make you a poring:
makepet 1002;
Notice that you absolutely have to create pet eggs with this command. If you try
to give a pet egg with 'getitem', pet data will not be created by the char
server and the egg will disappear when anyone tries to hatch it.
getpetinfo(<type>{,<char_id>})
This function will return pet information for the pet the invoking character
currently has active. Valid types are:
PETINFO_ID - Pet ID
PETINFO_CLASS - Pet class number as per 'db/(pre-)re/pet_db.txt' - will tell you what kind of a pet it
is.
PETINFO_NAME - Pet name. Will return "null" if there's no pet.
PETINFO_INTIMATE - Pet friendly level (intimacy score). 1000 is full loyalty.
PETINFO_HUNGRY - Pet hungry level. 100 is completely full.
PETINFO_RENAMED - Pet rename flag. 0 means this pet has not been named yet.
PETINFO_LEVEL - Pet level
PETINFO_BLOCKID - Pet Game ID
PETINFO_EGGID - Pet egg item id
PETINFO_FOODID - Pet food item id
Copyright © 工程的初始时间(可选)–2019. All rights reserved.