• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Trainer Floor or SQM

raizune

New Member
Joined
Jul 20, 2010
Messages
11
Reaction score
0
Could anybody help me getting a script?
I need a script that when you step on a SQM (Large Gem) i start training like skills shielding, sword, distance, axe, etc.
Also when you say !mana your mana drain and gives you arroung 10% of your mana level.

thanks :)

i got this from Necroxia
 
PHP:
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

try this ;p but i don't know do it work ;p
sorry about my english ;p
 
yes this is for magic level ;p
in source i don't find anything for training sword axe itd ;/
 
Try it
PHP:
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
 
Back
Top