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

[REQUESt] Function doc

Zisly

Intermediate OT User
Joined
Jun 9, 2008
Messages
7,338
Reaction score
120
I'm soon done with my OT Editor, the problem is that there are ALOT of functions missing any documentation whatsoever.
I'll use the info for calltips


So I would really appreciate if someone could come with info for some function/functions.
All input is appreciated.

If you feel like helping do like this:
  • Pick a function in the MISSING CALLTIP list
  • Write a short description (max 1 line)
  • Post the description together with the function name here.

MISSING CALLTIP list
Code:
        getPlayerInstantSpellInfo(cid, index)
	getInstantSpellInfoByName(cid, name)
	getThing(uid)
	queryTileAddThing(uid, pos, <optional> flags)
	doPlayerAddItemEx(cid, uid, <optional: default: 0> useCidPosOnFail)
	doSetCreatureDropLoot(cid, doDrop)
	numberToVariant(number)
	stringToVariant(string)
	positionToVariant(pos)
	targetPositionToVariant(pos)
	variantToNumber(var)
	variantToString(var)
	variantToPosition(var)	
	saveData()
	escapeString(str)
 
Last edited:
I think I didnt quite understood your post, you mean you need us to post a short description of a function of the list? Like with an example too? Or how..?

You mean something like this?

Lua:
doSendMagicEffect(pos, type)
This function will send any desired magic effect to a selected position, whether its a creature´s position or a fixed one.
Example: doSendMagicEffect(getPlayerPosition(cid), 47).

I might be able to help out but I dont know if thats what you're asking ;)

Cheers.
 
Thats what I was asking for.
No examples needed, just the little description.
Thanks :D

Oh I see, np well here are some more:

Lua:
doPlayerSendTextMessage(cid, MessageClasses, message)
This function will send the player a message to his log and depending on the type, also to the player´s screen (not necessarily a pre-written one; it can be configured and mixed with other functions).

Lua:
doSendAnimatedText(pos, text, color)
This function will send an animated text that appears above the player or in a selected position, with the desired color chosen.

Lua:
doCreatureAddHealth(cid, health)
This function will add any amount of health points to the player. Notice they are not added to the permanent/maximum health points, they are added to the player´s current HP.

Lua:
doPlayerAddMana(cid, mana)
This function will add any amount of mana points to the player. Notice they are not added to the permanent/maximum mana, they are added to the player´s current mana.

Lua:
doPlayerAddManaSpent(cid, mana)
This function will add any amount of spent mana to the selected player´s magic level. Spent mana is the amount of mana a player needs to spend to obtain the next magic level.

Lua:
doPlayerAddSoul(cid, soul)
This function will add any amount of soul points to the selected player.

Lua:
doPlayerRemoveMoney(cid, money)
This function will remove any amount of money from the player´s local money. This means it will not remove money from the bank or depot, only from the money the player is carrying at that moment.
** Correct me if Im wrong on the bank/dp part **

Lua:
doCreateTeleport(itemid, topos, createpos)
This function will create a teleport in the position you choose in createpos, and it will send you to the position you write on topos.

Lua:
doSummonCreature(name, pos)
This function will summon any creature in a selected position. This is not a personal summon.

Lua:
doConvinceCreature(cid, target)
This function will convince the selected creature. This function combined with doSummonCreature can work as a simulation of the "Utevo Res" spell.

Lua:
doRemoveCreature(cid)
This function will remove the selected creature.

Lua:
doPlayerSetVocation(cid,voc)
This function will set the selected player´s vocation to a new one. Choose the new vocation ID in "voc".

Lua:
doPlayerRemoveItem(cid,itemid,count)
This function will remove any item from the selected player, and also the amount selected in case it´s needed.

Lua:
doPlayerAddExp(cid,exp)
This function will add any amount of exp to the player.

Lua:
isPlayer(cid)
This function will check if the creature is a player.

Lua:
isContainer(uid)
This function will check if the item is a container.

Lua:
broadcastMessage(message, type)
This function will broadcast to the server a certain message of the chosen type.

Lua:
getPlayerSex(cid)
This function will check the player´s sex (gender).

Lua:
doPlayerSetSex(cid, newSex)
This function will set a player´s sex (gender) to a new one.

Lua:
getCreatureOutfit(cid)
This function will check the creature´s outfit.

Lua:
getCreaturePosition(cid)
This function will check the creature´s position.

Lua:
getCreatureName(cid)
This function will check the creature´s name, whether it is a player or a monster.

Lua:
getCreatureSpeed(cid)
This function will check the creature´s speed.

Lua:
doPlayerPopupFYI(cid, message)
This function will send the player a message through a pop-up window. (Notice that if the message has a line that is too long it will debug the client; to avoid that, use separate lines with /n)

Lua:
doPlayerAddPremiumDays(cid, days)
This function will add premium days to the selected player.

Lua:
doPlayerRemovePremiumDays(cid, days)
This function will remove premium days from the selected player.

Lua:
getPlayerPremiumDays(cid)
This function will check the amount of premium days the player has left.

Lua:
getPlayerSkullType(cid)
This function will check the skull type of the selected player, or lack of.

Lua:
doPlayerAddBlessing(cid, blessing)
This function will add any blessing to the selected player.

I know those are pretty much basic ones but oh well, took me a while and its something, I guess :)

PS: Notice that Im doing these based on my knowledge, which isnt too wide -lol-. If anyone wants to correct my descriptions feel free to :thumbup:

Maybe Ill do some more tomorrow, gotta sleep now :thumbup: Sorry for any typos. Cheerz.
 
These functions below are taken from the file within the doc folder of TFS 0.3. Hope its usefull for you. :)

