StendhalAPI: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>AntumDeluge |
imported>AntumDeluge add categories |
||
| (12 intermediate revisions by the same user not shown) | |||
| Line 304: | Line 304: | ||
* Class: {{StendhalFile|master|src/games/stendhal/server/entity/GuidedEntity.java|games.stendhal.server.entity.GuidedEntity}} |
* Class: {{StendhalFile|master|src/games/stendhal/server/entity/GuidedEntity.java|games.stendhal.server.entity.GuidedEntity}} |
||
* Inherits: [[StendhalAPI#ActiveEntity|ActiveEntity]] |
* Inherits: [[StendhalAPI#ActiveEntity|ActiveEntity]] |
||
'''Public methods:''' |
|||
{{PublicMethod | GuidedEntity | desc=Default constructor.}} |
|||
{{PublicMethod | GuidedEntity | params=object | descr=Copy Constructor. | paramlist= |
|||
{{MethodParam| object | type=RPObject | desc=Object to be copied. }} }} |
|||
{{PublicMethod | setBaseSpeed | params=bs | desc=Set entity's normal movement speed. | ret= | rettype= | paramlist= |
|||
{{MethodParam| bs | type=double | desc=New normal speed for moving.}} }} |
|||
{{PublicMethod | setPath | params=path, position | desc=Set a path for this entity to follow. | ret= | rettype= | paramlist= |
|||
{{MethodParam| path | type=FixedPath | desc=Path to follow.}} |
|||
{{MethodParam| position | type=int | desc=(optional) The position of the path where the entity should start (this is not the same as <code>setPosition()</code>).}} }} |
|||
{{PublicMethod | setPathAndPosition | params=path | desc=Set path & starting position for entity. | ret= | rettype= | paramlist= |
|||
{{MethodParam| path | type=FixedPath | desc=Path to follow.}} }} |
|||
{{PublicMethod | setPathPosition | params=pathPos | desc=Sets the entity's position in its path. | ret= | rettype= | paramlist= |
|||
{{MethodParam| pathPos | type=int | desc=Position to set.}} }} |
|||
{{PublicMethod | retracePath | params= | desc=Causes entity to retrace its path backwards when it reaches the end. | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setCollisionAction | params=action | desc=Set action type to take when entity collides. | ret= | rettype= | paramlist= |
|||
{{MethodParam| action | type=CollisionAction | desc=Behavior type after collision.}} }} |
|||
{{PublicMethod | getBaseSpeed | params= | desc=Retreives entity's normal movement speed. | ret= | rettype=double | paramlist=}} |
|||
{{PublicMethod | getPath | params= | desc=Retrieves the entity's current path. | ret= | rettype=FixedPath | paramlist=}} |
|||
{{PublicMethod | getPathPosition | params= | desc=Retrieves the entity's current position in its path. | ret= | rettype=int | paramlist=}} |
|||
{{PublicMethod | getGuide | params= | desc= | ret= | rettype=EntityGuide | paramlist=}} |
|||
{{PublicMethod | getCollisionAction | params= | desc= | ret= | rettype=CollisionAction | paramlist=}} |
|||
{{PublicMethod | hasPath | params= | desc=Checks if the entity has a path set. | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | isPathLoop | params= | desc=Checks if the entity's path loops. | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | clearPath | params= | desc=Removes the entity's path. | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | reroute | params= | desc=Plan a new path to destination. | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | followPath | params= | desc= | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | addSuspend | params=duration, dir, pos... | desc=Add a suspension to the entity's path. | ret= | rettype= | paramlist= |
|||
{{MethodParam | duration | type=in | desc=}} |
|||
{{MethodParam | dir | type=Direction | desc=(optional)}} |
|||
{{MethodParam | pos... | type=int[] | desc=}} }} |
|||
: ''NOTE: this method is experimental.'' |
|||
{{PublicMethod | removeSuspend | params=pos... | desc=Removes a suspension from path. | ret= | rettype= | paramlist= |
|||
{{MethodParam | pos... | type=int[] | desc=}} }} |
|||
: ''NOTE: this method is experimental.'' |
|||
{{PublicMethod | onFinishedPath | params= | desc= | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | updateModifedAttributes | params= | desc= | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | atMovementRadius | params= | desc= | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | onOutsideMovementRadius | params= | desc= | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setRandomMovementRadius | params=radius, ret | desc= | ret= | rettype= | paramlist= |
|||
{{MethodParam | radius | type=int | desc=}} |
|||
{{MethodParam | ret | type=boolean | desc=(optional)}} }} |
|||
== RPEntity == |
== RPEntity == |
||
* Class: {{StendhalFile|master|src/games/stendhal/server/entity/RPEntity.java|games.stendhal.server.entity.RPEntity}} |
* Class: {{StendhalFile|master|src/games/stendhal/server/entity/RPEntity.java|games.stendhal.server.entity.RPEntity}} ''(abstract)'' |
||
* Inherits: [[StendhalAPI#GuidedEntity|GuidedEntity]] |
* Inherits: [[StendhalAPI#GuidedEntity|GuidedEntity]] |
||
'''Public methods:''' |
|||
{{PublicMethod | RPEntity | params= | desc=Default constructor. | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | RPEntity | params=object | desc=Copy constructor. | ret= | rettype= | paramlist= |
|||
{{MethodParam | object | type=RPObject | desc=Object to be copied.}} }} |
|||
{{PublicMethod | setName | params=name | desc=Sets the entity's name attribute. | ret= | rettype= | paramlist= |
|||
{{MethodParam | name | type=String | desc=String to be used as name.}} }} |
|||
{{PublicMethod | setLevel | params=level | desc=Sets the entity's level. | ret= | rettype= | paramlist= |
|||
{{MethodParam | level | type=int | desc=}} }} |
|||
{{PublicMethod | addKarma | params=karma | desc=Adds good or bad karma (players only). | ret= | rettype= | paramlist= |
|||
{{MethodParam | karma | type=double | desc=Amount to be added (negative amount represents "bad" karma).}} }} |
|||
{{PublicMethod | getLevel | params= | desc=Retrieves the entity's current level. | ret= | rettype=int | paramlist=}} |
|||
{{PublicMethod | getKarma | params= | desc=Retrieves current karma level. | ret= | rettype=double | paramlist=}} |
|||
{{PublicMethod | useKarma | params=scale | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | useKarma | params=negLimit, posLimit[, granularity] | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | heal | params=[amount[, tell]] | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | addMana | params=mana, tell | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | damageDone | params=defender, attackingWeaponsValue, damageType | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setAtk | params=atk | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getAtk | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getCappedAtk | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setAtkXP | params=atk | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | addAtkXP | params=xp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getAtkXP | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | incAtkXP | params=def | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setDef | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getDef | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getCappedDef | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setDefXP | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | addDefXP | params=xp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getDefXP | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | incDefXP | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setRatk | params=ratk | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getRatk | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getCappedRatk | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setRatkXP | params=xp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | addRatkXP | params=xp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getRatkXP | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | incRatkXP | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | initHP | params=hp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setBaseHP | params=newhp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getBaseHP | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setHP | params=hp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getHP | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getLVCap | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getMana | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getBaseMana | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setMana | params=newMana | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setBaseMana | params=newBaseMana | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | addBaseMana | params=newBaseMana | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setLVCap | params=newLVCap | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setXP | params=newxp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | subXP | params=newxp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | addXP | params=newxp | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getXP | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | isAttackable | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setTarget | params=target | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | stopAttack | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getsFightXpFrom | params=enemy | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | stopAttacking | params=attacker | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | rememberAttacker | params=attacker | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setBlood | params=name | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getBloodClass | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getDroppables | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | dropDroppableItem | params=droppable | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | maybeDropDroppables | params=attacker | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | onDamaged | params=attacker, damage | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | damage | params=amount, attacker | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | delayedDamage | params=amount, attackerName | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | onDead | params=killer[, remove] | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getCorpseName | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getHarmlessCorpseName | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getCorpseWidth | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getCorpseHeight | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | isInvisibleToCreatures | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | isAttacked | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getAttackSources | params= | desc=TODO | ret= | rettype=List<[[StendhalAPI#Entity|Entity]]> | paramlist=}} |
|||
{{PublicMethod | getAttackingRPEntities | params= | desc=TODO | ret= | rettype=List<[[StendhalAPI#RPEntity|RPEntity]]> | paramlist=}} |
|||
{{PublicMethod | isAttacking | params= | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | getAttackTarget | params= | desc=TODO | ret= | rettype=[[StendhalAPI#RPEntity|RPEntity]] | paramlist=}} |
|||
{{PublicMethod | equipToInventoryOnly | params=item | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | getSlotToEquip | params=item | desc=TODO | ret= | rettype=[[MarauroaAPI#RPSlot|RPSlot]] | paramlist=}} |
|||
{{PublicMethod | equipOrPutOnGround | params=item | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | equip | params=slotName, item | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | isEquipped | params=condition, amount | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | drop | params=<name> {{!|}} <item> | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | dropWithInfostring | params=name, infostring[, amount] | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | isEquipped | params=name[, amount] | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | isEquippedWithInfostring | params=name, infostring[, amount] | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | getNumberOfEquipped | params=name | desc=TODO | ret= | rettype=int | paramlist=}} |
|||
{{PublicMethod | getTotalNumberOf | params=name | desc=TODO | ret= | rettype=int | paramlist=}} |
|||
{{PublicMethod | getFirstEquipped | params=name | desc=TODO | ret= | rettype=[[StendhalAPI#Item|Item]] | paramlist=}} |
|||
{{PublicMethod | getAllEquipped | params=name | desc=TODO | ret= | rettype=List<[[StendhalAPI#Item|Item]]> | paramlist=}} |
|||
{{PublicMethod | getAllEquippedWithInfostring | params=name, infostring | desc=TODO | ret= | rettype=List<[[StendhalAPI#Item|Item]]> | paramlist=}} |
|||
{{PublicMethod | isEquippedItemClass | params=slot, clazz | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | isEquippedItemInSlot | params=slot, item | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | getEquippedItemClass | params=slot, clazz | desc=TODO | ret= | rettype=[[StendhalAPI#Item|Item]] | paramlist=}} |
|||
{{PublicMethod | getWeapon | params= | desc=TODO | ret= | rettype=[[StendhalAPI#Item|Item]] | paramlist=}} |
|||
{{PublicMethod | getWeapons | params= | desc=TODO | ret= | rettype=List<[[StendhalAPI#Item|Item]]> | paramlist=}} |
|||
{{PublicMethod | getRangeWeapon | params= | desc=TODO | ret= | rettype=[[StendhalAPI#Item|Item]] | paramlist=}} |
|||
{{PublicMethod | getAmmunition | params= | desc=TODO | ret= | rettype=[[StendhalAPI#StackableItem|StackableItem]] | paramlist=}} |
|||
{{PublicMethod | getMissileIfNotHoldingOtherWeapon | params= | desc=TODO | ret= | rettype=[[StendhalAPI#StackableItem|StackableItem]] | paramlist=}} |
|||
{{PublicMethod | hasShield | params= | desc=TODO | ret= | rettype=boolean | paramlist=}} |
|||
{{PublicMethod | getShield | params= | desc=TODO | ret= | rettype=[[StendhalAPI#Item|Item]] | paramlist=}} |
|||
{{PublicMethod | hasArmor | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getArmor | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | hasHelmet | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getHelmet | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | hasLegs | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getLegs | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | hasBoots | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getBoots | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | hasCloak | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getCloak | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | hasRing | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getRing | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | sendPrivateText | params=text | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | sendPrivateText | params=type, text | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getItemAtk | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getItemRatk | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getItemDef | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getDefenseItems | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | updateItemAtkDef | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | canDoRangeAttack | params=target, maxrange | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | hasLineOfSight | params=target | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getMaxRangeForArcher | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setTitle | params=title | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | logic | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | canHit | params=defender | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getAtkRate | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | attack | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | handleLifesteal | params=attacker, attackerWeapons, damage | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getCorpseDeserver | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getLanguage | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setDeathSound | params=sound | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getDeathSound | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | addStatusAttacker | params=statusAttacker | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getStatusList | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | hasStatus | params=statusType | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setShadowStyle | params=st | desc=TODO | ret= | rettype= | paramlist=}} |
|||
'''Static public methods:''' |
|||
{{PublicMethod | generateRPClass | params= | desc= | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | applyDistanceAttackModifiers | params=damage, squareDistance, maxrange | desc=TODO | ret= | rettype= | paramlist=}} |
|||
== DressedEntity == |
|||
* Class: {{StendhalFile|master|src/games/stendhal/server/entity/DressedEntity.java|games.stendhal.server.entity.DressedEntity}} ''(abstract)'' |
|||
* Inherits: [[StendhalAPI#RPEntity|RPEntity]] |
|||
'''Public Methods:''' |
|||
{{PublicMethod | DressedEntity | params= | desc=Default constructor. | ret=New instance. | rettype=[[StendhalAPI#DressedEntity|DressedEntity]] | paramlist=}} |
|||
{{PublicMethod | DressedEntity | params=object | desc=Copy constructor. | ret=New instance. | rettype=[[StendhalAPI#DressedEntity|DressedEntity]] | paramlist= |
|||
{{MethodParam | object | type=[[MarauroaAPI#RPObject|RPObject]] | desc=Object to be copied.}} }} |
|||
{{PublicMethod | getOutfit | params= | desc=TODO | ret= | rettype=[[StendhalAPI#Outfit|Outfit]] or null | paramlist=}} |
|||
{{PublicMethod | getOriginalOutfit | params= | desc=TODO | ret= | rettype=[[StendhalAPI#Outfit|Outfit]] or null | paramlist=}} |
|||
{{PublicMethod | getOutfitColors | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setOutfit | params=outfit[, temporary] | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setOutfit | params=layers | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setOutfit | params=temporary, layers | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setOutfit | params=strcode[, temporary] | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setOutfitWithDetail | params=outfit, temporary | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setOutfitColor | params=part, color | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setOutfitColors | params=parts | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | isNaked | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | unsetOutfitColor | params=part | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | restoreOriginalOutfit | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
== NPC == |
|||
* Class: {{StendhalFile|master|src/games/stendhal/server/entity/npc/NPC.java|games.stendhal.server.entity.npc.NPC}} ''(abstract)'' |
|||
* Inherits: [[StendhalAPI#DressedEntity|DressedEntity]] |
|||
'''Public Members:''' |
|||
{{PublicMember | pauseTurnsRemaining | desc=| type=int}} |
|||
'''Public Methods:''' |
|||
{{PublicMethod | NPC | params= | desc=Default constructor | ret=New instance. | rettype=[[StendhalAPI#NPC|NPC]] | paramlist=}} |
|||
{{PublicMethod | NPC | params=object | desc=Copy constructor. | ret=New instance. | rettype=[[StendhalAPI#NPC|NPC]] | paramlist= |
|||
{{MethodParam | object | type=[[MarauroaAPI#RPObject|RPObject]] | desc=Object to be copied.}} }} |
|||
{{PublicMethod | checkPause | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getIdea | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getMovementRange | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getPerceptionRange | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | getSounds | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | moveRandomly | params= | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | say | params=text | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setIdea | params=idea | desc=Sets the NPC's idea/thought. | ret= | rettype= | paramlist= |
|||
{{MethodParam | idea | type=String | desc=The idea mnemonic, or <code>null</code>.}} }} |
|||
{{PublicMethod | setMovement | params=destEntity, min, max, maxPathRadius | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setMovementRange | params=movementRange | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setPathCompletedPause | params=pause[, dir] | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setPerceptionRange | params=perceptionRange | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setRandomPathFrom | params=x, y, distance | desc=TODO | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setSounds | params=sounds | desc=TODO | ret= | rettype= | paramlist=}} |
|||
== PassiveNPC == |
|||
* Class: {{StendhalFile|master|src/games/stendhal/server/entity/npc/PassiveNPC.java|games.stendhal.server.entity.npc.PassiveNPC}} ''(abstract)'' |
|||
* Inherits: [[StendhalAPI#NPC|NPC]] |
|||
'''Public Methods:''' |
|||
{{PublicMethod | createPath | params= | desc=Does nothing unless overridden by sub-class. | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | reversePath | params= | desc=Changes entity's path to walk in opposite direction. | ret= | rettype= | paramlist=}} |
|||
{{PublicMethod | setTeleportsFlag | params=teleports | desc=TODO | ret= | rettype= | paramlist= |
|||
{{MethodParam | teleports | type=boolean | desc=}} }} |
|||
{{PublicMethod | isTeleporter | params= | desc= | ret=teleports | rettype=boolean | paramlist=}} |
|||
== SpeakerNPC == |
|||
* Class: {{StendhalFile|master|src/games/stendhal/server/entity/npc/SpeakerNPC.java|games.stendhal.server.entity.npc.SpeakerNPC}} |
|||
* Inherits: [[StendhalAPI#PassiveNPC|PassiveNPC]] |
|||
'''Public Methods:''' |
|||
{{PublicMethod | SpeakerNPC | params=name | desc=Constructor. | ret= | rettype= | paramlist= |
|||
{{MethodParam | name | type=String | desc=Name of the new entity.}} }} |
|||
{{PublicMethod | add | params=state, trigger, condition, nextState, reply, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | add | params=state, trigger, condition, nextState, reply, action, label | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | add | params=state, triggerStrings, condition, nextState, reply, action,label | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | add | params=state, triggerStrings, condition, nextState, reply, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | add | params=state, triggerStrings, condition, secondary, nextState, reply, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | add | params=states, trigger, condition, nextState, reply, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | add | params=states, triggerStrings, condition, nextState, reply, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | add | params=state, triggerStrings, nextState, reply, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | add | params=state, triggerStrings, nextState, reply, action, label | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addEmotion | params=triggerStrings, npcAction | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addEmotion | params=trigger, npcAction | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addEmotionReply | params=playerAction, npcAction | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addGoodbye | params= | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addGoodbye | params=text | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addGreeting | params= | desc=Add default greeting. | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addGreeting | params=text | desc=Add greeting text. | ret= | rettype= | paramlist= |
|||
{{MethodParam | text | type=String | desc=Message to be displayed.}} }} |
|||
{{PublicMethod | addGreeting | params=text, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addHelp | params=helpDescription | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addInitChatMessage | params=condition, action | desc= | ret= | rettype= | paramlist= |
|||
{{MethodParam | condition | type=[[StendhalAPI#ChatCondition|ChatCondition]] | desc=}} |
|||
{{MethodParam | action | type=[[StendhalAPI#ChatAction|ChatAction]] | desc=}} }} |
|||
{{PublicMethod | addJob | params=jobDescription | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addMatching | params=state, trigger, matcher, condition, nextState, reply, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addOffer | params=offerDescription | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addQuest | params=text | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addReply | params=trigger, text | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addReply | params=triggerStrings, text | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addReply | params=trigger, text, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addReply | params=triggerStrings, text, action | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addReplyOnEmotion | params=playerAction, reply | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addWaitMessage | params= | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | addWaitMessage | params=text, action | desc=Message when attending another player. | ret= | rettype= | paramlist= |
|||
{{MethodParam | text | type=String | desc=Message to be shown.}} |
|||
{{MethodParam | action | type=[[StendhalAPI#ChatAction|ChatAction]] | desc=}} }} |
|||
{{PublicMethod | del | params=label | desc=Delete transitions that match label. | ret= | rettype=boolean | paramlist= |
|||
{{MethodParam | label | type=String | desc=}} }} |
|||
{{PublicMethod | endConversation | params= | desc=Ends interaction with player & sets to not attending. | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | getAlternativeImage | params= | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | getAttending | params= | desc=Retrieves the entity currently talking to the NPC, or null if not attending anyone. | ret=Entity attended to. | rettype=[[StendhalAPI#RPEntity|RPEntity]] | paramlist= }} |
|||
{{PublicMethod | getEngine | params= | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | getJob | params= | desc=TODO | ret= | rettype=String | paramlist= }} |
|||
{{PublicMethod | getReply | params=trigger | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | getReply | params=trigger, state, expressionType | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | getTransitions | params= | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | inConversationRange | params= | desc=Checks if an entity is within range to interact. | ret= | rettype=boolean | paramlist= }} |
|||
{{PublicMethod | isAllowedToActAlone | params= | desc= | ret= | rettype=boolean | paramlist= }} |
|||
{{PublicMethod | isTalking | params= | desc= | ret= | rettype=boolean | paramlist= }} |
|||
{{PublicMethod | listenTo | params=player, text | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | onRejectedAttackStart | params=attacker | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | preLogic | params= | desc= | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | setAllowToActAlone | params=allow | desc=Allow or disallow the NPC to act without players in its zone. | ret= | rettype= | paramlist= |
|||
{{MethodParam | allow | type=boolean }} }} |
|||
{{PublicMethod | setAlternativeImage | params=alternativeImage | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | setAttending | params=rpendity | desc=Sets the entity to whom the NPC is currently listening. | ret= | rettype= | paramlist= |
|||
{{MethodParam | rpentity | type=[[StendhalAPI#RPEntity|RPEntity]] | desc=The entity with whom the NPC should be interacting}} }} |
|||
{{PublicMethod | setCurrentState | params=state | desc=TODO | ret= | rettype= | paramlist= }} |
|||
{{PublicMethod | setIdleDirection | params=dir | desc=Sets the direction the entity will face while not interacting with a player. | ret= | rettype= | paramlist= |
|||
{{MethodParam | dir | type=[[StendhalAPI#Direction|Direction]] | desc=Direction to face.}} }} |
|||
{{PublicMethod | setPlayerChatTimeout | params=playerChatTimeout | desc=Sets the time a conversation can be paused before it will be terminated by the NPC. | ret= | rettype= | paramlist= |
|||
{{MethodParam | playerChatTimeout | type=long | desc=Time in seconds.}} }} |
|||
== SilentNPC == |
|||
* Class: {{StendhalFile|master|src/games/stendhal/server/entity/npc/SilentNPC.java|games.stendhal.server.entity.npc.SilentNPC}} |
|||
* Inherits: [[StendhalAPI#PassiveNPC|PassiveNPC]] |
|||
= See Also = |
= See Also = |
||
* [[StendhalScripting|Stendhal Supported Scripting]] |
* [[StendhalScripting|Stendhal Supported Scripting]] |
||
[[Category:Documentation]] |
|||
[[Category:API]] |
|||