
Tudo que Vodkart postou
-
[8;6] Premium Paper [Talk] + [Action]
está clonando usando até a descrição do item?
-
Novo Sistema
esses pontos já existem no teu servidor? se sim, qual valor da storage usada ou points(se for função)
-
o tempo passa..
Se eu fosse mulher eu deixava o comedinhas programar na minha xoxota
-
(Resolvido)[Pedido] Checkagem de Monstro
function getMonsterInArena(area) local t = {} for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].z} local m = getTopCreature(pos).uid if m ~= 0 and isMonster(m) then t[#t+1] = m end end end return t end local position = {{x = 541, y = 34, z = 7}, {x = 560, y = 55, z = 7}} -- começo e final da arena function onThink(interval) if #getMonsterInArena(position) > 0 then doSendAnimatedText(position[1], "Vivo", 50) -- pos onde o efeito vai aparecer end return true end
-
ERRO SQL - Error during getDataInt(acesstime).
Antes de mais nada execute essas querys no seu banco de dados ALTER TABLE `guilds` ADD `frags` INT(11) NOT NULL DEFAULT 0; ALTER TABLE `guilds` ADD `acesstime` INT(15) NOT NULL DEFAULT 0;
- Novos sistemas de Aura
-
Npc Auction Versão 1.0 [Atualizado]
manda a lib do npc shop pra eu ver
-
Só essa coxa já é maior que minhas duas pernas e meus dois braços juntos
muita estria, nem comia.
-
(Resolvido)Problema com Rank, remoção do acc manager
local config = { MaxPlayer = 20, fight_skills = { ['fist'] = 0, ['club'] = 1, ['sword'] = 2, ['axe'] = 3, ['distance'] = 4, ['shielding'] = 5, ['fishing'] = 6, ['dist'] = 4, ['shield'] = 5, ['fish'] = 6, }, other_skills = { [''] = "level", ['level'] = "level", ['magic'] = "maglevel", ['health'] = "healthmax", ['reset'] = "reset", ['mana'] = "manamax" }, vocations = { ['sorcerer'] = {1,5}, ['druid'] = {2,6}, ['paladin'] = {3,7}, ['knight'] = {4,8} } } function onSay(cid, words, param) local store,exausted = 156201,5 local param,str = param:lower(),"" if not config.fight_skills[param] and not config.other_skills[param] and not config.vocations[param] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "this ranking does not exists.") return true elseif getPlayerStorageValue(cid, store) >= os.time() then doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.") return true end str = "--[ RANK "..(param == "" and "LEVEL" or string.upper(param)).." ]--\n\n" local query = config.fight_skills[param] and db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `player_id` > 6 AND `skillid` = "..config.fight_skills[param].." ORDER BY `value` DESC;") or config.other_skills[param] and db.getResult("SELECT `name`, `"..config.other_skills[param].."` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `"..config.other_skills[param].."` DESC, `name` ASC;") or db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` <= 2 AND `vocation` = "..config.vocations[param][1].." or `vocation` = "..config.vocations[param][2].." ORDER BY `level` DESC;") if (query:getID() ~= -1) then k = 1 repeat str = str .. "\n " .. k .. ". "..(config.fight_skills[param] and getPlayerNameByGUID(query:getDataString("player_id")) or query:getDataString("name")).." - [" .. query:getDataInt((config.fight_skills[param] and "value" or config.vocations[param] and "level" or config.other_skills[param])) .. "]" k = k + 1 until not(query:next()) or k > config.MaxPlayer query:free() end doShowTextDialog(cid,6500, str) setPlayerStorageValue(cid, store, os.time()+exausted) return true end eu acho que na database o account manager é id 6, se não for mude o 6 por 8 por exemplo
-
Recompença de item por tarefa
exemplo da sua task de ursos ["ursos"] = {monster_race={"urso"}, storage_start = 200221, storage = 91021,count = 50,exp = 1150,money = 500, item = 7732}, use assim para dar items ao jogador: ["ursos"] = {monster_race={"urso"}, storage_start = 200221, storage = 91021,count = 50,exp = 1150, money = 500, reward = {{7732,1}}}, ou mais de um item: ["ursos"] = {monster_race={"urso"}, storage_start = 200221, storage = 91021,count = 50,exp = 1150, money = 500, reward = {{7732,1},{2496,1}}},
- Novos sistemas de Aura
- [8.6][Talk] Reedem Codes [Sqlite][+Beta]
- [8.6][Talk] Reedem Codes [Sqlite][+Beta]
-
[8.6][Talk] Reedem Codes [Sqlite][+Beta]
Descrição: Execute no banco de dados: CREATE TABLE resgate_codes ( id INTEGER NOT NULL, code VARCHAR( 255 ) NOT NULL, items VARCHAR( 500 ) NOT NULL, premium_points INT NOT NULL DEFAULT 0, premium_days INT NOT NULL DEFAULT 0, PRIMARY KEY ( id ) ); Adicione na sua lib: function getPremiumPoints(cid) local query = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = "..getPlayerAccountId(cid)) return query:getDataInt("premium_points") <= 0 and 0 or query:getDataInt("premium_points") end function setPremiumPoints(cid, amount) return db.executeQuery("UPDATE `accounts` SET `premium_points` = "..amount.." WHERE `id` = "..getPlayerAccountId(cid)) end function getCodesFromServe(p) local ret = db.getResult("SELECT `id` FROM `resgate_codes` WHERE `code` = "..db.escapeString(p)) return ret:getID() ~= -1 and ret:getDataInt("id") or 0 end Data/Talkactions createcode.lua function onSay(cid, words, param, channel) local param = param:lower() if param == "" or not param then doPlayerSendCancel(cid, "insira um codigo novo.") return true end local code = getCodesFromServe(param) if code ~= 0 then doPlayerSendCancel(cid, "Your code ["..param.."] already exist.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your code ["..param.."] create sucefull, now you can add items, premium days or premium points.") return db.executeQuery("INSERT INTO `resgate_codes` (`code`, `items`, `premium_points`, `premium_days`) VALUES ('".. param .."', '{}', '0', '0');") end addcode.lua function onSay(cid, words, param, channel) local t = string.explode(param:lower(), ",") if (param == "") then doPlayerPopupFYI(cid, "[Redeem Code System]\n\nHow Use Command?\n\nTo add rewards from code enter: /addcode,type\n\n[Types:]\n\nItems\nPremium\nPoints\n\n\Exemples:\n\n/addcode items,crystal coin, 100 --To add item from code, use item name, amount.\n\n/addcode premium,10 -- To set 10 premium days in code\n\n/addcode points,20 -- To set 20 premium points in code") return true end local code = getCodesFromServe(t[1]) if code == 0 then doPlayerSendCancel(cid, "Code ["..t[1].."] does exist.") return true end if isInArray({"items","item","itens","iten"}, t[2]) then if tonumber(t[4]) ~= nil and tostring(t[3]) ~= nil then local itemid, amount = getItemIdByName(t[3], false), tonumber(t[4]) if not itemid then doPlayerSendCancel(cid, "Sorry, this item does not exist.") return true end local d = db.getResult("SELECT `items` FROM `resgate_codes` WHERE `id` = "..code):getDataString("items") local y,n = {},0 for a,b in d:gmatch("(%d+),(%d+)") do n = n + 1 y[n] = {a,b} end table.insert(y, {itemid, amount}) local str = "{" for i, x in pairs(y) do str = str.."{".. x[1] .. "," .. x[2] .. "}" if i ~= table.maxn(y) then str = str .. ',' else str = str .. '}' end end db.executeQuery("UPDATE `resgate_codes` SET `items` = "..db.escapeString(str).." WHERE `id` = "..code) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You Added "..amount.." "..t[3].." from code ["..t[1].."].") return true else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to enter the item name, amount.")return true end elseif isInArray({"pa","premium","premmy","premiun"}, t[2]) then local min, max = 1, 999 if not tonumber(t[3]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, only number.") return true elseif tonumber(t[3]) < min or tonumber(t[3]) > max then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, Min "..min.." and Max "..max.." points.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Now the code receives total "..t[3].." premium days.") db.executeQuery("UPDATE `resgate_codes` SET `premium_days` = "..t[3].." WHERE `id` = "..code) return true elseif isInArray({"points","pp","point","pontos"}, t[2]) then local min, max = 1, 999 if not tonumber(t[3]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, only number.") return true elseif tonumber(t[3]) < min or tonumber(t[3]) > max then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, Min "..min.." and Max "..max.." points.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Now the code receives total "..t[3].." premium days.") db.executeQuery("UPDATE `resgate_codes` SET `premium_points` = "..t[3].." WHERE `id` = "..code) return true end return true end codes.lua function onSay(cid, words, param, channel) local param,str = param:lower(),'' if not param then return true end local code = getCodesFromServe(param) if code == 0 then doPlayerSendCancel(cid, "Your code ["..param.."] does exist or Already used.") return true end local info = db.getResult("SELECT * FROM `resgate_codes` WHERE `id` = "..code) local d,k,p = info:getDataString("items"),info:getDataInt("premium_points"),info:getDataInt("premium_days") local t,n = {},0 for a,b in d:gmatch("(%d+),(%d+)") do n = n + 1 t[n] = {a,b} end if #t > 0 then local backpack = doPlayerAddItem(cid, 1999, 1) for _, i_i in ipairs(t) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end str = str.."".. (str == "" and "" or ", ") ..""..getItemsFromList(t) end if p > 0 then doPlayerAddPremiumDays(cid, p) str = str.."".. (str == "" and "" or ", ") .." "..p.." premium days" end if k > 0 then local total = (getPremiumPoints(cid)+k) setPremiumPoints(cid, total) str = str.."".. (str == "" and "" or ", ") .." "..k.." premium points" end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully redeemed the code ["..param.."]! Reward(s):\n"..str) return db.executeQuery("DELETE FROM `resgate_codes` WHERE `id` = "..code) end talkactions.xml <talkaction words="/resgatecode;!resgatecode" event="script" value="codes.lua"/> <talkaction words="!createcode;/createcode" access="5" event="script" value="createcode.lua"/> <talkaction words="!addcode;/addcode" access="5" event="script" value="addcode.lua"/> Observações: * Testado somente em servidores com SQLITE * Futuramente estarei acrescentando e modificando o código para melhorias * Em breve um comando especial "/generate codes" para gerar códigos com itens randômicos(com chances) * Quem tiver alguma ideia ou querer passar para servidores com site estarei dando auxilia no tópico.
- OTSERVER 10.90+(criar servidor)
-
CRIAR SERVIDOR OFFLINE
Esta é uma mensagem automática! Este tópico foi movido para a área correta. Pedimos que você leia as regras do fórum.
-
Script Portal por alavanca
adc na lib function doSetItemActionId(lols, actionid) return doItemSetAttribute(lols, "aid", actionid) end
-
Alteração em Script da Annihilator
local config = { daily = "no", -- allow only one enter per day? (like in global Tibia) level = 450, storage = 30015, entry = { {x = 4464, y = 1288, z = 6}, {x = 4466, y = 1288, z = 6}, {x = 4465, y = 1289, z = 6}, {x = 4464, y = 1290, z = 6}, {x = 4466, y = 1290, z = 6} }, destination = { {x = 189, y = 650, z = 13}, {x = 189, y = 651, z = 13}, {x = 189, y = 652, z = 13}, {x = 189, y = 653, z = 13} } } local money = 15000 config.daily = getBooleanFromString(config.daily) function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 1946) then if(config.daily) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) else doTransformItem(item.uid, item.itemid - 1) end return true end if(item.itemid ~= 1945) then return true end local players = {} for _, position in ipairs(config.entry) do local pid = getTopCreature(position).uid if(pid == 0 or not isPlayer(pid) or getCreatureStorage(pid, config.storage) > 0 or getPlayerLevel(pid) < config.level or getPlayerMoney(pid) < money) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end table.insert(players, pid) end for i, pid in ipairs(players) do doPlayerRemoveMoney(pid, money) doSendMagicEffect(config.entry, CONST_ME_POFF) doTeleportThing(pid, config.destination, false) doSendMagicEffect(config.destination, CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid + 1) return true end obs: Faltou uma pos para onde o jogador vai depois de puxar a alavanca! Não esqueça de adicionar no código.
- [PEDIDO] SPELL AREA
-
Secure Mode Pvp não funciona
https://otland.net/threads/getplayersecuremode-cid-getplayerfightmode-cid.128276/
-
Ao morrer nao perde magic level
registrou no player tbm?
-
Ao morrer nao perde magic level
function onDeath(cid, corpse, deathList) if isPlayer(cid) and getPlayerMagLevel(cid) >= 150 then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end return true end
-
(Resolvido)Bug DISTRO devido a uma falha no creaturescript
tenta remover o autoloot e testa para ver se o erro persiste
- Kekkai Shihou Fuujin - Sistema Jinchuuriki
-
Imbuing e Pray System!
Esta é uma mensagem automática! Este tópico foi movido para a área correta. Pedimos que você leia as regras do fórum.