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

is there a function for that?

wesleyt10

Well-Known Member
Joined
Dec 15, 2012
Messages
73
Reaction score
71
I'm looking or if someone can help, I want a creaturescript or something like that when the player gets x storage he gets a benefit, for example - 10% damage or 10% more protection! if someone can give me a light i'm happy.
I looked in the list of functions moon of tfs 0.4 but i didn't find anything related, what i found was related to the use of the item and also only for magic damage!
 
Check on sources and modify onChangeHealth, player storage X = dmg -10%
(Guessing you know C++)
 
Actually you don't need to modify anything on sources. Just use something like this:
Lua:
local value = 4657897
if getPlayerStorageValue(cid, value) >= 1 then
    just put any condition that you want to.
end
 
so, in this case I would do the script by another method because there are some conditions, however I did not find in the source any function that can easily add this value, for example the "IncreaseMagicPercent", I would like to know if there is a method of increase the total damage understand?
Thanks Pisces
Post automatically merged:

there was creaturescript "onStatsChange" in 0.4 that was
Code:
function onStatsChange(cid, attacker, type, combat, value)
    -- code
    return true -- true / false
end

some explaination: https://otland.net/threads/how-does-onstatschange-work.105227/
some examples: https://www.google.com/search?q=site%3Aotland.net+onstatschange


I thought about using exactly this function but, my server and Fast attack full, wouldn't it cause a higher consumption of CPU?
 
Back
Top