• 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!

Good Lua Functions!

Montuni

New Member
Joined
Mar 6, 2009
Messages
25
Reaction score
0
Location
Sweden
Good lua "functions" in spell making that you probably need.

COMBAT_NONE = 0
COMBAT_PHYSICALDAMAGE = 1
COMBAT_ENERGYDAMAGE = 2
COMBAT_POISONDAMAGE = 4
COMBAT_FIREDAMAGE = 8
COMBAT_UNDEFINEDDAMAGE = 16
COMBAT_LIFEDRAIN = 32
COMBAT_MANADRAIN = 64
COMBAT_HEALING = 128
COMBAT_DROWNDAMAGE = 256




CONST_ME_DRAWBLOOD = 0
CONST_ME_LOSEENERGY = 1
CONST_ME_POFF = 2
CONST_ME_BLOCKHIT = 3
CONST_ME_EXPLOSIONAREA = 4
CONST_ME_EXPLOSIONHIT = 5
CONST_ME_FIREAREA = 6
CONST_ME_YELLOW_RINGS = 7
CONST_ME_GREEN_RINGS = 8
CONST_ME_HITAREA = 9
CONST_ME_ENERGYAREA = 10
CONST_ME_ENERGYHIT = 11
CONST_ME_MAGIC_BLUE = 12
CONST_ME_MAGIC_RED = 13
CONST_ME_MAGIC_GREEN = 14
CONST_ME_HITBYFIRE = 15
CONST_ME_HITBYPOISON = 16
CONST_ME_MORTAREA = 17
CONST_ME_SOUND_BLUE = 18
CONST_ME_SOUND_RED = 19
CONST_ME_POISONAREA = 20
CONST_ME_SOUND_YELLOW = 21
CONST_ME_SOUND_PURPLE = 22
CONST_ME_SOUND_BLUE = 23
CONST_ME_SOUND_WHITE = 24
CONST_ME_BUBBLES = 25
CONST_ME_CRAPS = 26
CONST_ME_NONE = 255





SPEAR = 0
BOLT = 1
ARROW = 2
FIRE = 3
ENERGY = 4
POISONARROW = 5
BURSTARROW = 6
THROWINGSTAR = 7
THROWINGKNIFE = 8
SMALLSTONE = 9
DEATH = 10
LARGEROCK = 11
SNOWBALL = 12
POWERBOLT = 13
POISON = 14
INFERNALBOLT = 15
CONST_ANI_HUNTINGSPEAR = 16
ENCHANTEDSPEAR = 17
REDSTAR = 18
GREENSTAR = 19
ROYALSPEAR = 20
SNIPERARROW = 21
ONYXARROW = 22
PIERCINGBOLT = 23
WHIRLWINDSWORD = 24
WHIRLWINDAXE = 25
WHIRLWINDCLUB = 26
ETHEREALSPEAR = 27
ICE = 28
EARTH = 29
HOLY = 30
SUDDENDEATH = 31
FLASHARROW = 32
FLAMMINGARROW = 33
SHIVERARROW = 34
ENERGYBALL = 35
SMALLICE = 36
SMALLHOLY = 37
SMALLEARTH = 38
EARTHARROW = 39
EXPLOSION = 40
CAKE = 41





setPlayerGroupId(cid, newGroupId)
playerLearnInstantSpell(cid, name)
canPlayerLearnInstantSpell(cid, name)
getPlayerLearnedInstantSpell(cid, name)
getPlayerInstantSpellCount(cid)
getPlayerInstantSpellInfo(cid, index)
getInstantSpellInfoByName(cid, name)
getInstantSpellWords(name)
setPlayerStorageValue(uid, valueid, newvalue)
getGlobalStorageValue(valueid)
setGlobalStorageValue(valueid, newvalue)
getTilePzInfo(pos)
getTileHouseInfo(pos)
getItemRWInfo(uid)
getThingfromPos(pos)
getThing(uid)
queryTileAddThing(uid, pos, <optional> flags)
getThingPos(uid)
doRemoveItem(uid, <optional> n)
doPlayerFeed(cid, food)

