Guest User

Untitled

a guest
Apr 22nd, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.26 KB | None | 0 0
  1. -- Funções 0.X
  2. -- Legenda
  3. -- cid = creatureId (ID DA CRIATURA)
  4. -- uid = unique id (ID UNICO, ITENS E CRIATURA POSSUEM ESSE ID)
  5. -- pos -> posição {x,y,z}
  6. -- channelId -> ID DO CANAL
  7.  
  8. -- Creature
  9. getCreatureHealth(cid)
  10. getCreatureMaxHealth(cid[, ignoreModifiers = false])
  11. getCreatureMana(cid)
  12. getCreatureMaxMana(cid[, ignoreModifiers = false])
  13. getCreatureHideHealth(cid)
  14. doCreatureSetHideHealth(cid, hide)
  15. getCreatureSpeakType(cid)
  16. doCreatureSetSpeakType(cid, type)
  17. getCreatureLookDirection(cid)
  18. getInstantSpellInfo(cid, name)
  19. getCreatureStorageList(cid)
  20. getCreatureStorage(uid, key)
  21. doCreatureSetStorage(uid, key, value)
  22. doCreatureSay(uid, text[, type = SPEAK _SAY[, ghost = false[, cid = 0[, pos]]]])
  23. doSendCreatureSquare(cid, color[, player])
  24. doCreatureAddHealth(cid, health[, hitEffect[, hitColor[, force]]])
  25. doCreatureAddMana(cid, mana)
  26. setCreatureMaxHealth(cid, health)
  27. setCreatureMaxMana(cid, mana)
  28. doSummonMonster(cid, name)
  29. doConvinceCreature(cid, target)
  30. doCreatureExecuteTalkAction(cid, text[, ignoreAccess = false[, channelId = CHANNEL _DEFAULT]])
  31. getCreatureByName(name)
  32. registerCreatureEvent(uid, eventName)
  33. unregisterCreatureEvent(uid, eventName)
  34. doCreatureSetDropLoot(cid, doDrop)
  35. doCreatureSetLookDirection(cid, dir)
  36. getCreatureGuildEmblem(cid[, target])
  37. doCreatureSetGuildEmblem(cid, emblem)
  38. getCreaturePartyShield(cid[, target])
  39. doCreatureSetPartyShield(cid, shield)
  40. getCreatureSkullType(cid[, target])
  41. doCreatureSetSkullType(cid, skull)
  42. getCreatureNoMove(cid)
  43. doCreatureSetNoMove(cid, block)
  44. getCreatureOutfit(cid)
  45. getCreatureLastPosition(cid)
  46. getCreatureName(cid)
  47. getCreatureSpeed(cid)
  48. getCreatureBaseSpeed(cid)
  49. getCreatureTarget(cid)
  50. doChangeSpeed(cid, delta)
  51. doCreatureChangeOutfit(cid, outfit)
  52. doSetCreatureOutfit(cid, outfit[, time = -1])
  53. doSetMonsterOutfit(cid, name[, time = -1])
  54. doSetItemOutfit(cid, item[, time = -1])
  55. getCreatureMaster(cid)
  56. getCreatureSummons(cid)
  57.  
  58. -- Player
  59. getPlayerLevel(cid)
  60. getPlayerExperience(cid)
  61. getPlayerMagLevel(cid[, ignoreModifiers = false])
  62. getPlayerSpentMana(cid)
  63. getPlayerFood(cid)
  64. getPlayerAccess(cid)
  65. getPlayerGhostAccess(cid)
  66. getPlayerSkillLevel(cid, skill[, ignoreModifiers = false])
  67. getPlayerSkillTries(cid, skill)
  68. getPlayerTown(cid)
  69. getPlayerVocation(cid)
  70. getPlayerIp(cid)
  71. getPlayerRequiredMana(cid, magicLevel)
  72. getPlayerRequiredSkillTries(cid, skillId, skillLevel)
  73. getPlayerItemCount(cid, itemid[, subType = -1])
  74. getPlayerMoney(cid)
  75. getPlayerSoul(cid[, ignoreModifiers = false])
  76. getPlayerFreeCap(cid)
  77. getPlayerLight(cid)
  78. getPlayerSlotItem(cid, slot)
  79. getPlayerWeapon(cid[, ignoreAmmo = false])
  80. getPlayerItemById(cid, deepSearch, itemId[, subType = -1])
  81. getPlayerDepotItems(cid, depotid)
  82. getPlayerGuildId(cid)
  83. getPlayerGuildName(cid)
  84. getPlayerGuildRankId(cid)
  85. getPlayerGuildRank(cid)
  86. getPlayerGuildNick(cid)
  87. getPlayerGuildLevel(cid)
  88. getPlayerGUID(cid)
  89. getPlayerNameDescription(cid)
  90. doPlayerSetNameDescription(cid, desc)
  91. getPlayerSpecialDescription(cid)
  92. doPlayerSetSpecialDescription(cid, desc)
  93. getPlayerAccountId(cid)
  94. getPlayerAccount(cid)
  95. getPlayerFlagValue(cid, flag)
  96. getPlayerCustomFlagValue(cid, flag)
  97. getPlayerPromotionLevel(cid)
  98. doPlayerSetPromotionLevel(cid, level)
  99. getPlayerGroupId(cid)
  100. doPlayerSetGroupId(cid, newGroupId)
  101. doPlayerSendOutfitWindow(cid)
  102. doPlayerLearnInstantSpell(cid, name)
  103. doPlayerUnlearnInstantSpell(cid, name)
  104. getPlayerLearnedInstantSpell(cid, name)
  105. getPlayerInstantSpellCount(cid)
  106. getPlayerInstantSpellInfo(cid, index)
  107. doPlayerFeed(cid, food)
  108. doPlayerSendCancel(cid, text)
  109. doPlayerSendDefaultCancel(cid, ReturnValue)
  110. doPlayerAddSkillTry(cid, skillid, n[, useMultiplier = true])
  111. doPlayerSetMaxCapacity(cid, cap)
  112. doPlayerAddSpentMana(cid, amount[, useMultiplier = true])
  113. doPlayerAddSoul(cid, amount)
  114. doPlayerAddItem(cid, itemid[, count/subtype = 1[, canDropOnMap = true[, slot = 0]]])
  115. doPlayerAddItem(cid, itemid[, count = 1[, canDropOnMap = true[, subtype = 1[, slot = 0]]]])
  116. doPlayerAddItemEx(cid, uid[, canDropOnMap = false[, slot = 0]])
  117. doPlayerSendTextMessage(cid, MessageClasses, message)
  118. doPlayerSendChannelMessage(cid, author, message, SpeakClasses, channel)
  119. doPlayerSendToChannel(cid, targetId, SpeakClasses, message, channel[, time])
  120. doPlayerOpenChannel(cid, channelId)
  121. doPlayerAddMoney(cid, money)
  122. doPlayerRemoveMoney(cid, money)
  123. doPlayerTransferMoneyTo(cid, target, money)
  124. doPlayerPopupFYI(cid, message)
  125. doPlayerSendTutorial(cid, id)
  126. doPlayerSendMailByName(name, item[, town[, actor]])
  127. doPlayerAddMapMark(cid, pos, type[, description])
  128. doPlayerAddPremiumDays(cid, days)
  129. getPlayerPremiumDays(cid)
  130. getPlayerIdleTime(cid)
  131. doPlayerSetIdleTime(cid, amount)
  132. getPlayerLastLoad(cid)
  133. getPlayerLastLogin(cid)
  134. getPlayerAccountManager(cid)
  135. getPlayerTradeState(cid)
  136. getPlayerModes(cid)
  137. getPlayerRates(cid)
  138. doPlayerSetRate(cid, type, value)
  139. getPlayerPartner(cid)
  140. doPlayerSetPartner(cid, guid)
  141. doPlayerFollowCreature(cid, target)
  142. getPlayerParty(cid)
  143. doPlayerJoinParty(cid, lid)
  144. doPlayerLeaveParty(cid[, forced = false])
  145. doPlayerAddMount(cid, mountId)
  146. doPlayerRemoveMount(cid, mountId)
  147. getPlayerMount(cid, mountId)
  148. doPlayerSetMount(cid, mountId)
  149. doPlayerSetMountStatus(cid, mounted)
  150. getPlayerByNameWildcard(name~[, ret = false])
  151. getPlayerGUIDByName(name[, multiworld = false])
  152. getPlayerNameByGUID(guid[, multiworld = false[, displayError = true]])
  153. doPlayerChangeName(guid, oldName, newName)
  154. doPlayerSetPzLocked(cid, locked)
  155. doPlayerSetTown(cid, townid)
  156. doPlayerSetVocation(cid,voc)
  157. doPlayerRemoveItem(cid, itemid[, count[, subType = -1]])
  158. doPlayerAddExperience(cid, amount)
  159. doPlayerSetGuildId(cid, id)
  160. doPlayerSetGuildLevel(cid, level[, rank])
  161. doPlayerSetGuildNick(cid, nick)
  162. doPlayerAddOutfit(cid, looktype, addon)
  163. doPlayerRemoveOutfit(cid, looktype[, addon = 0])
  164. doPlayerAddOutfitId(cid, outfitId, addon)
  165. doPlayerRemoveOutfitId(cid, outfitId[, addon = 0])
  166. canPlayerWearOutfit(cid, looktype[, addon = 0])
  167. canPlayerWearOutfitId(cid, outfitId[, addon = 0])
  168. getPlayerLossPercent(cid, lossType)
  169. doPlayerSetLossPercent(cid, lossType, newPercent)
  170. doPlayerSetLossSkill(cid, doLose)
  171. getPlayerLossSkill(cid)
  172. doPlayerSwitchSaving(cid)
  173. doPlayerSave(cid[, shallow = false])
  174. isPlayerPzLocked(cid)
  175. isPlayerSaving(cid)
  176. getPlayerByGUID(guid)
  177. getPlayerSex(cid[, full = false])
  178. doPlayerSetSex(cid, newSex)
  179. getPlayerSkullEnd(cid)
  180. doPlayerSetSkullEnd(cid, time, type)
  181. getPlayerBlessing(cid, blessing)
  182. doPlayerAddBlessing(cid, blessing)
  183. getPlayerStamina(cid)
  184. doPlayerSetStamina(cid, minutes)
  185. getPlayerBalance(cid)
  186. doPlayerSetBalance(cid, balance)
  187.  
  188. -- Party
  189. getPartyMembers(lid)
  190.  
  191. -- Account
  192. getAccountIdByName(name)
  193. getAccountByName(name)
  194. getAccountIdByAccount(accName)
  195. getAccountByAccountId(accId)
  196. getPlayersByAccountId(accId)
  197.  
  198. -- Ban
  199. getBanData(value[, type[, param]])
  200. getBanReason(id)
  201. getBanAction(id[, ipBanishment = false])
  202. getBanList(type[, value[, param]])
  203. isIpBanished(ip[, mask])
  204. isPlayerBanished(name/guid, type)
  205. isAccountBanished(accountId[, playerId])
  206. doAddIpBanishment(...)
  207. doAddPlayerBanishment(...)
  208. doAddAccountBanishment(...)
  209. doAddNotation(...)
  210. doAddStatement(...)
  211. doRemoveIpBanishment(ip[, mask])
  212. doRemovePlayerBanishment(name/guid, type)
  213. doRemoveAccountBanishment(accountId[, playerId])
  214. doRemoveNotations(accountId[, playerId])
  215. doRemoveStatements(name/guid[, channelId])
  216. getNotationsCount(accountId[, playerId])
  217. getStatementsCount(name/guid[, channelId])
  218.  
  219. -- Guild
  220. doGuildAddEnemy(guild, enemy, war, type)
  221. doGuildRemoveEnemy(guild, enemy)
  222. getGuildId(guildName)
  223. getGuildMotd(guildId)
  224.  
  225. -- Storage
  226.  
  227. getStorageList()
  228. getStorage(key)
  229. doSetStorage(key, value)
  230. setPlayerStorageValue
  231.  
  232. -- OT
  233. getPlayersOnline()
  234. getPlayersByIp(ip[, mask = 0xFFFFFFFF])
  235. getExperienceStage(level)
  236. getGameState()
  237. doSetGameState(id)
  238. getWorldType()
  239. setWorldType(type)
  240. getWorldTime()
  241. getWorldLight()
  242. getWorldCreatures(type)
  243. getWorldUpTime()
  244. getVocationList()
  245. getGroupList()
  246. getChannelList()
  247. getTownList()
  248. getWaypointList()
  249. getTalkActionList()
  250. getExperienceStageList()
  251. doSaveServer([shallow = false])
  252. doUpdateHouseAuctions()
  253. isCreature(cid)
  254. isMovable(uid)
  255. hasPlayerClient(cid)
  256. getHighscoreString(skillId)
  257. getVocationInfo(id)
  258. getGroupInfo(id[, premium = false])
  259. getIpByName(name)
  260. getMountInfo([mountId])
  261.  
  262. -- Lua Utils
  263. isInArray(array, value[, caseSensitive = false])
  264.  
  265. -- Events
  266. addEvent(callback, delay, ...)
  267. stopEvent(eventid)
  268.  
  269. -- Channel
  270. getChannelUsers(channelId)
  271.  
  272. -- Item
  273. doItemRaidUnref(uid)
  274. doRemoveItem(uid[, count = -1])
  275. doTransformItem(uid, newId[, count/subType])
  276. doDecayItem(uid)
  277. doCreateItem(itemid[, type/count], pos)
  278. doCreateItemEx(itemid[, count/subType = -1])
  279. getItemIdByName(name[, displayError = true])
  280. getItemInfo(itemid)
  281. getItemAttribute(uid, key)
  282. doItemSetAttribute(uid, key, value)
  283. doItemEraseAttribute(uid, key)
  284. getItemWeight(uid[, precise = true])
  285. getItemParent(uid)
  286. hasItemProperty(uid, prop)
  287.  
  288. -- Container
  289. doAddContainerItemEx(uid, virtuid)
  290. getContainerSize(uid)
  291. getContainerCap(uid)
  292. getContainerItem(uid, slot)
  293. doAddContainerItem(uid, itemid[, count/subType = 1])
  294.  
  295. -- Raids
  296. doExecuteRaid(name)
  297.  
  298. -- Map
  299. getTileInfo(pos)
  300. getThingFromPos(pos[, displayError = true])
  301. getThing(uid[, recursive = RECURSE _FIRST])
  302. doTileQueryAdd(uid, pos[, flags[, displayError = true]])
  303. getThingPosition(uid)
  304. getTileItemById(pos, itemId[, subType = -1])
  305. getTileItemByType(pos, type)
  306. getTileThingByPos(pos)
  307. getTopCreature(pos)
  308. getClosestFreeTile(cid, targetpos[, extended = false[, ignoreHouse = true]])
  309. doTeleportThing(cid, newpos[, pushmove = true[, fullTeleport = true]])
  310. doSendMagicEffect(pos, type[, player])
  311. doSendDistanceShoot(fromPos, toPos, type[, player])
  312. doSendAnimatedText(pos, text, color[, player])
  313. doTileAddItemEx(pos, uid)
  314. doRelocate(pos, posTo[, creatures = true[, unmovable = true]])
  315. doCleanTile(pos[, forceMapLoaded = false])
  316. doCreateTeleport(itemid, topos, createpos)
  317. doCreateMonster(name, pos[, extend = false[, force = false[, displayError = true]]])
  318. doCreateNpc(name, pos[, displayError = true])
  319. doCleanHouse(houseId)
  320. doCleanMap()
  321. doRefreshMap()
  322. doMoveCreature(cid, direction[, flag = FLAG _NOLIMIT])
  323. doSteerCreature(cid, position)
  324. getSpectators(centerPos, rangex, rangey[, multifloor = false])
  325. isSightClear(fromPos, toPos, floorCheck)
  326. getTownId(townName)
  327. getTownName(townId)
  328. getTownTemplePosition(townId)
  329. getTownHouses(townId)
  330.  
  331. -- Waypoints
  332. getWaypointPosition(name)
  333. doWaypointAddTemporial(name, pos)
  334.  
  335. -- Condition & Combat
  336. doAddCondition(cid, condition)
  337. doRemoveCondition(cid, type[, subId])
  338. doRemoveConditions(cid[, onlyPersistent])
  339. doRemoveCreature(cid[, forceLogout = true])
  340. getCreatureCondition(cid, condition[, subId = 0])
  341. createCombatArea({area}[, {extArea}])
  342. createConditionObject(type[, ticks[, buff[, subId]]])
  343. setCombatArea(combat, area)
  344. setCombatCondition(combat, condition)
  345. setCombatParam(combat, key, value)
  346. setConditionParam(condition, key, value)
  347. addDamageCondition(condition, rounds, time, value)
  348. addOutfitCondition(condition, outfit)
  349. setCombatCallBack(combat, key, function_name)
  350. setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]])
  351. setConditionFormula(combat, mina, minb, maxa, maxb)
  352. doCombat(cid, combat, param)
  353. createCombatObject()
  354. doCombatAreaHealth(cid, type, pos, area, min, max, effect)
  355. doTargetCombatHealth(cid, target, type, min, max, effect)
  356. doCombatAreaMana(cid, pos, area, min, max, effect)
  357. doTargetCombatMana(cid, target, min, max, effect)
  358. doCombatAreaCondition(cid, pos, area, condition, effect)
  359. doTargetCombatCondition(cid, target, condition, effect)
  360. doCombatAreaDispel(cid, pos, area, type, effect)
  361. doTargetCombatDispel(cid, target, type, effect)
  362. doChallengeCreature(cid, target)
  363. numberToVariant(number)
  364. stringToVariant(string)
  365. positionToVariant(pos)
  366. targetPositionToVariant(pos)
  367. variantToNumber(var)
  368. variantToString(var)
  369. variantToPosition(var)
  370.  
  371. -- Message
  372. doShowTextDialog(cid, itemid, text)
  373.  
  374. -- Engine
  375. loadmodlib(lib)
  376. domodlib(lib)
  377. dodirectory(dir[, recursively = false])
  378. getDataDir()
  379. getLogsDir()
  380. getConfigFile()
  381. getConfigValue(key)
  382. getModList()
  383. doReloadInfo(id[, cid])
  384.  
  385. -- House
  386. getHouseInfo(houseId[, displayError = true])
  387. getHouseAccessList(houseid, listId)
  388. getHouseByPlayerGUID(playerGUID)
  389. getHouseFromPos(pos)
  390. setHouseAccessList(houseid, listid, listtext)
  391. setHouseOwner(houseId, owner[, clean])
  392.  
  393. -- Unknown
  394. getSearchString(fromPosition, toPosition[, fromIsCreature = false[, toIsCreature = false]])
Add Comment
Please, Sign In to add comment