BI

Otserver Lua Functions & Structures!

Por bizugo, 26 de jul. de 2007 em Tutoriais de Scripting

script
otserv
4.0 (1)
22
8.3k
bizugoB
26 de julho de 2007 às 14:41

PS: Todas as funções LUA podem ser achadas da SOURCE do OTServer



Segue algumas funções retiradas do SNV luascript.h

OTServer Lua Functions

  1. DoRemoveItem()
  2. DoFeedPlayer()
  3. DoSendCancel()
  4. DoSendDefaultCancel()
  5. DoTeleportThing()
  6. DoTransformItem()
  7. DoSendMagicEffect()
  8. DoChangeTypeItem()
  9. DoSendAnimatedText()
  10. DoShowTextWindow()
  11. DoShowTextDialog()
  12. DoDecayItem()
  13. DoCreateItem()
  14. DoCreateTeleport()
  15. DoSummonCreature()
  16. DoMoveCreature()
  17. DoPlayerSay()
  18. DoPlayerAddSkillTry()
  19. DoPlayerAddHealth()
  20. DoPlayerAddMana()
  21. DoPlayerSoul()
  22. DoPlayerAddItem()
  23. DoPlayerSendTextMessage()
  24. DoPlayerRemoveMoney()
  25. DoPlayerSetMasterPos()
  26. DoPlayerSetTown()
  27. DoPlayerSetVocation()
  28. DoPlayerRemoveItem()
  29. DoPlayerAddSoul()
  30. DoPlayerAddExp()
  31. DoPlayerSetGuildRank()
  32. DoPlayerSetGuildNick()
  33. DoSetCreatureLight()
  34. GetItemRWInfo()
  35. GetThingfromPos()
  36. GetThing()
  37. GetThingPos()
  38. DoSetItemActionId()
  39. DoSetItemText()
  40. DoSetItemSpecialDescription()
  41. GetTilePzInfo()
  42. GetTileHouseInfo()
  43. GetHouseOwner()
  44. GetHouseName()
  45. GetHouseEntry()
  46. GetHouseRent()
  47. GetHouseTown()
  48. GetHouseAccessList()
  49. GetHouseByPlayerGUID()
  50. SetHouseOwner()
  51. SetHouseAccessList()
  52. GetPlayerFood()
  53. GetPlayerAccess()
  54. GetPlayerLevel()
  55. GetPlayerMagLevel()
  56. GetPlayerMana()
  57. GetPlayerHealth()
  58. GetPlayerName()
  59. GetPlayerPosition()
  60. GetPlayerSkill()
  61. GetPlayerVocation()
  62. GetPlayerMasterPos()
  63. GetPlayerTown()
  64. GetPlayerItemCount()
  65. GetPlayerSoul()
  66. GetPlayerFreeCap()
  67. GetPlayerLight()
  68. GetPlayerSlotItem()
  69. GetPlayerDepotItems()
  70. GetPlayerGuildId()
  71. GetPlayerGuildName()
  72. GetPlayerGuildRank()
  73. GetPlayerGuildNick()
  74. GetPlayerSex()
  75. GetPlayerLookDir()
  76. GetPlayerGUID()
  77. GetPlayerFlagValue()
  78. PlayerLearnInstantSpell()
  79. GetPlayerLearnedInstantSpell()
  80. GetPlayerInstantSpellInfo()
  81. GetPlayerInstantSpellCount()
  82. GetPlayerStorageValue()
  83. SetPlayerStorageValue()
  84. GetGlobalStorageValue()
  85. SetGlobalStorageValue()
  86. DoPlayerAddOutfit()
  87. DoPlayerRemOutfit()
  88. GetWorldType()
  89. GetWorldTime()
  90. GetWorldLight()
  91. GetWorldCreatures()
  92. GetWorldUpTime()
  93. GetGuildId()
  94. IsPlayer()
  95. IsCreature()
  96. IsContainer()
  97. IsMoveable()
  98. GetPlayerByName()
  99. GetPlayerGUIDByName()
  100. RegisterCreature()
  101. GetContainerSize()
  102. GetContainerCap()
  103. GetContainerItem()
  104. DoAddContainerItem()
  105. CreateCombatObject()
  106. CreateCombatArea()
  107. SetCombatArea()
  108. SetCombatCondition()
  109. SetCombatParam()
  110. CreateConditionObject()
  111. SetConditionParam()
  112. AddDamageCondition()
  113. AddOutfitCondition()
  114. SetCombatCallBack()
  115. SetCombatFormula()
  116. SetConditionFormula()
  117. DoCombat()
  118. DoAreaCombatHealth()
  119. DoTargetCombatHealth()
  120. DoAreaCombatMana()
  121. DoTargetCombatMana()
  122. DoAreaCombatCondition()
  123. DoTargetCombatCondition()
  124. DoAreaCombatDispel()
  125. DoTargetCombatDispel()
  126. DoChallengeCreature()
  127. DoConvinceCreature()
  128. NumberToVariant()
  129. StringToVariant()
  130. PositionToVariant()
  131. TargetPositionToVariant()
  132. VariantToNumber()
  133. VariantToString()
  134. VariantToPosition()
  135. DoChangeSpeed()
  136. SetCreatureOutfit()
  137. GetCreatureOutfit()
  138. SetMonsterOutfit()
  139. SetItemOutfit()
  140. GetCreaturePosition()
  141. GetCreatureName()
  142. IsItemStackable()
  143. IsItemRune()
  144. IsItemDoor()
  145. IsItemContainer()
  146. IsItemFluidContainer()
  147. GetItemName()
  148. DebugPrint()
  149. IsInArray()
  150. AddEvent()
  151. StopEvent()
  152. GetDataDirectory()
  153. internalGetPlayerInfo()

