-
Total de itens
3406 -
Registro em
-
Última visita
-
Dias Ganhos
113
Tudo que Vodkart postou
-
moveevent [Movements] Item Com Efeito!
tópico respondeu ao Newtonnotwen de Vodkart em Actions e Talkactions
o script é meu xD- 13 respostas
-
- item efeito
- otserv
-
(e 2 mais)
Tags:
-
@up esse não vai funcionar, tinha que ter passado o MODS junto... @topic atualizei o script pode suar já: http://www.xtibia.com/forum/topic/191311-comando-rank-atualizado/
-
Beleza então fera, aguardo novos conteúdo seus! abraços
-
palhaço! não sabe brincar rsrsrsrs boa
-
também, o parâmetro da função está errada troca doCreatureSetDropLoot(cid, true) para doCreatureSetDropLoot(cid, false)
-
funciona com a função main onDeath também
-
function getNumeroInAlfabeto(letra) for letter = 1, 26, 1 do if string.format("%c", 96+letter) == letra then return letter end end end ou function getNumeroInAlfabeto(letra) for letter = string.byte("a"), string.byte("z") do if letra == string.char(letter) then return (letter-96) end end end
-
http://www.xtibia.com/forum/topic/192816-not-drop-loot/page__pid__1325475#entry1325475
-
Show de bola amigo! Não ficou nada mal, obrigado por compartilhar o código no xtibia! Estou vendo que vc é novo, já mexe com tibia há algum tempo?
-
Desse modo retorna o ID do player: local query = db.getResult("SELECT `id`, `level` FROM `players` WHERE `id` > 6 AND `group_id` < 3 ORDER BY `level` DESC;") if (query:getID() ~= -1) then return query:getDataInt("id") end desse outro vai retornar o nome: local query = db.getResult("SELECT `name`, `level` FROM `players` WHERE `id` > 6 AND `group_id` < 3 ORDER BY `level` DESC, `name` ASC;") if (query:getID() ~= -1) then return query:getDataString("name") end
-
function onSay(cid, words, param) local t = { ["nightmare doll"] = {item ={117,1},points = 90}, ["sd"] = {item ={2268,100},points = 10} } local param,str = string.lower(param),"" if param == "" then doPlayerSendTextMessage(cid, 27, "Voce possui "..getPoints(cid).." creditos.") return true elseif param == 'lista' then for name, x in pairs(t) do str = str.."\nItem: "..name.." -> Price: [" ..x.points.."]" end doShowTextDialog(cid, 2529, str) return true end local buy = t[param] if not(buy) then doPlayerSendTextMessage(cid, 22, "desculpe, mas este não existe, digite !comando lista") return true elseif getPoints(cid) < buy.points then doPlayerSendTextMessage(cid, 22, "desculpe, mas você precisa de "..buy.points.." points para comprar o "..param) return true end local desc = doPlayerAddItem(cid, buy.item[1],buy.item[2]) doItemSetAttribute(desc,"description","Este Item foi obtido por "..getPlayerName(cid)..".") removePoints(cid,buy.points) doPlayerSendTextMessage(cid, 27, "Parabéns! você comprou "..buy.item[2].." ".. getItemNameById(buy.item[1]) ..".") return true end
-
tudo em excesso faz mal O sucesso, autoridade, inteligência, talento, felicidade, sonhos, etc, em excesso nunca fizeram mal a ninguém
-
estuda de novo, conhecimento nunca é demais;
-
vai estudar rapaz fica esperando reposta num fórum de tibia
-
dúvida Ajuda Com Esse Creaturescripts De Level Protection
pergunta respondeu ao KennyConrad de Vodkart em Scripts
function onDeath(cid, corpse, deathList) function getResets(cid) local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid)) return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset") end local config = { onlypremium = false, -- se precisa ser premium para não perder nada exp = false, -- se ao morrer o jogador irá perder exp skills = false, -- se ao morrer vai perder skills magic = false, -- se vai perder magic level loot = false, -- se ao morrer o jogador irá perder o loot level = 100 -- até que level irá proteger o player } if isPlayer(cid) and getPlayerLevel(cid) <= config.level and getResets(cid) == 0 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, PLAYERLOSS_MANA, 0) end if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end return TRUE end return TRUE end -
local query = db.getResult("SELECT `name` FROM `guilds` WHERE `gate` = 1 ;") if (query:getID() ~= -1) then doBroadcastMessage("Member of the "..query:getDataString("name").." got blabla bla") end vai pegar o nome da guild que tem gate 1 getDataString -> para pegar string getDataInt -> para pegar números agora de todas as guilds local query = db.getResult("SELECT `name`, `gate` FROM `guilds` WHERE `gate` > -1 ORDER BY `gate` DESC, `name` ASC;") if (query:getID() ~= -1) then doBroadcastMessage("Member of the "..query:getDataString("name").." have "..query:getDataInt("gate").." gates") end -- função para você function getGuildTopGate() local query = db.getResult("SELECT `name`, `gate` FROM `guilds` WHERE `gate` > -1 ORDER BY `gate` DESC, `name` ASC;") if (query:getID() ~= -1) then return query:getDataString("name") end return false end ai você usa if getPlayerGuildName(cid) == getGuildTopGate() then ... end
-
function math.SumArray(array) local soma = 0 for _, i in pairs(array) do if type(i) == "number" then soma = soma + i end end return soma end
-
daria para salvar todos os players online e depois checar
-
@jNNo Algum erro? tem que ver a diferença de level cara.
-
Mas se fosse para fazer desse modo não seria mais fácil retornar todos de uma vez? online/offline
-
sim eu tinha visto esse problema ontem, por isso atualizei o script novamente pode usar o novo que está funcionando 100%
-
e o PS3, comprou?
-
outra já? tais rápido em fi xD essa função é bastante útil obrigado por postar! REP+
-
Entendi, retorna os players de um certo level, parabéns amigo! está avançando muito xD rep+
-
São funções para retornar quantos slots livres a Bp ou as BP possui. function getContainerSlotsFree(container) -- by vodka return getContainerCap(container)-getContainerSize(container) end function getAllContainerFree(container) -- by vodka local containers,soma = {},0 for i = 0, getContainerSize(container)-1 do local item = getContainerItem(container, i) if isContainer(item.uid) then table.insert(containers, item.uid) end end for _, check in pairs(containers) do soma = soma + getContainerSlotsFree(check) end return (soma + getContainerSlotsFree(container)) end exemplo de talks 1° function onSay(cid, words, param) local item = getContainerSlotsFree(getPlayerSlotItem(cid, 3).uid) return doPlayerSendTextMessage(cid,18,'You have '..item..' slots free in your primary backpack') end nesse talk vai retornar quantos slot livres a primeira backpack tem, no caso á que está no slot dela. 2° function onSay(cid, words, param) local item = getAllContainerFree(getPlayerSlotItem(cid, 3).uid) return doPlayerSendTextMessage(cid,18,'You have '..item..' slots free in your backpack') end nessa talk vai retornar quantos slots livres possui mesmo se tiver backpack dentro de backpack.
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.