doPlayerSendDefaultCancel(cid, ReturnValue)
doTeleportThing(cid, newpos, <optional> pushmove)
doTransformItem(uid, toitemid, <optional> count/subtype)
doCreatureSay(cid, text, type)
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)
doCreatureAddHealth(cid, health)
doPlayerAddMana(cid, mana)
doPlayerAddManaSpent(cid, mana)
doPlayerAddSoul(cid, soul)
doPlayerAddItem(uid, itemid, <optional> count/subtype)
doPlayerAddItemEx(cid, uid, <optional: default: 0> useCidPosOnFail)
doPlayerSendTextMessage(cid, MessageClasses, message)
doPlayerRemoveMoney(cid, money)
doShowTextDialog(cid, itemid, text)
doDecayItem(uid)
doCreateItem(itemid, type/count, pos)
doCreateItemEx(itemid, <optional> count/subtype)
doTileAddItemEx(pos, uid)
doCreateTeleport(itemid, topos, createpos)
doSummonCreature(name, pos)
doConvinceCreature(cid, target)
doRemoveCreature(cid)
doMoveCreature(cid, direction)
doPlayerSetTown(cid, townid)
doPlayerSetVocation(cid,voc)
doPlayerRemoveItem(cid,itemid,count)
doPlayerAddExp(cid,exp)
doPlayerSetGuildId(cid, id)
doPlayerSetGuildRank(cid, rank)
doPlayerSetGuildNick(cid, nick)
doPlayerAddOutfit(cid,looktype,addons)
doPlayerRemOutfit(cid,looktype,addons)
doSetCreatureLight(cid, lightLevel, lightColor, time)
doSetCreatureDropLoot(cid, doDrop)
getCreatureCondition(cid, condition)
isPlayer(cid)
isCreature(cid)
isContainer(uid)
isMoveable(uid)
getPlayerByName(name)
getPlayerGUIDByName(name)
registerCreatureEvent(uid, eventName)
getContainerSize(uid)
getContainerCap(uid)
getContainerItem(uid, slot)
doAddContainerItem(uid, itemid, <optional> count/subtype)
getHouseOwner(houseid)
getHouseName(houseid)
getHouseEntry(houseid)
getHouseRent(houseid)
getHouseTown(houseid)
getHouseAccessList(houseid, listid)
getHouseByPlayerGUID(playerGUID)
setHouseAccessList(houseid, listid, listtext)
setHouseOwner(houseid, ownerGUID)
getWorldType()
getWorldTime()
getWorldLight()
getWorldCreatures(type)
getWorldUpTime()
broadcastMessage(message, type)
getGuildId(guild_name)
getPlayerSex(cid)
doPlayerSetSex(cid, newSex)
createCombatArea( {area}, <optional> {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)
numberToVariant(number)
stringToVariant(string)
positionToVariant(pos)
targetPositionToVariant(pos)
variantToNumber(var)
variantToString(var)
variantToPosition(var)
doChangeSpeed(cid, delta)
doSetMonsterOutfit(cid, name, time)
doSetItemOutfit(cid, item, time)
doSetCreatureOutfit(cid, outfit, time)
getCreatureOutfit(cid)
getCreaturePosition(cid)
getCreatureName(cid)
getCreatureSpeed(cid)
getCreatureBaseSpeed(cid)
getCreatureTarget(cid)
isItemStackable(itemid)
isItemRune(itemid)
isItemDoor(itemid)
isItemContainer(itemid)
isItemFluidContainer(itemid)
getItemName(itemid)
getItemWeight(itemid, count)
debugPrint(text)
isInArray(array, value)
addEvent(callback, delay, parameter)
stopEvent(eventid)
doPlayerPopupFYI(cid, message)
mayNotLogout(cid, value)
mayNotMove(cid, value)
doPlayerAddPremiumDays(cid, days)
doPlayerRemovePremiumDays(cid, days)
getPlayerPremiumDays(cid)
getPlayerSkullType(cid)
getPromotedVocation(vocation)
getPlayerBlessing(cid, blessing)
doPlayerAddBlessing(cid, blessing)
saveData()
escapeString(str)
 
All you did was copy them from constant.lua and LUA_FUNCTIONS...

It would be alot more useful if you listed some functions and explained what they do, and give examples.
 
Back
Top