Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 04/25/12 em todas áreas

  1. [Talkaction] Create Teleport

    Angelo Gabriel e um outro reagiu a Skyforever por uma resposta no tópico

    2 pontos
    Tipo: TalkAction. Testado: Sim, 8.6 TFS 0.3.6. @Oque Faz?. Muitos gods/adms tem problemas ao criar teleport exêmplo pelo /i você não pode esconder ele bem então resolvi criar essa talkaction para ajudar os donos de otserv. @Instalando. Vá em /data/talkactions/talkactions.xml e adicione a seguinte tag: <talkaction log="yes" access="4" words="!teleport" event="script" value="createTp.lua"/> agora vá em /data/talkactions/scripts copie um arquivo da extensão .lua e renomeie para createTp.lua e adicione o seguinte conteúdo nele function onSay(cid, words, param, channel) local T = string.explode(param, ",") local toPos = {x = T[1], y = T[2], z = T[3]} if not param or not tonumber(T[1]) or not tonumber(T[2]) or not tonumber(T[3]) then doPlayerSendTextMessage(cid, 27, "Error, talkaction incorrect only numbers accepted, for example: !comando positionX, positionY, positionZ (!comando 1000, 1000, 7).") return true end doCreateTeleport(1387, toPos, getPosByDir(ultimapos, getCreatureLookDirection(cid), 1)) doSendMagicEffect(getPosByDir(ultimapos, getCreatureLookDirection(cid), 1), math.random(28, 30)) doSendAnimatedText(getPosByDir(ultimapos, getCreatureLookDirection(cid), 1), "TELEPORT", math.random(1, 255)) doPlayerSendTextMessage(cid, 28, "You has been created teleport for the pos ( X: " .. T[1] .. " | Y: " .. T[2] .. " | Z: " .. T[3] .. ".") return true end @TÓPICO ATUALIZADO 7 DE DEZEMBRO DE 2012, 14:23, POIS HAVIA BUGS NELE, SCRIPT CORRIGIDO E FUNCIONANDO.
  2. Simple Task 3.0

    ricardo3 e um outro reagiu a Vodkart por uma resposta no tópico

    2 pontos
    kk seria uma boa mas acho que seria cansativo para configurar, dá para fazer sem problema, só que não tem como fazer por lib e tal para ficar mais fácil de mexer, teria que adicionar no xml cada task mas talvez eu faça sim e ai usa quem quiser xd obrigado pela sugestão! abraços
  3. [GFS] Guild Frag System

    Magalhaes92 reagiu a Vodkart por uma resposta no tópico

    1 ponto
    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; Sistema Configuração Actions function onUse(cid, item, frompos, item2, topos) local MyGuild = getPlayerGuildName(cid) if not HaveGuild(cid) then return doPlayerSendTextMessage(cid,22,"Sorry, you're not in a guild.") elseif not HaveAcess(MyGuild) then return doPlayerSendTextMessage(cid,22,"Your guild no has access to this area.") end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, topos, TRUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome,The access of your guild in this area ends in "..getAcessDate(getGuildWinnerName())) return true end Tag: <action actionid="84005" script="FragSystemDoor.lua"/> Creaturescript function onKill(cid, target, lastHit) local config = {MaxDifLevel = 50, MyGuild = getPlayerGuildName(cid)} if isPlayer(cid) and isPlayer(target) and HaveGuild(cid) and HaveGuild(target) and getPlayerGuildId(cid) ~= getPlayerGuildId(target) and getPlayerIp(target) ~= getPlayerIp(cid) and math.abs(getPlayerLevel(cid) - getPlayerLevel(target)) <= config.MaxDifLevel and getGlobalStorageValue(frag_guild.start_frags) <= 0 then addFragsByGuild(config.MyGuild,frag_guild.FragsPerKill) doBroadCastGuild(config.MyGuild,20,'[Guild Frag System] Your guild received '..frag_guild.FragsPerKill..' frag because have killed a player another guild, now your guild have '..getFragsByGuild(config.MyGuild)..' frags') if getFragsByGuild(config.MyGuild) >= frag_guild.FragsToWinAcess then addAcess(config.MyGuild, frag_guild.AcessTimeDays) addHonorPoints(config.MyGuild, frag_guild.Honor_Point) doBroadcastMessage("[Guild Frag System]\nThe guild ["..config.MyGuild.."] is dominant for having achieved "..frag_guild.FragsToWinAcess.." Frags!\nYour domain ends in "..getAcessDate(config.MyGuild)) cleanGuildFrags() setGlobalStorageValue(frag_guild.start_frags, 1) if frag_guild.MoreExpToGuild == true then local players = {} for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildName(cid) == config.MyGuild then table.insert(players, cid) end end for i = 1, #players do doPlayerSetExperienceRate(players[i], frag_guild.Exp_Rate) end end end end return TRUE end GuildFragsLogin.lua function onLogin(cid) registerCreatureEvent(cid, "FragsGuildLogin") registerCreatureEvent(cid, "FragsGuildKill") if getPlayerStorageValue(cid,frag_guild.Honor_Storage) == -1 then setPlayerStorageValue(cid, frag_guild.Honor_Storage, 0) end local MyGuild,StorCheck = getPlayerGuildName(cid),17595 if HaveGuild(cid) then if HaveAcess(MyGuild) then setPlayerStorageValue(cid, StorCheck, 1) if frag_guild.MoreExpToGuild == true then doPlayerSetExperienceRate(cid, frag_guild.Exp_Rate) end elseif getPlayerStorageValue(cid, StorCheck) == 1 and not HaveAcess(MyGuild) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid, "[Guild Frag System]\nThe domain of your guild is over and you've been teleported to the temple.") setPlayerStorageValue(cid, StorCheck, -1) if getGlobalStorageValue(frag_guild.start_frags) >= 1 then setGlobalStorageValue(frag_guild.start_frags, 0) end end end return TRUE end Tag <event type="login" name="FragsGuildLogin" script="GuildFragsLogin.lua"/> <event type="kill" name="FragsGuildKill" script="GuildFragsKill.lua"/> globalevent function onThink(interval, lastExecution) if getGuildWinnerName() == "" and getGlobalStorageValue(frag_guild.start_frags) >= 1 then setGlobalStorageValue(frag_guild.start_frags, 0) end return doBroadcastMessage("".. (getGuildWinnerName() == "" and "[Guild Frag System]\nThe first guild to reach "..frag_guild.FragsToWinAcess.." frags will gain "..frag_guild.AcessTimeDays.." days of access to exclusive areas, for more information enter !guildfrags" or "[Guild Frag System]\nCurrently guild dominant is ["..getGuildWinnerName().."] and your domain ends in "..getAcessDate(getGuildWinnerName()).."") .."", 22) end Tag <globalevent name="GuildFrags" interval="1800" event="script" value="GuildFragsInfo.lua"/> talkactions function onSay(cid, words, param) if words == "!myhonor" or words == "/myhonor" then return doPlayerPopupFYI(cid,"Honor Points can be exchanged for special items in npc\nAnd each domain, every guild players receive "..frag_guild.Honor_Point.." Honor Points!\n\n\nMy Honor Points: "..getHonorPoints(cid)) elseif words == "!guildfrags" or words == "/guildfrags" then if param == "rank" then local max_guild,str = 10,"" str = "--[ Rank Guild Frags ]--\n\n" query = db.getResult("SELECT `name`, `frags` FROM `guilds` WHERE `frags` ORDER BY `frags` DESC, `name` ASC;") if (query:getID() ~= -1) then k = 1 while true do str = str .. "\n " .. k .. ". " .. query:getDataString("name") .. " - [" .. query:getDataInt("frags") .. "]" k = k + 1 if not(query:next()) or k > max_guild then break end end query:free()end if str ~= "" then doPlayerPopupFYI(cid, str) end return true end doPlayerPopupFYI(cid,"".. (getGuildWinnerName() == "" and "The server does not have any dominant guild\n\nTo show the rank of frags enter !guildfrags rank" or "Currently guild dominant is ["..getGuildWinnerName().."]\n\nYour domain ends in "..getAcessDate(getGuildWinnerName()).."") .."") end return true end Tag <talkaction words="!guildfrags;/guildfrags;!myhonor;/myhonor" event="script" value="GuildFragsRank.lua"/> Por Mod Npc (obs: o NPC funciona caso você use MOD tbm) <?xml version="1.0"?> <npc name="Major Ancient" script="data/npc/scripts/trade_honor.lua" walkinterval="50000" floorchange="0"> <health now="100" max="100"/> <look type="287" head="78" body="88" legs="0" feet="88" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. I {trade} items for honor points!"/> </parameters> </npc> trade_honor.lua 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 Honor_Storage = 215548 function getHonorPoints(cid) local Honor = getPlayerStorageValue(cid, Honor_Storage) return Honor < 0 and 0 or Honor end local shopWindow = {} local t = { [2195] = {price = 5}, -- [id do item] e em price qnto honor points vai custar [2493] = {price = 25}, [2361] = {price = 30}, [8851] = {price = 20}, [8925] = {price = 30}, [2640] = {price = 50}, [2494] = {price = 100}, [9932] = {price = 50}, [2472] = {price = 70}, [8931] = {price = 100} } local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if t[item] and getHonorPoints(cid) < t[item].price then selfSay("you do not have "..t[item].price.." Honor Points", cid) else doPlayerAddItem(cid, item) setPlayerStorageValue(cid, Honor_Storage, getPlayerStorageValue(cid, Honor_Storage) - t[item].price) selfSay("Here you item", 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())
  4. [Talkaction] !buypremium day's

    Dalken reagiu a Skyforever por uma resposta no tópico

    1 ponto
    Eae galera do TK vim aqui trazer 2 scripts meu de !buypremium vamos ao primeiro script primeiramente va em talkactions.xml e adcione essa tag <talkaction words="!buypremium" event="script" value="buypremium.lua"/> depois vá em /data/talkactions/scripts cria um arquivo buypremium e adcione isso dentro Como funciona você fala !buypremium 5 compra 5 dias de premium por 100 gps cada um preço editavel no script Vamos ao segundo script de buypremium em talkactions.xml adcione essa tag: <talkaction words="!buypremium" event="script" value="buypremium.lua"/> em /data/talkactions/scripts cria um arquivo e renomeie para buypremium e adcione isso dentro Explicando [1] = {price = 1000}, --- dias de premium, quanto ira custar [7] = {price = 7000}, [15] = {price = 15000}, [30] = {price = 30000}, [50] = {price = 50000}, [100] = {price = 100000}, } em colchetes e quantos dias ira custar, price e alto explicativo para você adcionar mais opçoes do adcionar uma nova linha! se gostaram REP+ @EDIT só pra avisar não pode comprar mais de um ano de premium account @EDIT2 Quem copiou antes copia denovo
  5. Anyur ShowOFF

    MaXwEllDeN reagiu a Anyur por uma resposta no tópico

    1 ponto
    Anyur ShowOFF Coloco mais Fotos Depois! Espero Comentários!
  6. [Talkaction] Create Teleport

    dragster reagiu a ricardo3 por uma resposta no tópico

    1 ponto
    INTERESSANTE
  7. [Pedido] Item que teleporta

    bleckout94 reagiu a MaXwEllDeN por uma resposta no tópico

    1 ponto
    function onUse(cid, item, frompos, item2, topos) if (isPlayerPzLocked(cid)) then return doPlayerSendCancel(cid, "Você não pode se teletransportar agora!") end local msg = "Mensagem que irá dizer." pos = {x=***, y=***, z=*} doTeleportThing(cid, pos) doPlayerSendTextMessage(cid,22, msg) return doRemoveItem(item.uid, 1) end COloquei verificação pra não poder teletransportar com pz locked
  8. [Pedido] Item que teleporta

    Wellitin.eduard13 reagiu a Fabiano Alberto por uma resposta no tópico

    1 ponto
    só tira esse end antes do return true function onUse(cid, item, frompos, item2, topos) pos = {x=***, y=***, z=*} doTeleportThing(cid, pos) doPlayerSendTextMessage(cid,22,"Mensagem que irá dizer.") doRemoveItem(item.uid, 1) end return TRUE end
  9. [Talkaction] !buypremium day's

    Baiakzik reagiu a Skyforever por uma resposta no tópico

    1 ponto
    Vodkart obrigado pela funçao rep+
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo