# API

# Objects

L2Object
  |
  ├── L2Buff
  ├── L2Skill
  ├── L2Creature
  |     ├── L2PartyPet
  |     ├── L2Summon
  |     ├── L2Mob
  |     ├── L2Npc
  |     └── L2Character
  |           ├── L2User
  |           └── L2PartyMember
  ├── L2Mail
  ├── L2Recipe
  └── L2Item
        └── L2DroppedItem

# Commands

Command Does what?
say Send a general message
shout Shout a message
tell Send a PM
sayToParty Send a party message
sayToClan Send a clan message
sayToTrade Send a trade message
sayToAlly Send an ally message
moveTo Move to location
hit Hit on target. Accepts L2Object object or ObjectId
attack Attack a target. Accepts L2Object object or ObjectId
cancelTarget Cancel the active target
acceptJoinParty Accepts the requested party invite
declineJoinParty Declines the requested party invite
nextTarget Select next/closest attackable target
inventory Request for inventory item list
useItem Use an item. Accepts L2Item object or ObjectId
requestDuel Request player a duel. If no char is provided, the command tries to request the selected target
autoShots Enable/disable auto-shots
cancelBuff Cancel a buff
sitOrStand Sit or stand
validatePosition Sync position with server
dwarvenCraftRecipes Dwarven craft recipe book
craft Craft an item
revive Revive to a location (Town, Castle, Clan Hall)

# Events

Event Type Event Data Type When?
LoggedIn void logged in to Game server
PacketReceived EPacketReceived (opens new window) a packet is received
PacketSent EPacketSent (opens new window) a packet is sent
PartyRequest EPartyRequest (opens new window) receive a party request
Die EDie (opens new window) L2Creature is dead
TargetSelected ETargetSelected (opens new window) L2Creature is selected by L2Creature
MyTargetSelected EMyTargetSelected (opens new window) L2Creature is selected by L2User
Attacked EAttacked (opens new window) L2User is beings attacked
RequestedDuel ERequestedDuel (opens new window) receive a duel request
StartMoving EStartMoving (opens new window) L2Creature starts moving
StopMoving EStopMoving (opens new window) L2Creature stops moving
CraftResult ECraftResult (opens new window) A result from crafting an item
RecipeBook ERecipeBook (opens new window) A receipt book is received
PartySmallWindow EPartySmallWindow (opens new window) The party small window updated
PartyMemberPosition EPartyMemberPosition (opens new window) A party member position is updated
CharInfo ECharInfo (opens new window) character info
Revive ERevive (opens new window) creature is revived
ConfirmDlg EConfirmDlg (opens new window) confirm dialog
SystemMessage ESystemMessage (opens new window) server system message
CreatureSay ECreatureSay (opens new window) creature says
NpcHtmlMessage ENpcHtmlMessage (opens new window) receiving HTML from an NPC
NpcQuestHtmlMessage ENpcQuestHtmlMessage (opens new window) receiving a quest HTML from an NPC