Tudo que Emersonssss postou
-
[Pedido] NPC Que Vende Item com Moeda Diferente!
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local MoedaVip = 2160 -- Id da MoedaVip local shopWindow = {} local t = { [2457] = {price = 200}, -- [id do item] e em price qnto honor points vai custar [2458] = {price = 200}, [2459] = {price = 200}, [8931] = {price = 200}, [2422] = {price = 200} } local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if t[item] and doPlayerRemoveItem(cid, MoedaVip, t[item].price) then doPlayerAddItem(cid, item, 1, false) selfSay("Aqui esta o Item", cid) else selfSay("Voce nao tem "..t[item].price.." gold vip suficiente", cid) end return true end if (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE'))then for var, ret in pairs(t) do table.insert(shopWindow, {id = var, subType = 0, buy = ret.price, sell = 0, name = getItemNameById(var)}) end openShopWindow(cid, shopWindow, onBuy, onSell) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
(Resolvido)[pedido] Action Use No pilar, nasce o boss
function onUse(cid, item, fromPosition, itemEx, toPosition) tempo = 2 * 60 * 60 BosPos = {x=190, y=116, z=10} -- onde o bos vai nasce if getGlobalStorageValue(99293) < os.time() then if(item.itemid == 9790) then doSummonCreature("NOMEDACRIATURA", BosPos) setGlobalStorageValue(99293, (os.time() + tempo)) end else local left = getGlobalStorageValue(99293) - os.time() left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)} doPlayerSendCancel(cid, 'Voce pode invocar esse BOS depois de '.. left.hour ..'h e '..left.minutes..'min.') end return true end <action itemid="9790" event="script" value="SumonBos.lua"/>
-
[VIP] No look
- [VIP] No look
- [VIP] No look
Mande o Post do sistema que vc usa que eu atualizo- [VIP] No look
Poste o seu script de frag que eu edito para você function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then vip = vip.hasVip(thing.uid) == TRUE and "VIP" or "Free" doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..']['..vip..']') return true elseif thing.uid == cid then vips = vip.hasVip(cid) == TRUE and "VIP" or "Free" doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..']['..vips..']') local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end Sistema usando o System Mock instale ele para funcionar perfeitamente! http://www.tibiaking.com/forum/topic/20589-vip-system-by-mock-100/- Sem parar
http://www.tibiaking.com/forum/topic/38177-bug-shop-do-site-fica-duplicando-o-item/page-2- [TalkActions] Duvida Facil Trasnform
doPlayerSay(cid, 'Transformar', TALKTYPE_ORANGE_1) --MENSAGEM COMO FALA DE MONSTRO- (Resolvido)[Ajuda] Script Evento Double Xp
Explicando Em DoubleXP = {"Wednesday", "Sunday"} Coloque os dias que serão Double XP, será de 00:00 a 24:59 do dia escolhido, os dias tem que ser em ingles, quando o player logar e for o dia escolhido será modificado o rateXP dele para Double. Segue : function onLogin(cid) -- Monday = Segunda -- Tuesday = Terça -- Wednesday = Quarta -- Thursday = Quinta -- Friday = Sexta -- Saturday = Sabado -- Sunday = Domingo DoubleXP = {"Wednesday", "Sunday"} if isInArray(DoubleXP, os.date("%A")) then doPlayerSetRate(cid, SKILL__LEVEL, 2.0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[Double XP]--\nHoje Estamos em evento Double XP!!") end return true end Em CreatureScripts.xml <event type="login" name="DoubleXP" event="script" value="DoubleXP.lua"/> Login.lua registerCreatureEvent(cid, "DoubleXP") Creditos? Emerson Henrique- (Resolvido)[Pedido] Max Ml
function onLogin(cid) if getPlayerMagLevel(cid) >= 150 then doPlayerSetMagicRate(cid, 0) end return true end function onAdvance(cid, skill, oldlevel, newlevel) if getPlayerMagLevel(cid) >= 150 then doPlayerSetMagicRate(cid, 0) end return true end Em Creaturescripts.xml <event type="login" name="MaxMl" event="script" value="MaxMl.lua"/> <event type="advance" name="MaxMll" event="script" value="MaxMl.lua"/> em Login.lua registerCreatureEvent(cid, "MaxMl") registerCreatureEvent(cid, "MaxMll") Creditos ? Emerson Henrique- TILE Trainer
em config.lua tem essa função stopAttackingAtExit = true- [Ajuda] Criar Spell Haste
Eu ja vi esse script só não lembro em qual forum, tava como Haste que deixa rastro de fogo !- Script de quest que necessita de item
---> Codes by: OrochiElf <--- local configs = { Quest_Storage = 19822, Quest_Reward = 2160, Ammount_Quest_Reward = 10, Need_Item = 2152, Ammount_Need_Item = 1, } function onUse(cid) if getPlayerStorageValue(cid, configs.Quest_Storage) < 1 then if(doPlayerRemoveItem(cid, configs.Need_Item, configs.Ammount_Need_Item)) then doPlayerAddItem(cid, configs.Quest_Reward, configs.Ammount_Quest_Reward) doPlayerSendTextMessage(cid, 27, "You have found "..configs.Quest_Reward.." "..configs.Ammount_Quest_Reward) setPlayerStorageValue(cid, configs.Quest_Storage, 1) return true else doPlayerSendTextMessage(cid, 27, "You need "..configs.Ammount_Need_Item.." "..configs.Need_Item) return true end doPlayerSendTextMessage(cid, 27, "This chest are empty.") return true end end- Script de quest que necessita de item
Ele Remove esse items?- [Pedido] Spell Distance teleport
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 75) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2, -1, -3, -1) function onCastSpell(cid, var) local target = getCreatureTarget(cid) local enemypos = getCreaturePosition(target) if target == isMonster or isCreature then doTeleportThing(cid, enemypos) doSendMagicEffect(enemypos, 75) end return doCombat(cid, combat, var) end- [Duvida] Player de Tal vocação nascer com x roupa
local outGain = { [1] = 69, --[ID VOCATION] = ID OUTFIT [2] = 62, [3] = 250, [4] = 73, [5] = 158, [6] = 137, [7] = 227, [8] = 52 } function onLogin(cid) local outfit = getCreatureOutfit(cid) outfit.lookType = outGain[getPlayerVocation(cid)] doSetCreatureOutfit(cid, outfit, -1) return true end Em Creaturescripts.xml <event type="login" name="ChangeOutfit" event="script" value="ChangeOutfit.lua"/> Em Login.lua registerCreatureEvent(cid, "ChangeOutfit") Creditos? Emerson Henrique- Bug shop do site fica duplicando o item
Tente : -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end Gesior é muito chato pra adc historico -.-" Modern é 3 Params e pronto :S- [TalkActions] Duvida Facil Trasnform
- [Look Frag] Mostrando Frags no look!
Me manda PM com sua duvida eu tento te ajudar- [MultipleExp System]
Obg ele ainda esta grande, tenho ctz que existe maneira de simplificar pois meu conhecimento ainda é basico mas da pro gasto !- [MultipleExp System]
Fala Galerinha nessa madrugada eu modifiquei meu script e resolvi posta-lo para ajudar os OT-Admin iniciantes e ter algo diferente no server. O Sistem Funciona assim, sabe quando vem um noob e fala " ADM Ponhe Double XP!!", com esse sistema vc resolve esse problema, ele se resumi quanto mais Players Online + XP é Adc para quem estiver online, simples, simples, sem mais delongas. Em /data/creaturescripts/ Adicione a seguinte tag: <event type="login" name="MultipleExp" event="script" value="MultipleExpLogin.lua"/> Em /data/creaturescripts/scripts/ Crie um arquivo.lua chamado MultipleExpLogin.lua e adicione : local config = getBooleanFromString(getConfigInfo('experienceStages')) function onLogin(cid) registerCreatureEvent(cid, "MultipleExp") if(config) then exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) end local players = getPlayersOnline() if(#players >= 1 and #players <= 49) then for _, pid in ipairs(players) do if isPremium(pid) then doPlayerSetRate(pid, SKILL__LEVEL, 1.5) else doPlayerSetRate(pid, SKILL__LEVEL, 1.0) end end if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.5x)") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x)") end elseif(#players >= 50 and #players <= 99) then for _, pid in ipairs(players) do if isPremium(pid) then doPlayerSetRate(pid, SKILL__LEVEL, 1.6) else doPlayerSetRate(pid, SKILL__LEVEL, 1.1) end end if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.5x + 0.1x)") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.1x)") end elseif(#players >= 100 and #players <= 149) then for _, pid in ipairs(players) do if isPremium(pid) then doPlayerSetRate(pid, SKILL__LEVEL, 1.7) else doPlayerSetRate(pid, SKILL__LEVEL, 1.2) end end if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.5x + 0.2x)") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.2x)") end elseif(#players >= 150 and #players <= 199) then for _, pid in ipairs(players) do if isPremium(pid) then doPlayerSetRate(pid, SKILL__LEVEL, 1.8) else doPlayerSetRate(pid, SKILL__LEVEL, 1.3) end end if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.5x + 0.3x)") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.3x)") end elseif(#players >= 200 and #players <= 249) then for _, pid in ipairs(players) do if isPremium(pid) then doPlayerSetRate(pid, SKILL__LEVEL, 1.9) else doPlayerSetRate(pid, SKILL__LEVEL, 1.4) end end if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.5x + 0.4x)") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.4x)") end elseif(#players >= 250) then for _, pid in ipairs(players) do if isPremium(pid) then doPlayerSetRate(pid, SKILL__LEVEL, 2.0) else doPlayerSetRate(pid, SKILL__LEVEL, 1.5) end end if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.5x + 0.5x)") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[MultipleExp System]--\nPlayers Online : "..#players.."\nSeu Exp Foi Atualizado Para : ("..exp.."x + 0.5x)") end end return true end Creditos? Emerson Henrique E quero ver algum filho de uma pessoa vim falar que eu copie esse script -.-"- Bebida da Satisfação RadBR- Com nome !
Eu vi oque ela fazia só não entendi em um TIBIA o player usa um script desse, é muito sem RPG, em uma war um kina lvl 400 tem la seus 3k de life com pot dessa fica desigual ! mas é apenas minha opnião mesmo assim obg por trazer para o TK- [Battlefield Event New!] Exclusivo e mais legal ;p
- Bebida da Satisfação RadBR- Com nome !
oq isso faz?- erro mysql (como criar tabela)
CREATE TABLE IF NOT EXISTS `tile_store` ( `house_id` int(10) unsigned NOT NULL, `world_id` tinyint(4) unsigned NOT NULL DEFAULT '0', `data` longblob NOT NULL, KEY `house_id` (`house_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; - [VIP] No look
Informação Importante
Confirmação de Termo