-
Total de itens
3406 -
Registro em
-
Última visita
-
Dias Ganhos
113
Tudo que Vodkart postou
-
Preciso de: ID das Voc ID do Orb of Deuses
-
[Pedido] Comprar Item Vip Por Lavanca
tópico respondeu ao danilo13 de Vodkart em Actions e Talkactions
@UP Mas é vip coin,ele compra os items com a moeda ID: 9020 -
removido
-
já tem esse script aqui tbm http://www.xtibia.com/forum/topic/147147-god-system/
-
moveevent [Moveevents] Tile Informativo
tópico respondeu ao Meunomeefeiozik de Vodkart em Actions e Talkactions
não precisa de tabela function onStepIn(cid, item, pos, fromPos) local text = {"Existem diversos tipos de monstros em todo o map.","Há varias aventuras espalhadas por essa cidade.","Cuidado, pois você nao esta sozinho."} return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,text[math.random(#text)]) end -
Spell Que Muda Seu Proprio Outfit (8.54)
tópico respondeu ao jeandemonloko de Vodkart em Lixeira Pública
local sys = createConditionObject(CONDITION_OUTFIT) setConditionParam(sys, CONDITION_PARAM_TICKS, -1) addOutfitCondition(sys, outfit) setCombatCondition(combat, sys) -
function onCastSpell(cid, var) if getPlayerStorageValue(cid, CHARGE) == 1 then setPlayerStorageValue(cid, CHARGE, 0) elseif (getCreatureCondition(cid, CONDITION_INFIGHT) == true)then doPlayerSendCancel(cid, "Sorry, you are in fight.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) elseif (getPlayerMana(cid) == getPlayerMaxMana(cid))then doPlayerSendCancel(cid, "Sorry, you are full.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end setPlayerStorageValue(cid, CHARGE, 1) doCreatureSetNoMove(cid, true) addEvent(dajmane, 0, cid) return TRUE end function dajmane(cid) if (getPlayerMana(cid) < getPlayerMaxMana(cid) and getCreatureHealth(cid) < getCreatureMaxHealth(cid) and getCreatureCondition(cid, CONDITION_INFIGHT) == false and getPlayerStorageValue(cid, CHARGE) == 1) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid)*0.25) doCreatureAddMana(cid, getCreatureMaxMana(cid)*0.15) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA) addEvent(dajmane, 1000, cid) else stopEvent(dajmane, true) doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, CHARGE, 0) end end eu coloquei para dar em porcentagem: doCreatureAddHealth(cid, getCreatureMaxHealth(cid)*0.25) doCreatureAddMana(cid, getCreatureMaxMana(cid)*0.15) no caso vai dar 25% de hp e 15% de mana pode alterar se quiser =]
-
http://www.xtibia.com/forum/topic/138512-item-que-adiciona-vip-time/
-
[Pedido] Comprar Item Vip Por Lavanca
tópico respondeu ao danilo13 de Vodkart em Actions e Talkactions
fiz um aqui rapidinho... nome do seu script.lua local coin = 9020 local lever = { [6001] = {30,7429}, [6002] = {20,7366}, [6003] = {10,8926}, [6004] = {5,5978} } function onUse(cid,item,fromPosition,itemEx,toPosition) if doPlayerRemoveItem(cid,coin,lever[item.actionid][1]) == FALSE then return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "você precisa de "..lever[item.actionid][1].." " ..getItemNameById(coin)) end doPlayerAddItem(cid,lever[item.actionid][2]) doPlayerSendTextMessage(cid,22,"você comprou um " .. getItemNameById(lever[item.actionid][2])) doSendMagicEffect(getCreaturePosition(cid), math.random(28,30)) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end em actions.xml adiciona a tag: <action actionid="6001-6004" script="nome do seu script.lua"/> explicação: [ACTION ID] = {QNTO DE COIN VAI REMOVER,ITEM QUE VAI VENDER} por exemplo: [6003] = {10,8926} você vai na na propriedade da alavanca e vai colocar ACTIONID = 6003 nesse caso o jogador vai precisar de 10 Coin para comprar o item 8926 se vc quiser adicionar mais é só adicionar uma virgula no último colchete: local lever = { [6001] = {30,7429}, [6002] = {20,7366}, [6003] = {10,8926}, [6004] = {5,5978}, [6005] = {Qntidade de Coin,ID DO ITEM} } ai a tag vai ficar : <action actionid="6001-6005" script="nome do seu script.lua"/> -
sim,tbm testei algumas aqui =/ vou ver se na source tem alguma função para isso
-
iusHIUSHSUIhsiuHSIiUSHiushiUHIUhiuhSISHishUi Bom tópico vc tem que postar mais cara,abraços
-
não,no script você não mexe,você só vai mexer na tag,que no caso se fosse promotion.lua e o id é 2611 vc usa essa: <action itemid="2611" event="script" value="promotion.lua"/>
- 9 respostas
-
- {pedido} 3° promotion
- otserv
- (e 2 mais)
-
[ Resolvido ]Query Deletar Lastday Accounts Que Não Logam Mais.
tópico respondeu ao cs007 de Vodkart em Lixeira Pública
já existe, globalevents.xml: <globalevent name="dbcleaner" type="startup" event="script" value="dbcleaner.lua"/> Add globalevents/scripts dbcleaner.lua ------------------------------------------------------------------------------* ----- [[> Automated Database Cleanup 1.1 Structure //By Cybermaster <]] ------| -------------- [[> System 2.0 Revamped by Teh Maverick <3 <]] ----------------| ------------- [[> Removal of empty accounts by darkaos <]] ---------------| --------------- [[> Function getDBPlayersCount() by Elf <]] ------------------| ------------------------------------------------------------------------------| ------------------------------------------------------------------------------| --- ~!READ THIS!~ ------------------------------------------------------------| --- Be sure to back up your database and test this on your server first, -----| --- I(Teh Maverick) cannot guarantee it will work the same for every core. ---| --- It is very easy to test, with the log file and values that are printed ---| -----------------------------------Enjoy!-------------------------------------| ------------------------------------------------------------------------------* function countRowsWhereInTable(table, field, condition) local result = db.getResult("SELECT COUNT(" .. field .. ") as count FROM " .. table .. " WHERE " .. field .. " = '" .. condition .. "';") local tmp = result:getDataInt("count") result:free() return tmp end function getDBPlayersCount() local result = db.getResult("SELECT COUNT(id) as count FROM `players`;") local tmp = result:getDataInt("count") result:free() return tmp end function getDBAccountsCount() local result = db.getResult("SELECT COUNT(id) as count FROM `accounts`;") local tmp = result:getDataInt("count") result:free() return tmp end function onStartup() local DB_BEFORE = {players = getDBPlayersCount(), accounts = getDBAccountsCount()} local result,result1, ii, numPlayersToDelete, numAccountsDeleted, tmp = 0, 0, 0, 0, 0 local pid, aid = {}, {} local dropCount = {players={},accounts={}} local config = { deleteAccountWithNoPlayers = true, cleanChildTables = true, printResult = true, saveResultToFile = true, logFileName = 'db_cleanup.txt' } --In each table, players with below specified level, and days of inactivity will be deleted from db on server startup local cleanup = { [1] = {level = 11, time = 5 * 24 * 60 * 60}, [2] = {level = 20, time = 15 * 24 * 60 * 60}, [3] = {level = 50, time = 30 * 24 * 60 * 60}, [4] = {level = 100, time = 60 * 24 * 60 * 60}, [5] = {level = 130, time = 90 * 24 * 60 * 60} } local childAttributeTables = { players = { [1] = {table = "`player_viplist`", idField = "`player_id`"}, [2] = {table = "`player_storage`", idField = "`player_id`"}, [3] = {table = "`player_spells`", idField = "`player_id`"}, [4] = {table = "`player_skills`", idField = "`player_id`"}, [5] = {table = "`player_namelocks`", idField = "`player_id`"}, [6] = {table = "`player_items`", idField = "`player_id`"}, [7] = {table = "`player_depotitems`", idField = "`player_id`"}, [8] = {table = "`houses`", idField = "`owner`"}, [9] = {table = "`house_auctions`", idField = "`player_id`"}, [10] = {table = "`players`", idField = "`id`"} -- Keep this as the last item in the array --Note: `houses` and `bans` are in the DB triggers for TFS so don't worry about them. --Also I did not want to put killers, or deaths on here because that is historic data, --do so at your own risk. }, accounts = { [1] = {table = "`accounts`", idField = "`id`"}, [2] = {table = "`account_viplist`", idField = "`account_id`"} } } --Clean up all the players and player data for i = 1, #cleanup do result = db.getResult("SELECT `id`,`name`,`account_id` FROM `players` WHERE `level` < ".. cleanup[i].level .." AND `name` NOT IN('Account Manager', 'Sorcerer Sample', 'Druid Sample', 'Paladin Sample', 'Knight Sample', 'Rook Sample') AND `group_id` < 2 AND `lastlogin` < UNIX_TIMESTAMP() - ".. cleanup[i].time .." AND `lastlogin` > 0;") if(result:getID() ~= -1) then ii = 1 repeat pid[ii] = result:getDataInt("id") -- list the players id into an array aid[ii] = result:getDataInt("account_id") -- list the account id of each player being removed into an array ii = ii + 1 until not(result:next()) result:free() end numPlayersToDelete = ii - 1 --Drop players and their child table attribute data such as skills, items, etc. for j = 1, numPlayersToDelete do if(config.cleanChildTables) then for k = 1, #childAttributeTables.players do if childAttributeTables.players[k].table == "houses" then house = getHouseByPlayerGUID(pid[j]) if house ~= 0 or house ~= nil then doCleanHouse(house) doUpdateHouseAuctions() end else dropCount.players[k] = ((dropCount.players[k] or 0) + countRowsWhereInTable(childAttributeTables.players[k].table, childAttributeTables.players[k].idField, pid[j])) db.executeQuery("DELETE FROM " .. childAttributeTables.players[k].table .. " WHERE " .. childAttributeTables.players[k].idField .. " = '" .. pid[j] .. "';") end end else db.executeQuery("DELETE FROM `players` WHERE `id` = '" .. pid[j] .. "';") end end end --Drop all the accounts that have 0 players linked to them (at the moment its only checking from the list of players removed) if config.deleteAccountWithNoPlayers then --This part was scripted by Darkhaos, modified/fixed by Teh Maverick --[[ for acc = 1, #aid do result1 = db.getResult("SELECT `id` FROM `accounts` WHERE `id` = '" .. aid[acc] .. "';") if result1:getID() ~= -1 then -- check to make sure the account exists result1:free() for i = 1, #childAttributeTables.accounts do --Make sure there are no other players on the account result1 = db.getResult("SELECT COUNT(id) as count FROM `players` WHERE `account_id` = '" .. aid[acc] .. "';") tmp = result1:getDataInt("count") if(tmp <= 0) then --Remove accounts dropCount.accounts[i] = ((dropCount.accounts[i] or 0) + countRowsWhereInTable(childAttributeTables.accounts[i].table, childAttributeTables.accounts[i].idField, aid[acc])) db.executeQuery("DELETE FROM " .. childAttributeTables.accounts[i].table .. " WHERE " .. childAttributeTables.accounts[i].idField .. " = '" .. aid[acc] .. "';") end end end end end --]] --Print and Save results (configurable) local DB_NOW = {players = DB_BEFORE.players - getDBPlayersCount(), accounts = DB_BEFORE.accounts - getDBAccountsCount()} if DB_NOW.players > 0 or DB_NOW.accounts > 0 then local text = ">> [DBCLEANUP] " .. DB_NOW.players .. " inactive players" .. (config.deleteAccountWithNoPlayers and " and " .. DB_NOW.accounts .. " empty accounts" or "") .. " have been deleted from the database." --Write to console if config.printResult then print("") print(text) if config.cleanChildTables then --Write player info for i = 1,#dropCount.players do print("[!] --> Dropped: " .. dropCount.players[i] .. " from " .. childAttributeTables.players[i].table .. " table") end --Write account info if config.deleteAccountWithNoPlayers then for i = 1,#dropCount.accounts do print("[!] --> Dropped: " .. dropCount.accounts[i] .. " from " .. childAttributeTables.accounts[i].table .. " table") end end print("") end end --Write to file if config.saveResultToFile then local file = io.open("data/logs/"..config.logFileName, "a") file:write("[" .. os.date("%d %B %Y %X ", os.time()) .. "] " .. text .. "\n") if config.cleanChildTables then --Write player info for i = 1, #dropCount.players do file:write("[!] --> Dropped: " .. dropCount.players[i] .. " from " .. childAttributeTables.players[i].table .. " table\n") end --Write account info if config.deleteAccountWithNoPlayers then for i = 1, #dropCount.accounts do file:write("[!] --> Dropped: " .. dropCount.accounts[i] .. " from " .. childAttributeTables.accounts[i].table .. " table\n") end end file:write("\n") end file:close() end end return true end ai o exemplo do log: Aqui está o link para o tópico original: http://otland.net/f82/2-0-database-cleaner-inactive-players-players-child-data-skills-items-etc-127320/ -
@UP essa mensagem da no server Log ele quer no default
-
é em actions/script e a tag se for pra ele clicar em um certo item e esse item desaparecer é essa: <action itemid="ID DO ITEM" event="script" value="nome do script.lua"/> e se for como um báu é essa: <action actionid="ACTION ID" script="nome do seu script.lua"/>
- 9 respostas
-
- {pedido} 3° promotion
- otserv
- (e 2 mais)
-
possíveis acho que são essas: doPlayerSendTextMessage(cid,NÚMERO,"message")
-
qual o erro?
-
e dá algum erro? alguns amigos meus testaram e não tiveram problema,como disse eu não sei mexer mto em ot 7.92
-
http://www.xtibia.com/forum/topic/135741-gold-quando-mata-player/
-
falei pra tentar assim: function doRefilSecond(cid, mana, hp, delay) -- function by vodka if isCreature(cid) then doPlayerAddMana(cid, mana) doPlayerAddHealth(cid, hp) doSendMagicEffect(getCreaturePosition(cid), 6) if delay ~= 1 then addEvent(doRefilSecond, 1000, cid, mana , hp , delay -1) end else return LUA_ERROR end return nil end function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { hp = 10, -- qnto de hp irá ganha por segundo mana = 5, -- qnto de mana irá ganhar por segundo seconds = 30, -- por qnto segundos ele irá ganhar o hp e mana outfit = {100,50,120} -- outfit q ele vai virar } doRefilSecond(cid, config.mana,config.hp, config.seconds) doSetCreatureOutfit(cid, {lookType = config.outfit[math.random(#config.outfit)]}, config.seconds*1000) doPlayerAddSoul(cid, -1) doRemoveItem(item.uid, 1) return TRUE end não sei se as outras funções vão funcionar,eu só mexo com servidores 8.54+
-
tenta function onUse(cid, item, frompos, item2, topos) if not isInArray({5,6,7,8}, getPlayerVocation(cid)) then return doPlayerSendCancel(cid, "você não pode ser promovido pois não tem vocação") end doPlayerSetVocation(cid,getPlayerVocation(cid)+4) return TRUE end ou function onUse(cid, item, frompos, item2, topos) if not isInArray({5,6,7,8}, getPlayerVocation(cid)) then return doPlayerSendCancel(cid, "você não pode ser promovido pois não tem vocação") end doPlayerSetPromotionLevel(cid, 2) return TRUE end e se vc quiser que suma o item vc adiciona: doRemoveItem(item.uid, 1)
- 9 respostas
-
- {pedido} 3° promotion
- otserv
- (e 2 mais)
-
então tenta alterar aquela parte do script para essa que vc usou: de doCreatureAddMana(cid, mana) doCreatureAddHealth(cid, hp) para doPlayerAddMana(cid, mana) doPlayerAddHealth(cid, hp) ---- outra dúvida,vai ser math.random igual o script ai em cima que ele vai receber o hp?
-
moskitinho o poeta da vida
-
então está explicado,eu testei foi em 8.54+ sabe me dizer qual a função que adiciona mana e hp para o jogador? :T
-
essas eu estava olhando nas source mesmo
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.