Player Info Structure

  1. PlayerInfoFood
  2. PlayerInfoAccess
  3. PlayerInfoLevel
  4. PlayerInfoMagLevel
  5. PlayerInfoMana
  6. PlayerInfoHealth
  7. PlayerInfoName
  8. PlayerInfoPosition
  9. PlayerInfoVocation
  10. PlayerInfoMasterPos
  11. PlayerInfoSoul
  12. PlayerInfoFreeCap
  13. PlayerInfoGuildId
  14. PlayerInfoGuildName
  15. PlayerInfoGuildRank
  16. PlayerInfoGuildNick
  17. PlayerInfoSex
  18. PlayerInfoLookDirection
  19. PlayerInfoTown
  20. PlayerInfoGUID

Position Structure

  1. pos.x
  2. pos.y
  3. pos.z
  4. pos.stackpos

Editado Julho 26 por bizugo

bizugoB
26 de julho de 2007 às 14:42

Error Codes

  1. LUA_ERROR_PLAYER_NOT_FOUND
  2. LUA_ERROR_CREATURE_NOT_FOUND
  3. LUA_ERROR_ITEM_NOT_FOUND
  4. LUA_ERROR_THING_NOT_FOUND
  5. LUA_ERROR_TILE_NOT_FOUND
  6. LUA_ERROR_HOUSE_NOT_FOUND
  7. LUA_ERROR_COMBAT_NOT_FOUND
  8. LUA_ERROR_CONDITION_NOT_FOUND
  9. LUA_ERROR_AREA_NOT_FOUND
  10. LUA_ERROR_CONTAINER_NOT_FOUND
  11. LUA_ERROR_VARIANT_NOT_FOUND
  12. LUA_ERROR_VARIANT_UNKNOWN
  13. LUA_ERROR_SPELL_NOT_FOUND

Verdadeiro Falso

  1. TRUE = 1
  2. FALSE = 0

Lua Error

  1. TRUE = -1
  2. FALSE = 0

Formulas

  1. FORMULA_UNDEFINED = 0
  2. FORMULA_LEVELMAGIC = 1
  3. FORMULA_SKILL = 2

Condition Paramters

  1. OWNER = 1
  2. TICKS = 2
  3. OUTFIT = 3
  4. HEALTHGAIN = 4
  5. HEALTHTICKS = 5
  6. MANAGAIN = 6
  7. MANATICKS = 7
  8. DELAYED = 8
  9. SPEED = 9
  10. LIGHT_LEVEL = 10
  11. LIGHT_COLOR = 11
  12. SOULGAIN = 12
  13. SOULTICKS = 13
  14. MINVALUE = 14
  15. MAXVALUE = 15
  16. STARTVALUE = 16
  17. TICKINTERVAL = 17
  18. FORCEUPDATE = 18

Slot ID

  1. HEAD = 1
  2. NECKLACE = 2
  3. BACKPACK = 3
  4. ARMOR = 4
  5. RIGHT = 5
  6. LEFT = 6
  7. LEGS = 7
  8. FEET = 8
  9. RING = 9
  10. AMMO = 10

LEMBRANDO QUE TUDO DESDE TOPICO PODE SER ENCONTRADO NAS SOURCES OU NO DATA DO SEU OT!

Isto não é um tutorial, é apenas uma lista de funções :D

Flood cause: vo por mais e o topico acima chego no limite :|

Editado Julho 26 por bizugo

DarakD
26 de julho de 2007 às 15:30

muito bom cara

gostei

quanta funçao hein? :blink:

NostradamusN
26 de julho de 2007 às 15:57

Seria bom que você desse a sintaxe e a descrição de cada uma também.

bizugoB
26 de julho de 2007 às 16:54

Se o topico for aceito em tutoriais eu adiciono descrições, argumentos...

29 de julho de 2007 às 02:11

@Nostradamus

 

tb achu

 

@topico

 

Bem util xD

 

//paxeco

JvchequerJ
30 de julho de 2007 às 19:11

Olá Xtibiano,

 

Parabéns, seu tutorial foi aprovado.

 

Estarei movendo ele para a área de tutoriais.

 

Obrigado por trazer conteúdo para o Xtibia.com e espero que continue com o ótimo trabalho.

 

 

Atenciosamente,

JV Chequer *Diretor Xtibia.com*

GM VolcanoG
03 de agosto de 2007 às 16:21

Poderia ter explicado o que significava cada coisa ^.-

+ Ta mt bom..lista atualizada! xP

 

\\4 Estrelas//

biazinha21B
07 de agosto de 2007 às 21:57

vlw!!nao sabia todos agora fica bem mais facil

ExordiumE
08 de agosto de 2007 às 23:29

quanta coisa, pudia explica alguns pragente =D

 

 

flw.

2 semanas depois...
ToninT
19 de agosto de 2007 às 16:40

Muito bom devia merecer fix

WondaW
25 de agosto de 2007 às 15:35

poxa meio dificilzin

 

 

 

 

 

 

 

 

sou mapperav42st1zw7fk7.gif68%

1 mês depois...
thayamT
09 de setembro de 2007 às 19:56

o.0

Funções Pakas eim

Muito Bom kra

Falows

hopugopH
09 de setembro de 2007 às 20:55

Perfeito!!

 

Há muito tempo procuro essa lista e não sabia onde encontrar! ;)

2 semanas depois...
borghiB
18 de setembro de 2007 às 21:08

cara!

ta mto bom!!

devia ser fix!