metiu11
Member
- Joined
- Mar 26, 2011
- Messages
- 94
- Solutions
- 2
- Reaction score
- 5
Hello,
Today i was create some potions and when i just hold F1 (hotkey object potion) i have spam in server log "Using one of 100 great potions...".
I have exhaust on potion 2 sec. During 2sec i have like 10 or more text about using one of ... great potions.
I fear if more players use it then server will be crash or get lags. Where can i change exhaust those messages?
my script looks like this:
Today i was create some potions and when i just hold F1 (hotkey object potion) i have spam in server log "Using one of 100 great potions...".
I have exhaust on potion 2 sec. During 2sec i have like 10 or more text about using one of ... great potions.
I fear if more players use it then server will be crash or get lags. Where can i change exhaust those messages?
my script looks like this:
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 2000))
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 2.9) + (mlevel * 1) - 50
local mana_maximum = (level * 5.0) + (mlevel * 1)
local mana_add = math.random(mana_minimum, mana_maximum)
if getPlayerLevel(cid) > 700 then
doPlayerAddMana(cid, mana_add)
doRemoveItem(item.uid, 1)
doSendMagicEffect(getThingPos(itemEx.uid), 5)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 700 lvl to use this.")
return TRUE
end
end