Postado Fevereiro 10, 2013 12 anos sistema de trainer por piso bom esse script fuciona assim vc colo o action no piso 9094 ai quando o player fica em cima desse piso o player ficará treinando va em seu ot data/movements/script copie um arquivo e renomei para train.lua e remove o que dentro e cole isso -- Config -- local skillTries = 10 -- Number of tries per skill local t = 5 * 1000 -- Set the time before try is added to skills local lock = 0 -- Time to wait before start again in seconds -- Weapon Types -- local weaponTypes = { { 1, 2 }, -- Sword { 2, 1 }, -- Club { 3, 3 }, -- Axe { 5, 5 }, -- Shield { 4, 4 } -- Distance } function onStepIn(cid, item, pos, fromPos) local p = {cid = cid, item = item, pos = pos} setPlayerStorageValue(p.cid, 18010, 1) if isPlayer(p.cid) and p.item.actionid == 9094 then doPlayerSendTextMessage(p.cid,22,"Your training session will now begin") addEvent(trainMe, t, p) end return true end function onStepOut(cid, item) if getPlayerStorageValue(cid, 18010) == 2 then return false end setPlayerStorageValue(cid, 18010, 2) doPlayerSendTextMessage(cid,22,"Your training session has now ended") return true end function trainMe(p) if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 and p.item.actionid == 9094 then local weaponLeft = getPlayerSlotItem(p.cid, CONST_SLOT_LEFT) local weaponRight = getPlayerSlotItem(p.cid, CONST_SLOT_RIGHT) if weaponLeft.itemid ~= 0 then weaponLeft = getItemWeaponType(weaponLeft.uid) end if weaponRight.itemid ~= 0 then weaponRight = getItemWeaponType(weaponRight.uid) end for _, t in pairs(weaponTypes) do if t[1] == weaponLeft or t[1] == weaponRight then doPlayerAddSkillTry(p.cid, t[2], skillTries) end end manaspent = getPlayerMana(p.cid) doPlayerAddSpentMana(p.cid, manaspent) doTargetCombatMana(0, p.cid, -manaspent, -manaspent, CONST_ME_NONE) doPlayerAddMana(p.cid, 100) doSendMagicEffect(getPlayerPosition(p.cid),30) addEvent(trainMe, t, p) end return true end agora va em seu ot data/movements/movements.xml e cole isso <movevent type="StepIn" actionid="9094" event="script" value="train.lua"/> <movevent type="StepOut" actionid="9094" event="script" value="train.lua"/> Editado Fevereiro 12, 2013 12 anos por gristony (veja o histórico de edições)
Postado Fevereiro 11, 2013 12 anos Administrador Organize mais seus tópicos, use spoiler,code e outros utensílios, ficaria mais bonito e organizado! @topic não entendi direito oque o scripts faz .-. Editado Fevereiro 11, 2013 12 anos por Erimyth (veja o histórico de edições)
Postado Janeiro 19, 2014 11 anos Coloque creditos,creio que esse script não seja seu pois ja vi em outro topico...
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.