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

TFS 0.X Help with rank system on look TFS 0.4

royalpala

Well-Known Member
Joined
Dec 31, 2019
Messages
85
Solutions
1
Reaction score
68
good day people,

I would like to implement a rank system that shows the rank of the player when using "look" on him
I followed the script on the following link here and here but didnt work.
I think my server doesnt have the onLook function, also doesnt have events folder, anybody who can help me with this script?
TFS 0.4 rev 3777 for 8.6

I have already made an NPC that gives you the rank depending on your storage
but I would like the players to show ("You see Player_Name. he is a Knight, he is level 8, he is Rank_Name") when you use look on them
maybe it can be possible using a LUA made function but I dont know how to do it myself

If anybody knows how to do it or could give me an insight on this issue, would be helpful.
thank you in advance :)

Screenshot of my folders inside "data"
1598767811719.png

My lua functions list:
Code:
    //get*
    getCreatureHealth(cid)
    getCreatureMaxHealth(cid)
    getCreatureHideHealth(cid)
    getCreatureMana(cid)
    getCreatureMaxMana(cid)
    getCreatureSpeakType(cid)
    getCreatureMaster(cid)
    getCreatureSummons(cid)
    getCreatureOutfit(cid)
    getCreaturePosition(cid)
    getCreatureLastPosition(cid)
    getCreatureLookDirection(cid)
    getCreatureName(cid)
    getCreatureSpeed(cid)
    getCreatureBaseSpeed(cid)
    getCreatureTarget(cid)
    getCreatureByName(name)
    getCreatureSkullType(cid)
    getCreatureCondition(cid, condition[, subId = 0])
    getCreatureNoMove(cid)
    getCreatureStorage(cid, key)
    getMonsterInfo(name)
    getMonsterSummonList(name)
    getMonsterTargetList(cid)
    getMonsterFriendList(cid)
    getPlayerByNameWildcard(name~[, ret = false])
    getPlayerLossSkill(cid)
    getPlayerLossPercent(cid, lossType)
    getPlayerGUIDByName(name[, multiworld = false])
    getPlayerNameByGUID(guid[, multiworld = false[, displayError = true]])
    getPlayerFood(cid)
    getPlayerLevel(cid)
    getPlayerExperience(cid)
    getPlayerMagLevel(cid[, ignoreBuffs = false])
    getPlayerSpentMana(cid)
    getPlayerAccess(cid)
    getPlayerGhostAccess(cid)
    getPlayerSkillLevel(cid, skillId)
    getPlayerSkillTries(cid, skillId)
    getPlayerTown(cid)
    getPlayerVocation(cid)
    getPlayerRequiredMana(cid, magicLevel)
    getPlayerRequiredSkillTries(cid, skillId, skillLevel)
    getPlayerItemCount(cid, itemid[, subType = -1])
    getPlayerSoul(cid)
    getPlayerAccountId(cid)
    getPlayerAccount(cid)
    getPlayerIp(cid)
    getPlayerFreeCap(cid)
    getPlayerLight(cid)
    getPlayerSlotItem(cid, slot)
    getPlayerWeapon(cid[, ignoreAmmo = false])
    getPlayerItemById(cid, deepSearch, itemId[, subType = -1])
    getPlayerDepotItems(cid, depotid)
    getPlayerGuildId(cid)
    getPlayerGuildName(cid)
    getPlayerGuildRank(cid)
    getPlayerGuildNick(cid)
    getPlayerGuildLevel(cid)
    getPlayerSex(cid)
    getPlayerGUID(cid)
    getPlayerFlagValue(cid, flag)
    getPlayerCustomFlagValue(cid, flag)
    getPlayerPromotionLevel(cid)
    getPlayerGroupId(cid)
    getPlayerLearnedInstantSpell(cid, name)
    getPlayerInstantSpellCount(cid)
    getPlayerInstantSpellInfo(cid, index)
    getPlayerBlessing(cid, blessing)
    getPlayerStamina(cid)
    getPlayerExtraExpRate(cid)
    getPlayerPartner(cid)
    getPlayerParty(cid)
    getPlayerPremiumDays(cid)
    getPlayerBalance(cid)
    getPlayerMoney(cid)
    getPlayerSkullTicks(cid, type)
    getPlayerModes(cid)
    getPlayerRates(cid)
    getPlayerLastLogin(cid)
    getPlayerLastLoginSaved(cid)
    getPlayerAccountManager(cid)
    getPlayerTradeState(cid)
    getInstantSpellInfo(cid, name)
    getPlayersByAccountId(accountNumber)
    getPlayersByIp(ip[, mask = 0xFFFFFFFF])
    getChannelUsers(channelId)
    getPlayersOnline()
    getPartyMembers(lid)
    getAccountIdByName(name)
    getAccountByName(name)
    getAccountIdByAccount(accName)
    getAccountByAccountId(accId)
    getIpByName(name)
    getItemRWInfo(uid)
    getItemProtection(uid)
    getItemDescriptionsById(itemid)
    getItemWeightById(itemid, count[, precise])
    getItemDescriptions(uid)
    getItemWeight(uid[, precise])
    getItemParent(uid)
    getItemAttack(uid)
    getItemExtraAttack(uid)
    getItemDefense(uid)
    getItemExtraDefense(uid)
    getItemArmor(uid)
    getItemAttackSpeed(uid)
    getItemHitChance(uid)
    getItemShootRange(uid)
    getItemIdByName(name[, displayError = true])
    getItemLevelDoor(itemid)
    getItemWeaponType(uid)
    getFluidSourceType(type)
    getContainerSize(uid)
    getContainerCap(uid)
    getContainerItem(uid, slot)
    getTileItemById(pos, itemId[, subType = -1])
    getTileItemByType(pos, type)
    getTileThingByPos(pos)
    getTileInfo(pos)
    getTopCreature(pos)
    getClosestFreeTile(cid, targetpos[, extended = false[, ignoreHouse = true]])
    getThingFromPos(pos[, displayError = true])
    getThing(uid)
    getThingPosition(uid)
    getHouseInfo(id)
    getHouseAccessList(houseid, listid)
    getHouseByPlayerGUID(playerGUID)
    getHouseFromPos(pos)
    getTownId(townName)
    getTownName(townId)
    getTownTemplePosition(townId)
    getTownHouses(townId)
    getWorldType()
    getWorldTime()
    getWorldLight()
    getWorldCreatures(type) //0 players, 1 monsters, 2 npcs, 3 all
    getWorldUpTime()
    getHighscoreString(skillId)
    getVocationInfo(id)
    getGuildId(guildName)
    getGuildMotd(guildId)
    getSpectators(centerPos, rangex, rangey[, multifloor = false])
    getSearchString(fromPosition, toPosition[, fromIsCreature = false[, toIsCreature = false]])
    getWaypointPosition(name)
    getGameState()
    getStorage(key)
    getNotationsCount(accountId[, playerId])
    getStatementsCount(name/guid[, channelId])
    getBanData(value[, type[, param]])
    getBanList(type[, value[, param]])
    getBanReason(id)
    getBanAction(id[, ipBanishment = false])
    getExperienceStage(level)
    getConfigFile()
    getConfigValue(key)
    getModList()
    doUpdateHouseAuctions()
    loadmodlib(lib)
    domodlib(lib)
    dodirectory(dir[, recursively = false])
    errors(var)
    getDataDir()
    getLogsDir()
    getVocationList()
    getGroupList()
    getChannelList()
    getTownList()
    getWaypointList()
    getTalkActionList()
    getExperienceStageList()

    //set*
    setCreatureMaxHealth(cid, health)
    setCreatureMaxMana(cid, mana)
    setHouseOwner(houseid, ownerGUID)
    setHouseAccessList(houseid, listid, listtext)
    setItemName(uid)
    setItemPluralName(uid)
    setItemArticle(uid)
    setItemAttack(uid, attack)
    setItemExtraAttack(uid, extraattack)
    setItemDefense(uid, defense)
    setItemArmor(uid, armor)
    setItemExtraDefense(uid, extradefense)
    setItemAttackSpeed(uid, attackspeed)
    setItemHitChance(uid, hitChance)
    setItemShootRange(uid, shootRange)
    setCombatArea(combat, area)
    setCombatCondition(combat, condition)
    setCombatParam(combat, key, value)
    setConditionParam(condition, key, value)
    setCombatCallBack(combat, key, function_name)
    setCombatFormula(combat, type, mina, minb, maxa, maxb)
    setConditionFormula(combat, mina, minb, maxa, maxb)
    setWorldType(type)

    //do*
    doCreatureAddHealth(cid, health[, force])
    doCreatureAddMana(cid, mana)
    doCreatureSetDropLoot(cid, doDrop)
    doCreatureSetSkullType(cid, skull)
    doCreatureSetSpeakType
    doCreatureSetLookDirection(cid, dir)
    doPlayerSetMaxCapacity(cid, cap)
    doCreatureChangeOutfit(cid, outfit)
    doCreatureSay(uid, text, type[, ghost = false[, cid = 0[, pos]]])
    doCreatureSetNoMove(cid, cannotMove)
    doCreatureSetStorage(cid, key, value)
    doSetCreatureLight(cid, lightLevel, lightColor, time)
    doSetCreatureOutfit(cid, outfit[, time = -1])
    doRemoveCreature(cid[, forceLogout = true])
    doMoveCreature(cid, direction[, flag = FLAG_NOLIMIT])
    doSteerCreature(cid, position)
    doConvinceCreature(cid, target)
    doChallengeCreature(cid, target)
    doChangeSpeed(cid, delta)
    doSummonMonster(name, pos)
    doCreateMonster(name, pos[, extend = false[, force = false[, displayError = true]]])
    doMonsterChangeTarget(cid)
    doMonsterSetTarget(cid, target)
    doCreateNpc(name, pos[, displayError = true])
    doSetMonsterOutfit(cid, name[, time = -1])
    doPlayerBroadcastMessage(cid, message[, type])
    doPlayerSetSex(cid, newSex)
    doPlayerSetTown(cid, townid)
    doPlayerSetVocation(cid, voc)
    doPlayerSetGroupId(cid, newGroupId)
    doPlayerSetPromotionLevel(cid, level)
    doPlayerSetStamina(cid, minutes)
    doPlayerSetBalance(cid, balance)
    doPlayerSetExtraExpRate(cid, value)
    doPlayerSetPartner(cid, guid)
    doPlayerFollowCreature(cid, target)
    doPlayerRemoveItem(cid, itemid, count[, subtype])
    doPlayerAddExperience(cid, amount)
    doPlayerSetGuildId(cid, id)
    doPlayerSetGuildRank(cid, rank)
    doPlayerSetGuildNick(cid, nick)
    doPlayerAddOutfit(cid,looktype, addon)
    doPlayerRemoveOutfit(cid,looktype[, addon = 0])
    doPlayerAddOutfitId(cid, outfitId, addon)
    doPlayerRemoveOutfitId(cid, outfitId[, addon = 0])
    doPlayerSetRedSkullTicks(cid, amount)
    doPlayerSetLossPercent(cid, lossType, newPercent)
    doPlayerSetLossSkill(cid, doLose)
    doPlayerAddSkillTry(cid, skillid, n)
    doPlayerAddSpentMana(cid, amount)
    doPlayerAddSoul(cid, soul)
    doPlayerAddItem(uid, itemid[, count/subtype = 1[, canDropOnMap = true[, slot = 0]]])
    doPlayerAddItemEx(cid, uid[, canDropOnMap = false[, slot = 0]])
    doPlayerSendTextMessage(cid, MessageClasses, message)
    doPlayerSendChannelMessage(cid, author, message, SpeakClasses, channel)
    doPlayerSendToChannel(cid, targetId, SpeakClasses, message, channel[, time])
    doPlayerOpenChannel(cid, channelId)
    doPlayerAddMoney(cid, money)
    doPlayerRemoveMoney(cid, money)
    doPlayerTransferMoneyTo(cid, target, money)
    doPlayerPopupFYI(cid, message)
    doPlayerSendTutorial(cid, id)
    doPlayerAddMapMark(cid, pos, type[, description])
    doPlayerAddPremiumDays(cid, days)
    doPlayerAddBlessing(cid, blessing)
    doPlayerResetIdleTime(cid)
    doPlayerLearnInstantSpell(cid, name)
    doPlayerUnlearnInstantSpell(cid, name)
    doPlayerFeed(cid, food)
    doPlayerSendCancel(cid, text)
    doPlayerSendDefaultCancel(cid, ReturnValue)
    doPlayerSetRate(cid, type, value)
    doPlayerJoinParty(cid, lid)
    doPlayerLeaveParty(cid[, forced = false])
    doPlayerSendOutfitWindow(cid)
    doPlayerSwitchSaving(cid)
    doPlayerSave(cid[, shallow = false])
    doCreateItem(itemid[, type/count = 1], pos)
    doCreateItemEx(itemid[, count/subtype])
    doAddContainerItemEx(uid, virtuid)
    doAddContainerItem(uid, itemid[, count/subtype = 1])
    doChangeTypeItem(uid, newtype)
    doDecayItem(uid)
    doRemoveItem(uid[, count = -1])
    doTransformItem(uid, toitemid[, count/subtype])
    doSetItemActionId(uid, actionid)
    doSetItemText(uid, text[, writer[, date]])
    doSetItemSpecialDescription(uid, desc)
    doSetItemOutfit(cid, item[, time = -1])
    doSetItemProtection(uid, value)
    doTileAddItemEx(pos, uid)
    doTileQueryAdd(uid, pos[, flags])
    doItemRaidUnref(uid)
    doAddCondition(cid, condition)
    doRemoveCondition(cid, type[, subId])
    doRemoveConditions(cid[, onlyPersistent])
    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)
    doCombat(cid, combat, param)
    doTeleportThing(cid, newpos[, pushmove = true])
    doCreateTeleport(itemid, topos, createpos)
    doSendCreatureSquare(cid, color[, player])
    doSendMagicEffect(pos, type[, player])
    doSendDistanceShoot(frompos, topos, type[, player])
    doSendAnimatedText(pos, text, color[, player])
    doShowTextDialog(cid, itemid, text)
    doRelocate(pos, toPos[, creatures = true[, unmovable = true]])
    doCleanTile(pos[, forceMapLoaded = false])
    doBroadcastMessage(message, type)
    doWaypointAddTemporial(name, pos)
    doSetGameState(stateId)
    doSetStorage(key, value)
    doAddIpBanishment(ip[, mask[, length[, reason[, comment[, admin[, statement]]]]]])
    doAddPlayerBanishment(name/guid[, type[, length[, reason[, action[, comment[, admin[, statement]]]]]]])
    doAddAccountBanishment(accountId[, playerId[, length[, reason[, action[, comment[, admin[, statement]]]]]]])
    doAddNotation(accountId[, playerId[, reason[, comment[, admin[, statement]]]]]])
    doAddStatement(name/guid[, channelId[, reason[, comment[, admin[, statement]]]]]])
    doRemoveIpBanishment(ip[, mask])
    doRemovePlayerBanishment(name/guid, type)
    doRemoveAccountBanishment(accountId[, playerId])
    doRemoveNotations(accountId[, playerId])
    doRemoveStatements(name/guid[, channelId])
    doSaveServer([shallow = false])
    doReloadInfo(id[, cid])
    doCleanHouse(houseId)
    doCleanMap()
    doRefreshMap()

    //is*
    isCreature(cid)
    isMonster(uid)
    isNpc(uid)
    isPlayer(cid)
    isPlayerPzLocked(cid)
    isPlayerSaving(cid)
    isItemStackable(itemid)
    isItemRune(itemid)
    isItemMovable(itemid)
    isItemDoor(itemid)
    isItemContainer(itemid)
    isItemFluidContainer(itemid)
    isContainer(uid)
    isCorpse(uid)
    isMovable(uid)
    isSightClear(fromPos, toPos, floorCheck)
    isIpBanished(ip[, mask])
    isPlayerBanished(cid, type)
    isPlayerNamelocked(name)
    isAccountBanished(accountId[, playerId])
    isInArray({array}, value[, lower = true])

    //others
    registerCreatureEvent(uid, eventName)
    unregisterCreatureEvent(uid, eventName)
    createCombatArea({area}[, {exArea}])
    createConditionObject(type[, ticks[, buff[, subId]]])
    addDamageCondition(condition, rounds, time, value)
    addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
    createCombatObject()
    numberToVariant(number)
    stringToVariant(string)
    positionToVariant(pos)
    targetPositionToVariant(pos)
    variantToNumber(var)
    variantToString(var)
    variantToPosition(var)
    canPlayerWearOutfit(cid, lookType[, addon = 0])
    canPlayerWearOutfitId(cid, outfitId[, addon = 0])
    executeRaid(name)
    addEvent(callback, delay, ...)
    stopEvent(eventid)
    hasPlayerClient(cid)
    hasItemProperty(uid, prop)

    //db table
    db.query(query)
    db.storeQuery(query)
    db.escapeString(str)
    db.escapeBlob(s, length)
    db.lastInsertId()
    db.stringComparison()
    db.updateLimiter()

    //result table
    result.getDataInt(resId, s)
    result.getDataLong(resId, s)
    result.getDataString(resId, s)
    result.getDataStream(resId, s, length)
    result.next(resId)
    result.free(resId)

    //bit table
    #bit.cast
    bit.bnot(n)
    bit.band(type, n)
    bit.bor(type, n)
    bit.bxor(type, n)
    bit.lshift(type, n)
    bit.rshift(type, n)
    #bit.arshift
    #bit.ucast
    bit.ubnot(n)
    bit.uband(type, n)
    bit.ubor(type, n)
    bit.ubxor(type, n)
    bit.ulshift(type, n)
    bit.urshift(type, n)
    #bit.uarshift

    //std table
    std.cout(...)
    std.clog(...)
    std.cerr(...)
    std.md5(string[, upperCase = false])
    std.sha1(string[, upperCase = false])
    std.sha256(string[, upperCase = false])
    std.sha512(string[, upperCase = false])
    std.vahash(string[, upperCase = false])

    //os table
    os.time()
    os.mtime()

    //compats
    table.getPos = table.find
    doSetCreatureDropLoot = doCreatureSetDropLoot
    doPlayerSay = doCreatureSay
    doPlayerAddMana = doCreatureAddMana
    playerLearnInstantSpell = doPlayerLearnInstantSpell
    doPlayerRemOutfit = doPlayerRemoveOutfit
    pay = doPlayerRemoveMoney
    broadcastMessage = doBroadcastMessage
    getPlayerName = getCreatureName
    getPlayerPosition = getCreaturePosition
    getCreaturePos = getCreaturePosition
    creatureGetPosition = getCreaturePosition
    getPlayerMana = getCreatureMana
    getPlayerMaxMana = getCreatureMaxMana
    hasCondition = getCreatureCondition
    isMoveable = isMovable
    isItemMoveable = isItemMovable
    saveData = saveServer
    savePlayers = saveServer
    getPlayerSkill = getPlayerSkillLevel
    getPlayerSkullType = getCreatureSkullType
    getCreatureSkull = getCreatureSkullType
    getAccountNumberByName = getAccountIdByName
    getIPByName = getIpByName
    getPlayersByIP = getPlayersByIp
    getThingfromPos = getThingFromPos
    getPlayersByAccountNumber = getPlayersByAccountId
    getIPByPlayerName = getIpByName
    getPlayersByIPNumber = getPlayersByIp
    getAccountNumberByPlayerName = getAccountIdByName
    convertIntToIP = doConvertIntegerToIp
    convertIPToInt = doConvertIpToInteger
    queryTileAddThing = doTileQueryAdd
    getTileHouseInfo = getHouseFromPos
    executeRaid = doExecuteRaid
    saveServer = doSaveServer
    cleanHouse = doCleanHouse
    cleanMap = doCleanMap
    shutdown = doShutdown
    mayNotMove = doCreatureSetNoMove
    doPlayerSetNoMove = doCreatureSetNoMove
    getPlayerNoMove = getCreatureNoMove
    getConfigInfo = getConfigValue
    doPlayerAddExp = doPlayerAddExperience
    isInArea = isInRange
    doPlayerSetSkillRate = doPlayerSetRate
    getCreatureLookDir = getCreatureLookDirection
    getPlayerLookDir = getCreatureLookDirection
    getPlayerLookDirection = getCreatureLookDirection
    doCreatureSetLookDir = doCreatureSetLookDirection
    getPlayerLookPos = getCreatureLookPosition
    setPlayerStamina = doPlayerSetStamina
    setPlayerPromotionLevel = doPlayerSetPromotionLevel
    setPlayerGroupId = doPlayerSetGroupId
    setPlayerPartner = doPlayerSetPartner
    doPlayerSetStorageValue = doCreatureSetStorage
    setPlayerStorageValue = doPlayerSetStorageValue
    getPlayerStorageValue = getCreatureStorage
    getGlobalStorageValue = getStorage
    setGlobalStorageValue = doSetStorage
    setPlayerBalance = doPlayerSetBalance
    doAddMapMark = doPlayerAddMapMark
    doSendTutorial = doPlayerSendTutorial
    getWaypointsList = getWaypointList
    getPlayerLastLoginSaved = getPlayerLastLogin
    getThingPos = getThingPosition
    doAreaCombatHealth = doCombatAreaHealth
    doAreaCombatMana = doCombatAreaMana
    doAreaCombatCondition = doCombatAreaCondition
    doAreaCombatDispel = doCombatAreaDispel
    getItemDescriptionsById = getItemInfo
    hasProperty = hasItemProperty
    hasClient = hasPlayerClient
    print = std.cout
    getPosByDir = getPositionByDirection
    db.updateQueryLimitOperator = db.updateLimiter
    db.stringComparisonOperator = db.stringComparer
    db.stringComparison = db.stringComparer
    db.executeQuery = db.query
    isNumber = isNumeric

    //lua-made functions
    doPlayerGiveItem(cid, itemid, amount, subType)
    doPlayerGiveItemContainer(cid, containerid, itemid, amount, subType)
    doPlayerTakeItem(cid, itemid, amount)
    doPlayerBuyItem(cid, itemid, count, cost, charges)
    doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges)
    doPlayerSellItem(cid, itemid, count, cost)
    doPlayerWithdrawMoney(cid, amount)
    doPlayerDepositMoney(cid, amount)
    doPlayerAddStamina(cid, minutes)
    doComparePositions(pos, posEx)
    isInRange(position, fromPosition, toPosition)
    getArea(pos, x, y)
    isPremium(cid)
    getMonthDayEnding(day)
    getMonthString(m)
    getArticle(str)
    isNumeric(str)
    getDistanceBetween(fromPosition, toPosition)
    doPlayerAddAddons(cid, addon)
    isSorcerer(cid)
    isDruid(cid)
    isPaladin(cid)
    isKnight(cid)
    isRookie(cid)
    getDirectionTo(pos, posEx)
    getCreatureLookPosition(cid)
    getPositionByDirection(fromPosition, direction, size)
    doPlayerWithdrawAllMoney(cid)
    doPlayerDepositAllMoney(cid)
    doPlayerTransferAllMoneyTo(cid, target)
    doPlayerAddLevel(cid[, amount = 1[, round = false]])
    doPlayerAddMagLevel(cid[, amount = 1])
    doPlayerAddSkill(cid, skill[, amount = 1[, round = false]])
    playerExists(name)
    getTibiaTime()
    doWriteLogFile(file, text)
    isInArea(pos, fromPos, toPos)
    getExperienceForLevel(lv)
    doMutePlayer(cid, time)
    getPlayerGroupName(cid)
    getPlayerVocationName(cid)
    getPromotedVocation(vid)
    doPlayerRemovePremiumDays(cid, days)
    getPlayerMasterPos(cid)
    getHouseOwner(houseId)
    getHouseName(houseId)
    getHouseEntry(houseId)
    getHouseRent(houseId)
    getHousePrice(houseId)
    getHouseTown(houseId)
    getHouseTilesCount(houseId)
    getItemNameById(itemid)
    getItemPluralNameById(itemid)
    getItemArticleById(itemid)
    getItemName(uid)
    getItemPluralName(uid)
    getItemArticle(uid)
    getItemText(uid)
    getItemSpecialDescription(uid)
    getItemWriter(uid)
    getItemDate(uid)
    getTilePzInfo(pos)
    getTileZoneInfo(pos)
    debugPrint(text)
    doShutdown()
    doSummonCreature(name, pos)
    getOnlinePlayers()
    getPlayerByName(name)
    isPlayerGhost(cid)
    getPlayerFrags(cid)
    getPartyLeader(cid)
    isInParty(cid)
    isPrivateChannel(channelId)
    doConvertIntegerToIp(int, mask)
    doConvertIpToInteger(str)
    doRevertIp(ip)
    getBooleanFromString(str)
    doCopyItem(item, attributes)
    getContainerCapById(itemid)
    getDepotId(uid)
    getMonsterAttackSpells(name)
    getMonsterHealingSpells(name)
    getMonsterLootList(name)
    getMonsterSummonList(name)
    exhaustion.check(cid, storage)
    exhaustion.get(cid, storage)
    exhaustion.set(cid, storage, time)
    exhaustion.make(cid, storage, time)
    table.find(table, value)
    table.isStrIn(txt, str)
    table.countElements(table, item)
    table.getCombinations(table, num)
    string.split(str)
    string.trim(str)
    string.explode(str, sep)
    choose(...)
]
 
