Ir para conteúdo

Emersonssss

Membro
  • Registro em

  • Última visita

Tudo que Emersonssss postou

  1. Muito vago as informações, se v sabe qual é o conflito poste o erro para que possamos entender oque esta errado
  2. Emersonssss postou uma resposta no tópico em Suporte Tibia OTServer
    Poq o player iria querer reseta se ele n ganha merda nenhuma ?
  3. function onThink() --[[ Dias em inglês: Monday - Segunda; Tuesday - Terça; Wednesday - Quarta; Thursday - Quinta; Friday - Sexta; Saturday - Sábado; Sunday - Domingo; ]]-- _Lib_Days = { ["Monday"] = { ["10:00"] = {players = 10}, ["12:00"] = {players = 10}, ["13:00"] = {players = 10}, ["15:00"] = {players = 10}, ["19:00"] = {players = 10}, ["21:00"] = {players = 10} }, ["Tuesday"] = { ["10:00"] = {players = 10}, ["12:00"] = {players = 10}, ["13:00"] = {players = 10}, ["15:00"] = {players = 10}, ["19:00"] = {players = 10}, ["21:00"] = {players = 10} }, ["Wednesday"] = { ["10:00"] = {players = 10}, ["12:00"] = {players = 10}, ["13:00"] = {players = 10}, ["15:00"] = {players = 10}, ["19:00"] = {players = 10}, ["21:00"] = {players = 10} }, ["Thursday"] = { ["10:00"] = {players = 10}, ["12:00"] = {players = 10}, ["13:00"] = {players = 10}, ["15:00"] = {players = 10}, ["19:00"] = {players = 10}, ["21:00"] = {players = 10} }, ["Friday"] = { ["10:00"] = {players = 10}, ["12:25"] = {players = 10}, ["13:00"] = {players = 10}, ["15:00"] = {players = 10}, ["19:00"] = {players = 10}, ["21:00"] = {players = 10} }, ["Saturday"] = { ["10:00"] = {players = 10}, ["12:00"] = {players = 10}, ["13:00"] = {players = 10}, ["15:00"] = {players = 10}, ["19:00"] = {players = 10}, ["21:00"] = {players = 10} }, ["Sunday"] = { ["10:00"] = {players = 10}, ["12:00"] = {players = 10}, ["13:00"] = {players = 10}, ["15:00"] = {players = 10}, ["19:00"] = {players = 10}, ["21:00"] = {players = 10} } } if _Lib_Days[os.date("%A")] then hours = tostring(os.date("%X")):sub(1, 5) tb = _Lib_Days[os.date("%A")][hours] if tb and (tb.players % 2 == 0) then setZombiesEventPlayersLimit(tb.players) removeZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Event started.") doPlayerBroadcastMessage(cid, "Zombie Arena Event teleport is opened. We are waiting for " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players to start.") end return true end XML : <globalevent name="Zombie" interval="60000" event="script" value="ZombieStart.lua"/>
  4. vo testa ake no meu serv e te mando function onLogin(cid) local rate = 1 local rate_premium = 0.35 local rate_castle = 0.10 local storage = 211320111636 local days = getPlayerPremiumDays(cid) local config = { yes_premium = "Você tem "..((rate_premium)*100).."% de EXP em vantagem, ainda lhe restam "..days.." dias de VIP!", not_premium = "Tornesse VIP e tenha "..((rate_premium)*100).."% a mais de EXP!", winCastle = "Você Tem "..((rate_castle)*100).."% De Experiencia A mais Agora.(Bonus Castle).", lostCastle = "A Sua Guild Nao Conquistou a Castle" } if isPremium(cid) and getGlobalStorageValue(storage) == getPlayerGuildName(cid) then doPlayerSetExperienceRate(cid, rate + rate_premium + rate_castle) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.yes_premium) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.winCastle) elseif isPremium(cid) == TRUE and getGlobalStorageValue(storage) == getPlayerGuildName(cid) == FALSE then doPlayerSetExperienceRate(cid, rate + rate_premium) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.yes_premium) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.lostCastle) elseif isPremium(cid) == FALSE and getGlobalStorageValue(storage) == getPlayerGuildName(cid) == TRUE then doPlayerSetExperienceRate(cid, rate + rate_castle) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.not_premium) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.winCastle) elseif isPremium(cid) == FALSE and getGlobalStorageValue(storage) == getPlayerGuildName(cid) == FALSE then doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.not_premium) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.lostCastle) end return true end agora eu testei
  5. Segue um lista in-game para quem não usa gesior e queria o sistema ! local config = { levelRequiredToAdd = 20, maxOffersPerPlayer = 5, SendOffersOnlyInPZ = true, blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933} } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") if(t[1] == "add") then if((not t[2]) or (not t[3]) or (not t[4])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end if(not tonumber(t[3]) or (not tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.") return true end if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.") return true end local item = getItemIdByName(t[2]) if(not item) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end if(getPlayerLevel(cid) < config.levelRequiredToAdd) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.") return true end if(isInArray(config.blocked_items, item)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.") return true end if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).") return true end local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";") if(check:getID() == -1) then elseif(check:getRows(true) >= config.maxOffersPerPlayer) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.") return true end end if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.") return true end local itemcount, costgp = math.floor(t[4]), math.floor(t[3]) doPlayerRemoveItem(cid, item, itemcount) db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.") end if(t[1] == "buy") then if(not tonumber(t[2])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(buy:getID() ~= -1) then if(getPlayerMoney(cid) < buy:getDataInt("cost")) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.") buy:free() return true end if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.") buy:free() return true end if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.") buy:free() return true end if(isItemStackable((buy:getDataString("item_id")))) then doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count")) else for i = 1, buy:getDataInt("count") do doPlayerAddItem(cid, buy:getDataString("item_id"), 1) end end doPlayerRemoveMoney(cid, buy:getDataInt("cost")) db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!") db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";") buy:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "remove") then if((not tonumber(t[2]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.") return true end end local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(delete:getID() ~= -1) then if(getPlayerGUID(cid) == delete:getDataInt("player")) then db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") if(isItemStackable(delete:getDataString("item_id"))) then doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count")) else for i = 1, delete:getDataInt("count") do doPlayerAddItem(cid, delete:getDataString("item_id"), 1) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!") end delete:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "withdraw") then local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";") if(balance:getDataInt("auction_balance") < 1) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.") balance:free() return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!") doPlayerAddMoney(cid, balance:getDataInt("auction_balance")) db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";") balance:free() end if(t[1] == "list") then local result = db.getResult("SELECT * FROM `auction_system` ORDER BY `auction_system`.`id` ASC") if result:getID() == -1 then return true end local msg = "Trade Offline:\n\n!offer buy, ID\n!offer remove, ID\n!offer add, ItemName, ItemPrice, ItemCount\n\n" while true do local id = result:getDataString("id") local name = getPlayerNameByGUID(result:getDataString("player")) local item_name = getItemNameById(result:getDataString("item_id")) local count = result:getDataString("count") local custo = result:getDataString("cost")/1000 local custo2 = result:getDataString("cost") if isPlayer(cid) then msg = ""..msg.."ID : "..id.."\nItem Name : "..item_name.." - Item Count : "..count.." - Item Cust : "..custo.."k("..custo2.."GP) - Dono : "..name.."\n" end if not result:next() then break end end doPlayerPopupFYI(cid, msg) return true end return true end
  6. Esse sistema não é 100% funcional e ele eleva muito a transferencia de dados na db com certeza irá fazer um pouco lag.
  7. Muito simples meu amigo, no seu sistema você não esta pegando o rate atual e adc mais....vc esta setando um novo rate do 0 Tente Assim. Troque esses 2 Scripts por este : function onLogin(cid) local rate = 1 local rate_premium = 0.35 local rate_castle = 0.10 local storage = 201320111714 local days = getPlayerPremiumDays(cid) local config = { yes_premium = "Você tem "..((rate - 1)*100).."% de EXP em vantagem, ainda lhe restam "..days.." dias de VIP!", not_premium = "Tornesse VIP e tenha "..((rate - 1)*100).."% a mais de EXP!", winCastle = "Você Tem "..((rate - 1)*100).."% De Experiencia A mais Agora.(Bonus Castle).", lostCastle = "A Sua Guild Nao Conquistou a Castle" } if isPremium(cid) and getGlobalStorageValue(storage) == getPlayerGuildName(cid) then doPlayerSetExperienceRate(cid, rate + rate_premium + rate_castle) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.yes_premium) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.winCastle) end if not isPremium(cid) and getGlobalStorageValue(storage) == getPlayerGuildName(cid) then doPlayerSetExperienceRate(cid, rate + rate_castle) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.not_premium) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.winCastle) end if not isPremium(cid) and not getGlobalStorageValue(storage) == getPlayerGuildName(cid) then doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.not_premium) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.lostCastle) end return true end
  8. E Papai Absulute como sempre posta o script faltando funções e ainda manda o player se vira para cria-la e o mais engraçado é que me fala para adicionar a função na source ! kkkkkkkkkk Troque: E para finalizar crie um arquivo com o nome de florestaabsolute.lua em data/libs e dentro adicione: Adicione este : configExf = { teleportPos = {x = 32341,y = 32213, z = 7}, -- aonde aparecerá o teleport teleportPla = {x=32622, y=31699, z=7}, -- para onde o teleport levará stats = 201201180701, timetostart = 300, -- tempo para iniciar topleftPos = {x = 32589, y = 31662, z = 7}, -- canto esquerdo superior botrightPos = {x = 32631, y = 31693, z = 7}, -- canto direito inferior prize = 6571, -- recompensa templepos = {x=32369, y=32241, z=7}, -- posição do templo randpos = {{x=32625,y=31692,z=7},{x=32621,y=31692,z=7},{x=32617,y=31692,z=7},{x=32619,y=31687,z=7},{x=32624,y=31681,z=7},{x=32630,y=31668,z=7},{x=32627,y=31668,z=7},{x=32617,y=31672,z=7},{x=32613,y=31677,z=7},{x=32608,y=31665,z=7},{x=32610,y=31688,z=7},{x=32598,y=31684,z=7},{x=32596,y=31684,z=7},{x=32597,y=31668,z=7}} } -- O PAPAI ABSOLUTE EXPLICARÁ NAS IMAGENS ESSAS POSIÇÕES function doStartExf() doCreateTeleport(1387, configExf.teleportPla, configExf.teleportPos) setGlobalStorageValue(configExf.stats, 0) doBroadcastMessage("The Exchanted Forest event will open in " .. configExf.timetostart .. " seconds.") addEvent(doInitExf, configExf.timetostart*1000) end function doInitExf() if getGlobalStorageValue(configExf.stats) == 0 then doBroadcastMessage("The Exchanted Forest event is starting...") setGlobalStorageValue(configExf.stats, 1) end end function doCloseExf() setGlobalStorageValue(configExf.stats, -1) local item = getTileItemById(configExf.teleportPos, 1387) if(item.uid ~= 0) then doRemoveItem(item.uid) end for index, creature in ipairs(doGetPlayersFromArea()) do doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature))) end end function doGetPlayersFromArea() local players = {} for index, creature in ipairs(getPlayersOnline()) do if isInArea(getThingPos(creature), configExf.topleftPos, configExf.botrightPos) then table.insert(players, creature) end end return players or #players end "Ai tu tem que adicionar a função na source brother, na 0.3.6 tem..." kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Modificações by Emerson Henrique Oque eu Alterei ? for index, creature in ipairs(doGetPlayersFromArea()) do doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature))) end end function doGetPlayersFromArea() local players = {} for index, creature in ipairs(getPlayersOnline()) do if isInArea(getThingPos(creature), configExf.topleftPos, configExf.botrightPos) then table.insert(players, creature) end end return players or #players end Resumindo ele vai pegar qualquer player que esteja nessa Area e vai Teleportar pra o *Town do Player Town = Cidade Main do Player, Isso : templepos = {x=32369, y=32241, z=7}, -- posição do templo é Igual a Isso : getTownTemplePosition(getPlayerTown(creature)) Porem não é necessario variavel. Mine Tutorial de como fazer uma função que teleport o player para seu templo sem nenhuma variavel. Até o Proximo Check's Script's of Absulute
  9. essa modificação apenas pela source
  10. Emersonssss postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    Eu sempre resolvo esses erro de Creature not found, thing, com um if isCreature(cid) then function() else return nil end sempre resolve, caso não exista ele para o script.
  11. Você não comprou esse sistema? podia jura que vc me falo que comprou do Roksas ou do Chaito mais era comprado sim ! estranho...não ta nos creditos
  12. Testado em 0.3.7 8.60 Creditos? 50% = Emerson Henrique ( EU ) 50% = MeNi (OtLand) Porq 50% para mim? R:Quando ele Posto o Sistema não posto todas as funções para Adc e como eu fiz isso 50%. Vamos A Magica ou Jutsu em LuaScript.cpp Procure Por : //getPlayerBlessing(cid, blessing) Adicione Abaixo : //doCreateCustomMonster(name, pos, outfit, health, spells, corpse, distance, experience ) lua_register(m_luaState, "doCreateCustomMonster", LuaInterface::luaDoCreateCustomMonster); Procure Por : int32_t LuaInterface::luaGetPlayerBlessing(lua_State* L) Adicione Abaixo do Final dessa Função: int32_t LuaInterface::luaDoCreateCustomMonster(lua_State* L) { //doCreateCustomMonster(name, pos, outfit, health, spells, corpse, distance, experience ) // created By MeNi for otland.net // uint64_t health,corpse,distance,experience; Outfit_t outfit; PositionEx pos; MonsterType* pobranyTyp = NULL; pobranyTyp = new MonsterType(); experience = popNumber(L); distance = popNumber(L); corpse = popNumber(L); std::string spells = popString(L); health = popNumber(L); outfit = popOutfit(L); popPosition(L, pos); std::string name = popString(L); Monster* monster; pobranyTyp->spellAttackList.clear(); pobranyTyp->health = health; pobranyTyp->healthMax = health; pobranyTyp->outfit = outfit; pobranyTyp->name = name; pobranyTyp->nameDescription = name; pobranyTyp->lookCorpse = corpse; pobranyTyp->targetDistance = distance; pobranyTyp->experience = experience; pobranyTyp->isSummonable = pobranyTyp->isIllusionable = pobranyTyp->isConvinceable = pobranyTyp->isWalkable = pobranyTyp->pushable = false; pobranyTyp->isAttackable = pobranyTyp->isHostile = pobranyTyp->canPushItems = pobranyTyp->canPushCreatures = true; pobranyTyp->defense = 50; pobranyTyp->armor = 80; pobranyTyp->baseSpeed = 200; pobranyTyp->changeTargetSpeed = pobranyTyp->changeTargetChance = 0; xmlDocPtr doc = xmlParseMemory(spells.c_str(), spells.length()); xmlNodePtr root = xmlDocGetRootElement(doc); xmlNodePtr tmpNode = root->children; while(tmpNode) { if(!xmlStrcmp(tmpNode->name, (const xmlChar*)"attack")) { spellBlock_t sb; if(g_monsters.deserializeSpell(tmpNode, sb, "doCreateCustomMonster")) pobranyTyp->spellAttackList.push_back(sb); } tmpNode = tmpNode->next; } monster = Monster::createMonster(pobranyTyp); if(!g_game.placeCreature(monster, pos, false, false)) { delete monster; lua_pushboolean(L, true); return 1; } ScriptEnviroment* env = getEnv(); lua_pushnumber(L, env->addThing((Thing*)monster)); return 1; } Em LuaScript.h Procure Por : static int32_t luaDoRemoveItem(lua_State* L); Adicione Abaixo : static int32_t luaDoCreateCustomMonster(lua_State* L); Em monsters.h Mude de Private para Public; bool deserializeSpell(xmlNodePtr node, spellBlock_t& sb, const std::string& description = ""); Uma coisa que meu amigo e quase professor (Arthur Luna) me disse é Arthur says : Source é source, a diferença é as modificações. Então quase todos os sistemas são instalaveis o problema é saber oque adaptar! Segue um Script Basico em TalkActions: local text = '<attack name="melee" interval="2000" chance="100" range="5" radius="1" target="0"><attribute key="areaEffect" value="fire"/></attack>' function onSay(cid, words) local MaximoSummon = 10 --- Maximo de Monstros Sumonados!! No Caso So Posso Sumonar 5 Clones local summons = getCreatureSummons(cid) if(table.maxn(summons) < MaximoSummon) then -- no summons local clone = doCreateCustomMonster(getCreatureName(cid), getCreaturePosition(cid), getCreatureOutfit(cid), getCreatureMaxHealth(cid), text, 6324, 1, 100) doConvinceCreature(cid, clone) return true end return true end Criação do Script : Emerson Henrique
  13. Somente para ele desligar, para ligar utilize um auto Restart Creditos? Emerson Henrique Em lib/050-function adicione isso : Save_Server = {"Monday-05:57", "Tuesday-05:57", "Wednesday-05:57", "Thursday-05:57", "Friday-05:57", "Saturday-05:57", "Sunday-05:57"} Closed_Server = {"Monday-05:58", "Tuesday-05:58", "Wednesday-05:58", "Thursday-05:58", "Friday-05:58", "Saturday-05:58", "Sunday-05:58"} Save_Server = {"Monday-05:59", "Tuesday-05:59", "Wednesday-05:59", "Thursday-05:59", "Friday-05:59", "Saturday-05:59", "Sunday-05:59"} Shutdown_Server = {"Monday-06:00", "Tuesday-06:00", "Wednesday-06:00", "Thursday-06:00", "Friday-06:00", "Saturday-06:00", "Sunday-06:00"} em GlobalEvents Adicione isso : <globalevent name="Saves" interval="60000" event="script" value="SaveServ.lua"/> <globalevent name="Close" interval="60000" event="script" value="ClosedServ.lua"/> <globalevent name="Shutdown" interval="60000" event="script" value="ShutdownServ.lua"/> SaveServ.lua function onThink() if isInArray(Save_Server, os.date("%A-%H:%M")) then doSaveServer() end return true end ShutdownServ.lua function onThink() if isInArray(Shutdown_Server, os.date("%A-%H:%M")) then doSetGameState(GAMESTATE_SHUTDOWN) end return true end ClosedServ.lua function onThink() if isInArray(Closed_Server, os.date("%A-%H:%M")) then doSetGameState(GAMESTATE_CLOSED) end return true end
  14. não tal sistema nesse forum!
  15. Normal ele fazer isso. Caso não seja só copiado e postado Parabens concerteza vou adaptar para algo no meu servidor ! REP+
  16. Me ajudo D+
  17. Emersonssss postou uma resposta no tópico em Suporte Tibia OTServer
    function onSay(cid, words, param) local vocs = {"500", "405"} -- ID Vocation local cargas = 10 -- quantas vezes ira refletir if not isInArray(vocs, getPlayerVocation(cid)) then doPlayerSendTextMessage(cid, 28, "Você não pdoe usar essa magia.") local position1 = {x=getThingPosition(getPlayerPosition(cid)).x+1, y=getThingPosition(getPlayerPosition(cid)).y+1, z=getThingPosition(getPlayerPosition(cid)).z} -- mude aque as pos doSendMagicEffect(position1, 10) -- 10 é o effect return true end if getPlayerStorageValue(cid, 19273) <= 0 and getPlayerStorageValue(cid, 19274) - os.time() < 0 then doSendMagicEffect(getPlayerPosition(cid), 10) setPlayerStorageValue(cid, 19273, cargas) setPlayerStorageValue(cid, 19274, os.time() + 300*1000) else doPlayerSendTextMessage(cid, 28, "Você só podera usar denovo daqui [".. getPlayerStorageValue(cid, 19274) - os.time() .. "] Segundos.") local position1 = {x=getThingPosition(getPlayerPosition(cid)).x+1, y=getThingPosition(getPlayerPosition(cid)).y+1, z=getThingPosition(getPlayerPosition(cid)).z} -- mude aque as pos doSendMagicEffect(position1, 10) -- 10 é o effect end return true end
  18. Emersonssss postou uma resposta no tópico em Suporte Tibia OTServer
    Utilize oq eu postei por ultimo concerta vai funcionar
  19. Isso não da pra mudar somente pela source e olha la Esse script é um gambiara para fazer oq vc necessita mais apenas isso
  20. Gostei dese script Poste Plx !
  21. Emersonssss postou uma resposta no tópico em Suporte Tibia OTServer
    function onSay(cid, words, param) local vocs = {"500", "405"} -- ID Vocation local cargas = 10 -- quantas vezes ira refletir if not isInArray(vocs, getPlayerVocation(cid)) then doPlayerSendTextMessage(cid, 28, "Você não pdoe usar essa magia.") return true end if getPlayerStorageValue(cid, 19273) <= 0 and getPlayerStorageValue(cid, 19274) - os.time() < 0 then setPlayerStorageValue(cid, 19273, cargas) setPlayerStorageValue(cid, 19274, os.time() + 300*1000) else doPlayerSendTextMessage(cid, 28, "Você só podera usar denovo daqui [".. getPlayerStorageValue(cid, 19274) - os.time() .. "] Segundos.") end return true end
  22. local pos1 = { x = 1054, y = 1059, z = 7 } local pos2 = { x = 1055, y = 1058, z = 7 } function onThink(cid, interval, lastExecution) local random = math.random(1, 3) if random == 1 then doSendMagicEffect(pos1, text) end if random == 2 then doSendMagicEffect(pos2, text) end if random == 3 then return nil end return true end
  23. local VocPoints = { [1] = 3, [2] = 3, [3] = 3, [4] = 5, [5] = 5, [6] = 5, [7] = 5, [8] = 8, } function onSay(cid, words, param) if not (VocPoints[getPlayerVocation(cid)]) then return false end local param = param:lower() local p2 = string.explode(param, ",") if (getPlayerStorageValue(cid, 14574) < 0) then setPlayerStorageValue(cid, 14574, 0) end local skillids = { ["shielding"] = 5, ["sword"] = 2, ["axe"] = 3, ["club"] = 1, ["distance"] = 4 } local attributes = { ["health"] = {np = 2, np2 = 3, np3 = 4, np4 = 5, vl = 5, nm = "Hit Points"}, -- 2 Points to gain 10 hp ["energy"] = {np = 2, np2 = 3, np3 = 4, np4 = 5, vl = 2, nm = "Mana Points"}, ["magic"] = {np = 2, np2 = 3, np3 = 4, np4 = 5, vl = 1, nm = "Magic Level"}, ["shielding"] = {np = 2, np2 = 3, np3 = 4, np4 = 5, vl = 1, nm = "Shielding Skill"}, ["sword"] = {np = 2, np2 = 3, np3 = 4, np4 = 5, vl = 1, nm = "Sword Skill"}, ["axe"] = {np = 2, np2 = 3, np3 = 4, np4 = 5, vl = 1, nm = "Axe Skill"}, ["club"] = {np = 2, np2 = 3, np3 = 4, np4 = 5, vl = 1, nm = "Club Skill"}, ["distance"] = {np = 2, np2 = 3, np3 = 4, np4 = 5, vl = 1, nm = "Distance Skill"}, } if (param == "check") then doPlayerPopupFYI(cid, "~*~*~ Add Attributes ~*~*~\n\nPoints Available: ".. getPlayerStorageValue(cid, 14574) .."\nLevel Points: ".. VocPoints [getPlayerVocation(cid)]) elseif (p2[1] and p2[1] == "add") and (attributes[p2[2]]) and (tonumber(p2[3])) then if (getPlayerStorageValue(cid, 14574) < tonumber(p2[3]) * attributes[p2[2]].np) then doPlayerSendCancel(cid, "you do not have enough points to distribute!") return doSendMagicEffect(getThingPos(cid), 2) end if (p2[2] == "health") then setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + attributes[p2[2]].vl * tonumber(p2[3])) doCreatureAddHealth(cid, attributes[p2[2]].vl * tonumber(p2[3])) elseif (p2[2] == "energy") then setCreatureMaxMana(cid, getCreatureMaxMana(cid) + attributes[p2[2]].vl * tonumber(p2[3])) doCreatureAddMana(cid, attributes[p2[2]].vl * tonumber(p2[3])) elseif(skillids[p2[2]]) then for a = 1, tonumber(p2[3]) do doPlayerAddSkillTry(cid, skillids[p2[2]], getPlayerRequiredSkillTries(cid, skillids[p2[2]], getPlayerSkillLevel(cid, skillids[p2[2]]) + 1) - getPlayerSkillTries(cid, skillids[p2[2]]), false) end end doSendMagicEffect(getThingPos(cid), 29) doSendMagicEffect(getThingPos(cid), 30) doSendAnimatedText(getThingPos(cid), "-" .. tonumber(p2[3]) * attributes[p2[2]].np, 180) if getPlayerLevel(cid) <= 29 then setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) - tonumber(p2[3]) * attributes[p2[2]].np) elseif getPlayerLevel(cid) >= 30 and getPlayerLevel(cid) <= 49 then setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) - tonumber(p2[3]) * attributes[p2[2]].np2) elseif getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) <= 69 then setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) - tonumber(p2[3]) * attributes[p2[2]].np3) elseif getPlayerLevel(cid) >= 70 then setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) - tonumber(p2[3]) * attributes[p2[2]].np4) end else local msgx = "" for i, v in pairs(attributes) do local add = (v.np > 1) and "s" or "" msgx = msgx .. string.upper(i:sub(1,1)) .. i:sub(2, #i) .. " - ".. v.np .. " points".. add .. " ~ " .. v.vl .. " ".. v.nm .. "\n" end doPlayerPopupFYI(cid, "~*~*~ Add Attributes ~*~*~\n\nPoints needed for skill:\n\n".. msgx .. "\nExample of Use: ".. words .." add,health, 5\n\nPoints available: ".. getPlayerStorageValue(cid, 14574)) end return true end

Informação Importante

Confirmação de Termo