Postado Agosto 20, 2022 2 anos Entao galera, uso a 0.4 3996 porem no script de critical fica dando esse erro, alguem poderia me ajudar pf ! na 3777 entre outras funfa normal, ja na 3996 da esse erro, deve ser alguma funçao, Alguem pra ajudar pf Citar local lvlcrit = 98798645 local multiplier = 2.0 function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then if (getPlayerStorageValue(attacker, lvlcrit)*1) >= math.random (1,100) then dano = math.ceil(value*(multiplier)) doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 215) doSendAnimatedText(getCreaturePos(attacker), "CRITICAL", 180) return false end end return true end
Postado Agosto 20, 2022 2 anos @deza Tem que ver se essa funcao onStatsChange existe no tfs 3996, pode ser que ela esteja com outro nome
Postado Agosto 20, 2022 2 anos Autor Em 20/08/2022 em 18:49, MatteusDeli disse: @deza Tem que ver se essa funcao onStatsChange existe no tfs 3996, pode ser que ela esteja com outro nome No dodge tem essa funçao ! e funciona perfeitamente. Citar local storagedodge = 98798644 -- storage do dodge local cor = 31 -- cor do texto local msg = "DODGE" -- msg local dodge = { {min = 1, max = 10, chance = 2}, {min = 11, max = 20, chance = 4}, {min = 21, max = 30, chance = 6}, {min = 31, max = 40, chance = 8}, {min = 41, max = 50, chance = 10}, {min = 51, max = 60, chance = 12}, {min = 61, max = 70, chance = 14}, {min = 71, max = 80, chance = 16}, {min = 81, max = 90, chance = 18}, {min = 91, max = math.huge, chance = 20} } function onStatsChange(cid, attacker, type, combat, value) if not isCreature(cid) then return false end for _, tudo in pairs(dodge) do if getPlayerStorageValue(cid, storagedodge) >= tudo.min and getPlayerStorageValue(cid, storagedodge) <= tudo.max then local chancex = math.random(1, 100) if chancex <= tudo.chance then if combat ~= COMBAT_HEALING then doSendAnimatedText(getCreaturePosition(cid), msg, cor) return false end end end end return true end Na pasta do ot veio as funçoes, poderia me ajudar a achar a funçao no qual se encaixaria no system critical pf !?? Citar getCreatureHealth(cid) getCreatureMaxHealth(cid[, ignoreModifiers = false]) getCreatureMana(cid) getCreatureMaxMana(cid[, ignoreModifiers = false]) getCreatureHideHealth(cid) doCreatureSetHideHealth(cid, hide) getCreatureSpeakType(cid) doCreatureSetSpeakType(cid, type) getCreatureLookDirection(cid) getPlayerLevel(cid) getPlayerExperience(cid) getPlayerMagLevel(cid[, ignoreModifiers = false]) getPlayerSpentMana(cid) getPlayerFood(cid) getPlayerAccess(cid) getPlayerGhostAccess(cid) getPlayerSkillLevel(cid, skill[, ignoreModifiers = false]) getPlayerSkillTries(cid, skill) getPlayerTown(cid) getPlayerVocation(cid) getPlayerIp(cid) getPlayerRequiredMana(cid, magicLevel) getPlayerRequiredSkillTries(cid, skillId, skillLevel) getPlayerItemCount(cid, itemid[, subType = -1]) getPlayerMoney(cid) getPlayerSoul(cid[, ignoreModifiers = false]) getPlayerFreeCap(cid) getPlayerLight(cid) getPlayerSlotItem(cid, slot) getPlayerWeapon(cid[, ignoreAmmo = false]) getPlayerItemById(cid, deepSearch, itemId[, subType = -1]) getPlayerDepotItems(cid, depotid) getPlayerGuildId(cid) getPlayerGuildName(cid) getPlayerGuildRankId(cid) getPlayerGuildRank(cid) getPlayerGuildNick(cid) getPlayerGuildLevel(cid) getPlayerGUID(cid) getPlayerNameDescription(cid) doPlayerSetNameDescription(cid, desc) getPlayerSpecialDescription(cid) doPlayerSetSpecialDescription(cid, desc) getPlayerAccountId(cid) getPlayerAccount(cid) getPlayerFlagValue(cid, flag) getPlayerCustomFlagValue(cid, flag) getPlayerPromotionLevel(cid) doPlayerSetPromotionLevel(cid, level) getPlayerGroupId(cid) doPlayerSetGroupId(cid, newGroupId) doPlayerSendOutfitWindow(cid) doPlayerLearnInstantSpell(cid, name) doPlayerUnlearnInstantSpell(cid, name) getPlayerLearnedInstantSpell(cid, name) getPlayerInstantSpellCount(cid) getPlayerInstantSpellInfo(cid, index) getInstantSpellInfo(cid, name) getCreatureStorageList(cid) getCreatureStorage(uid, key) doCreatureSetStorage(uid, key, value) getStorageList() getStorage(key) doSetStorage(key, value) getChannelUsers(channelId) getPlayersOnline() getTileInfo(pos) getThingFromPos(pos[, displayError = true]) getThing(uid[, recursive = RECURSE _FIRST]) doTileQueryAdd(uid, pos[, flags[, displayError = true]]) doItemRaidUnref(uid) getThingPosition(uid) getTileItemById(pos, itemId[, subType = -1]) getTileItemByType(pos, type) getTileThingByPos(pos) getTopCreature(pos) doRemoveItem(uid[, count = -1]) doPlayerFeed(cid, food) doPlayerSendCancel(cid, text) doPlayerSendDefaultCancel(cid, ReturnValue) getSearchString(fromPosition, toPosition[, fromIsCreature = false[, toIsCreature = false]]) getClosestFreeTile(cid, targetpos[, extended = false[, ignoreHouse = true]]) doTeleportThing(cid, newpos[, pushmove = true[, fullTeleport = true]]) doTransformItem(uid, newId[, count/subType]) doCreatureSay(uid, text[, type = SPEAK _SAY[, ghost = false[, cid = 0[, pos]]]]) doSendCreatureSquare(cid, color[, player]) doSendMagicEffect(pos, type[, player]) doSendDistanceShoot(fromPos, toPos, type[, player]) doSendAnimatedText(pos, text, color[, player]) doPlayerAddSkillTry(cid, skillid, n[, useMultiplier = true]) doCreatureAddHealth(cid, health[, hitEffect[, hitColor[, force]]]) doCreatureAddMana(cid, mana) setCreatureMaxHealth(cid, health) setCreatureMaxMana(cid, mana) doPlayerSetMaxCapacity(cid, cap) doPlayerAddSpentMana(cid, amount[, useMultiplier = true]) doPlayerAddSoul(cid, amount) doPlayerAddItem(cid, itemid[, count/subtype = 1[, canDropOnMap = true[, slot = 0]]]) doPlayerAddItem(cid, itemid[, count = 1[, canDropOnMap = true[, subtype = 1[, 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) doShowTextDialog(cid, itemid, text) doDecayItem(uid) doCreateItem(itemid[, type/count], pos) doCreateItemEx(itemid[, count/subType = -1]) doTileAddItemEx(pos, uid) doAddContainerItemEx(uid, virtuid) doRelocate(pos, posTo[, creatures = true[, unmovable = true]]) doCleanTile(pos[, forceMapLoaded = false]) doCreateTeleport(itemid, topos, createpos) doCreateMonster(name, pos[, extend = false[, force = false[, displayError = true]]]) doCreateNpc(name, pos[, displayError = true]) doSummonMonster(cid, name) doConvinceCreature(cid, target) getMonsterTargetList(cid) getMonsterFriendList(cid) doMonsterSetTarget(cid, target) doMonsterChangeTarget(cid) getMonsterInfo(name) doAddCondition(cid, condition) doRemoveCondition(cid, type[, subId]) doRemoveConditions(cid[, onlyPersistent]) doRemoveCreature(cid[, forceLogout = true]) doMoveCreature(cid, direction[, flag = FLAG _NOLIMIT]) doSteerCreature(cid, position) doPlayerSetPzLocked(cid, locked) doPlayerSetTown(cid, townid) doPlayerSetVocation(cid,voc) doPlayerRemoveItem(cid, itemid[, count[, subType = -1]]) doPlayerAddExperience(cid, amount) doPlayerSetGuildId(cid, id) doPlayerSetGuildLevel(cid, level[, rank]) doPlayerSetGuildNick(cid, nick) doPlayerAddOutfit(cid, looktype, addon) doPlayerRemoveOutfit(cid, looktype[, addon = 0]) doPlayerAddOutfitId(cid, outfitId, addon) doPlayerRemoveOutfitId(cid, outfitId[, addon = 0]) canPlayerWearOutfit(cid, looktype[, addon = 0]) canPlayerWearOutfitId(cid, outfitId[, addon = 0]) getCreatureCondition(cid, condition[, subId = 0]) doCreatureSetDropLoot(cid, doDrop) getPlayerLossPercent(cid, lossType) doPlayerSetLossPercent(cid, lossType, newPercent) doPlayerSetLossSkill(cid, doLose) getPlayerLossSkill(cid) doPlayerSwitchSaving(cid) doPlayerSave(cid[, shallow = false]) isPlayerPzLocked(cid) isPlayerSaving(cid) isCreature(cid) isMovable(uid) getCreatureByName(name) getPlayerByGUID(guid) getPlayerByNameWildcard(name~[, ret = false]) getPlayerGUIDByName(name[, multiworld = false]) getPlayerNameByGUID(guid[, multiworld = false[, displayError = true]]) doPlayerChangeName(guid, oldName, newName) registerCreatureEvent(uid, eventName) unregisterCreatureEvent(uid, eventName) getContainerSize(uid) getContainerCap(uid) getContainerItem(uid, slot) doAddContainerItem(uid, itemid[, count/subType = 1]) getHouseInfo(houseId[, displayError = true]) getHouseAccessList(houseid, listId) getHouseByPlayerGUID(playerGUID) getHouseFromPos(pos) setHouseAccessList(houseid, listid, listtext) setHouseOwner(houseId, owner[, clean]) getWorldType() setWorldType(type) getWorldTime() getWorldLight() getWorldCreatures(type) getWorldUpTime() getGuildId(guildName) getGuildMotd(guildId) getPlayerSex(cid[, full = false]) doPlayerSetSex(cid, newSex) createCombatArea({area}[, {extArea}]) createConditionObject(type[, ticks[, buff[, subId]]]) setCombatArea(combat, area) setCombatCondition(combat, condition) setCombatParam(combat, key, value) setConditionParam(condition, key, value) addDamageCondition(condition, rounds, time, value) addOutfitCondition(condition, outfit) setCombatCallBack(combat, key, function_name) setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]]) setConditionFormula(combat, mina, minb, maxa, maxb) doCombat(cid, combat, param) createCombatObject() doCombatAreaHealth(cid, type, pos, area, min, max, effect) doTargetCombatHealth(cid, target, type, min, max, effect) doCombatAreaMana(cid, pos, area, min, max, effect) doTargetCombatMana(cid, target, min, max, effect) doCombatAreaCondition(cid, pos, area, condition, effect) doTargetCombatCondition(cid, target, condition, effect) doCombatAreaDispel(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) doCreatureChangeOutfit(cid, outfit) doSetMonsterOutfit(cid, name[, time = -1]) doSetItemOutfit(cid, item[, time = -1]) doSetCreatureOutfit(cid, outfit[, time = -1]) getCreatureOutfit(cid) getCreatureLastPosition(cid) getCreatureName(cid) getCreatureSpeed(cid) getCreatureBaseSpeed(cid) getCreatureTarget(cid) isSightClear(fromPos, toPos, floorCheck) isInArray(array, value[, caseSensitive = false]) addEvent(callback, delay, ...) stopEvent(eventid) getPlayersByAccountId(accId) getAccountIdByName(name) getAccountByName(name) getAccountIdByAccount(accName) getAccountByAccountId(accId) getIpByName(name) getPlayersByIp(ip[, mask = 0xFFFFFFFF]) doPlayerPopupFYI(cid, message) doPlayerSendTutorial(cid, id) doPlayerSendMailByName(name, item[, town[, actor]]) doPlayerAddMapMark(cid, pos, type[, description]) doPlayerAddPremiumDays(cid, days) getPlayerPremiumDays(cid) doCreatureSetLookDirection(cid, dir) getCreatureGuildEmblem(cid[, target]) doCreatureSetGuildEmblem(cid, emblem) getCreaturePartyShield(cid[, target]) doCreatureSetPartyShield(cid, shield) getCreatureSkullType(cid[, target]) doCreatureSetSkullType(cid, skull) getPlayerSkullEnd(cid) doPlayerSetSkullEnd(cid, time, type) getPlayerBlessing(cid, blessing) doPlayerAddBlessing(cid, blessing) getPlayerStamina(cid) doPlayerSetStamina(cid, minutes) getPlayerBalance(cid) doPlayerSetBalance(cid, balance) getCreatureNoMove(cid) doCreatureSetNoMove(cid, block) getPlayerIdleTime(cid) doPlayerSetIdleTime(cid, amount) getPlayerLastLoad(cid) getPlayerLastLogin(cid) getPlayerAccountManager(cid) getPlayerTradeState(cid) getPlayerModes(cid) getPlayerRates(cid) doPlayerSetRate(cid, type, value) getPlayerPartner(cid) doPlayerSetPartner(cid, guid) doPlayerFollowCreature(cid, target) getPlayerParty(cid) doPlayerJoinParty(cid, lid) doPlayerLeaveParty(cid[, forced = false]) doPlayerAddMount(cid, mountId) doPlayerRemoveMount(cid, mountId) getPlayerMount(cid, mountId) doPlayerSetMount(cid, mountId) doPlayerSetMountStatus(cid, mounted) getMountInfo([mountId]) getPartyMembers(lid) getCreatureMaster(cid) getCreatureSummons(cid) getTownId(townName) getTownName(townId) getTownTemplePosition(townId) getTownHouses(townId) getSpectators(centerPos, rangex, rangey[, multifloor = false]) getVocationInfo(id) getGroupInfo(id[, premium = false]) getVocationList() getGroupList() getChannelList() getTownList() getWaypointList() getTalkActionList() getExperienceStageList() getItemIdByName(name[, displayError = true]) getItemInfo(itemid) getItemAttribute(uid, key) doItemSetAttribute(uid, key, value) doItemEraseAttribute(uid, key) getItemWeight(uid[, precise = true]) getItemParent(uid) hasItemProperty(uid, prop) hasPlayerClient(cid) isIpBanished(ip[, mask]) isPlayerBanished(name/guid, type) isAccountBanished(accountId[, playerId]) doAddIpBanishment(...) doAddPlayerBanishment(...) doAddAccountBanishment(...) doAddNotation(...) doAddStatement(...) doRemoveIpBanishment(ip[, mask]) doRemovePlayerBanishment(name/guid, type) doRemoveAccountBanishment(accountId[, playerId]) doRemoveNotations(accountId[, playerId]) doRemoveStatements(name/guid[, channelId]) getNotationsCount(accountId[, playerId]) getStatementsCount(name/guid[, channelId]) getBanData(value[, type[, param]]) getBanReason(id) getBanAction(id[, ipBanishment = false]) getBanList(type[, value[, param]]) getExperienceStage(level) getDataDir() getLogsDir() getConfigFile() getConfigValue(key) getModList() getHighscoreString(skillId) getWaypointPosition(name) doWaypointAddTemporial(name, pos) getGameState() doSetGameState(id) doExecuteRaid(name) doCreatureExecuteTalkAction(cid, text[, ignoreAccess = false[, channelId = CHANNEL _DEFAULT]]) doReloadInfo(id[, cid]) doSaveServer([shallow = false]) doCleanHouse(houseId) doCleanMap() doRefreshMap() doGuildAddEnemy(guild, enemy, war, type) doGuildRemoveEnemy(guild, enemy) doUpdateHouseAuctions() loadmodlib(lib) domodlib(lib) dodirectory(dir[, recursively = false])getCreatureHealth(cid) getCreatureMaxHealth(cid[, ignoreModifiers = false]) getCreatureMana(cid) getCreatureMaxMana(cid[, ignoreModifiers = false]) getCreatureHideHealth(cid) doCreatureSetHideHealth(cid, hide) getCreatureSpeakType(cid) doCreatureSetSpeakType(cid, type) getCreatureLookDirection(cid) getPlayerLevel(cid) getPlayerExperience(cid) getPlayerMagLevel(cid[, ignoreModifiers = false]) getPlayerSpentMana(cid) getPlayerFood(cid) getPlayerAccess(cid) getPlayerGhostAccess(cid) getPlayerSkillLevel(cid, skill[, ignoreModifiers = false]) getPlayerSkillTries(cid, skill) getPlayerTown(cid) getPlayerVocation(cid) getPlayerIp(cid) getPlayerRequiredMana(cid, magicLevel) getPlayerRequiredSkillTries(cid, skillId, skillLevel) getPlayerItemCount(cid, itemid[, subType = -1]) getPlayerMoney(cid) getPlayerSoul(cid[, ignoreModifiers = false]) getPlayerFreeCap(cid) getPlayerLight(cid) getPlayerSlotItem(cid, slot) getPlayerWeapon(cid[, ignoreAmmo = false]) getPlayerItemById(cid, deepSearch, itemId[, subType = -1]) getPlayerDepotItems(cid, depotid) getPlayerGuildId(cid) getPlayerGuildName(cid) getPlayerGuildRankId(cid) getPlayerGuildRank(cid) getPlayerGuildNick(cid) getPlayerGuildLevel(cid) getPlayerGUID(cid) getPlayerNameDescription(cid) doPlayerSetNameDescription(cid, desc) getPlayerSpecialDescription(cid) doPlayerSetSpecialDescription(cid, desc) getPlayerAccountId(cid) getPlayerAccount(cid) getPlayerFlagValue(cid, flag) getPlayerCustomFlagValue(cid, flag) getPlayerPromotionLevel(cid) doPlayerSetPromotionLevel(cid, level) getPlayerGroupId(cid) doPlayerSetGroupId(cid, newGroupId) doPlayerSendOutfitWindow(cid) doPlayerLearnInstantSpell(cid, name) doPlayerUnlearnInstantSpell(cid, name) getPlayerLearnedInstantSpell(cid, name) getPlayerInstantSpellCount(cid) getPlayerInstantSpellInfo(cid, index) getInstantSpellInfo(cid, name) getCreatureStorageList(cid) getCreatureStorage(uid, key) doCreatureSetStorage(uid, key, value) getStorageList() getStorage(key) doSetStorage(key, value) getChannelUsers(channelId) getPlayersOnline() getTileInfo(pos) getThingFromPos(pos[, displayError = true]) getThing(uid[, recursive = RECURSE _FIRST]) doTileQueryAdd(uid, pos[, flags[, displayError = true]]) doItemRaidUnref(uid) getThingPosition(uid) getTileItemById(pos, itemId[, subType = -1]) getTileItemByType(pos, type) getTileThingByPos(pos) getTopCreature(pos) doRemoveItem(uid[, count = -1]) doPlayerFeed(cid, food) doPlayerSendCancel(cid, text) doPlayerSendDefaultCancel(cid, ReturnValue) getSearchString(fromPosition, toPosition[, fromIsCreature = false[, toIsCreature = false]]) getClosestFreeTile(cid, targetpos[, extended = false[, ignoreHouse = true]]) doTeleportThing(cid, newpos[, pushmove = true[, fullTeleport = true]]) doTransformItem(uid, newId[, count/subType]) doCreatureSay(uid, text[, type = SPEAK _SAY[, ghost = false[, cid = 0[, pos]]]]) doSendCreatureSquare(cid, color[, player]) doSendMagicEffect(pos, type[, player]) doSendDistanceShoot(fromPos, toPos, type[, player]) doSendAnimatedText(pos, text, color[, player]) doPlayerAddSkillTry(cid, skillid, n[, useMultiplier = true]) doCreatureAddHealth(cid, health[, hitEffect[, hitColor[, force]]]) doCreatureAddMana(cid, mana) setCreatureMaxHealth(cid, health) setCreatureMaxMana(cid, mana) doPlayerSetMaxCapacity(cid, cap) doPlayerAddSpentMana(cid, amount[, useMultiplier = true]) doPlayerAddSoul(cid, amount) doPlayerAddItem(cid, itemid[, count/subtype = 1[, canDropOnMap = true[, slot = 0]]]) doPlayerAddItem(cid, itemid[, count = 1[, canDropOnMap = true[, subtype = 1[, 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) doShowTextDialog(cid, itemid, text) doDecayItem(uid) doCreateItem(itemid[, type/count], pos) doCreateItemEx(itemid[, count/subType = -1]) doTileAddItemEx(pos, uid) doAddContainerItemEx(uid, virtuid) doRelocate(pos, posTo[, creatures = true[, unmovable = true]]) doCleanTile(pos[, forceMapLoaded = false]) doCreateTeleport(itemid, topos, createpos) doCreateMonster(name, pos[, extend = false[, force = false[, displayError = true]]]) doCreateNpc(name, pos[, displayError = true]) doSummonMonster(cid, name) doConvinceCreature(cid, target) getMonsterTargetList(cid) getMonsterFriendList(cid) doMonsterSetTarget(cid, target) doMonsterChangeTarget(cid) getMonsterInfo(name) doAddCondition(cid, condition) doRemoveCondition(cid, type[, subId]) doRemoveConditions(cid[, onlyPersistent]) doRemoveCreature(cid[, forceLogout = true]) doMoveCreature(cid, direction[, flag = FLAG _NOLIMIT]) doSteerCreature(cid, position) doPlayerSetPzLocked(cid, locked) doPlayerSetTown(cid, townid) doPlayerSetVocation(cid,voc) doPlayerRemoveItem(cid, itemid[, count[, subType = -1]]) doPlayerAddExperience(cid, amount) doPlayerSetGuildId(cid, id) doPlayerSetGuildLevel(cid, level[, rank]) doPlayerSetGuildNick(cid, nick) doPlayerAddOutfit(cid, looktype, addon) doPlayerRemoveOutfit(cid, looktype[, addon = 0]) doPlayerAddOutfitId(cid, outfitId, addon) doPlayerRemoveOutfitId(cid, outfitId[, addon = 0]) canPlayerWearOutfit(cid, looktype[, addon = 0]) canPlayerWearOutfitId(cid, outfitId[, addon = 0]) getCreatureCondition(cid, condition[, subId = 0]) doCreatureSetDropLoot(cid, doDrop) getPlayerLossPercent(cid, lossType) doPlayerSetLossPercent(cid, lossType, newPercent) doPlayerSetLossSkill(cid, doLose) getPlayerLossSkill(cid) doPlayerSwitchSaving(cid) doPlayerSave(cid[, shallow = false]) isPlayerPzLocked(cid) isPlayerSaving(cid) isCreature(cid) isMovable(uid) getCreatureByName(name) getPlayerByGUID(guid) getPlayerByNameWildcard(name~[, ret = false]) getPlayerGUIDByName(name[, multiworld = false]) getPlayerNameByGUID(guid[, multiworld = false[, displayError = true]]) doPlayerChangeName(guid, oldName, newName) registerCreatureEvent(uid, eventName) unregisterCreatureEvent(uid, eventName) getContainerSize(uid) getContainerCap(uid) getContainerItem(uid, slot) doAddContainerItem(uid, itemid[, count/subType = 1]) getHouseInfo(houseId[, displayError = true]) getHouseAccessList(houseid, listId) getHouseByPlayerGUID(playerGUID) getHouseFromPos(pos) setHouseAccessList(houseid, listid, listtext) setHouseOwner(houseId, owner[, clean]) getWorldType() setWorldType(type) getWorldTime() getWorldLight() getWorldCreatures(type) getWorldUpTime() getGuildId(guildName) getGuildMotd(guildId) getPlayerSex(cid[, full = false]) doPlayerSetSex(cid, newSex) createCombatArea({area}[, {extArea}]) createConditionObject(type[, ticks[, buff[, subId]]]) setCombatArea(combat, area) setCombatCondition(combat, condition) setCombatParam(combat, key, value) setConditionParam(condition, key, value) addDamageCondition(condition, rounds, time, value) addOutfitCondition(condition, outfit) setCombatCallBack(combat, key, function_name) setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]]) setConditionFormula(combat, mina, minb, maxa, maxb) doCombat(cid, combat, param) createCombatObject() doCombatAreaHealth(cid, type, pos, area, min, max, effect) doTargetCombatHealth(cid, target, type, min, max, effect) doCombatAreaMana(cid, pos, area, min, max, effect) doTargetCombatMana(cid, target, min, max, effect) doCombatAreaCondition(cid, pos, area, condition, effect) doTargetCombatCondition(cid, target, condition, effect) doCombatAreaDispel(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) doCreatureChangeOutfit(cid, outfit) doSetMonsterOutfit(cid, name[, time = -1]) doSetItemOutfit(cid, item[, time = -1]) doSetCreatureOutfit(cid, outfit[, time = -1]) getCreatureOutfit(cid) getCreatureLastPosition(cid) getCreatureName(cid) getCreatureSpeed(cid) getCreatureBaseSpeed(cid) getCreatureTarget(cid) isSightClear(fromPos, toPos, floorCheck) isInArray(array, value[, caseSensitive = false]) addEvent(callback, delay, ...) stopEvent(eventid) getPlayersByAccountId(accId) getAccountIdByName(name) getAccountByName(name) getAccountIdByAccount(accName) getAccountByAccountId(accId) getIpByName(name) getPlayersByIp(ip[, mask = 0xFFFFFFFF]) doPlayerPopupFYI(cid, message) doPlayerSendTutorial(cid, id) doPlayerSendMailByName(name, item[, town[, actor]]) doPlayerAddMapMark(cid, pos, type[, description]) doPlayerAddPremiumDays(cid, days) getPlayerPremiumDays(cid) doCreatureSetLookDirection(cid, dir) getCreatureGuildEmblem(cid[, target]) doCreatureSetGuildEmblem(cid, emblem) getCreaturePartyShield(cid[, target]) doCreatureSetPartyShield(cid, shield) getCreatureSkullType(cid[, target]) doCreatureSetSkullType(cid, skull) getPlayerSkullEnd(cid) doPlayerSetSkullEnd(cid, time, type) getPlayerBlessing(cid, blessing) doPlayerAddBlessing(cid, blessing) getPlayerStamina(cid) doPlayerSetStamina(cid, minutes) getPlayerBalance(cid) doPlayerSetBalance(cid, balance) getCreatureNoMove(cid) doCreatureSetNoMove(cid, block) getPlayerIdleTime(cid) doPlayerSetIdleTime(cid, amount) getPlayerLastLoad(cid) getPlayerLastLogin(cid) getPlayerAccountManager(cid) getPlayerTradeState(cid) getPlayerModes(cid) getPlayerRates(cid) doPlayerSetRate(cid, type, value) getPlayerPartner(cid) doPlayerSetPartner(cid, guid) doPlayerFollowCreature(cid, target) getPlayerParty(cid) doPlayerJoinParty(cid, lid) doPlayerLeaveParty(cid[, forced = false]) doPlayerAddMount(cid, mountId) doPlayerRemoveMount(cid, mountId) getPlayerMount(cid, mountId) doPlayerSetMount(cid, mountId) doPlayerSetMountStatus(cid, mounted) getMountInfo([mountId]) getPartyMembers(lid) getCreatureMaster(cid) getCreatureSummons(cid) getTownId(townName) getTownName(townId) getTownTemplePosition(townId) getTownHouses(townId) getSpectators(centerPos, rangex, rangey[, multifloor = false]) getVocationInfo(id) getGroupInfo(id[, premium = false]) getVocationList() getGroupList() getChannelList() getTownList() getWaypointList() getTalkActionList() getExperienceStageList() getItemIdByName(name[, displayError = true]) getItemInfo(itemid) getItemAttribute(uid, key) doItemSetAttribute(uid, key, value) doItemEraseAttribute(uid, key) getItemWeight(uid[, precise = true]) getItemParent(uid) hasItemProperty(uid, prop) hasPlayerClient(cid) isIpBanished(ip[, mask]) isPlayerBanished(name/guid, type) isAccountBanished(accountId[, playerId]) doAddIpBanishment(...) doAddPlayerBanishment(...) doAddAccountBanishment(...) doAddNotation(...) doAddStatement(...) doRemoveIpBanishment(ip[, mask]) doRemovePlayerBanishment(name/guid, type) doRemoveAccountBanishment(accountId[, playerId]) doRemoveNotations(accountId[, playerId]) doRemoveStatements(name/guid[, channelId]) getNotationsCount(accountId[, playerId]) getStatementsCount(name/guid[, channelId]) getBanData(value[, type[, param]]) getBanReason(id) getBanAction(id[, ipBanishment = false]) getBanList(type[, value[, param]]) getExperienceStage(level) getDataDir() getLogsDir() getConfigFile() getConfigValue(key) getModList() getHighscoreString(skillId) getWaypointPosition(name) doWaypointAddTemporial(name, pos) getGameState() doSetGameState(id) doExecuteRaid(name) doCreatureExecuteTalkAction(cid, text[, ignoreAccess = false[, channelId = CHANNEL _DEFAULT]]) doReloadInfo(id[, cid]) doSaveServer([shallow = false]) doCleanHouse(houseId) doCleanMap() doRefreshMap() doGuildAddEnemy(guild, enemy, war, type) doGuildRemoveEnemy(guild, enemy) doUpdateHouseAuctions() loadmodlib(lib) domodlib(lib) dodirectory(dir[, recursively = false]) Lua made functions - Funções feitas em lua (data/lib) 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) isPremium(cid) getMonthDayEnding(day) getMonthString(m) getArticle(str) isNumeric(str) doNumberFormat(i) doPlayerAddAddons(cid, addon) doPlayerWithdrawAllMoney(cid) doPlayerDepositAllMoney(cid) doPlayerTransferAllMoneyTo(cid, target) playerExists(name) getTibiaTime() doWriteLogFile(file, text) 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) getHouseDoorsCount(houseId) getHouseBedsCount(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) doShutdown() doSummonCreature(name, pos, displayError) getOnlinePlayers() getPlayerByName(name) isPlayer(cid) isPlayerGhost(cid) isMonster(cid) isNpc(cid) doPlayerSetExperienceRate(cid, value) doPlayerSetMagicRate(cid, value) doPlayerAddLevel(cid, amount, round) doPlayerAddMagLevel(cid, amount) doPlayerAddSkill(cid, skill, amount, round) getPartyLeader(cid) isInParty(cid) isPrivateChannel(channelId) doPlayerResetIdleTime(cid) doBroadcastMessage(text, class) doPlayerBroadcastMessage(cid, text, class, checkFlag, ghost) getBooleanFromString(input) doCopyItem(item, attributes) doRemoveThing(uid) setAttackFormula(combat, type, minl, maxl, minm, maxm, min, max) setHealingFormula(combat, type, minl, maxl, minm, maxm, min, max) doChangeTypeItem(uid, subtype) doSetItemText(uid, text, writer, date) doItemSetActionId(uid, aid) getFluidSourceType(itemid) getDepotId(uid) getItemDescriptions(uid) getItemWeightById(itemid, count, precision) getItemWeaponType(uid) getItemRWInfo(uid) getItemLevelDoor(itemid) isContainer(uid) isItemStackable(itemid) isItemRune(itemid) isItemDoor(itemid) isItemContainer(itemid) isItemFluidContainer(itemid) isItemMovable(itemid) isCorpse(uid) getContainerCapById(itemid) getMonsterAttackSpells(name) getMonsterHealingSpells(name) getMonsterLootList(name) getMonsterSummonList(name) choose(...) exhaustion.check(cid, storage) exhaustion.get(cid, storage) exhaustion.set(cid, storage, time) exhaustion.make(cid, storage, time) doConvertIntegerToIp(int, mask) doConvertIpToInteger(str) doRevertIp(str) isInRange(position, fromPosition, toPosition) getDistanceBetween(fromPosition, toPosition) getDirectionTo(pos1, pos2) getCreatureLookPosition(cid) getPositionByDirection(position, direction, size) doComparePositions(position, positionEx) getArea(position, x, y) Position(x, y, z, stackpos) isValidPosition(position) isSorcerer(cid) isDruid(cid) isPaladin(cid) isKnight(cid) isRookie(cid) string.split(str) string.trim(str) string.explode(str, sep, limit) string.expand(str) string.timediff(diff) Compats (data/lib/100-compat.lua) doSetCreatureDropLoot = doCreatureSetDropLoot doPlayerSay = doCreatureSay doPlayerAddMana = doCreatureAddMana playerLearnInstantSpell = doPlayerLearnInstantSpell doPlayerRemOutfit = doPlayerRemoveOutfit pay = doPlayerRemoveMoney broadcastMessage = doBroadcastMessage getPlayerName = getCreatureName getCreaturePosition = getThingPosition getPlayerPosition = getCreaturePosition getCreaturePos = getCreaturePosition creatureGetPosition = getCreaturePosition getPlayerMana = getCreatureMana getPlayerMaxMana = getCreatureMaxMana hasCondition = hasCreatureCondition getCreatureCondition = hasCreatureCondition isMoveable = isMovable isItemMoveable = isItemMovable saveData = saveServer savePlayers = saveServer getPlayerSkill = getPlayerSkillLevel getPlayerSkullType = getCreatureSkullType getCreatureSkull = getCreatureSkullType getAccountNumberByName = getAccountIdByName getIPByName = getIpByName getPlayersByIP = getPlayersByIp getThingFromPos = getThingFromPosition getThingfromPos = getThingFromPos getHouseFromPos = getHouseFromPosition 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 getTileItemsByType = getTileItemByType 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 getPlayerMount = canPlayerRideMount 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 isNumber = isNumeric doSetItemActionId = doItemSetActionId getOnlinePlayers = getPlayersOnlineEx addDialog = doPlayerAddDialog doSendPlayerExtendedOpcode = doPlayerSendExtendedOpcode
Postado Agosto 21, 2022 2 anos Em 20/08/2022 em 03:42, deza disse: doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 215) essa função eh uma merreca, ela puxa da source, e ela "duplica" pq ela eh um "statsChange" então vc chama ela de novo no script eu indico usar assim: local lvlcrit = 98798645 local multiplier = 2 function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then if (getPlayerStorageValue(attacker, lvlcrit)*1) >= math.random (1,1000) then --Fix* chance de 1 a 1000 evita bug dano = math.ceil(value*multiplier) if isCreature(cid) then doCreatureAddHealth(cid, -dano) end addEvent(function() if isCreature(cid) then doSendAnimatedText(getCreaturePos(cid), "-"..dano, 180) end end, 100) if isCreature(attacker) then doSendAnimatedText(getCreaturePos(attacker), "CRITICAL!!", 144) end end end return true end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.