it is a creaturescript:

one again @Evil Puncker, thank you so much for your help! you and @Xikini are always helping me :)
I will be back tomorrow to tell you my results, I need to sleep now :( theres been like 3 hours solving this issue
 
I'm back and here´s my code

Lua:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
local nickname = ""
    if getCreatureStorage(thing.uid, 1111) > 0 then
        nickname = "Hunter"
    elseif getCreatureStorage(thing.uid, 2222) > 0 then
        nickname = "Assassin"
    elseif getCreatureStorage(thing.uid, 3333) > 0 then
        nickname = "Killer Spree"
    end
doPlayerSetSpecialDescription(thing.uid, "\nRanked "..nickname..".")
end

if (thing.uid == cid) then
local nickname = ""
    if getCreatureStorage(thing.uid, 1111) > 0 then
        nickname = "Hunter"
    elseif getCreatureStorage(thing.uid, 2222) > 0 then
        nickname = "Assassin"
    elseif getCreatureStorage(thing.uid, 3333) > 0 then
        nickname = "Killer Spree"
    end
doPlayerSetSpecialDescription(thing.uid, "\nRanked "..nickname..".")
end

return true
end

it works when I look at other players "You see PlayerName, He is level 8. Ranked Hunter"

but when I look at myself it only shows "You see yourself. You are an Elite Knight"

I tried to change this line a little bit but didnt worked
Code:
if (thing.uid == cid) then
 
theres an issue with this line when I look at myself

Code:
doPlayerSetSpecialDescription(thing.uid, "\nRanked "..nickname..".")

but if I use this, it works with no issues
Code:
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "\nRanked "..nickname..".")
 
Back
Top