
Tudo que Noob II postou
-
(Resolvido)Premium Scroll
Posta teu config.lua ai
-
Help, dropstone.lua
Poste aqui o dropstone.lua e se necessario o some functions tbm
-
(Resolvido)[Pedido] Comando !withdraw
Fiquei sem internet por 1 dia e não deu tempo ajudar, mas vi que o membro acima já lhe passou um script. Mas se quiser usar o seu próprio script olha ai, testei e tá funcionando normal function onSay(cid, words, param) if getPlayerTown(cid) == 24 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot withdraw money while being in Rookgaard.") return true end if isPlayer(cid) == TRUE and param ~= nil then if getTilePzInfo(getPlayerPosition(cid)) == TRUE then if tonumber(param) ~= nil then param = tonumber(param) if getPlayerBalance(cid) >= param then doPlayerSetBalance(cid, getPlayerBalance(cid) - param) doPlayerAddMoney(cid, param) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Here you are, ".. param .." gold.") else doPlayerSendCancel(cid, "You do not have enough money.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "" .. param .. " is not a known currency value. Use numbers only. -> ex: 5000") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "You may only use this command while in a protection zone.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end return true end
-
BUG Script Forjar itens
function onUse(cid, item, item2, frompos, topos, pos) local config = { ["Magic Plate Armor"] = {t1=2177,t2=2178,t3=2195}, } local r1 = {x = 189, y = 131, z = 7, stackpos= 1} local r2 = {x = 191, y = 131, z = 7, stackpos= 2} local r3 = {x = 190, y = 131, z = 7} local q1 = getThingfromPos(r1) local q2 = getThingfromPos(r2) for i, x in pairs(config) do if (q1.itemid == x.t1 and q2.itemid == x.t2) or (q1.itemid == x.t2 and q2.itemid == x.t1) then doRemoveItem(q1.uid, 1) doRemoveItem(q2.uid, 1) addEvent(doCreateItem, 1000, x.t3, 1, r3) doSendMagicEffect(r3, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, 22, "Parabéns, Você Forjou Um " .. i .. ".") break end end return TRUE end
-
Player quando morre não perde NADA!
Faz assim use os scripts originais do seu servidor e adicione o system de loot que uso... Vá na pasta > Data > Creaturescripts > Scripts Crie o arquivo levelprotection.lua e adicione dentro: function onDeath(cid, corpse, deathList) local config = { skills = true, -- se ao morrer vai perder skills magic = false, -- se vai perder magic level level = 1000 -- até que level irá proteger o player } if isPlayer(cid) and getPlayerLevel(cid) <= config.level then doCreatureSetDropLoot(cid, true) if config.magic == false then doPlayerSetLossPercent(cid, false) end if config.skills == false then doPlayerSetLossPercent(cid, false) end return TRUE end return TRUE end Depois volte na pasta Creaturescripts e abra o creaturescript.xml, adicione a seguinte tag: <event type="death" name="ProtectLevel" event="script" value="levelprotection.lua"/> Vá novamente em Creaturescripts > Scripts > Login.lua e adicione: registerCreatureEvent(cid, "ProtectLevel") creio eu que vai funcionar normal
-
(Resolvido)[Pedido] Comando !withdraw
Tenta function onSay(cid, words, param) if getPlayerTown(cid) == 24 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot withdraw money being in Rookgaard.") return end if isPlayer(cid) == TRUE and param ~= "" then if getTilePzInfo(getPlayerPosition(cid)) == TRUE then if getPlayerBalance(cid) == param then doPlayerSetBalance(cid, getPlayerBalance(cid) - param) doPlayerAddMoney(cid, param) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Here you are, ".. param .." gold.") else doPlayerSendCancel(cid, "You do not have enough money.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "You can only use this command in PZ.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end end
-
Player quando morre não perde NADA!
Ultima vez: local config = { deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if(config.deathListEnabled ~= TRUE) then return end local hitKillerName = "field item" local damageKillerName = "" if(lastHitKiller ~= FALSE) then if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerGUID(lastHitKiller) else hitKillerName = getCreatureName(lastHitKiller) end if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then if(isPlayer(mostDamageKiller) == TRUE) then damageKillerName = getPlayerGUID(mostDamageKiller) else damageKillerName = getCreatureName(mostDamageKiller) end end end db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");") local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") if(rows:getID() ~= -1) then local amount = rows:getRows(true) - config.maxDeathRecords if(amount > 0) then if(config.sqlType == DATABASE_ENGINE_SQLITE) then for i = 1, amount do db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);") end else db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";") end end end end poste seu login,lua
-
Player quando morre não perde NADA!
PlayerDeath local config = { deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if(config.deathListEnabled ~= TRUE) then return end local hitKillerName = "field item" local damageKillerName = "" if(lastHitKiller ~= FALSE) then if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerGUID(lastHitKiller) else hitKillerName = getCreatureName(lastHitKiller) end if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then if(isPlayer(mostDamageKiller) == TRUE) then damageKillerName = getPlayerGUID(mostDamageKiller) else damageKillerName = getCreatureName(mostDamageKiller) end end end db.query("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");") local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") if(rows:getID() ~= -1) then local amount = rows:getRows(true) - config.maxDeathRecords if(amount > 0) then if(config.sqlType == DATABASE_ENGINE_SQLITE) then for i = 1, amount do db.query("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);") end else db.query("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";") end end end end
-
BUG Script Forjar itens
Mudando o stackpos para 1 dar erro nos dois scripts? o que eu passei e o que já tinha?
-
Player quando morre não perde NADA!
Tá usando qual PlayerDeath? O que já tinha no servidor ou oque o Joaovettor postou? Troca o deathBroadcast por esse: local config = { affected = 10, -- how many players (deathAssits) from table deathList should this script be executed for? killStorageValue = 3943, deathStorageValue = 3944, -- commands for the texts (those inside of ||, example: |KILLS| to show skills): KILLS, KILLERNAME, TARGETNAME rewardItem = { use = true, itemid = 5953, minLevel = false, -- false if you don't want any level req minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed). }, killMessage = { use = true, text = ".", messageClass = MESSAGE_STATUS_CONSOLE_BLUE }, broadcastMessage = { use = true, minLevel = false, -- false if you don't want any level req minLevelDiff = false, -- false if you don't want any level diff req (negative numbers allowed). text = "|KILLERNAME| [|KILLERLEVEL|] Matou |TARGETNAME| [|TARGETLEVEL|]!", messageClass = MESSAGE_STATUS_WARNING }, killerAnimation = { use = true, text = "Frag!", -- Only 9 letters! No "commands" here. color = 144 }, targetAnimation = { use = true, text = "Owned!", -- Only 9 letters! No "commands" here. color = 180 } } function onDeath(cid, corpse, deathList) for i = 1, math.min(config.affected, getConfigInfo('deathAssistCount')) do local killer = deathList if(isPlayer(killer) == TRUE) then local targetKills = math.max(0, getPlayerStorageValue(cid, config.killStorageValue)) + 1 local targetDeaths = math.max(0, getPlayerStorageValue(cid, config.deathStorageValue)) + 1 local killerKills = math.max(0, getPlayerStorageValue(killer, config.killStorageValue)) + 1 local killerDeaths = math.max(0, getPlayerStorageValue(killer, config.deathStorageValue)) + 1 setPlayerStorageValue(killer, config.killStorageValue, targetKills) setPlayerStorageValue(cid, config.deathStorageValue, targetDeaths) doCreatureSetDropLoot(cid, true) local killerLevel = getPlayerLevel(killer) local targetLevel = getPlayerLevel(cid) local levelDiff = targetLevel - killerLevel local values = { ["KILLERKILLS"] = killerKills, ["KILLERDEATHS"] = killerDeaths, ["KILLERNAME"] = getCreatureName(killer), ["KILLERLEVEL"] = killerLevel, ["TARGETKILLS"] = targetKills, ["TARGETDEATHS"] = targetDeaths, ["TARGETNAME"] = getCreatureName(cid), ["TARGETLEVEL"] = targetLevel } function formateString(str) return(str:gsub("|([A-Z]+)|", (function(a) return values[a] end))) end if(config.rewardItem.use and (not config.rewardItem.minLevel or targetLevel >= config.rewardItem.minLevel) and (not config.rewardItem.minLevelDiff or levelDiff >= config.rewardItem.minLevelDiff)) then local uid = doPlayerAddItem(killer, config.rewardItem.itemid, 1) end if(config.killMessage.use) then doPlayerSendTextMessage(killer, config.killMessage.messageClass, formateString(config.killMessage.text)) end if(config.broadcastMessage.use and (not config.broadcastMessage.minLevel or getPlayerLevel(cid) >= config.broadcastMessage.minLevel) and (not config.broadcastMessage.minLevelDiff or levelDiff >= config.broadcastMessage.minLevelDiff)) then broadcastMessage(formateString(config.broadcastMessage.text), config.broadcastMessage.messageClass) end if(config.killerAnimation.use) then doSendAnimatedText(getCreaturePosition(killer), config.killerAnimation.text, config.killerAnimation.color) end if(config.targetAnimation.use) then doSendAnimatedText(getCreaturePosition(cid), config.targetAnimation.text, config.targetAnimation.color) end end end return true end
-
Player quando morre não perde NADA!
Esse script que alterei é o deathBroadcast.lua e não o playerdeath.lua, você substituiu pelo playerdeath? apenas fiz oque você pediu ao cara acima >
-
Player quando morre não perde NADA!
Se quiser pode adicionar, mas olha ai o seu script alterado com loot
-
Player quando morre não perde NADA!
Eu uso esse no meu servidor (mais fácil de configurar) function onDeath(cid, corpse, deathList) local config = { onlypremium = false, -- se precisa ser premium para não perder nada skills = true, -- se ao morrer vai perder skills magic = false, -- se vai perder magic level loot = true, -- se ao morrer o jogador irá perder o loot level = 1000 -- até que level irá proteger o player } if isPlayer(cid) and getPlayerLevel(cid) <= config.level then if config.onlypremium == true and not isPremium(cid) then return TRUE end if config.loot == false then doCreatureSetDropLoot(cid, false) end if config.magic == false then doPlayerSetLossPercent(cid, false) end if config.skills == false then doPlayerSetLossPercent(cid, false) end return TRUE end return TRUE end
-
BUG Script Forjar itens
local config = { ["Magic Plate Armor"] = {t1 = 2177, t2 = 2178, t3 = 2195, qnt1 = 1, qnt2 = 1}, } function onUse(cid, item, item2, frompos, topos, pos) local r1 = {x = 189, y = 131, z = 7, stackpos= 2} local r2 = {x = 191, y = 131, z = 7, stackpos= 2} local r3 = {x = 190, y = 131, z = 7} local q1 = getThingfromPos(r1) local q2 = getThingfromPos(r2) for i, x in pairs(config) do if q1.itemid == x.t1 and q2.itemid == x.t2 then if q1.type >= x.qnt1 and q1.type >= x.qnt2 then doRemoveItem(q1.uid, x.qnt1) doRemoveItem(q2.uid, x.qnt2) addEvent(doCreateItem, 1000, x.t3, 1, r3) doSendMagicEffect(r3, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, 22, "Parabéns, Você Forjou Um " .. i .. ".") break end elseif q1.itemid == x.t2 and q2.itemid == x.t1 then if q1.type >= x.qnt2 and q1.type >= x.qnt1 then doRemoveItem(q1.uid, x.qnt1) doRemoveItem(q2.uid, x.qnt2) addEvent(doCreateItem, 1000, x.t3, 1, r3) doSendMagicEffect(r3, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, 22, "Parabéns, Você Forjou Um " .. i .. ".") break end end end return TRUE end
-
Player quando morre não perde NADA!
Falta registrar o evento no login.lua! adicione: registerCreatureEvent(cid, "PlayerDeath")
-
Erro WOE
@tirso teste ai: dofile("./_woe.lua") local config = woe_config local reward = 200000 -- 200k local function EndWoe() Woe.getInfo() setGlobalStorageValue(stor.Started, 0) setGlobalStorageValue(stor.WoeTime, 0) Woe.expulsar(infoLua[2], Castle.salas.a.fromx, Castle.salas.a.tox, Castle.salas.a.fromy, Castle.salas.a.toy, Castle.salas.a.z, Castle._exit) Woe.expulsar(infoLua[2], Castle.salas.b.fromx, Castle.salas.b.tox, Castle.salas.b.fromy, Castle.salas.b.toy, Castle.salas.b.z, Castle._exit) Woe.expulsar(infoLua[2], Castle.salas.c.fromx, Castle.salas.c.tox, Castle.salas.c.fromy, Castle.salas.c.toy, Castle.salas.c.z, Castle._exit) doBroadcastMessage("WoE is finished", config.bcType) doBroadcastMessage("The castle " .. Castle.name .. " is owned by ".. Woe.guildName() ..".", config.bcType) if isCreature(getThingFromPos(Castle.empePos).uid) then doRemoveCreature(getThingFromPos(Castle.empePos).uid) end Woe.removePre() Woe.removePortals() doRemoveItem(getThingFromPos(Castle.desde).uid, 1) Woe.save() for _, cid in ipairs(getPlayersOnline()) do if infoLua[2] == getPlayerGuildId(cid) and getPlayerLevel(cid) >= 100 then doPlayerAddMoney(cid, reward) end end Woe.remove() setGlobalStorageValue(24503, -1) end function onThink(interval, lastExecution) Woe.getInfo() if Woe.isTime() then if not Woe.isStarted() then doSummonCreature("empe", Castle.empePos) doSummonCreature("pre1", Castle.PreEmpes[1]) doSummonCreature("pre2", Castle.PreEmpes[2]) doBroadcastMessage("War has started...", config.bcType) setGlobalStorageValue(stor.Started, 1) Woe.updateInfo({os.time(), infoLua[2], infoLua[3], infoLua[4]}) doCreateTeleport(1387, Castle.pos, Castle.desde) addEvent(EndWoe, config.timeToEnd * 60 * 1000) end end return true end Só trocar por aquele primeiro script que você postou Qualquer erro só falar.
-
(Resolvido)[HELP] msg em certo level
é porque comecei com essas coisas de scripting agora e não sabia disso, obg Ficaria certo assim? function onAdvance(cid, oldLevel, newLevel) if getPlayerStorageValue(cid, 9555) < 1 and getPlayerLevel(cid) == 50 then setPlayerStorageValue(cid, 9555, 1) doPlayerPopupFYI(cid, "Você atingiu o nível 50 e agora pode fazer tal quest, fale com o npc 'tal' para ter permissão.") end return TRUE end
-
habilitar pvp system
Precisando
-
(Resolvido)[HELP] msg em certo level
Script upnoob.lua : function onAdvance(cid, oldLevel, newLevel) if getPlayerLevel(cid) >= 50 then doPlayerPopupFYI(cid, "Você atingiu o nível 50 e agora pode fazer tal quest, fale com o npc 'tal' para ter permissão.") end return TRUE end tag creaturescripts.xml: <event type="advance" name="upnoob" event="script" value="upnoob.lua"/> registra esse evento no login.lua: registerCreatureEvent(cid, "upnoob")
-
Peça sua Script.!
Recomendo você usar uma database com todas tabelas adicionadas, isso é falta da tabela otserver.reports
-
Peça sua Script.!
Só traduzindo você já sabe o porque do erro "Tabela de base ou exibição não encontrada: 1146 Tabela 'otserver.reports' não existe 'em C: \ xampp \ htdocs \ layouts \ tibiacom \ layout.php: 653", tente adicionar essa tabela na database. E poste aqui o layouy.php da pasta C:\xampp\htdocs\layouts\tibiacom
-
Peça sua Script.!
Esse erro aconteceu dps ou já tinha dps de adicionar o script do facebook?
-
Peça sua Script.!
De nada, precisando
-
habilitar pvp system
vai em data/lib/050-function.lua e verifica se tem isso dentro se não tiver adiciona: function getTileZoneInfo(pos) local tmp = getTileInfo(pos) if(tmp.pvp) then return 2 end if(tmp.nopvp) then return 1 end return 0 end Depois vai em data/lib/somefunctions.lua e procura por essa função: function canAttackOther(cid, pid) abaixo disso: local master2 = isSummon(pid) and getCreatureMaster(pid) or pid coloca isso: if getTileInfo(getThingPos(cid)).pvp then return "Can" end
-
Ajuda com dois erros simples
Qual base? Se for PDA já tentou alterar a velocidade no configuration.lua da pasta lib? Se não abra ele e procure por essa parte flys = { ai embaixo vai está mais ou menos assim flys = { ["Moltres"] = {229, 2300}, -- moltres ["Articuno"] = {230, 2100}, -- artic ["Zapdos"] = {224, 2600}, -- zapdos ["Mew"] = {232, 2200}, -- 1000 ["Mewtwo"] = {233, 2200},-- two ["Dragonite"] = {221, 1300},-- nite ["Pidgeot"] = {222, 900}, -- geot ["Fearow"] = {226, 800}, -- fearow ["Aerodactyl"] = {227, 1100}, -- aero ["Charizard"] = {216, 1000}, -- chari ["Porygon"] = {316, 600}, -- porygon ["Shiny Dragonite"] = {1020, 1300},-- Shiny nite ["Shiny Pidgeot"] = {996, 900}, -- Shiny geot Se quiser diminuir a velocidade é só ir baixando o segundo número de cada pokémon > ["Moltres"] = {229, 2300} e pode me falar como é esse bug de derrubar o servidor? Você já testou pra ver se acontece mesmo?