Code:
LIST
        getPlayerFood(cid)
            Info
                This function will check how many seconds a player is full.

            Returns
                Time in second for which player is full: 360.
                    Ham - 360, Meat - 180, Fish - 145

        getCreatureHealth(cid)
            Info
                This function will check for creatures health points.

            Returns
                Creatures current health points.

        getCreatureMaxHealth(cid)
            Info
                This function will check for creatures max health points.

            Returns
                Creatures max health points.

        getCreatureMana(cid)
            Info
                This function will check for creatures mana points.

            Returns
                Creatures current mana points.

        getCreatureMaxMana(cid)
            Info
                This function will check for creatures max mana points.

            Returns
                Creatures max mana points.

        getPlayerLevel(cid)
            Info
                This function will check for players current level.

            Returns
                Players current level.

        getPlayerMagLevel(cid)
            Info
                This function will check for players current magic level.

            Returns
                Players current magic level.

        getCreatureName(cid)
            Info
                This function will check for creature name.

            Returns
                Creature name.

        getPlayerAccess(cid)
            Info
                This function will check for players access.

            Returns
                Players access.

        getCreaturePosition(cid)
            Info
                This function will check for current creature position.

            Returns
                Position in array
                    Example
                        {x = 127, y = 7, z = 9, stackpos = 1}
                        {x = 396, y = 582, z = 13, stackpos = 2} (when creature is on an item)

            Example
                local cPos = getCreaturePosition(cid)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your current position is [X: "..cPos.x.." | Y: "..cPos.y.." | Z: "..cPos.z.."].")

        getPlayerSkillLevel(cid, skillid)
            Info
                This function will check for player actually position.
                    Skillid can be:
                        0 = Fist Fighting
                        1 = Club Fighting
                        2 = Sword Fighting
                        3 = Axe Fighting
                        4 = Distance Fighting
                        5 = Shielding
                        6 = Fishing

            Returns
                Player skill value.
                    For Example
                        37
                        10

            Example
                if getPlayerSkillLevel(cid, 2) >= 20 then --Checking for sword skill value
                    doPlayerAddItem(cid, 2376, 1) --give sword, when skill >= 20
                else
                    doPlayerSendCancel(cid, "Sorry, your sword skill is not high enough.")
                end

        getPlayerTown(cid)
            Info
                This function will check player actually Town ID.

            Returns
                Player Town ID.
                    For Example:
                        1
                        3

            Example
                local playerPos = getCreaturePosition(cid)
                if getPlayerTown(cid) == 1 then
                    doSendAnimatedText(playerPos, 'I am leaving in town with id: 1 (Main City)! :)', TEXTCOLOR_GOLD)
                elseif getPlayerTown(cid) == 2 then
                    doSendAnimatedText(playerPos, 'I am leaving in town with id: 2 (Desert City)! :)', TEXTCOLOR_GOLD)
                end

        getPlayerVocation(cid)
            Info
                This function will check player Vocation ID.

            Returns
                Player Vocation ID.
                    For Example:
                        1 - when player vocation is Sorcerer
                        7 - when player vocation is Royal Paladin

            Example
                local playerVoc = getPlayerVocation(cid)
                    if playerVoc == 1 or playerVoc == 5 then --If Vocation is Sorcerer or Master Sorcerer then weapon = Wand
                        weapon == 2190 --Wand of vortex
                    elseif playerVoc == 2 or playerVoc == 6 then --If Voc == Druid or Elder Druid then weapon = Rod
                        weapon == 2182 --Snakebite Rod
                    elseif playerVoc == 3 or playerVoc == 7 then --If Voc == Paladin or Royal Paladin then weapon = Spear
                        weapon == 2389 --Spear
                    elseif playerVoc == 4 or playerVoc == 8 then --If Voc == Knight or Elite Knight then weapon = Sword
                        weapon == 2412 --Katana
                    end
                doPlayerAddItem(cid, weapon, 1)

        getPlayerItemCount(cid,itemid)
            Info
                This function will check how much items with == itemid player actually have.

            Returns
                Count of itemid.
                    For Example:
                        2 - when player have 2x royal spear
                        189 - when player have 189 platinum coins

            Example
                local crystalCoins = getPlayerItemCount(cid, 2160)
                local platinumCoins = getPlayerItemCount(cid, 2152)
                local goldCoins = getPlayerItemCount(cid, 2148)
                    money = crystalCoins * 10000 + platinumCoins * 100 + goldCoins
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your money: " ..money.. "gp")

        getPlayerSoul(cid)
            Info
                This function will check how much soul points player actually have.

            Returns
                Player actually soul points.
                    For Example:
                        27 - when player have 27 soul points
                        134 - when player have 134 soul points

            Example
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your soul points: " ..getPlayerSoul(cid))

        getPlayerFreeCap(cid)
            Info
                This function will check how much free cap points player actually have.

            Returns
                Player actually cap points.
                    For Example:
                        181 - when player have 181 capacity
                        1460 - when player have 1460 capacity

            Example
                local playerCap = getPlayerFreeCap(cid)
                local item = 2393 --Giant Sword
                local itemweight = getItemWeight(item, 1)
                    if playerCap >= itemweight then
                        doPlayerSendTextMessage(cid,22,'You have found a giant sword.')
                        doPlayerAddItem(cid,item,1)
                    else
                        doPlayerSendTextMessage(cid, 22, 'You have found a giant sword weighing ' ..itemweight.. ' oz it\'s too heavy.')

        getPlayerLight(cid)
            Info
                This function will check for player actually light.

            Returns
                Player actually light.
                    For Example:
                        215 - after using "utevo gran lux"

        getPlayerSlotItem(cid, slot)
            Info
                This function will check what item player have actually in slot.
                    Skillid can be:
                        1 = helmet
                        2 = necklace slot (amulet of loss etc.)
                        3 = backpack, bag
                        4 = armor
                        5 = left hand (its really hand placed >> (right page on screen))
                        6 = right hand (its really hand placed << (left page on screen))
                        7 = legs
                        8 = boots
                        9 = ring slot
                        10 = ammo slot (arrows etc.)

            Returns
                Array with item which is actually in slot. When slot is empty, then return = 0 (FALSE)
                    For Example:
                        {itemid = 2493, uid = 70001, actionid = 0} (demon helmet, slot = 1)

            Example
                if getPlayerSlotItem(cid, 2) == 2173 then  --checking for amulet of loss
                    doPlayerSendTextMessage(cid,22,'Ok, you can go.')
                else
                    doPlayerSendTextMessage(cid,22,'Sorry, you need amulet of loss to go.')
                    doTeleportThing(cid, fromPosition, TRUE)
                end

        getPlayerDepotItems(cid, depotid)
            Info
                This function will check how much items (slots reserved, becouse 10cc = 1 slot) player have in depo.
                    Depotid = number, which depo we want to check.

            Returns
                Busy slots in depot.
                    For example:
                        7 - when player have in depo:
                            - sword
                            - rope
                            - 100 uh
                            - parcel (inside: 10 crystal coins + label)
                            - depot chest (standard, all players have it)

            Example
                depotItems = getPlayerDepotItems(cid, 3)  -- 3 = Desert City
                if depotItems < 2 then --When depo contains only 1 ITEM.
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your depot contains 1 item.")
                else
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your depot contains " ..depotItems.. " items.")
                end


        getPlayerSex(cid)
            Info
                This function will check player sex.

            Returns
                Player sex.
                    For example:
                        0 - when player is female
                        1 - when player is male

            Example
                if getPlayerSex(cid) then --when female
                    doSendAnimatedText(playerPos, 'GiRl :*:*', TEXTCOLOR_GOLD)
                elseif getPlayerSex(cid) then --male
                    doSendAnimatedText(playerPos, 'Wtf? I aM BoY.', TEXTCOLOR_GOLD)
                else -- dont know how it is in english, but in polish = obojniak - something between boy and girl :P
                    doSendAnimatedText(playerPos, 'Wtf? I aM BoY.', TEXTCOLOR_GOLD)
                end

        getPlayerLookDir(cid)
            Info
                This function will check player direction.

            Returns
                Player direction.
                    For example:
                        0 - player is looking up (north) (/\)
                        1 - player is looking right (east) (>)
                        2 - player is looking down (south) (\/)
                        3 - player is looking left (west) (<)

            Example
                local direction = getPlayerLookDir(cid)
                if direction = 0 then --when north
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are looking to north")
                elseif direction = 1 then --when east
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are looking to east")
                elseif direction = 2 then --when south
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are looking to south")
                else --when west
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are looking to west")
                end

        getPlayerGUID(cid)
            Info
                This function will check for player id.

            Returns
                Player id. When checked creature isn't player then return = -1
                    For example:
                        61 - when player id in database is 61
                        -1 - when checked creature is NPC

            Example
                doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are player with id: "..getPlayerGUID(cid))

        getPlayerFlagValue(cid, flag)
            Info
                This function will check player flag value.
            Returns
                Return flag value. 1 = when true (player have this flag), 0 = when false (havent)
                    For example:
                        1 - checking GM for flag 8 (Can not be attacked)
                        0 - checking player for flag 8 (Can not be attacked)

            Example
                flagValue = getPlayerFlagValue(cid, 32) --32 "Can summon all monsters"
                    if flagValue = 1 then --if can
                        doSummonCreature("Demon", fromPosition.x + 1)
                    else --if cant
                        doSummonCreature("Rat", fromPosition.x + 1)
                    end

        getPlayerGroupId(cid)
            Info
                This function will check player group ID.

            Returns
                Player group id.
                    For example (using standard TFS groups):
                        1 - when checked player is player
                        2 - when checked player is gamemaster
                        3 - when checked player is god

            Example
                local group = getPlayerGroupId(cid)
                    if group == 3 --when God
                        doPlayerAddItem(cid,2160,100) --100 crystal coins
                    elseif group == 2 --when Gamemaster
                        doPlayerAddItem(cid,2160,50) --50 crystal coins
                    else
                        doPlayerSendCancel(cid, "Sorry, cheats doesnt work for you."
                    end

        getPlayerGuildId(cid)
            Info
                This function will return the players guild id.

            Returns
                Players guild id.
                    For example
                        21 - The guild the player is in has the guild id 21, as stored in the database.

            Example
                local guildId = getPlayerGuildId(cid)
                    if guildId == 21 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Welcome in!")
                    elseif guildId == 22 then
                        doPlayerSendCancel(cid,"This area is not for your guild")
                    end

        getPlayerGuildName(cid)
            Info
                Used to get a players guild name.

            Returns
                Players guild name in a string.
                    For example
                        "Lost Dragons"

            Example
                local guildName = getPlayerGuildName(cid)
                doSendAnimatedText(getCreaturePosition(cid),guildName, TEXTCOLOR_GOLD)

        getPlayerGuildRank(cid)
            Info
                Used to get a players rank name in a guild.

            Returns
                The players current rank in his guild in a string
                    For example
                        "Senator"

            Example
                local rank = getPlayerGuildRank(cid)
                doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You're a " .. rank .. " in your guild.")

        getPlayerGuildNick(cid)
            Info
                Used to get a players nick in his guild.

            Returns
                The players current nick in a string.
                    For example
                        "The protector"

            Example
                local guildNick = getPlayerGuildNick(cid)
                doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Your guild nick is " .. guildNick .. ".")
]

