Ir para conteúdo

pedrocoms

Campones
  • Total de itens

    4
  • Registro em

  • Última visita

Tudo que pedrocoms postou

  1. I've got to see you one more time.
  2. O cara acorda a essa hora e nem tem fome. :/
  3. Puta que pariu, mano. Eu tô nervoso pra caralho.
  4. Pelamor de deeeeeeeeeeeeeusssss
  5. Puta que pariu, preciso dormir menos.
  6. Comi demais, demais, demais...
  7. Mas não tô a fim de ir na aula.
  8. BAH MEU, O BAGULHO VAI TER ATÉ FUMAÇA!
  9. Quero uma máscara dessas.
  10. Quero saber como muda o efeito do objeto lançado. Fica com esse do bolt: Quero colocar pra ser small stone[1294] ou outro. E se possível queria colocar uma chance do item arremessado ficar ou não no chão. function onUse(cid, item, fromPosition, itemEx, toPosition) local combate = COMBAT_PHYSICALDAMAGE -- tipo de dano p = fromPosition local a0 = {x=p.x, y=p.y-1, z=p.z} local a1 = {x=p.x, y=p.y-2, z=p.z} local a2 = {x=p.x, y=p.y-3, z=p.z} local a3 = {x=p.x, y=p.y-4, z=p.z} local a4 = {x=p.x, y=p.y-5, z=p.z} local end1 = {x=p.x, y=p.y-6, z=p.z} local storage = 3425 -- Nao mexer local MIN_DAMAGE = 100 -- Dano minimo local MAX_DAMAGE = 500 -- Dano maximo local level = 10 -- Level necessario local UID = 1121 -- UniqueId do item if getPlayerStorageValue(cid,storage) == 1 then doPlayerSendCancel(cid,"You are exhausted.") end if getPlayerLevel(cid) < level then doPlayerSendCancel(cid,"You must be level "..level..".") end if getPlayerLevel(cid) >= level and item.uid == UID and getPlayerStorageValue(cid,storage) == -1 then setPlayerStorageValue(cid,storage,1) addEvent(setPlayerStorageValue,5000,cid,storage,-1) addEvent(doSendDistanceShoot,100,fromPosition, a4, 1) addEvent(doAreaCombatHealth,100,a0, combate, a0, 0, -MIN_DAMAGE, -MAX_DAMAGE, 2) addEvent(doAreaCombatHealth,200,a1, combate, a1, 0, -MIN_DAMAGE, -MAX_DAMAGE, 2) addEvent(doAreaCombatHealth,300,a2, combate, a2, 0, -MIN_DAMAGE, -MAX_DAMAGE, 2) addEvent(doAreaCombatHealth,400,a3, combate, a3, 0, -MIN_DAMAGE, -MAX_DAMAGE, 2) addEvent(doAreaCombatHealth,500,a4, combate, a4, 0, -MIN_DAMAGE, -MAX_DAMAGE, 2) addEvent(doCreateItem,600,1294,1,end1) addEvent(doSendMagicEffect,600,end1,44) end return TRUE end
  11. Tenho esse script de mineração e quando avança de level na mineração, aparece a mensagem You advanced from level 1 to level 2 em vermelho no game chat. Queria que aparecesse em branco e na tela do personagem, que nem quando passa de level na sword, fishing e etc, se for possível. --------------------------- -- Configurations -- --------------------------- local STORAGE_SKILL_LEVEL = 10002 local STORAGE_SKILL_TRY = 10003 local config = { levels = { {level = {0,9}, quant = {1,2}, percent = 5}, {level = {10,19}, quant = {2,4}, percent = 10}, {level = {20,29}, quant = {3,6}, percent = 15}, {level = {30,39}, quant = {4,8}, percent = 20}, {level = {40,49}, quant = {5,10}, percent = 25}, {level = {50,59}, quant = {6,12}, percent = 30}, {level = {60,69}, quant = {7,14}, percent = 30}, {level = {70,79}, quant = {8,16}, percent = 35}, {level = {80,89}, quant = {9,18}, percent = 35}, {level = {90,99}, quant = {10,20}, percent = 40}, {level = {100}, quant = {11,22}, percent = 50} }, rocks = {1356, 1285, 3607, 3616}, -- Id das rochas que podem ser quebradas stones = {}, -- Modelo = {rock_id, rock_id} default_stone = 2157, 5880, 9971, -- pedra padrão rock_delay = 480, -- Tempo de volta da rocha (Em segundos) bonus_chance = 3, -- Chance (em porcentagem) de se conseguir um bonus de exp bonus_exp = 1 -- Bonus extra } ------------------------------------ -- END Configurations --- ------------------------------------ function getMiningLevel(cid) return getPlayerStorageValue(cid, STORAGE_SKILL_LEVEL) end function setPlayerMiningLevel(cid, n) setPlayerStorageValue(cid, STORAGE_SKILL_LEVEL, n) end function addMiningLevel(cid, n) setPlayerMiningLevel(cid, getMiningLevel(cid) + (isNumber(n) and n or 1)) setMiningTry(cid, 0) end function getMiningInfo(cid) for i = 1, #config.levels do min = config.levels[i].level[1]; max = config.levels[i].level[2] if (getMiningLevel(cid) >= min and getMiningLevel(cid) <= max) then return {quantity = {min = config.levels[i].quant[1], max = config.levels[i].quant[2]}, chance = config.levels[i].percent} end end end function getStoneByRock(rockid) for i = 1, #config.stones do if (config.stones[2] == rockid) then return config.stones[1] end end return config.default_stone end function getMiningTries(cid) return getPlayerStorageValue(cid, STORAGE_SKILL_TRY) end function setMiningTry(cid, n) setPlayerStorageValue(cid, STORAGE_SKILL_TRY, n) end function addMiningTry(cid, bonus) setMiningTry(cid, getMiningTries(cid) + 1 + (bonus and config.bonus_exp or 0)) if (getMiningTries(cid) >= getMiningExpTo(getMiningLevel(cid))) then -- Up doPlayerSendTextMessage(cid, 22, "You advanced from level " .. getMiningLevel(cid) .. " to level ".. (getMiningLevel(cid) + 1) .." in mining.") if ((getMiningLevel(cid)+1) == getMiningMaxLevel()) then doPlayerSendTextMessage(cid, 22, "Max level reached in mining.") end addMiningLevel(cid) doSendMagicEffect(getCreaturePosition(cid), math.random(28,30)) setMiningTry(cid, 0) end end function getMiningExpTo(level) return ((level*1.5)+((level+1)*7)) end function getMiningMaxLevel() return config.levels[#config.levels].level[#config.levels[#config.levels].level] end --------------------------- function onUse(cid, item, fromPosition, itemEx, toPosition) rock = { id = itemEx.itemid, uid = itemEx.uid, position = toPosition } player = { position = getCreaturePosition(cid) } if (getMiningLevel(cid) < 0) then setPlayerMiningLevel(cid, 0) end if (isInArray(config.rocks, rock.id)) then addMiningTry(cid) if (math.random(1,100) <= getMiningInfo(cid).chance) then local collected = math.random(getMiningInfo(cid).quantity.min, getMiningInfo(cid).quantity.max) doPlayerAddItem(cid, getStoneByRock(rock.id), collected) doPlayerSendTextMessage(cid, 22, "You got " .. collected .. " gold" .. " nuggets.") if (math.random(1,100) <= config.bonus_chance) then -- Bonus calc addMiningTry(cid, true) doSendAnimatedText(player.position, "Bonus!", COLOR_YELLOW) end event_rockCut(rock) else if (math.random(1,100) <= (10-getMiningInfo(cid).chance/10)) then doPlayerSendTextMessage(cid, 22, "You got nothing.") event_rockCut(rock) else doSendMagicEffect(rock.position, 3) doSendAnimatedText(rock.position, "Poff!", COLOR_WHITE) end end else doPlayerSendCancel(cid, "This can't be mined.") end end function event_rockCut(rock) addEvent(event_rockGrow, config.rock_delay * 1000, rock.position, rock.id) doTransformItem(rock.uid, 3610) doSendMagicEffect(rock.position, 3) doSendAnimatedText(rock.position, "Tack!", COLOR_RED) doItemSetAttribute(rock.uid, "name", "A trunk of " .. getItemNameById(rock.id)) end function event_rockGrow(rockPos, old_id) local rock = getThingFromPos(rockPos).uid doTransformItem(rock, old_id) doItemSetAttribute(rock, "name", getItemNameById(old_id)) doSendMagicEffect(rockPos, 3) end
  12. :///////////////////////////////////
  13. Essa circunferência barrigal aí tá demais...
  14. EUAHEAUHEAUEHAUEHAUEHAUHEA
  15. Fiquei com a cara queimada. :/
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...