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

RevScripts Critical system script request for TFS 0.4 SVN (rev 3996)

There were 'critical damage' systems before real Tibia and before 0.4.

I got 2 questions:
1. Can you link TFS 0.4 rev 3996 on github? (GitHub - otland/tfs-old-svn at 0.4 (https://github.com/otland/tfs-old-svn/tree/0.4)) only 'curated' version is 3884 GitHub - otland/tfs-old-svn at curated/r3884 (https://github.com/otland/tfs-old-svn/tree/curated/r3884)
2. What is critical system?
  • weapon has chance to get 100% dmg?
  • weapon has chance to get 200% dmg or some configurable percent of dmg?
  • does it work for spells?
  • does it work with other items than weapon (all equipped items)?
 
similar to this one, but this one is not working on my server!
It works normally on the 3777, but on the 3996 it is not working!


actions:
local config = {
levelscrit = 100, --- leveis que terão
storagecrit = 48913 -- storage que será verificado
}

function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid, config.storagecrit) < config.levelscrit then
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,18,"[Critical]: ["..(getPlayerStorageValue(cid, config.storagecrit)+1).."/"..config.levelscrit.."].")
setPlayerStorageValue(cid, config.storagecrit, getPlayerStorageValue(cid, config.storagecrit)+1)
elseif getPlayerStorageValue(cid, config.storagecrit) >= config.levelscrit then
doPlayerSendTextMessage(cid,18,"Voce ja chegou no maximo de [Critical]. Parabens.")
return 0
end
return 1
end

creaturescripts:
local lvlcrit = 48913
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 (0,1000) 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
 

Similar threads

Back
Top