Ir para conteúdo

Malandrinho

Membro
  • Registro em

  • Última visita

Tudo que Malandrinho postou

  1. alguem pode ajudar?
  2. Bom galera, peço ajuda de vocês com o sistema Shop system do gesior que não está entregando a storage para o jogador. htdocs/shopsystem.php globalevents/scripts/shop.lua alguem pode me ajudar por favor?
  3. Salve, salve galerinha do TibiaKing estou com um problema com o seguinte script no meu servidor 10.10. O problema é o seguinte, quando o jogador está com a storage que deixa o boneco piscando a montaria desaparece e aparece de novo, tem como alguem ajudar? Já tentei de varias maneiras consertar o erro mas não conseguir pós sou novo no ramo de scripter e não sei qual função retorna as montarias. Segue abaixo o script que utilizei feito por xWhiteWolf. creaturescripts\scripts function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) local killer = lastHitKiller[1] if isPlayer(killer) and (getCreatureName(cid) == "Gran Tower") then if (getGlobalStorageValue(GRANTOWER.FINALWINNER) ~= getCreatureName(killer)) then if getPlayerGuildId(killer) >= 1 then for index, creature in ipairs(getGranTowerPlayers()) do if getPlayerGuildId(creature) ~= getPlayerGuildId(killer) then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)), true) end end else for index, creature in ipairs(getGranTowerPlayers()) do if getPlayerStorageValue(creature, GRANTOWER.AURA) ~= -1 then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)), true) end end end if (getPlayerGuildId(killer) >= 1) then setGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID, getPlayerGuildId(killer)) for index, creature in ipairs(getGranTowerGuild(getPlayerGuildId(killer))) do setPlayerStorageValue(creature, GRANTOWER.AURA, 1) end end setPlayerStorageValue(killer, GRANTOWER.AURA, 1) addEvent(changeOutfit, 0, killer) setGlobalStorageValue(GRANTOWER.SAVELASTWINNER, getCreatureName(killer)) addEvent(doCreateMonster, 2 * 1000, "Gran Tower", GRANTOWER.TOWERPOSITION) setGlobalStorageValue(GRANTOWER.FINALWINNER, getCreatureName(killer)) setGlobalStorageValue(GRANTOWER.DESTROYCOUNT, (getGlobalStorageValue(GRANTOWER.DESTROYCOUNT) + 1)) doBroadcastMessage("[Gran Tower] The Gran Aura is with "..getCreatureName(killer)..", run to destroy the Grand Tower and take it.") end end return true end function onTarget(cid, target) if isPlayer(cid) and isMonster(target) and (getCreatureName(target) == "Gran Tower") then if (getGlobalStorageValue(GRANTOWER.FINALWINNER) == getCreatureName(cid)) then doPlayerSendCancel(cid, "Você não pode atacar o Gran Tower, proteja ele!") return false end end return true end function onStatsChange(cid, attacker, type, combat, value) if (type == STATSCHANGE_HEALTHLOSS) and isMonster(cid) and isPlayer(attacker) and (getCreatureName(cid) == "Gran Tower") then if (getGlobalStorageValue(GRANTOWER.FINALWINNER) == getCreatureName(attacker)) then return false end end return true end data\lib GRANTOWER = {} GRANTOWER.PREPARETIME = 2 -- Tempo até liberar a entrada para o evento. GRANTOWER.CLOSETIME = 10 -- Tempo em minutos de duração do evento. GRANTOWER.LEVEL = 80 -- Mínimo de level para participar do evento. GRANTOWER.MAXGUILD = 7 -- Máximo de players por guild dentro do evento. GRANTOWER.DATES = {{"Monday", "19:00"}, {"Tuesday", "19:00"}, {"Saturday", "19:00"}, {"Sunday", "22:30"}} -- Dias e horários que ocorrem o evento. GRANTOWER.ENTER = {x = 245, y = 641, z = 7} -- A posição da entrada do castelo, aonde os players são mandados pelo NPC. GRANTOWER.TOWERPOSITION = {x = 264, y = 613, z = 6} -- Posição aonde fica o Gran Tower (o monstro). GRANTOWER.AREA = {{x = 236, y = 587, z = 7}, {x = 283, y = 643, z = 5}} --[[A primeira posição é o canto superior esquerdo do mapa do castelo, e a segunda é o canto direito inferior OBSERVAÇÃO IMPORTANTE: O script foi modificado por mim (xWhiteWolf) para aguentar diferentes andares, apenas coloque a posição dos cantos e o primeiro até o ultimo andar que ele irá remover todo mundo em todos os andares quando alguém matar a gran tower, pra remover isso apenas coloque o z do mesmo andar da gran tower e apenas os membros que estão nesse andar serão teleportados, contudo isso pode ocasionar que pessoas consigam ficar dentro do castelo mesmo após o evento ter sido encerrado!]] GRANTOWER.AURAPERCENT = 0.8 --- porcentagem do dano que irá levar (0.8 = 80%) significa que ele ignora 20% de dano! (adicionado por xWhiteWolf) GRANTOWER.SHURIAURA = true --- colocar true/false se quiser ativar/desativar a aura de shurikens pro player que tem a gran aura. (adicionado por xWhiteWolf) --// Favor não mexer daqui para baixo se não souber oque está fazendo!!! GRANTOWER.EMPTYWINNER = "# [Nobody] #" GRANTOWER.PREPARE = 201405051746 GRANTOWER.RUNNING = 201405051747 GRANTOWER.AURA = 201405052018 GRANTOWER.DESTROYCOUNT = 201405051800 GRANTOWER.FINALWINNER = 201405051805 GRANTOWER.SAVELASTWINNER = 201405061333 GRANTOWER.SAVEWINNERGUILDID = 201405061403 function doPrepareGranTower() if ((getGlobalStorageValue(GRANTOWER.PREPARE) ~= 1) and (getGlobalStorageValue(GRANTOWER.RUNNING) ~= 1)) then setGlobalStorageValue(GRANTOWER.PREPARE, 1) addEvent(doStartGranTower, GRANTOWER.PREPARETIME * 60 * 1000) addEvent(doBroadcastMessage, ((GRANTOWER.PREPARETIME / 2) * 60 * 1000), "[Gran Tower] Missing "..tostring((GRANTOWER.PREPARETIME / 2)).." minutes NPC Melkrapo will release the entrance to the event, get ready!") doBroadcastMessage("[Gran Tower] The event will be started in "..tostring(GRANTOWER.PREPARETIME).." minutes, please prepare your weapons and your team.") else print("[Erro] Gran Tower tentou ser iniciado ja ligado, favor verificar o codigo. (Roksas).") end return true end function doStartGranTower() if ((getGlobalStorageValue(GRANTOWER.PREPARE) ~= -1) and (getGlobalStorageValue(GRANTOWER.RUNNING) ~= 1)) then setGlobalStorageValue(GRANTOWER.RUNNING, 1) setGlobalStorageValue(GRANTOWER.PREPARE, -1) setGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID, -1) setGlobalStorageValue(GRANTOWER.FINALWINNER, GRANTOWER.EMPTYWINNER) setGlobalStorageValue(GRANTOWER.SAVELASTWINNER, GRANTOWER.EMPTYWINNER) setGlobalStorageValue(GRANTOWER.DESTROYCOUNT, 0) doCreateMonster("Gran Tower", GRANTOWER.TOWERPOSITION) addEvent(doBroadcastMessage, ((GRANTOWER.CLOSETIME - 1) * 60 * 1000), "[Gran Tower] The event will be closed in one minute. Hurry up!") addEvent(doCloseGranTower, GRANTOWER.CLOSETIME * 60 * 1000) doBroadcastMessage("[Gran Tower] Open event! Run to destroy the Gran Tower.") else print("[Erro] Gran Tower tentou ser iniciado já ligado, favor verificar o código.") end return true end function doCloseGranTower() if ((getGlobalStorageValue(GRANTOWER.PREPARE) ~= 1) and (getGlobalStorageValue(GRANTOWER.RUNNING) ~= -1)) then for index, creature in ipairs(getGranTowerPlayers()) do doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature))) end for index, creature in ipairs(getPlayersOnline()) do if (getPlayerGuildId(creature) >= 1) then if getPlayerGuildId(creature) ~= getGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID) then setPlayerStorageValue(creature, GRANTOWER.AURA, -1) end end end setGlobalStorageValue(GRANTOWER.RUNNING, -1) if (getCreatureByName("Gran Tower")) then doRemoveCreature(getCreatureByName("Gran Tower"), true) end local TMP_WINNER = getGlobalStorageValue(GRANTOWER.FINALWINNER) doBroadcastMessage("[Gran Tower] The event was completed with "..tostring(getGlobalStorageValue(GRANTOWER.DESTROYCOUNT)).." wrecks to Gran Tower, the final winner was "..(TMP_WINNER)..".") setGlobalStorageValue(GRANTOWER.DESTROYCOUNT, -1) setGlobalStorageValue(GRANTOWER.SAVELASTWINNER, TMP_WINNER) setGlobalStorageValue(GRANTOWER.FINALWINNER, -1) local TMP_WINNER = nil end return true end function getGranTowerPlayers() -- xWhiteWolf local players = {} local andares = math.abs(GRANTOWER.AREA[1].z - GRANTOWER.AREA[2].z) for index, creature in ipairs(getPlayersOnline()) do local z = 0 local pos1 = {x = GRANTOWER.AREA[1].x, y = GRANTOWER.AREA[1].y, z = GRANTOWER.AREA[1].z} local pos2 = {x = GRANTOWER.AREA[2].x, y = GRANTOWER.AREA[2].y, z = GRANTOWER.AREA[2].z} for i = 0, andares do z = z or 0 pos1.z = pos1.z > pos2.z and pos2.z + z or pos1.z + z pos2.z = pos1.z z = 1 if isInArea(getThingPos(creature), pos1, pos2) then table.insert(players, creature) end end end return players end function getGranTowerGuild(guild_id) -- xWhiteWolf local players = {} local andares = math.abs(GRANTOWER.AREA[1].z - GRANTOWER.AREA[2].z) for index, creature in ipairs(getPlayersOnline()) do local z = 0 local pos1 = {x = GRANTOWER.AREA[1].x, y = GRANTOWER.AREA[1].y, z = GRANTOWER.AREA[1].z} local pos2 = {x = GRANTOWER.AREA[2].x, y = GRANTOWER.AREA[2].y, z = GRANTOWER.AREA[2].z} for i = 0, andares do z = z or 0 pos1.z = pos1.z > pos2.z and pos2.z + z or pos1.z + z pos2.z = pos1.z z = 1 if isInArea(getThingPos(creature), pos1, pos2) then if (getPlayerGuildId(creature) == guild_id) then table.insert(players, creature) end end end end return players end -- // Gran Aura \/ function newColor(n) local n = tonumber(n) or 0 local n = n + 19 return tonumber(n) or 0 end function newColor(n) local n = tonumber(n) or 132 local n = n - 19 return tonumber(n) or 132 end -- comentario: se a cor for preta o addon vai para branco sendo que o certo é diminuir 19.. local events = {} function changeOutfit(uid) -- arrumado por xWhiteWolf e adicionado a opção da Shuri local sec = 0.5 local temp = getCreatureOutfit(uid) if (type(temp) == "number") then return true end if getGlobalStorageValue(GRANTOWER.SAVELASTWINNER) ~= getCreatureName(uid) then if getGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID) ~= getPlayerGuildId(uid) then return true end end if GRANTOWER.SHURIAURA then local pos = getCreaturePosition(uid) local effectPos = { [1] = {x = pos.x - 2, y = pos.y - 2, z = pos.z}, [2] = {x = pos.x + 2, y = pos.y + 2, z = pos.z} } for i = 1, #effectPos do position = effectPos[i + 1] or effectPos[i - 1] doSendDistanceShoot(effectPos[i], position, 18) end end local outfit = { lookType = temp.lookType, lookHead = newColor(temp.lookHead), lookBody = newColor(temp.lookBody), lookLegs = newColor(temp.lookLegs), lookFeet = newColor(temp.lookFeet), lookAddons = getCreatureOutfit(uid).lookAddons, } doSetCreatureOutfit(uid, outfit, sec) local event = addEvent(function() if isCreature(uid) then changeOutfit(uid) end end, 3.0 * sec * 450) events[uid] = event return true end Data/creaturescripts local events = {} function onLogin(cid) if (getPlayerStorageValue(cid, GRANTOWER.AURA) ~= -1) then if getGlobalStorageValue(GRANTOWER.SAVELASTWINNER) ~= getCreatureName(cid) then if (getPlayerGuildId(cid) ~= getGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID)) then setPlayerStorageValue(cid, GRANTOWER.AURA, -1) end end local event = addEvent(function() if isCreature(cid) then changeOutfit(cid) end end, 0) events[cid] = event end return true end function onLogout(cid) if (getGlobalStorageValue(GRANTOWER.FINALWINNER) == getCreatureName(cid)) then doPlayerSendCancel(cid, "You cannot logout while Gran Tower is running.") return false end if events[cid] then stopEvent(events[cid]) end return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(cid) and isCreature(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then if getGlobalStorageValue(GRANTOWER.SAVELASTWINNER) ~= getCreatureName(cid) and getGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID) ~= getPlayerGuildId(cid) then return true end value = value - (math.ceil(value*(GRANTOWER.AURAPERCENT))) doTargetCombatHealth(cid, attacker, type, -value, -value, 255) doCreatureAddHealth(cid, value) return true end return true end Ficarei muito grato pela ajuda galerinha do TibiaKing. Dou Rep+.
  4. alguem sabe qual função retorna o id da montaria que o player ta usando? porque tenho um script que muda a cor do outfit e quando o player ta com a storage que deixa cor mudando a montaria aparece e desaparece, alguem pode me ajudar?

Informação Importante

Confirmação de Termo