• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Avesta LUA Functions

Pro Warbringer

Retired with developing
Joined
Sep 23, 2008
Messages
3,582
Reaction score
25
Location
Austria
Well i made my Real Npc's and i want to improve them for sure i need some help from ya guys..
Well i need the god damn npc Function list for avesta can u get me that?
If yes then please post it here! :)

Ill rep ya!

Kind Regard's,
Pro Warbringer
 
Well i made my Real Npc's and i want to improve them for sure i need some help from ya guys..
Well i need the god damn npc Function list for avesta can u get me that?
If yes then please post it here! :)

Ill rep ya!

Kind Regard's,
Pro Warbringer

?

Code:
	//npc exclusive functions
	lua_register(m_luaState, "selfSay", NpcScriptInterface::luaActionSay);
	lua_register(m_luaState, "selfMove", NpcScriptInterface::luaActionMove);
	lua_register(m_luaState, "selfMoveTo", NpcScriptInterface::luaActionMoveTo);
	lua_register(m_luaState, "selfTurn", NpcScriptInterface::luaActionTurn);
	lua_register(m_luaState, "selfFollow", NpcScriptInterface::luaActionFollow);
	lua_register(m_luaState, "selfGetPosition", NpcScriptInterface::luaSelfGetPos);
	lua_register(m_luaState, "creatureGetName", NpcScriptInterface::luaCreatureGetName);
	lua_register(m_luaState, "creatureGetName2", NpcScriptInterface::luaCreatureGetName2);
	lua_register(m_luaState, "creatureGetPosition", NpcScriptInterface::luaCreatureGetPos);
	lua_register(m_luaState, "getDistanceTo", NpcScriptInterface::luagetDistanceTo);
	lua_register(m_luaState, "doNpcSetCreatureFocus", NpcScriptInterface::luaSetNpcFocus);
	lua_register(m_luaState, "getNpcCid", NpcScriptInterface::luaGetNpcCid);
	lua_register(m_luaState, "getNpcPos", NpcScriptInterface::luaGetNpcPos);
	lua_register(m_luaState, "getNpcState", NpcScriptInterface::luaGetNpcState);
	lua_register(m_luaState, "setNpcState", NpcScriptInterface::luaSetNpcState);
	lua_register(m_luaState, "getNpcName", NpcScriptInterface::luaGetNpcName);
	lua_register(m_luaState, "getNpcParameter", NpcScriptInterface::luaGetNpcParameter);

You can use all of the lua functions in npc files...
 
Also the TFS Functions? :O
There are mainly the same functions, just open the luascript.cpp/h of Avesta and see if function you are looking for exists.

Thanks to preg_match_all, Ive cleaned the list for you ;p