[ "do" functions
    Introduction
        These functions usually execute an action.

    List
        doPlayerSendCancel(cid, text)
            Info
                This function will send default cancel message do player (visible in bottom of

            Returns
                Return 1 (TRUE) - when msg was sent, 0 - when it was impossible (FALSE)

            Example
                if getPlayerLevel(cid) >= 10 then --checking level
                    doSummonCreature("Chicken", fromPosition.x + 1)
                else
                    doPlayerSendCancel(c
 
@guitarfreak & Zisly, my reference site to lua is working on a glossary for all functions, if you would like to donate your calltip list to me i would be grateful, or if guitarfreak wants to help as well.

here is a preview table, they arent in order persay, but you'll get the idea about the definitions. http://lualand.net/index.php?option=com_content&view=article&id=49&Itemid=57
 
These functions below are taken from the file within the doc folder of TFS 0.3. Hope its usefull for you. :)

Code:
LIST
        getPlayerFood(cid)
            Info
                This function will check how many seconds a player is full.

            Returns
                Time in second for which player is full: 360.
                    Ham - 360, Meat - 180, Fish - 145

        getCreatureHealth(cid)
            Info
                This function will check for creatures health points.

            Returns
                Creatures current health points.

        getCreatureMaxHealth(cid)
            Info
                This function will check for creatures max health points.

            Returns
                Creatures max health points.

        getCreatureMana(cid)
            Info
                This function will check for creatures mana points.

            Returns
                Creatures current mana points.

        getCreatureMaxMana(cid)
            Info
                This function will check for creatures max mana points.

            Returns
                Creatures max mana points.

        getPlayerLevel(cid)
            Info
                This function will check for players current level.

            Returns
                Players current level.

        getPlayerMagLevel(cid)
            Info
                This function will check for players current magic level.

            Returns
                Players current magic level.

        getCreatureName(cid)
            Info
                This function will check for creature name.

            Returns
                Creature name.

        getPlayerAccess(cid)
            Info
                This function will check for players access.

            Returns
                Players access.

        getCreaturePosition(cid)
            Info
                This function will check for current creature position.

            Returns
                Position in array
                    Example
                        {x = 127, y = 7, z = 9, stackpos = 1}
                        {x = 396, y = 582, z = 13, stackpos = 2} (when creature is on an item)

            Example
                local cPos = getCreaturePosition(cid)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your current position is [X: "..cPos.x.." | Y: "..cPos.y.." | Z: "..cPos.z.."].")

        getPlayerSkillLevel(cid, skillid)
            Info
                This function will check for player actually position.
                    Skillid can be:
                        0 = Fist Fighting
                        1 = Club Fighting
                        2 = Sword Fighting
                        3 = Axe Fighting
                        4 = Distance Fighting
                        5 = Shielding
                        6 = Fishing

            Returns
                Player skill value.
                    For Example
                        37
                        10

            Example
                if getPlayerSkillLevel(cid, 2) >= 20 then --Checking for sword skill value
                    doPlayerAddItem(cid, 2376, 1) --give sword, when skill >= 20
                else
                    doPlayerSendCancel(cid, "Sorry, your sword skill is not high enough.")
                end

        getPlayerTown(cid)
            Info
                This function will check player actually Town ID.

            Returns
                Player Town ID.
                    For Example:
                        1
                        3

            Example
                local playerPos = getCreaturePosition(cid)
                if getPlayerTown(cid) == 1 then
                    doSendAnimatedText(playerPos, 'I am leaving in town with id: 1 (Main City)! :)', TEXTCOLOR_GOLD)
                elseif getPlayerTown(cid) == 2 then
                    doSendAnimatedText(playerPos, 'I am leaving in town with id: 2 (Desert City)! :)', TEXTCOLOR_GOLD)
                end

        getPlayerVocation(cid)
            Info
                This function will check player Vocation ID.

            Returns
                Player Vocation ID.
                    For Example:
                        1 - when player vocation is Sorcerer
                        7 - when player vocation is Royal Paladin

            Example
                local playerVoc = getPlayerVocation(cid)
                    if playerVoc == 1 or playerVoc == 5 then --If Vocation is Sorcerer or Master Sorcerer then weapon = Wand
                        weapon == 2190 --Wand of vortex
                    elseif playerVoc == 2 or playerVoc == 6 then --If Voc == Druid or Elder Druid then weapon = Rod
                        weapon == 2182 --Snakebite Rod
                    elseif playerVoc == 3 or playerVoc == 7 then --If Voc == Paladin or Royal Paladin then weapon = Spear
                        weapon == 2389 --Spear
                    elseif playerVoc == 4 or playerVoc == 8 then --If Voc == Knight or Elite Knight then weapon = Sword
                        weapon == 2412 --Katana
                    end
                doPlayerAddItem(cid, weapon, 1)

        getPlayerItemCount(cid,itemid)
            Info
                This function will check how much items with == itemid player actually have.

            Returns
                Count of itemid.
                    For Example:
                        2 - when player have 2x royal spear
                        189 - when player have 189 platinum coins

            Example
                local crystalCoins = getPlayerItemCount(cid, 2160)
                local platinumCoins = getPlayerItemCount(cid, 2152)
                local goldCoins = getPlayerItemCount(cid, 2148)
                    money = crystalCoins * 10000 + platinumCoins * 100 + goldCoins
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your money: " ..money.. "gp")

        getPlayerSoul(cid)
            Info
                This function will check how much soul points player actually have.

            Returns
                Player actually soul points.
                    For Example:
                        27 - when player have 27 soul points
                        134 - when player have 134 soul points

            Example
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your soul points: " ..getPlayerSoul(cid))

        getPlayerFreeCap(cid)
            Info
                This function will check how much free cap points player actually have.

            Returns
                Player actually cap points.
                    For Example:
                        181 - when player have 181 capacity
                        1460 - when player have 1460 capacity

            Example
                local playerCap = getPlayerFreeCap(cid)
                local item = 2393 --Giant Sword
                local itemweight = getItemWeight(item, 1)
                    if playerCap >= itemweight then
                        doPlayerSendTextMessage(cid,22,'You have found a giant sword.')
                        doPlayerAddItem(cid,item,1)
                    else
                        doPlayerSendTextMessage(cid, 22, 'You have found a giant sword weighing ' ..itemweight.. ' oz it\'s too heavy.')

        getPlayerLight(cid)
            Info
                This function will check for player actually light.

            Returns
                Player actually light.
                    For Example:
                        215 - after using "utevo gran lux"

        getPlayerSlotItem(cid, slot)
            Info
                This function will check what item player have actually in slot.
                    Skillid can be:
                        1 = helmet
                        2 = necklace slot (amulet of loss etc.)
                        3 = backpack, bag
                        4 = armor
                        5 = left hand (its really hand placed >> (right page on screen))
                        6 = right hand (its really hand placed << (left page on screen))
                        7 = legs
                        8 = boots
                        9 = ring slot
                        10 = ammo slot (arrows etc.)

            Returns
                Array with item which is actually in slot. When slot is empty, then return = 0 (FALSE)
                    For Example:
                        {itemid = 2493, uid = 70001, actionid = 0} (demon helmet, slot = 1)

            Example
                if getPlayerSlotItem(cid, 2) == 2173 then  --checking for amulet of loss
                    doPlayerSendTextMessage(cid,22,'Ok, you can go.')
                else
                    doPlayerSendTextMessage(cid,22,'Sorry, you need amulet of loss to go.')
                    doTeleportThing(cid, fromPosition, TRUE)
                end

        getPlayerDepotItems(cid, depotid)
            Info
                This function will check how much items (slots reserved, becouse 10cc = 1 slot) player have in depo.
                    Depotid = number, which depo we want to check.

            Returns
                Busy slots in depot.
                    For example:
                        7 - when player have in depo:
                            - sword
                            - rope
                            - 100 uh
                            - parcel (inside: 10 crystal coins + label)
                            - depot chest (standard, all players have it)

            Example
                depotItems = getPlayerDepotItems(cid, 3)  -- 3 = Desert City
                if depotItems < 2 then --When depo contains only 1 ITEM.
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your depot contains 1 item.")
                else
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your depot contains " ..depotItems.. " items.")
                end


        getPlayerSex(cid)
            Info
                This function will check player sex.

            Returns
                Player sex.
                    For example:
                        0 - when player is female
                        1 - when player is male

            Example
                if getPlayerSex(cid) then --when female
                    doSendAnimatedText(playerPos, 'GiRl :*:*', TEXTCOLOR_GOLD)
                elseif getPlayerSex(cid) then --male
                    doSendAnimatedText(playerPos, 'Wtf? I aM BoY.', TEXTCOLOR_GOLD)
                else -- dont know how it is in english, but in polish = obojniak - something between boy and girl :P
                    doSendAnimatedText(playerPos, 'Wtf? I aM BoY.', TEXTCOLOR_GOLD)
                end

        getPlayerLookDir(cid)
            Info
                This function will check player direction.

            Returns
                Player direction.
                    For example:
                        0 - player is looking up (north) (/\)
                        1 - player is looking right (east) (>)
                        2 - player is looking down (south) (\/)
                        3 - player is looking left (west) (<)

            Example
                local direction = getPlayerLookDir(cid)
                if direction = 0 then --when north
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are looking to north")
                elseif direction = 1 then --when east
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are looking to east")
                elseif direction = 2 then --when south
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are looking to south")
                else --when west
                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are looking to west")
                end

        getPlayerGUID(cid)
            Info
                This function will check for player id.

            Returns
                Player id. When checked creature isn't player then return = -1
                    For example:
                        61 - when player id in database is 61
                        -1 - when checked creature is NPC

            Example
                doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are player with id: "..getPlayerGUID(cid))

        getPlayerFlagValue(cid, flag)
            Info
                This function will check player flag value.
            Returns
                Return flag value. 1 = when true (player have this flag), 0 = when false (havent)
                    For example:
                        1 - checking GM for flag 8 (Can not be attacked)
                        0 - checking player for flag 8 (Can not be attacked)

            Example
                flagValue = getPlayerFlagValue(cid, 32) --32 "Can summon all monsters"
                    if flagValue = 1 then --if can
                        doSummonCreature("Demon", fromPosition.x + 1)
                    else --if cant
                        doSummonCreature("Rat", fromPosition.x + 1)
                    end

        getPlayerGroupId(cid)
            Info
                This function will check player group ID.

            Returns
                Player group id.
                    For example (using standard TFS groups):
                        1 - when checked player is player
                        2 - when checked player is gamemaster
                        3 - when checked player is god

            Example
                local group = getPlayerGroupId(cid)
                    if group == 3 --when God
                        doPlayerAddItem(cid,2160,100) --100 crystal coins
                    elseif group == 2 --when Gamemaster
                        doPlayerAddItem(cid,2160,50) --50 crystal coins
                    else
                        doPlayerSendCancel(cid, "Sorry, cheats doesnt work for you."
                    end

        getPlayerGuildId(cid)
            Info
                This function will return the players guild id.

            Returns
                Players guild id.
                    For example
                        21 - The guild the player is in has the guild id 21, as stored in the database.

            Example
                local guildId = getPlayerGuildId(cid)
                    if guildId == 21 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Welcome in!")
                    elseif guildId == 22 then
                        doPlayerSendCancel(cid,"This area is not for your guild")
                    end

        getPlayerGuildName(cid)
            Info
                Used to get a players guild name.

            Returns
                Players guild name in a string.
                    For example
                        "Lost Dragons"

            Example
                local guildName = getPlayerGuildName(cid)
                doSendAnimatedText(getCreaturePosition(cid),guildName, TEXTCOLOR_GOLD)

        getPlayerGuildRank(cid)
            Info
                Used to get a players rank name in a guild.

            Returns
                The players current rank in his guild in a string
                    For example
                        "Senator"

            Example
                local rank = getPlayerGuildRank(cid)
                doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You're a " .. rank .. " in your guild.")

        getPlayerGuildNick(cid)
            Info
                Used to get a players nick in his guild.

            Returns
                The players current nick in a string.
                    For example
                        "The protector"

            Example
                local guildNick = getPlayerGuildNick(cid)
                doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Your guild nick is " .. guildNick .. ".")
]

[ "do" functions
    Introduction
        These functions usually execute an action.

    List
        doPlayerSendCancel(cid, text)
            Info
                This function will send default cancel message do player (visible in bottom of

            Returns
                Return 1 (TRUE) - when msg was sent, 0 - when it was impossible (FALSE)

            Example
                if getPlayerLevel(cid) >= 10 then --checking level
                    doSummonCreature("Chicken", fromPosition.x + 1)
                else
                    doPlayerSendCancel(c

I've already taken all of those.
@guitarfreak & Zisly, my reference site to lua is working on a glossary for all functions, if you would like to donate your calltip list to me i would be grateful, or if guitarfreak wants to help as well.

here is a preview table, they arent in order persay, but you'll get the idea about the definitions. Lua Functions

Ok, check attachment.

You will have to remove some things tho, like [Calltip - *functionname*], \n and w=

\n = new line
 

Attachments

  • CALLTIPS.calltip.txt
    8.1 KB · Views: 4 · VirusTotal
Last edited:
Thanks a lot!!
I hate collecting such things on my own so I really appreciate it :D

Np mate, Im with you on that, in good projects there are always those small but important things that, when doing them alone, become annoying and seem like they never end! Asking that bit of help from others on these things is the solution to keep us from dropping them :thumbup:

Maybe that was random lol but I say this because what you said reminded me of my last project, which I *stupidly* dropped because I though I could do it alone (or was too unconfident to ask for help) and those "never ending" things I mention beated me lol.

Nyways nuff jabbering lol, keep it up :thumbup: looking forward for the release in the future.

Ill see if I can give you some more definitions later when I have the time (when I confirm they are correct :D).

And that website is looking good Greg, that events table just cleared out a doubt Ive had on something for ages, I didnt know where to find them, very useful!
 
Why don't you make it load functions and calltips from XML like this:

Code:
<function name="isPlayer(cid)" calltip="This function will check if cid is a player."/>
 
Ok, after 1h~ I got 35 functions left.
Check first post, I need help with those.

Why don't you make it load functions and calltips from XML like this:

Code:
<function name="isPlayer(cid)" calltip="This function will check if cid is a player."/>
Why?
I don't see any problems with the current one.


Edit: Look here, what a mess the thing becomes:
Code:
<function name="addDamageCondition" calltip="addDamageCondition(condition, key, rounds, time, value)\n Adds a damage value to a condtion."/>
<function name="addEvent" calltip="addEvent(callback, delay, parameter)\n Add an event."/>
<function name="addOutfitCondition" calltip="addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)\n Adds a new outfit condition to a creature."/>
<function name="broadcastMessage" calltip="broadcastMessage(message, type)\n This function will broadcast to the server a certain message of the chosen type."/>
<function name="broadcastMessage" calltip="broadcastMessage(message, type)\n This function will broadcast to the server a certain message of the chosen type."/>
<function name="createCombatArea" calltip="createCombatArea( {area}, {extArea} )\n Create a new combat area."/>
<function name="createCombatObject" calltip="createCombatObject()\n Creates a new combat object."/>
<function name="createConditionObject" calltip="createConditionObject(type)\n Creates a new condition (condition-type required)."/>
<function name="debugPrint" calltip="debugPrint(text)\n Print a message in the console."/>
<function name="doAddContainerItem" calltip="doAddContainerItem(uid, itemid, count or subtype)\n Add an item to a container."/>
<function name="doAreaCombatCondition" calltip="doAreaCombatCondition(cid, pos, area, condition, effect)\n Adds a condition (area)."/>
<function name="doAreaCombatDispel" calltip="doAreaCombatDispel(cid, pos, area, type, effect)\n Removes a condition (area)."/>
<function name="doAreaCombatHealth" calltip="doAreaCombatHealth(cid, type, pos, area, min, max, effect)\n Change any creature's health (area)."/>
<function name="doAreaCombatMana" calltip="doAreaCombatMana(cid, pos, area, min, max, effect)\n Change any creature's mana (area)."/>
<function name="doChallengeCreature" calltip="doChallengeCreature(cid, target)\n Challenge a creature."/>
<function name="doChangeSpeed" calltip="doChangeSpeed(cid, delta)\n Change the creature's speed."/>
<function name="doChangeTypeItem" calltip="doChangeTypeItem(uid,new_type)\n Change the type/count of an item."/>
<function name="doCombat" calltip="doCombat(cid, combat, param)\n Execute the combat object."/>
<function name="doConvinceCreature" calltip="doConvinceCreature(cid, target)\n This function will convince the selected creature. This function combined with doSummonCreature can work as a simulation of the "Utevo Res" spell."/>
<function name="doCreateItem" calltip="doCreateItem(itemid, type/count, pos)\n Creates a item at a position."/>
<function name="doCreateItemEx" calltip="doCreateItemEx(itemid, count/subtype)\n Creates a item."/>
<function name="doCreateTeleport" calltip="doCreateTeleport(itemid, topos, createpos)\n This function will create a teleport in the position you choose in createpos, and it will send you to the position you write on topos."/>
<function name="doCreatureAddHealth" calltip="doCreatureAddHealth(cid, health)\n This function will add any amount of health points to the player."/>
<function name="doDecayItem" calltip="doDecayItem(uid)\n Start to decay an item."/>
<function name="doMoveCreature" calltip="doMoveCreature(cid, direction)\n Moves a creature to a direction."/>
<function name="doPlayerAddBlessing" calltip="doPlayerAddBlessing(cid, blessing)\n This function will add any blessing to the selected player."/>
<function name="doPlayerAddExp" calltip="doPlayerAddExp(cid,exp)\n This function will add any amount of exp to the player."/>
<function name="doPlayerAddItem" calltip="doPlayerAddItem(cid,itemid,count or type)\n Add an item to a player (returns uid of the created item)."/>
<function name="doPlayerAddMana" calltip="doPlayerAddMana(cid, mana)\n This function will add any amount of mana points to the player."/>
<function name="doPlayerAddManaSpent" calltip="doPlayerAddManaSpent(cid, mana)\n This function will add any amount of spent mana to the selected player´s magic level."/>
<function name="doPlayerAddPremiumDays" calltip="doPlayerAddPremiumDays(cid, days)\n This function will add premium days to the selected player."/>
<function name="doPlayerAddSkillTry" calltip="doPlayerAddSkillTry(cid,skillid,tries)\n Add skill tries to a player."/>
<function name="doPlayerAddSoul" calltip="doPlayerAddSoul(cid, soul)\n This function will add any amount of soul points to the selected player."/>
<function name="doPlayerFeed" calltip="doPlayerFeed(uid,food)\n Increase the food ticks of a player."/>
<function name="doPlayerPopupFYI" calltip="doPlayerPopupFYI(cid, message)\n This function will send the player a message through a pop-up window."/>
<function name="doPlayerRemoveItem" calltip="doPlayerRemoveItem(cid,itemid,count)\n This function will remove any item from the selected player, and also the amount selected in case it´s needed."/>
<function name="doPlayerRemoveMoney" calltip="doPlayerRemoveMoney(cid, money)\n This function will remove any amount of money from the player´s local money."/>
<function name="doPlayerRemovePremiumDays" calltip="doPlayerRemovePremiumDays(cid, days)\n This function will remove premium days from the selected player."/>
<function name="doPlayerSendCancel" calltip="doPlayerSendCancel(cid, text)\n This function will send a default cancel message to the player."/>
<function name="doPlayerSendDefaultCancel" calltip="doPlayerSendDefaultCancel(uid, ReturnValue)\n Sends a cancel message to the player."/>
<function name="doPlayerSendTextMessage" calltip="doPlayerSendTextMessage(cid, MessageClasses, message)\n This function will send the player a message to his log."/>
<function name="doPlayerSetGuildId" calltip="doPlayerSetGuildId(cid, id)\n Sets a players guild id."/>
<function name="doPlayerSetGuildNick" calltip="doPlayerSetGuildNick(cid, nick)\n Sets a players guild nick."/>
<function name="doPlayerSetGuildRank" calltip="doPlayerSetGuildRank(cid, rank)\n Sets a players guild rank."/>
<function name="doPlayerSetSex" calltip="doPlayerSetSex(cid, newSex)\n This function will set a player´s sex (gender) to a new one."/>
<function name="doPlayerSetTown" calltip="doPlayerSetTown(cid, townid)\n Sets the players town id."/>
<function name="doPlayerSetVocation" calltip="doPlayerSetVocation(cid,voc)\n This function will set the selected player´s vocation to a new one. Choose the new vocation ID in "voc"."/>
<function name="doRemoveCreature" calltip="doRemoveCreature(cid)\n This function will remove the selected creature."/>
<function name="doRemoveItem" calltip="doRemoveItem(uid, <optional> n)\n Removes a item or item count (eg. rune charge)."/>
<function name="doSendAnimatedText" calltip="doSendAnimatedText(pos, text, color)\n This function will send an animated text that appears above the player or in a selected position, with the desired color chosen."/>
<function name="doSendMagicEffect" calltip="doSendMagicEffect(pos, type)\n This function will send any desired magic effect to a selected position."/>
<function name="doSetCreatureLight" calltip="doSetCreatureLight(cid, lightLevel, lightColor, time)\n Add a new light condtion to a player/creature."/>
<function name="doSetCreatureOutfit" calltip="doSetCreatureOutfit(cid, outfit, time)\n Sets the creature's outfit (table required)."/>
<function name="doSetItemActionId" calltip="doSetItemActionId(uid,actionid)\n Set the item's action id."/>
<function name="doSetItemOutfit" calltip="doSetItemOutfit(cid, item, time)\n Sets the creature's outfit to an item."/>
<function name="doSetItemSpecialDescription" calltip="doSetItemSpecialDescription(uid,desc)\n Set an item's description."/>
<function name="doSetItemText" calltip="doSetItemText(uid,text)\n Set the text of an item if you open it."/>
<function name="doSetMonsterOutfit" calltip="doSetMonsterOutfit(cid, name, time)\n Sets the creature's outfit to a monster look."/>
<function name="doShowTextDialog" calltip="doShowTextDialog(cid,itemid,text)\n Show a text dialog to a player that contains text."/>
<function name="doSummonCreature" calltip="doSummonCreature(name, pos)\n This function will summon any creature in a selected position. This is not a personal summon."/>
<function name="doTargetCombatCondition" calltip="doTargetCombatCondition(cid, target, condition, effect)\n Adds a condition (target)."/>
<function name="doTargetCombatDispel" calltip="doTargetCombatDispel(cid, target, type, effect)\n Removes a condition (target)."/>
<function name="doTargetCombatHealth" calltip="doTargetCombatHealth(cid, target, type, min, max, effect)\n Change any creature's health (target)."/>
<function name="doTargetCombatMana" calltip="doTargetCombatMana(cid, target, min, max, effect)\n Change any creature's mana (target)."/>
<function name="doTeleportThing" calltip="doTeleportThing(uid,newpos)\n Teleports something to a position."/>
<function name="doTileAddItemEx" calltip="doTileAddItemEx(pos, uid)\n Adds a item on a tile."/>
<function name="doTransformItem" calltip="doTransformItem(uid,toitemid, <optional> count/subtype)\n Changes the item's id."/>
<function name="getContainerCap" calltip="getContainerCap(uid)\n Returns the capacity of a container."/>
<function name="getContainerItem" calltip="getContainerItem(uid, slot)\n Check if the slot contains a container."/>
<function name="getContainerSize" calltip="getContainerSize(uid)\n Returns the size of a container."/>
<function name="getCreatureHealth" calltip="getCreatureHealth(cid)\n This function will check for creatures health points."/>
<function name="getCreatureMaxHealth" calltip="getCreatureMaxHealth(cid)\n This function will check for creatures max health points."/>
<function name="getCreatureName" calltip="getCreatureName(cid)\n This function will check the creature´s name, whether it is a player or a monster."/>
<function name="getCreatureOutfit" calltip="getCreatureOutfit(cid)\n This function will check the creature´s outfit."/>
<function name="getCreaturePosition" calltip="getCreaturePosition(cid)\n This function will check the creature´s position."/>
<function name="getCreatureSpeed" calltip="getCreatureSpeed(cid)\n This function will check the creature´s speed."/>
<function name="getGlobalStorageValue" calltip="getGlobalStorageValue(valueid)\n Returns the value of the value id."/>
<function name="getGuildId" calltip="getGuildId(guild_name)\n Retrives the guild id."/>
<function name="getHouseAccessList" calltip="getHouseAccessList(houseod, listid)\n Returns the house-id of a house that matches the listid."/>
<function name="getHouseEntry" calltip="getHouseEntry(houseid)\n Retrives the house entry point."/>
<function name="getHouseName" calltip="getHouseName(houseid)\n Retrives the house name."/>
<function name="getHouseRent" calltip="getHouseRent(houseid)\n Retrives the house rent."/>
<function name="getHouseTown" calltip="getHouseTown(houseid)\n Retrives the town id of where the house is located."/>
<function name="getItemName" calltip="getItemName(itemid)\n Returns the item's name."/>
<function name="getItemRWInfo" calltip="getItemRWInfo(uid)\n Checks if the item is writeable."/>
<function name="getPlayerAccess" calltip="getPlayerAccess(cid)\n This function will check for players access."/>
<function name="getPlayerBlessing" calltip="getPlayerBlessing(cid, blessing)\n Returns the players current blessings."/>
<function name="getPlayerByName" calltip="getPlayerByName(name)\n Returns a player if the name matches any player on the server."/>
<function name="getPlayerDepotItems" calltip="getPlayerDepotItems(cid, depotid)\n This function will check how many items (slots reserved, because 10cc = 1 slot) player have in depot."/>
<function name="getPlayerFlagValue" calltip="getPlayerFlagValue(cid, flag)\n This function will check the players flag value."/>
<function name="getPlayerFood" calltip="getPlayerFood(cid)\n This function will check how many seconds a player is full."/>
<function name="getPlayerFreeCap" calltip="getPlayerFreeCap(cid)\n This function will check how much free cap the player has."/>
<function name="getPlayerGroupId" calltip="getPlayerGroupId(cid)\n This function will check the players group ID."/>
<function name="getPlayerGUID" calltip="getPlayerGUID(cid)\n This function will check for player id."/>
<function name="getPlayerGuildId" calltip="getPlayerGuildId(cid)\n This function will return the players guild id."/>
<function name="getPlayerGuildName" calltip="getPlayerGuildName(cid)\n This function gets the players guild name."/>
<function name="getPlayerGuildNick" calltip="getPlayerGuildNick(cid)\n This function gets the players nick in his guild."/>
<function name="getPlayerGuildRank" calltip="getPlayerGuildRank(cid)\n This function gets the players rank name in a guild."/>
<function name="getPlayerItemCount" calltip="getPlayerItemCount(cid,itemid)\n This function will check how much items with == itemid player actually have."/>
<function name="getPlayerLevel" calltip="getPlayerLevel(cid)\n This function will check for players current level."/>
<function name="getPlayerLight" calltip="getPlayerLight(cid)\n This function will check for player actually light."/>
<function name="getPlayerLookDir" calltip="getPlayerLookDir(cid)\n This function will check the players direction."/>
<function name="getPlayerMagLevel" calltip="getPlayerMagLevel(cid)\n This function will check for players current magic level."/>
<function name="getPlayerMana" calltip="getPlayerMana(cid)\n This function will check for creatures mana points."/>
<function name="getPlayerMaxMana" calltip="getPlayerMaxMana(cid)\n This function will check for creatures max mana points."/>
<function name="getPlayerName" calltip="getPlayerName(cid)\n This function will check for players name."/>
<function name="getPlayerPosition" calltip="getPlayerPosition(cid)\n This function will check for players current position."/>
<function name="getPlayerPremiumDays" calltip="getPlayerPremiumDays(cid)\n This function will check the amount of premium days the player has left."/>
<function name="getPlayerSex" calltip="getPlayerSex(cid)\n This function will check the players sex."/>
<function name="getPlayerSex" calltip="getPlayerSex(cid)\n This function will check the players sex."/>
<function name="getPlayerSkill" calltip="getPlayerSkill(cid, skillid)\n This function will check for players skill."/>
<function name="getPlayerSkullType" calltip="getPlayerSkullType(cid)\n This function will check the skull type of the selected player, or lack of."/>
<function name="getPlayerSlotItem" calltip="getPlayerSlotItem(cid, slot)\n This function will check what item the player has in the slot."/>
<function name="getPlayerSoul" calltip="getPlayerSoul(cid)\n This function will check how many soul points the player has."/>
<function name="getPlayerTown" calltip="getPlayerTown(cid)\n This function will check players Town ID."/>
<function name="getPlayerVocation" calltip="getPlayerVocation(cid)\n This function will check the players Vocation ID."/>
<function name="getThingPos" calltip="getThingPos(uid)\n Returns the position of something."/>
<function name="getTileHouseInfo" calltip="getTileHouseInfo(pos)\n Returns the house status of a tile (0 = no house, 0> = house id)"/>
<function name="getTilePzInfo" calltip="getTilePzInfo(pos)\n Returns the protection zone status of a tile (1 = pz, 0 = pz)."/>
<function name="getWorldCreatures" calltip="getWorldCreatures(type)\n Returns the amount of creatures (0 players, 1 monsters, 2 npcs, 3 all)."/>
<function name="getWorldLight" calltip="getWorldLight()\n Returns the light level of the server."/>
<function name="getWorldTime" calltip="getWorldTime()\n Returns the ingame time."/>
<function name="getWorldType" calltip="getWorldType()\n  Returns the worldtype (0 = no-pvp, 1 = pvp, 2 = pvp-enf)."/>
<function name="getWorldUpTime" calltip="getWorldUpTime()\n Returns the uptime of the server."/>
<function name="isContainer" calltip="isContainer(uid)\n This function will check if the item is a container."/>
<function name="isCreature" calltip="IsCreature(cid)\n Check if something is a creature."/>
<function name="isInArray" calltip="isInArray(array, value)\n Check if an array contains a specific element."/>
<function name="isItemContainer" calltip="isItemContainer(itemid)\n Check if an item is a container."/>
<function name="isItemDoor" calltip="isItemDoor(itemid)\n Check if an item is a door."/>
<function name="isItemFluidContainer" calltip="isItemFluidContainer(itemid)\n Check if an item is a fluid."/>
<function name="isItemRune" calltip="isItemRune(itemid)\n Check if an item is a rune."/>
<function name="isItemStackable" calltip="isItemStackable(itemid)\n Check if an item is stackable."/>
<function name="isPlayer" calltip="isPlayer(cid)\n This function will check if the creature is a player."/>
<function name="mayNotLogout" calltip="mayNotLogout(cid, value)\n Prevents player from logging out."/>
<function name="mayNotMove" calltip="mayNotMove(cid, value)\n Prevents player from moving."/>
<function name="setCombatArea" calltip="setCombatArea(combat, area)\n Set the area of a combat object."/>
<function name="setCombatCallBack" calltip="setCombatCallBack(combat, key, function_name)\n Set the callback of a combat object."/>
<function name="setCombatCondition" calltip="setCombatCondition(combat, condition)\n Adds a condtion to a combat object."/>
<function name="setCombatFormula" calltip="setCombatFormula(combat, type, mina, minb, maxa, maxb)\n Set the combat's formula."/>
<function name="setCombatParam" calltip="setCombatParam(combat, key, value)\n Adds a parameter to a combat object with a decent value."/>
<function name="setConditionFormula" calltip="setConditionFormula(combat, mina, minb, maxa, maxb)\n Set the condition's formula."/>
<function name="setConditionParam" calltip="setConditionParam(condition, key, value)\n Adds a parameter to a condition with a decent value."/>
<function name="setHouseAccessList" calltip="setHouseAccessList(houseid, listid, listtext)\n Set the accesslist of a door or anything else in a house."/>
<function name="setHouseOwner" calltip="setHouseOwner(houseid, ownername)\n Set the owner of a house."/>
<function name="setPlayerStorageValue" calltip="setPlayerStorageValue(uid,valueid, newvalue)\n Adds a new value-id to the storage map of player."/>
<function name="stopEvent" calltip="stopEvent(eventid)\n Stops an added event."/>
 
Last edited:
@up

Actually, you made it look messy (absolutely no offense, just pointing that out)

The function name should be added before the callback through the software's code, not directly from XML.

Something like:

Dim funcAndCallback as String = readFromXml(getFunctionName()) + vbNewLine + getFunctionCallback()

A note for noobs reading this: these functions don't really exist, they're just examples therefore don't spam my inbox if you tried that out and it doesn't work.


That was a vb.net example.
 
@up

Actually, you made it look messy (absolutely no offense, just pointing that out)

The function name should be added before the callback through the software's code, not directly from XML.

Something like:

Dim funcAndCallback as String = readFromXml(getFunctionName()) + vbNewLine + getFunctionCallback()

A note for noobs reading this: these functions don't really exist, they're just examples therefore don't spam my inbox if you tried that out and it doesn't work.


That was a vb.net example.
Sorry but I don't get what your talking about.

My code loads all caltips and functions at start of the app..

And can you please tell me why xml would be better?




First post has been edited, not many functions left.
 
Last edited:
Back
Top