Ir para conteúdo

suisinho

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    suisinho deu reputação a WarW0lf em Experience Scroll com tempo!   
    Vá em "mods" e crie expscroll.xml


    <?xml version="1.0" encoding="UTF-8"?> <mod name="Experience Stages Scroll" version="1.0" author="TomCrusher" contact="otland.net" enabled="yes"> <action itemid="9004" event="script" value="expstagescroll.lua"/> <creatureevent type="think" name="ExpStage" event="script" value="expstagescroll.lua"/> <creatureevent type="login" name="ExpStageLogin" event="script" value="expstagescroll.lua"/> </mod> em mods/scripts crie expstagescroll.lua local config = { rate = 2, storage = 1000, expstorage = 1100, register = 1200, time = 14400, } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, config.storage) <= 0 then local rates = getPlayerRates(cid) setPlayerStorageValue(cid, config.expstorage, rates[SKILL__LEVEL]) setPlayerStorageValue(cid, config.register, 1) itemEx=itemid == 9004 doCreatureSay(cid, "Your extra experience rate has been activated! It now is: " .. config.rate .. "x added to your former experience rate.", TALKTYPE_ORANGE_1, true, cid) setPlayerStorageValue(cid, config.storage, os.time()+config.time) doPlayerSetExperienceRate(cid, rates[SKILL__LEVEL]+config.rate) doRemoveItem(item.uid,1) registerCreatureEvent(cid, "ExpStage") else doCreatureSay(cid, "You must finish first exp condition to start other exp condition !", TALKTYPE_ORANGE_1, true, cid) end return true end function onThink(cid, interval) if getPlayerStorageValue(cid, config.register) == 1 then if getPlayerStorageValue(cid, config.storage) <= os.time() then doCreatureSay(cid, "Your extra experience rate has finished! It is now normaly experience rate.", TALKTYPE_ORANGE_1, true, cid) setPlayerStorageValue(cid, config.storage, 0) setPlayerStorageValue(cid, config.register, 0) local oldexp = getPlayerStorageValue(cid, config.expstorage) doPlayerSetExperienceRate(cid, oldexp) unregisterCreatureEvent(cid, "ExpStage") end end return true end function onLogin(cid) if getPlayerStorageValue(cid, config.register) == 1 then registerCreatureEvent(cid, "ExpStage") local rates = getPlayerRates(cid) doCreatureSay(cid, "Your extra experience rate is still here! It is: " .. config.rate .. "x added to your former experience rate.", TALKTYPE_ORANGE_1, true, cid) if getPlayerStorageValue(cid, config.storage) > os.time() then local oldexp = getPlayerStorageValue(cid, config.expstorage) doPlayerSetExperienceRate(cid, oldexp+config.rate) end end return true end

    Configuração:

    rate = 2, --quantos X vai adicionar de experience rate
    storage = 1000, --storage do tempo
    expstorage = 1100, --storage para ver se ja usou
    register = 1200, --registration storage
    time = 14400, --tempo para acabar (em seconds 14400=24 hours)

    Créditos: Tom Crusher
  2. Gostei
    suisinho deu reputação a PsyMcKenzie em Sistema de Cortar Madeira V1.0 por PsyMcKenzie   
    Bom galera, estou começando minha carreira na área de scripts, e estou fazendo o possível para postar 1 por semana.

    Semana passada eu postei o Sistema de Fome

    E hoje estou postando o Woodcutting Sistem na versão 1.0, em breve updates. Então, vamos lá!

    Em data/actions/scripts, crie um arquivo.lua com o nome de wood e coloque isso:


     
    function onUse(cid, item, frompos, item2, topos) local chance = 70 -- chance de cortar local madeiras = {5941, 5901} -- item que o player irá ganhar local premio = madeiras[math.random(1, #madeiras)] local transformItem = 8786 local texts = {"Tuc", "Toc", "Trec"} local random = texts[math.random(1,#texts)] local vocationUse = 2 local time = 2 -- Minutos para crescer novamente                   if getPlayerVocation(cid) ~= vocationUse then                                            doPlayerSendTextMessage(cid,22,"Você não tem a vocação necessária para cortar.")                   return true                   end                            if item2.itemid == 2708 or item2.itemid == 2700 or item2.itemid == 6218 or item2.itemid == 2701 or item2.itemid == 2707 then                                         if math.random(1,100) >= chance then                                                  doPlayerAddItem(cid,premio, math.random(1, 2))                                                  doTransformItem(item2.uid, transformItem)                                                  doSendMagicEffect(topos, 16)                                                  doPlayerSendTextMessage(cid,22,"Você cortou uma madeira.")                                                  doSendAnimatedText(topos, ""..random.."", TEXTCOLOR_GREEN)                                                  doDecayItem(item2.uid)                                                  addEvent(doCreateItem, time*60*1000, item2.itemid, 1, getThingPos(item2.uid))          else                                                  doSendAnimatedText(topos, ""..random.."", TEXTCOLOR_GREEN)                                                  doPlayerSendTextMessage(cid,22,"Você não conseguiu cortar.")                                         end                            end          return true end    
    Em data/actions/actions.xml adicione a tag:


     
    <action itemid="4874" event="script" value="wood.lua"/>    
    4874 é o ID do Dwarven Pickaxe.

    Imagens:





    É isso ai galera. Obrigado!

Informação Importante

Confirmação de Termo