Code:
//getConfigValue(key)
//getPlayerFood(cid)
//getPlayerHealth(cid)
//getPlayerMaxHealth(cid)
//getPlayerMana(cid)
//getPlayerMaxMana(cid)
//getPlayerLevel(cid)
//getPlayerMagLevel(cid)
//getPlayerName(cid)
//getPlayerAccess(cid)
//getPlayerPosition(cid)
//getPlayerSkill(cid, skillid)
//getPlayerMasterPos(cid)
//getPlayerTown(cid)
//getPlayerVocation(cid)
//getPlayerIp(cid)
//getPlayerItemCount(cid, itemid)
//getPlayerSoul(cid)
//getPlayerFreeCap(cid)
//getPlayerLight(cid)
//getPlayerSlotItem(cid, slot)
//getPlayerItemById(cid, deepSearch, itemId, subType)
//getPlayerDepotItems(cid, depotid)
//getPlayerGuildId(cid)
//getPlayerGuildName(cid)
//getPlayerGuildRank(cid)
//getPlayerGuildNick(cid)
//getPlayerSex(cid)
//doPlayerSetSex(cid, newSex)
//getPlayerLookDir(cid)
//getPlayerGUID(cid)
//getPlayerAccountId(cid)
//getPlayerFlagValue(cid, flag)
//getPlayerLossPercent(cid, lossType)
//doPlayerAddPremiumDays(cid, days)
//doPlayerPopupFYI(cid, message)
//getPlayerPremiumDays(cid)
//getPlayerSkullType(cid)
//getPlayerRedSkullTicks(cid)
//doPlayerSetRedSkullTicks(cid, amount)
//getPlayerAccountBalance(cid)
//playerLearnInstantSpell(cid, name)
//canPlayerLearnInstantSpell(cid, name)
//getPlayerLearnedInstantSpell(cid, name)
//getPlayerInstantSpellInfo(cid, index)
//getPlayerInstantSpellCount(cid)
//getInstantSpellInfoByName(cid, name)
//getInstantSpellWords(name)
//getPlayerStorageValue(cid, valueid)
//setPlayerStorageValue(cid, valueid, newvalue)
//isPremium(cid)
//getGlobalStorageValue(valueid)
//setGlobalStorageValue(valueid, newvalue)
//getTilePzInfo(pos)
//1 is pz. 0 no pz.
//getTileHouseInfo(pos)
//0 no house. != 0 house id
//getItemRWInfo(uid)
//getThingfromPos(pos)
//getThing(uid)
//queryTileAddThing(uid, pos, flags)
//getThingPos(uid)
//getTileItemById(pos, itemId, subType)
//getTileItemByType(pos, type)
//getTileThingByPos(pos)
//getTopCreature(pos)
//doRemoveItem(uid, count)
//doPlayerFeed(cid, food)
//doPlayerSendCancel(cid, text)
//doPlayerSendDefaultCancel(cid, ReturnValue)
//getClosestFreeTile(cid, targetpos[, extended[, ignoreHouse]])
//doTeleportThing(uid, newpos, pushMove)
//doTransformItem(uid, toitemid, count/subtype)
//doCreatureSay(cid, text, type)
//For scripts compatibility
//doSendMagicEffect(pos, type)
//doSendDistanceShoot(frompos, topos, type)
//doChangeTypeItem(uid, newtype)
//doSetItemActionId(uid, actionid)
//doSetItemText(uid, text)
//doSetItemSpecialDescription(uid, desc)
//doSendAnimatedText(pos, text, color)
//doPlayerAddSkillTry(cid, skillid, n, useMultiplier)
//doPlayerAddManaSpent(cid, mana, useMultiplier)
//doPlayerAddHealth(cid, health)
//doCreatureAddHealth(cid, health)
//doPlayerAddMana(cid, mana)
//doPlayerAddSoul(cid, soul)
//doPlayerAddItem(uid, itemid, count/subtype)
//Returns uid of the created item
//doPlayerAddItemEx(cid, uid, canDropOnMap)
//doPlayerSendTextMessage(cid, MessageClasses, message)
//doPlayerRemoveMoney(cid, money)
//doPlayerAddMoney(cid, money)
//doPlayerWithdrawMoney(cid, money)
//doPlayerDepositMoney(cid, money)
//doPlayerTransferMoneyTo(cid, target, money)
//doShowTextWindow(cid, maxlen, canWrite)
//doShowTextDialog(cid, itemid, text)
//doDecayItem(uid)
//doCreateItem(itemid, type/count, pos)
//Returns uid of the created item, only works on tiles.
//doCreateItemEx(itemid, count/subtype)
//doTileAddItemEx(pos, uid)
//doAddContainerItemEx(uid, virtuid)
//doRelocate(pos, posTo)
//Moves all moveable objects from pos to posTo
//doCreateTeleport(teleportID, positionToGo, createPosition)
//doCreateMonster(name, pos)
//doCreateNpc(name, pos)
//doSummonMonster(cid, name)
//doRemoveCreature(cid)
//doMoveCreature(cid, direction)
//doPlayerSetMasterPos(cid, pos)
//doPlayerSetTown(cid, townid)
//doPlayerSetVocation(cid, voc)
//doPlayerRemoveItem(cid, itemid, count, subtype)
//doPlayerAddExp(cid, exp, useRate, useMultiplier)
//doPlayerSetGuildId(cid, id)
//lua_register(m_luaState, "doPlayerSetGuildId", LuaScriptInterface::luaDoPlayerSetGuildId);
//doPlayerSetGuildRank(cid, rank)
//doPlayerSetGuildNick(cid, nick)
//doSetCreatureLight(cid, lightLevel, lightColor, time)
//doPlayerSetLossPercent(cid, lossType, newPercent)
//doSetCreatureDropLoot(cid, doDrop)
//isPlayer(cid)
//isPlayerGhost(cid)
//isPlayerPzLocked(cid)
//isMonster(cid)
//isCreature(cid)
//isContainer(uid)
//isMoveable(uid)
//getPlayerByName(name)
//getCreatureByName(name)
//getPlayerByNameWildcard(name~)
//getPlayerGUIDByName(name)
//registerCreatureEvent(uid, eventName)
//getContainerSize(uid)
//getContainerCap(uid)
//getContainerItem(uid, slot)
//doAddContainerItem(uid, itemid, count/subtype)
//getDepotId(uid)
//getHouseOwner(houseid)
//getHouseName(houseid)
//getHouseEntry(houseid)
//getHouseRent(houseid)
//getHouseTown(houseid)
//getHouseAccessList(houseid, listid)
//getHouseByPlayerGUID(playerGUID)
//getHouseTilesSize(houseid)
//setHouseAccessList(houseid, listid, listtext)
//setHouseOwner(houseid, ownerGUID)
//getHouseList(townid)
//getGameState()
//doSetGameState(id)
//executeRaid(name)
//doReloadInfo(id[, cid])
//saveServer()
//refreshMap()
//cleanHouse(houseid)
//getWorldType()
//setWorldType(type)
//getWorldTime()
//getWorldLight()
//getWorldCreatures(type)
//0 players, 1 monsters, 2 npcs, 3 all
//getWorldUpTime()
//getPlayersOnlineList()
//broadcastMessage( messageClass, message)
//getGuildId(guild_name)
//createCombatArea( {area}, {extArea} )
//createConditionObject(type)
//setCombatArea(combat, area)
//setCombatCondition(combat, condition)
//setCombatParam(combat, key, value)
//setConditionParam(condition, key, value)
//addDamageCondition(condition, rounds, time, value)
//addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
//setCombatCallBack(combat, key, function_name)
//setCombatFormula(combat, type, mina, minb, maxa, maxb)
//setConditionFormula(combat, mina, minb, maxa, maxb)
//doCombat(cid, combat, param)
//createCombatObject()
//doAreaCombatHealth(cid, type, pos, area, min, max, effect)
//doTargetCombatHealth(cid, target, type, min, max, effect)
//doAreaCombatMana(cid, pos, area, min, max, effect)
//doTargetCombatMana(cid, target, min, max, effect)
//doAreaCombatCondition(cid, pos, area, condition, effect)
//doTargetCombatCondition(cid, target, condition, effect)
//doAreaCombatDispel(cid, pos, area, type, effect)
//doTargetCombatDispel(cid, target, type, effect)
//doChallengeCreature(cid, target)
//doConvinceCreature(cid, target)
//getMonsterTargetList(cid)
//getMonsterFriendList(cid)
//doSetMonsterTarget(cid, target)
//doMonsterChangeTarget(cid)
//doAddCondition(cid, condition)
//doRemoveCondition(cid, type)
//numberToVariant(number)
//stringToVariant(string)
//positionToVariant(pos)
//targetPositionToVariant(pos)
//variantToNumber(var)
//variantToString(var)
//variantToPosition(var)
//doChangeSpeed(cid, delta)
//doCreatureChangeOutfit(cid, outfit)
//doSetMonsterOutfit(cid, name, time)
//doSetItemOutfit(cid, item, time)
//doSetCreatureOutfit(cid, outfit, time)
//getCreatureOutfit(cid)
//getCreaturePosition(cid)
//getCreatureName(cid)
//getCreatureSpeed(cid)
//getCreatureBaseSpeed(cid)
//getCreatureTarget(cid)
//getCreatureHealth(cid)
//getCreatureMaxHealth(cid)
//getCreatureMaster(cid)
//returns the creature's master or itself if the creature isn't a summon
//getCreatureSummons(cid)
//returns a table with all the summons of the creature
//getTownId(townName)
//getTownName(townId)
//getTownTemplePosition(townId)
//getSpectators(centerPos, rangex, rangey, multifloor)
//getVocationInfo(id)
//getPartyMembers(cid)
//hasCondition(cid, conditionid)
//hasProperty(uid)
//isItemStackable(itemid)
//isItemRune(itemid)
//isItemDoor(itemid)
//isItemContainer(itemid)
//isItemFluidContainer(itemid)
//isItemMoveable(itemid)
//getItemName(itemid)
//getItemDescriptions(itemid)
//getItemWeight(uid)
//getItemIdByName(name)
//isSightClear(fromPos, toPos, floorCheck)
//getFluidSourceType(type)
//isInArray(array, value)
//addEvent(callback, delay, ...)
//stopEvent(eventid)
//isAccountBanished(accId)
//isIpBanished(ip)
//isPlayerNamelocked(name)
//addPlayerBan(playerName = 0xFFFFFFFF[, length = 0[, admin = 0[, comment = "No comment"]]])
//addAccountBan(accounNumber = 0xFFFFFFFF[, length = 0[, admin = 0[, comment = "No comment"]]])
//addIPBan(ip[, mask = 0xFFFFFFFF[, length = 0[, admin = 0[, comment = "No comment"]]]])
//removePlayerBan(playerName)
//removeIPBan(ip[, mask])
//getPlayerBanList()
//getAccountBanList()
//getIPBanList()
//getPlayersByAccountNumber(account)
//getAccountNumberByPlayerName(name)
//getIPByPlayerName(name)
//getPlayersByIPNumber(ip[, mask = 0xFFFFFFFF])
//getDataDir()
//setExperienceRate(cid, value)
//setMagicRate(cid, value)
//setSkillRate(cid, skill, value)
//debugPrint(text)
 
Last edited:
Back
Top