Jump to content

Strubol

Campones
  • Posts

    3
  • Joined

  • Last visited

Reputation Activity

  1. Upvote
    Strubol reacted to Rafaellm in "p" Points System V1.0   
    P Points System
     
     
     
    Como funciona :
     
    O sistema funciona como uma recompensa ao player por ficar online por um certo tempo. O player, ao ficar online por um certo intervalo de tempo programado no código, receberá uma quantidade de pontos "P" a qual também se pode alterar.
     
    O objetivo foi fazer com que os players se sintam incentivados a ficar online por um maior período de tempo para que recebam tais moedas. Essa é, definitivamente, uma forma fácil de se alcançar um número maior de players online, já que a ideia foi retirada de um MMORPG online de grande sucesso.
    Como utilizar :
     
    Como o sistema tem como foco dar uma recompensa ao player, no caso pontos P, estes, podem ser utilizados no comercio, em npcs, ou até mesmo na entrada de locais. Sua sintaxe é muito maleável e se encaixa em quaquer requisito desejado.
    Instalação :
     
    Primeiramente, execute a seguinte QUERY em seu banco de dados :
     
    Em seguida, crie um arquivo com a extensão .lua chamado "points.lua" em "data/creaturescripts/scripts" e adicione o código abaixo :
     
     
    Ainda em creaturescripts, abra o arquivo "creaturescripts.xml" e adicione a seguinte TAG:
     
     
    Agora, em "data/globalevents/script" crie um arquivo com a extensão .lua também chamado "points.lua" e cole o seguinte código :
     
     
     
    E em "globalevents.xml" cole a seguinte TAG:
     
     
    Em seguida vá em "data/talkactions/scripts", crie um arquivo com extensão .lua chamado "points.lua" e adicione o seguinte código :
     
     
    E em "talkactions.xml" adicione a TAG :
     
     
    Para finalizar, vá em "data/lib/050-function.lua" e na última linha, adicione as funções abaixo :
     
     
    Fim, o sistema está instalado.
     
    Como configurar :
     
    A parte da configuração é a mais fácil, apenas edite :
     
     
    Quer utilizar o sistema em um npc, ou action, ou algum outro sistema e não sabe como? Simples, apenas use as seguintes funções :
     
    getPoints(cid) A função retorna a quantidade de pontos do player.
     
    doPlayerAddPoints(cid, quant) A função adiciona a quantidade(quant) de pontos ao player.
     
    doPlayerRemovePoints(cid, quant) A função remove a quantidade(quant) de pontos do player.
     
    Ilustração :
     
    FOTO
     
    Aí está galera, espero que gostem, e, para os preguiçosos, disponibilizei o download do sistema completo:
     
    Download Completo -> DOWNLOAD
     
    Scan download -> Scan
     
    Abraços.
  2. Upvote
    Strubol reacted to Mulizeu in Como Arruma Esse Bug?   
    Tente assim
     

    function onAttack(cid) kickPlayerFromZombiesArea(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "BOOM! You are dead.") local players = getZombiesEventPlayers() if(#players <= 1) then local winner = players[1] if(winner) then doPlayerAddItem(winner, 2157, 5, true) doPlayerAddItem(winner, 6119, 1, true) doPlayerSendTextMessage(winner, MESSAGE_STATUS_CONSOLE_BLUE, "You won zombies arena event.") doBroadcastMessage("After " .. os.time() - getPlayerZombiesEventStatus(winner) .. " seconds of fight " .. getCreatureName(winner) .. " won Zombie Arena Event in game versus " .. getStorage(ZE_ZOMBIES_SPAWNED) .. " zombies!") kickPlayerFromZombiesArea(winner) else doBroadcastMessage("Zombie arena event finished! No one win?!?!?! WTF!") end doSetStorage(ZE_STATUS, 0) doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS) doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0) doSetStorage(ZE_ZOMBIES_SPAWNED, 0) local width = (math.max(ZE_spawnFromPosition.x, ZE_spawnToPosition.x) - math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)) / 2 + 1 local height = (math.max(ZE_spawnFromPosition.y, ZE_spawnToPosition.y) - math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)) / 2 + 1 local centerPos = {x=math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)+width,y=math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)+height,z=ZE_spawnFromPosition.z} for z = math.min(ZE_spawnFromPosition.z, ZE_spawnToPosition.z), math.max(ZE_spawnFromPosition.z, ZE_spawnToPosition.z) do centerPos.z = z for i, uid in pairs(getSpectators(centerPos, width, height, false)) do if(isMonster(uid)) then doRemoveCreature(uid) end end end end end function onStatsChange(target, cid, changetype, combat, value) if((cid and isMonster(cid) and getCreatureName(cid) == "Zombie Event") or (isInRange(getThingPosition(target), ZE_spawnFromPosition, ZE_spawnToPosition) and changetype == STATSCHANGE_HEALTHLOSS and math.abs(value) >= getCreatureHealth(target))) then doCreatureAddHealth(target, getCreatureMaxHealth(target)) loseOnZombieArena(target) return false end return true end
  3. Upvote
    Strubol reacted to Demonbholder in Como Arruma Esse Bug?   
    Tente:
     

    function loseOnZombieArena(cid) kickPlayerFromZombiesArea(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "BOOM! You are dead.") local players = getZombiesEventPlayers() if(#players <= 1) then local winner = players[1] if(winner) then doPlayerAddItem(winner, 2157, 5, true) doPlayerAddItem(winner, 6119, 1, true) doPlayerSendTextMessage(winner, MESSAGE_STATUS_CONSOLE_BLUE, "You won zombies arena event.") doBroadcastMessage("After " .. os.time() - getPlayerZombiesEventStatus(winner) .. " seconds of fight " .. getCreatureName(winner) .. " won Zombie Arena Event in game versus " .. getStorage(ZE_ZOMBIES_SPAWNED) .. " zombies!") kickPlayerFromZombiesArea(winner) else doBroadcastMessage("Zombie arena event finished! No one win?!?!?! WTF!") end doSetStorage(ZE_STATUS, 0) doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS) doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0) doSetStorage(ZE_ZOMBIES_SPAWNED, 0) local width = (math.max(ZE_spawnFromPosition.x, ZE_spawnToPosition.x) - math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)) / 2 + 1 local height = (math.max(ZE_spawnFromPosition.y, ZE_spawnToPosition.y) - math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)) / 2 + 1 local centerPos = {x=math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)+width,y=math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)+height,z=ZE_spawnFromPosition.z} for z = math.min(ZE_spawnFromPosition.z, ZE_spawnToPosition.z), math.max(ZE_spawnFromPosition.z, ZE_spawnToPosition.z) do centerPos.z = z if getSpectators(centerPos, width, height, false) then for i, uid in pairs(getSpectators(centerPos, width, height, false)) do if(isMonster(uid)) then doRemoveCreature(uid) end end end end end end function onStatsChange(target, cid, changetype, combat, value) if((cid and isMonster(cid) and getCreatureName(cid) == "Zombie Event") or (isInRange(getThingPosition(target), ZE_spawnFromPosition, ZE_spawnToPosition) and changetype == STATSCHANGE_HEALTHLOSS and math.abs(value) >= getCreatureHealth(target))) then doCreatureAddHealth(target, getCreatureMaxHealth(target)) loseOnZombieArena(target) return false end return true end
  4. Upvote
    Strubol reacted to Mulizeu in Como Arruma Esse Bug?   
    Ixe cara to cançado agr amanha eu vejo blz.
  5. Upvote
    Strubol reacted to 6662597 in Comedo De Carnissa- Meu 3° Monstro   
    VA EM DATA/MONSTERS COPIA ALGUMA PASTA DE QUALUQER MONSTRO E COLE APAGUE TUDO Q ESTIVER DENTRO E PONHA \/
     
     
     
     
     
    DPOIS VA EM MONSTROS.XML ENTRE E PONHA \/
     
     
     
     
     
    PRONTO!!! COMENTEM!!!!
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...