Ir para conteúdo

roriscrave

Conde
  • Total de itens

    545
  • Registro em

  • Última visita

Tudo que roriscrave postou

  1. Script é esse: local config = { useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')), advancedFragList = getBooleanFromString(getConfigValue('advancedFragList')) } function onSay(cid, words, param, channel) if(not config.useFragHandler) then return false end local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = { name = result:getDataString("name"), level = result:getDataInt("level"), date = result:getDataInt("date") } if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } if(config.advancedFragList) then local result = "Frags de hoje: " .. size.day .. ". Red skull= 5. Black Skull= 7." if(size.day > 0) then for _, content in ipairs(contents.day) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags na semana: " .. (size.day + size.week) .. ". Red Skull= 15. Black Skull= 20." if(size.week > 0) then for _, content in ipairs(contents.week) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags no mes: " .. (size.day + size.week + size.month) .. ". Red Skull= 25. Black Skull= 30." if(size.month > 0) then for _, content in ipairs(contents.month) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then result = result .. "\nYour " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd) end doPlayerPopupFYI(cid, result) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.") if(size.day > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").") end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd)) end end return true end
  2. Como titulo diz, no meu server o comando !frags, aparece uma mensagem no meio da tela, sendo assim quando você tem muito frags ele buga. Então eu queria o comando !frags para aparecer no default.
  3. Bom cara, mas eu queria que o item que fosse removido não fosse gold. Tem como fazer isso?
  4. Queria 2 npcs, como fala no titulo: 1 - Voê da um item pro NPC e ganha uma spell. 2 - Se você tiver a storage X, é so ir no NPC e trocar por uma outra spell.
  5. Tem como eu colocar pra ser automático? Tipo todo dia as 14:00 horas e as 20:00 horas. Ocorre esse evento? Outra dúvida: Se abrir pra 10 players, e entrarem apenas 9. O evento não começa? Os 9 ficam presos na arena? Vlw.
  6. Tenho um servidor de narutibia, e quero criar um forum para meu servidor. Mas eu não sei NADA sobre este assunto: 1- Qual forum vocês me indicam? 2- Tem um tutorial bacana para me enviar? Darei rep.
  7. Cara está funcionando sim, desculpa ai. É que eu estava errando aqui: coloquei como no seu script: (E. na verdade esses 2 id's devem ser iguais). Muito obrgiado rep+ para você. local config = { exhaustionSeconds = 15, -- exausted em segundos trapId = [color=#ff0000]3456[/color], -- id do item do trap timeRemove = 30, -- segundos para remover o trap storageUse = 34538 -- storage usado. } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 10) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) setCombatParam(combat, COMBAT_PARAM_CREATEITEM, [color=#ff0000]2711[/color]) local arr = { { 0, 0, 0, 0, 0, 0, }, { 0, 0, 0, 0, 0, 0, }, { 0, 0, 1, 1, 1, 0, }, { 0, 0, 1, 2, 1, 0, }, { 0, 0, 1, 1, 1, 0, }, { 0, 0, 0, 0, 0, 0, }, { 0, 0, 0, 0, 0, 0, }, } local area = createCombatArea(arr) setCombatArea(combat, area) function onCastSpell(cid, var) if(exhaustion.check(cid, config.storageUse) == TRUE) then if (exhaustion.get(cid, config.storageUse) >= 60) then doPlayerSendCancel(cid, "Voçê só pode usar após [" .. math.floor(exhaustion.get(cid, config.storageUse) / 60 + 1) .."] minutos.") end if (exhaustion.get(cid, config.storageUse) <= 60) then doPlayerSendCancel(cid, "Voçê só pode usar após [" .. exhaustion.get(cid, config.storageUse).."] segundos.") end return false end doCombat(cid, combat, var) local pos = getCreaturePosition(getCreatureTarget(cid)) posTile1 = {x=pos.x+1,y=pos.y+1,z=pos.z,stackpos=1} posTile2 = {x=pos.x+1,y=pos.y,z=pos.z,stackpos=1} posTile3 = {x=pos.x+1,y=pos.y-1,z=pos.z,stackpos=1} posTile4 = {x=pos.x,y=pos.y-1,z=pos.z,stackpos=1} posTile5 = {x=pos.x-1,y=pos.y-1,z=pos.z,stackpos=1} posTile6 = {x=pos.x-1,y=pos.y,z=pos.z,stackpos=1} posTile7 = {x=pos.x-1,y=pos.y+1,z=pos.z,stackpos=1} posTile8 = {x=pos.x,y=pos.y+1,z=pos.z,stackpos=1} posAll = {posTile1,posTile2,posTile3,posTile4,posTile5,posTile6,posTile7,posTile8} exhaustion.set(cid, config.storageUse, config.exhaustionSeconds) addEvent(removeTrap, config.timeRemove*1000, posAll) return true end function removeTrap(posAll) for i=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[i].x,y=posAll[i].y,z=posAll[i].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == config.trapId then doRemoveItem(removeTile.uid) end end end end
  8. Pô cara, com esse ai os items não estão sumindo
  9. Outro erro: [26/07/2012 09:48:03] [Error - LuaScriptInterface::loadFile] data/spells/scripts/naruto/bunshin.lua:21: 'end' expected (to close 'function' at line 1) near '<eof>' [26/07/2012 09:48:03] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/naruto/bunshin.lua) [26/07/2012 09:48:03] data/spells/scripts/naruto/bunshin.lua:21: 'end' expected (to close 'function' at line 1) near '<eof>' Acho melhor deixar queto cara, tá te dando um trabalhão.
  10. Eu coloquei para soltar os items no target. (Mas só mexi no spell.xml)
  11. Deu esse erro: [Warning - Event::loadScript] Event onCastSpell not found (data/spells/scripts/naruto/bunshin.lua)
  12. Outro erro: [quote [Error - LuaScriptInterface::loadFile] data/spells/scripts/naruto/bunshin.lua:21: 'end' expected (to close 'function' at line 1) near '<eof>' [Warning - Event::loadScript] Cannot load script (data/spells/scripts/naruto/bunshin.lua) data/spells/scripts/naruto/bunshin.lua:21: 'end' expected (to close 'function' at line 1) near '<eof>'
  13. Deu esse erro: [Error - LuaScriptInterface::loadFile] data/spells/scripts/naruto/bunshin.lua:21: 'end' expected (to close 'if' at line 10) near '<eof>' [Warning - Event::loadScript] Cannot load script (data/spells/scripts/naruto/bunshin.lua) data/spells/scripts/naruto/bunshin.lua:21: 'end' expected (to close 'if' at line 10) near '<eof>'
  14. Isso mesmo que você falou, atrás é pz. Porem se o player tentar sumonar o monstro, a magia sai mas o monstro não é sumonado e aparece esse erro no distro: [Error - Spell Interface] data/spells/scripts/naruto/bunshin.lua:onCastSpell Description: (luaSetCreatureOutfit) Creature not found
  15. Editei lá encima, dá uma olhada. Ta com SS agora.
  16. Cara, acho que você não entendeu o que eu quero. Acho que me expliquei mau. Tipo, essa magia ai funciona, porem de você usar ela quando esta dentro dos TREINERS, aparece este erro ai, e não sumona a criatura.
  17. O erro que estava dando saiu, mas agora não está removendo os items.
  18. Vlw ai cara, você cunhece msm, quando puder dar rep+ te darei.
  19. Deu esse erro aqui cara, você sabe remover? [Error - Spell Interface] data/spells/scripts/test.lua:onCastSpell Description: data/spells/scripts/test.lua:49: attempt to perform arithmetic on global 'timeRemove' (a nil value) stack traceback: data/spells/scripts/test.lua:49: in function <data/spells/scripts/test.lua:27>
  20. Fica sim cara, eu coloquei ela no meu server. Quando você fala a magia sumona o bixo, que você escolheu para a magia.
  21. Meu server tem uma magia de summon, mas quando player está nos treiner e tenta sumonar, da o seguinte erro: [Error - Spell Interface] data/spells/scripts/sumon.lua:onCastSpell Description: (luaSetCreatureOutfit) Creature not found Spell: function onCastSpell(cid, var) local playerpos = getPlayerPosition(cid) local cloth = getCreatureOutfit(cid) local health = getCreatureHealth(cid) local maxhealth = getCreatureMaxHealth(cid) local MaximoSummon = 2 --- Maximo de Monstros Sumonados!! No Caso So Posso Sumonar 2 Clones local summons = getCreatureSummons(cid) if(table.maxn(summons) < MaximoSummon) then -- no summons local clone = doCreateMonster("clone", playerpos) doConvinceCreature(cid, clone) setCreatureMaxHealth(clone, maxhealth) doCreatureAddHealth(clone, health) doSetCreatureOutfit(clone, cloth, -1) doSendMagicEffect(playerpos, 2) return TRUE end end Quem ajudar rep++. VERDE: Player VERMELHO: Trainer
  22. Ae parceir, você conhece d+. Deu certinho. Só que acabou meus rep de hoje, amanha irei te dar rep. Pode me reponder só o que você mudou?
  23. Vlw ae Jhon992, funcionou certinho,irei dar rep pra vc e para o Tchubacka que tentou ajudar. Obrigado. _______________________________ EDIT: Só uma dúvida que ficou. Na magia de trap para o item sumir eu teria que modificar la no items.xml, e colocar ele tipo o magic wall. Queria saber se é possivel modificar essa spell para que não precise mudar o item la no item.xml, já que vou criar varios tipos de trap.
  24. No meu server tem uma spell que uso tanto para player quanto para monstros. Porém ela está dando bug. Que acontece quando o monstro solta spell e o jogador mata o monstro antes da spell terminar. local combats = {} local count = 5 local combatTypes = {1,3} local combatEffects = {340} local combatDistanceEffects = {1} local combatFormulas = {{-99, -9, -9, -99}} local delays = {300,100, 100, 100,100,200,200,200} for i = 1, count do local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, combatTypes[((i-1) % #combatTypes)+1]) setCombatParam(combat, COMBAT_PARAM_EFFECT, combatEffects[((i-1) % #combatEffects)+1]) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, combatDistanceEffects[((i-1) % #combatDistanceEffects)+1]) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, unpack(combatFormulas[((i-1) % #combatFormulas)+1])) combats[i] = combat end local function onCastSpellDelayed(cid, combat, var, combat_id) if(isCreature(variantToNumber(var)) and not getTileInfo(getThingPosition(variantToNumber(var))).protection) then doCombat(cid, combat[combat_id], var) if(combat[combat_id+1] ~= nil) then addEvent(onCastSpellDelayed, delays[((combat_id-1) % #delays)+1], cid, combats, var, combat_id+1) end end end function onCastSpell(cid, var) onCastSpellDelayed(cid, combats, var, 1) return true end O erro é o seguinte: [Error - Spell Interface] In a timer event called from: data/spells/scripts/novas\spell.lua:onCastSpell Description: (luaDoCombat) Creature not found Darei rep+
  25. Deu não cara, a magia não está com delay de 15sec.
  • Quem Está Navegando   0 membros estão online

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