Tudo que luanluciano93 postou
-
vocações e database
Se você usar gesior, existe uma função que verifica se é premium ... Website::getVocationName($player->getVocation()) https://github.com/gesior/Gesior2012/blob/master/pages/characters.php#L39
-
Premium account ficou free, é teleportado
@LeoTK a titulo de conhecimento ... • o evento onLogin não precisa ser registrado. • TRUE em maiúscula é gambiarra do TFS. não use-o • Se o personagem for premium você não precisa da variável "pos", portanto pode declarar ela depois da segunda verificação ... function onLogin(cid) if isPremium(cid) then setPlayerStorageValue(cid, 6787656, 1) elseif getPlayerStorageValue(cid, 6787656) == 1 and not isPremium(cid) then doPlayerSetTown(cid, 1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getPlayerPosition(cid), 240) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua Premium expirou!\nNao deixe de visitar nosso SHOP.") setPlayerStorageValue(cid, 6787656, 0) end return true end
-
[TFS 1.2] Bônus de Exp para quem estiver no Client 11
Em data/events/scripts/player.lua na função: Player:onGainExperience -- Extra xp to use client 11 if self:getClient().version == 1100 then exp = exp * 0.05 end
-
(Resolvido)Nivel alto não atacar nivel baixo
-- <event type="target" name="onTarget" script="onTarget.lua"/> local level = 450 function onTarget(cid, target) if not isPlayer(cid) or not isPlayer(target) then return true end if getPlayerLevel(cid) >= level and getPlayerLevel(target) < level then return false elseif getPlayerLevel(target) >= level and getPlayerLevel(cid) < level then return false end return true end NAO TESTADO
-
TFS [1.2] Proteção de diferença de level
Em data/events/scripts/creature.lua na função Creature:onTargetCombat(target): if self:isPlayer() and target:isPlayer() then local level = self:getLevel() / 2 if target:getLevel() < level and not table.contains({SKULL_RED, SKULL_BLACK, SKULL_YELLOW, SKULL_GREEN, SKULL_WHITE}, target:getSkull()) then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end Não testado
-
Look Runes Info
tfs OU otx? VERSÃO?
-
horario desatualizado
date_default_timezone_set("America/Sao_Paulo");
-
(Resolvido)teleport storage
versão da engine? TFS ou OTX?
-
(Resolvido)[Rain] Sistema de Chuva
Qual o script que vocÊ tem?
-
Bugando ao morrer no evento
local config = { redTeam = 1, blueTeam = 2, gametime = 2000, redTeamStorage = 2001, blueTeamStorage = 2002, outfitRed = {lookType = 128, lookHead = 94, lookAddons = 2, lookLegs = 94, lookBody = 94, lookFeet = 94}, outfitBlue = {lookType = 128, lookHead = 88, lookAddons = 2, lookLegs = 88, lookBody = 88, lookFeet = 88}, war = { fromPos = {x=638, y=711, z=7, stackpos=253}, toPos = {x=751, y=780, z=7, stackpos=253}, rewardRoom = {x=636,y=662,z=7,stackpos=1}, removePlayer = {x=518, y=840, z=7, stackpos=253} } } local function TpWinners(cid) for _, pid in ipairs(getPlayersOnline()) do if isInArea(getPlayerPosition(pid), config.war.fromPos, config.war.toPos) then doTeleportThing(pid, config.war.rewardRoom, false) end end end local function winKill(cid, team) addEvent(TpWinners, 5000, cid) setGlobalStorageValue(config.redTeamStorage, 0) setGlobalStorageValue(config.blueTeamStorage, 0) doTeleportThing(cid, config.war.removePlayer) if team == 1 then doBroadcastMessage("Red Team has won the event!") elseif team == 2 then doBroadcastMessage("Blue Team has won the event!") end end local function arenaDeath(cid, team) doTeleportThing(cid, config.war.removePlayer) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have died, you are eliminated from the event') setPlayerStorageValue(cid, 1001, 0) setPlayerStorageValue(cid, 1002, 1) doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) if team == 1 then setGlobalStorageValue(config.redTeamStorage, getGlobalStorageValue(2001) - 1) elseif team == 2 then setGlobalStorageValue(config.blueTeamStorage, getGlobalStorageValue(2002) - 1) end if getGlobalStorageValue(2001) == 1 then -- redStorage winKill(cid, 2) elseif getGlobalStorageValue(2002) == 1 then -- blueStorage winKill(cid, 1) end end function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true and getPlayerStorageValue(cid, 1001) > 0 then arenaDeath(cid, team) return false end return true end
-
(Resolvido)Memorial
@Thornes local storage = 9999 function onUse(player, item, fromPosition, target, toPosition, isHotkey) local resultId = db.storeQuery("SELECT `player_id` FROM `player_storage` WHERE `key` = " .. storage .. " AND `value` = 1;") if resultId ~= false then local message = "Em memória de:\n\n" repeat local resultId2 = db.storeQuery("SELECT `name` FROM `players` WHERE `id` = " .. result.getDataInt(resultId, "player_id") .. ";") if resultId2 ~= false then local playerName = result.getString(resultId2, "name") message = ""..message.."".. playerName ..".\n" result.free(resultId2) end until not result.next(resultId) result.free(resultId) player:popupFYI(message) else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Não existe nenhum nome gravado.") end return true end
-
Town Portal System (based Dota 2)
-- Town Portal Scroll System based in Dota 2 local config = { portalId = 11796, -- change to portal item id portalTime = 30, -- portal duration in seconds scrollId = 14324, -- change to scroll item id effect = CONST_ME_POFF -- effect id or CONST that appears at the end of time } local function checkPortal(uid, pos) local position = Position(pos) if position then local tile = Tile(position) if tile then local item = tile:getItemById(config.portalId) if item then item:remove() item:getPosition():sendMagicEffect(config.effect) else local playerId = Player(uid) if playerId then local portal = Game.createItem(config.portalId, 1, position) if portal then if playerId:getParty() then portal:setAttribute(ITEM_ATTRIBUTE_TEXT, playerId:getParty()) end portal:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, playerId:getName()) end addEvent(checkPortal, config.portalTime * 1000, uid, pos) end end end end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item:getId() == config.scrollId then checkPortal(player:getGuid(), player:getPosition()) else if not player:isPzLocked() and not player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT) then local itemParty = item:getAttribute(ITEM_ATTRIBUTE_TEXT) local itemDescription = item:getAttribute(ITEM_ATTRIBUTE_DESCRIPTION) if itemParty then local party = player:getParty() if party then if party == itemParty then player:teleportTo(player:getTown():getTemplePosition(), true) return true else player:popupFYI("You do not participate in the portal creator's party.") end end elseif itemDescription then if player:getName() == itemDescription then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You isn't the owner.") return true end end else player:popupFYI("You are PZ locked or in battle.") end end return true end
-
Star System - Aegis, mate 3 receba o prêmio
@Vinni012 substitui o arquivo star.lua
-
Bugando ao morrer no evento
war_death local config = { redTeam = 1, blueTeam = 2, gametime = 2000, redTeamStorage = 2001, blueTeamStorage = 2002, outfitRed = {lookType = 128, lookHead = 94, lookAddons = 2, lookLegs = 94, lookBody = 94, lookFeet = 94}, outfitBlue = {lookType = 128, lookHead = 88, lookAddons = 2, lookLegs = 88, lookBody = 88, lookFeet = 88}, war = { fromPos = {x=638, y=711, z=7, stackpos=253}, toPos = {x=751, y=780, z=7, stackpos=253}, rewardRoom = {x=636,y=662,z=7,stackpos=1}, removePlayer = {x=518, y=840, z=7, stackpos=253} } } local function TpWinners(cid) for _, pid in ipairs(getPlayersOnline()) do if isInArea(getPlayerPosition(pid), config.war.fromPos, config.war.toPos) then doTeleportThing(pid, config.war.rewardRoom, false) end end end local function winKill(cid, team) addEvent(TpWinners, 5000, cid) setGlobalStorageValue(config.redTeamStorage, 0) setGlobalStorageValue(config.blueTeamStorage, 0) doTeleportThing(cid, config.war.removePlayer) if team == 1 then doBroadcastMessage("Red Team has won the event!") elseif team == 2 doBroadcastMessage("Blue Team has won the event!") end end local function arenaDeath(cid, team) doTeleportThing(cid, config.war.removePlayer) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have died, you are eliminated from the event') setPlayerStorageValue(cid, 1001, 0) setPlayerStorageValue(cid, 1002, 1) doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) if team == 1 then setGlobalStorageValue(config.redTeamStorage, getGlobalStorageValue(2001) - 1) elseif team == 2 then setGlobalStorageValue(config.blueTeamStorage, getGlobalStorageValue(2002) - 1) end if getGlobalStorageValue(2001) == 1 then -- redStorage winKill(cid, 2) elseif getGlobalStorageValue(2002) == 1 then -- blueStorage winKill(cid, 1) end end function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true and getPlayerStorageValue(cid, 1001) > 0 then arenaDeath(cid, team) return false end return true end ctf_death local config = { redTeam = 3, blueTeam = 4, redSide = {x=676, y=499, z=7, stackpos=253}, blueSide = {x=744, y=520, z=7, stackpos=253}, flagDropRed = 'Red Team has dropped the flag.', flagDropBlue = 'Blue Team has dropped the flag.' } function onPrepareDeath(cid, deathList) if not isPlayer(cid) and getPlayerStorageValue(cid, 1001) < 1 then return true end local flagPosRed = {x=676,y=503,z=7,stackpos=0} local flagPosBlue = {x=744,y=523,z=7,stackpos=0} local hasFlag = getPlayerStorageValue(cid, 2015) local killer = 1 local assister = 2 local kills = 65530 local deaths = 65529 local getDeaths = getPlayerStorageValue(cid,deaths) local getKills = getPlayerStorageValue(deathList[killer],kills) if getPlayerStorageValue(cid, 1001) == config.redTeam or getPlayerStorageValue(cid, 1001) == config.blueTeam then if getPlayerStorageValue(cid, 1001) == config.redTeam then setPlayerStorageValue(cid, 1003, 1) doTeleportThing(cid, config.redSide) elseif getPlayerStorageValue(cid, 1001) == config.blueTeam then setPlayerStorageValue(cid, 1004, 1) doTeleportThing(cid, config.blueSide) end doRemoveCondition(cid,CONDITION_INFIGHT) if getPlayerStorageValue(deathList[killer],kills) < 1 then setPlayerStorageValue(deathList[killer], kills, 1) else setPlayerStorageValue(deathList[killer], kills, getKills + 1) end if getPlayerStorageValue(cid,deaths) < 1 then setPlayerStorageValue(cid,deaths, 1) else setPlayerStorageValue(cid,deaths, getDeaths + 1) end if hasFlag >= 1 then if getPlayerStorageValue(cid,1001) == config.redTeam then doSetItemActionId(getThingFromPos(flagPosBlue).uid, 100) doBroadcastMessage(config.flagDropRed) elseif getPlayerStorageValue(cid, 1001) == config.blueTeam then doSetItemActionId(getThingFromPos(flagPosRed).uid, 100) doBroadcastMessage(config.flagDropBlue) end doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You dropped the flag!') setPlayerStorageValue(cid,2015, 0) if getPlayerStorageValue(deathList[killer],65532) < 1 then setPlayerStorageValue(deathList[killer], 65532, 1) else setPlayerStorageValue(deathList[killer], 65532, getPlayerStorageValue(deathList[killer],65532) + 1) end if isPlayer(deathList[assister]) == true then if getPlayerStorageValue(deathList[assister],65531) < 1 then setPlayerStorageValue(deathList[assister], 65531, 1) else setPlayerStorageValue(deathList[assister], 65531, getPlayerStorageValue(deathList[assister],65531) + 1) end end end return false end return true end
-
Bugando ao morrer no evento
@Lisbeky war_death local config = { redTeam = 1, blueTeam = 2, gametime = 2000, redTeamStorage = 2001, blueTeamStorage = 2002, outfitRed = {lookType = 128, lookHead = 94, lookAddons = 2, lookLegs = 94, lookBody = 94, lookFeet = 94}, outfitBlue = {lookType = 128, lookHead = 88, lookAddons = 2, lookLegs = 88, lookBody = 88, lookFeet = 88}, war = { fromPos = {x=638, y=711, z=7, stackpos=253}, toPos = {x=751, y=780, z=7, stackpos=253}, rewardRoom = {x=636,y=662,z=7,stackpos=1}, removePlayer = {x=518, y=840, z=7, stackpos=253} } } local function TpWinners(cid) for _, pid in ipairs(getPlayersOnline()) do if isInArea(getPlayerPosition(pid), config.war.fromPos, config.war.toPos) then doTeleportThing(pid, config.war.rewardRoom, false) end end end local function winKill(cid, team) addEvent(TpWinners, 5000, cid) setGlobalStorageValue(config.redTeamStorage, 0) setGlobalStorageValue(config.blueTeamStorage, 0) doTeleportThing(cid, config.war.removePlayer) if team = 1 then doBroadcastMessage("Red Team has won the event!") elseif team == 2 doBroadcastMessage("Blue Team has won the event!") end end local function arenaDeath(cid, team) doTeleportThing(cid, config.war.removePlayer) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have died, you are eliminated from the event') setPlayerStorageValue(cid, 1001, 0) setPlayerStorageValue(cid, 1002, 1) doRemoveCondition(cid,CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_OUTFIT) if team == 1 then setGlobalStorageValue(config.redTeamStorage, getGlobalStorageValue(2001) - 1) elseif team == 2 then setGlobalStorageValue(config.blueTeamStorage, getGlobalStorageValue(2002) - 1) end if getGlobalStorageValue(2001) == 1 then -- redStorage winKill(cid, 2) elseif getGlobalStorageValue(2002) == 1 then -- blueStorage winKill(cid, 1) end end function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true and getPlayerStorageValue(cid, 1001) > 0 then arenaDeath(cid, team) return false end return true end
-
(Resolvido)Nivel alto não atacar nivel baixo
Com isso talvez !? doRemoveCondition(cid, CONDITION_INFIGHT)
-
Bugando ao morrer no evento
Isso não é bem vindo aqui. @Lisbeky poste o seu creaturescript.xml e seu login.lua do creaturescript
-
Bugando ao morrer no evento
Poste os dois scripts aqui ...
-
Item que teleporta o player para house
REMOVIDO
-
Star System - Aegis, mate 3 receba o prêmio
@Vinni012 local config = { monsterName = "star", countKillMonster = 3, storageKillMonster = 6665, storagePoints = 7775 } function onDeath(cid, corpse, deathList) local killer = deathList[1] local pos = getCreaturePosition(killer) if not isMonster(cid) or not isPlayer(killer) then return true end if getPlayerStorageValue(killer, config.storageKillMonster) == -1 then setPlayerStorageValue(killer, config.storageKillMonster, 0) end setPlayerStorageValue(killer, config.storageKillMonster, getPlayerStorageValue(killer, config.storageKillMonster) + 1) if getPlayerStorageValue(killer, config.storageKillMonster) == config.countKillMonster then doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) if getPlayerStorageValue(killer, config.storagePoints) == -1 then setPlayerStorageValue(killer, config.storagePoints, 0) end setPlayerStorageValue(killer, storagePoints, getPlayerStorageValue(killer, config.storagePoints) + 1) setPlayerStorageValue(killer, config.storageKillMonster, 0) doPlayerSendTextMessage(killer, MESSAGE_STATUS_CONSOLE_RED, "You receive 1 vip point by kill ".. config.countKillMonster .."x the monster ".. config.monsterName ..".") else doPlayerSendTextMessage(killer, MESSAGE_STATUS_CONSOLE_BLUE, "You killed ".. getPlayerStorageValue(killer, config.storageKillMonster) .." of ".. config.countKillMonster .." ".. config.monsterName ..", There are still ".. config.countKillMonster - (getPlayerStorageValue(killer, config.storageKillMonster)) .." ".. config.monsterName .." left to receive the reward.") end return true end Mas eu recomendaria fazer por onKill ao invés de onDeath
- [OTX3 8.60] STYLLER 2019
-
Town Portal System (based Dota 2)
-- Town Portal Scroll System based in Dota 2 local config = { portalId = 11796, -- change to portal item id portalTime = 30, -- portal duration in seconds scrollId = 14324, -- change to scroll item id effect = CONST_ME_POFF -- effect id or CONST that appears at the end of time } local function checkPortal(uid, pos) local position = Position(pos) if position then local tile = Tile(position) if tile then local item = tile:getItemById(config.portalId) if item then item:remove() item:getPosition():sendMagicEffect(config.effect) else local playerId = Player(uid) if playerId then local portal = Game.createItem(config.portalId, 1, position) if portal then if playerId:getParty() then portal:setCustomAttribute("party", playerId:getParty()) else portal:setCustomAttribute("owner", playerId:getName()) end end addEvent(checkPortal, config.portalTime * 1000, uid, pos) end end end end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item:getId() == config.scrollId then checkPortal(player:getGuid(), player:getPosition()) else if not player:isPzLocked() and not player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT) then local itemParty = item:getCustomAttribute("party") local itemName = item:getCustomAttribute("name") if itemParty then if player:getParty() == itemParty then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You do not participate in the portal creator's party.") end elseif itemName then if player:getName() == itemName then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You isn't the owner.") end else player:popupFYI("You isn't the owner.") end else player:popupFYI("You are PZ locked or in battle.") end end return true end
-
(Resolvido)Memorial
local storage = 9999 function onUse(cid, item, frompos, item2, topos) local result = db.getResult("SELECT `player_id` FROM `player_storage` WHERE `key` = " .. storage .. " AND `value` = 1;") if(result:getID() ~= -1) then local message = "Em memória de:\n\n" repeat local playerId = result:getDataInt("player_id") local database = db.getResult("SELECT `name` FROM `players` WHERE `id` = " .. db.escapeString(playerId) .. ";") if(database:getID() ~= -1) then local playerName = database:getDataString("name") message = ""..message.."".. playerName ..".\n" database:free() end until not(result:next()) result:free() doPlayerPopupFYI(cid, message) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não existe nenhum nome gravado.") end return true end
-
Ajuda com Hearty System
function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) ~= getPlayerIp(target) then if getPlayerLevel(target) >= 80 then local heart = doPlayerAddItem(cid, 5943, 1) if heart then doItemSetAttribute(heart, "name", "" .. getPlayerName(target) .. " Heart's") doItemSetAttribute(heart, "description", "Killed at Level ".. getPlayerLevel(target) .." by ".. getPlayerName(cid) ..". " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "(Unjustified)" or "(Justified)")) end end elseif getPlayerIp(cid) == getPlayerIp(target) then doPlayerAddExp(cid, -10000) end end return true end
-
[OTX3 8.60] STYLLER 2019
Obrigado pelo comentário. Fiz um teste, testei o npc Dark Rodo e aqui todas as runas e potions estão normais, dá para comprar 100. Lembrando que a quantidade que aparece leva em conta a capacidade e dinheiro do personagem. TÓPICO ~ Update 24/09/2019 • Adicionado trainer offline. • Adicionado duca evento. • Adicionado zumbi evento. • Reajustado battlefield evento. • Adicionado trofeus para zumbi e duca evento. • Adicionado a função eventActive(). • Fixado alguns bugs no mapa.