raizune
New Member
- Joined
- Jul 20, 2010
- Messages
- 11
- Reaction score
- 0
function onSay(cid, words, param)
local config = {
mana = getCreatureMana(cid),
percent = 10,
mmana = getCreatureMaxMana(cid)/100*config.percent
}
if config.mana >= config.mmana then
doPlayerAddSpentMana(cid,getPlayerRequiredMana(cid,getPlayerMagLevel(cid)+1)/100*config.percent)
doCreatureAddMana(cid, -getCreatureMaxMana(cid)/100*config.percent)
end
return true
end
function doTraning(cid, position)
if (isPlayer(cid) and position == getThingPosition(cid)) then
for _, skill in ipairs({SKILL_FIST, SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE, SKILL_SHIELD, SKILL_FISHING}) do
doPlayerAddSkillTry(cid, skill, math.random(0, 100))
end
addEvent(doTraning, 1000, cid, position)
end
end
function onStepIn(cid, item, position, fromPosition)
return addEvent(doTraning, 1000, cid, position)
end