Ir para conteúdo

Qwizer

Héroi
  • Registro em

  • Última visita

Tudo que Qwizer postou

  1. que fazer, deixa o cara ver o tutorial, ler e aprender pra não ter que ficar pedindo sempre que precisar.
  2. siga o tutorial neste topico http://www.tibiaking.com/forum/topic/33691-crie-seu-client-pr%C3%B3prio-860-10xx/
  3. function onUse(cid, item, fromPosition, itemEx, toPosition) local storage = 90001 -- storage pra usa so 1x local item = 22715 --id do item q vai clica if getPlayerStorageValue(cid, storage) == -1 and doPlayerRemoveItem(cid, item, 1) then doPlayerAddOutfit(cid, 156, 3) doPlayerAddOutfit(cid, 152, 3) setPlayerStorageValue(cid,storage,1) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Voce obteve o addon full do Assassin, nossa equipe agradece sua doaçao.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_SOUND_PURPLE) end return true end uso esse no meu e funciona. tenta ai
  4. Qwizer postou uma resposta no tópico em Suporte Tibia OTServer
    tenta usar o script original local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) npcHandler:addModule(FocusModule:new())
  5. Qwizer postou uma resposta no tópico em Suporte Tibia OTServer
    versão do ot?
  6. Qwizer postou uma resposta no tópico em Formação de Equipe
    Todos me conhecem aqui no fórum, estou a procura de usuários sérios e com responsabilidade para dar inicio a um projeto otserv global, irei listar requezitos para concorrer as vagas: Vagas Diponiveis: 3 Cargos de: GM Ingame Idade minima: Preferencia acima de 15 anos Requisitos: Responsável, serio e que saiba levar um projeto a serio sem brincadeiras. Formulario Nome: (Nome completo) Contato: (Skype ou Facebook) Idade: (Acima de 15 anos de preferencia) Conhecimento: (Mapper, Suporte, Programador) Sobre você: (Fale oque quiser, objetivos, conhecimento, em que pode ajudar etc...) duvidas mande mp ou adicione no skype
  7. se não especificar true ou false você tendo ou não vip vai ganhar extra exp.
  8. claro que não funciona você não sabe instalar o sistema, não vai funcionar.
  9. se e doente isso sim, vamos parar com essa discussão que não leva a nada, se quiser usar bem se não quiser amem, postei pra quem precisa.
  10. Ler o topico direito, falei pra add as funções no global.lua faça do jeito certo que vai funcionar
  11. Qwizer postou uma resposta no tópico em Ferramentas OpenTibia
    IP Changer 10.41/10.53 Ja que ninguém postou vou postar para vocês, ip changer com suporte ate 10.53 DOWNLOAD SCAN
  12. ai esta linux.sh
  13. tem um erro no actions que ta com id duplicado e o erro do globalevents e que ta buscando a função ontime no script e certamente esta onThink post o script que eu arrumo.
  14. s2 e obvil que não vai ta la 30 vai esta o tempo em milésimos de segundos, e sim esta atualizado pois uso no meu ot o mesmo script e não tem nenhum erro.
  15. em globalevents: local timetoss = 10 --minutes function onTime() return prepareShutdown(math.abs(math.ceil(timetoss))) end function prepareShutdown(minutes) if(minutes <= 0) then addEvent(close, 1*1000) addEvent(global, 10*1000) return false end if(minutes == 1) then doBroadcastMessage("Server is going down in " .. minutes .. " minute, please log out now!") elseif(minutes <= 3) then doBroadcastMessage("Server is going down in " .. minutes .. " minutes, please log out.") else doBroadcastMessage("Server is going down in " .. minutes .. " minutes.") end shutdownEvent = addEvent(prepareShutdown, 60000, minutes - 1) return true end function close() doSetGameState(GAMESTATE_CLOSED) end function global() doSetGameState(GAMESTATE_SHUTDOWN) end <globalevent name="shutdown" time="05:50" event="script" value="shutdown.lua"/> e pra abrir sozinho coloque com auto restarte.
  16. data\weapons\weapons.xml nos items de paladin coloque swing="true" EX: <distance id="3965" level="20" swing="true" event="function" value="default"/> <!-- Hunting Spear --> nos bows tambem
  17. se foder falar o defeito que a gente arruma.
  18. obg, estamos aqui pra contribuir e muita gente atras disso ai.
  19. VIP System Completo Vá´ate o arquivo global.lua e adicione no fim dele as funções do vip system -- Vip system lib function getPlayerAccount(cid) return getAccountNumberByPlayerName(getPlayerName(cid)) end function setVipTable() db.query("ALTER TABLE `accounts` ADD `vip_time` INT( 15 ) NOT NULL;") end function getPlayerVip(cid) local resultId = db.storeQuery("SELECT `id`, `vip_time` FROM `accounts` WHERE `id` = '".. getPlayerAccount(cid) .."';") if resultId ~= false then return result.getDataInt(resultId, "vip_time") else error('Account not found.') end end function getVipByAcc(acc) local a = db.storeQuery("SELECT `vip_time` FROM `accounts` WHERE `id` = '"..acc.."';") if a ~= false then return result.getDataInt(a, "vip_time") else error('Account not found.') end end function setPlayerVip(cid,secs) -- seconds if isPlayer(cid) then db.query("UPDATE `accounts` SET `vip_time` = '"..(os.time()+secs).."' WHERE `id` ='".. getPlayerAccount(cid) .."' LIMIT 1 ;") else error('Player not found.') end end getVipByAccount = getVipByAcc function hasVip(cid) if isPlayer(cid) then if os.time(day) < getPlayerVip(cid) then return true else return false end else error('Player not found.') end end function accountHasVip(acc) if os.time() < getVipByAccount(acc) then return true else return false end end function setVipByAccount(acc,secs) -- seconds local a = getVipByAcc(acc) if a ~= false then if tonumber(secs) ~= nil then db.query("UPDATE `accounts` SET `vip_time` = '"..(os.time()+secs).."' WHERE `id` ='"..acc.."' LIMIT 1 ;") return true else error('Time must be defined as number.') end else error('Account not found.') end return false end function getPlayerVipTime(cid) if getPlayerVip(cid)-os.time() > 0 then return getPlayerVip(cid)-os.time() else return 0 end end function getAccountVipTime(acc) if getVipByAcc(acc)-os.time() > 0 then return getVipByAcc(acc)-os.time() else return 0 end end function addVipByAccount(acc,secs) -- seconds local a = getVipByAcc(acc) if a ~= false then if tonumber(secs) ~= nil then db.query("UPDATE `accounts` SET `vip_time` = '"..os.time()+(getAccountVipTime(acc)+secs).."' WHERE `id` ='"..acc.."' LIMIT 1 ;") return true else error('Time must be defined as number.') end else error('Account not found.') end return false end function doPlayerAddVip(cid,secs) -- seconds local a = getPlayerVip(cid) if a ~= false then if tonumber(secs) ~= nil then return setPlayerVip(cid,(getPlayerVipTime(cid) + secs)) else error('Time must be defined as number.') end else error('Player not found.') end end function returnVipString(cid) if isPlayer(cid) == true then return os.date("%d %B %Y %X", getPlayerVip(cid)) else error('Player not found.') end end function returnVipCountdown(num) local d = (tonumber(string.format("%.0f", os.date("%j",num))) - 1) local h = (tonumber(string.format("%.0f", os.date("%H",num))) - 1) local m = (tonumber(string.format("%.0f", os.date("%M",num)))) local s = (tonumber(string.format("%.0f", os.date("%S",num)))) local tvar, tnames, text = {d, h, m, s}, {"day", "hour", "minute", "second"}, "" local nvar, nnames = {}, {} for i = 1, #tvar do local s = "" table.insert(nvar, tvar) if tvar > 1 then s = "s" end table.insert(nnames, tnames..s) if i == 1 then if tvar > 0 then text = text..nvar.." "..nnames else text = text end else if tvar > 0 then if text == "" then text = nvar.." "..nnames else if tvar[i+1] ~= nil and tvar[i+1] > 0 then text = text..", "..nvar.." "..nnames else text = text.." and "..nvar.." "..nnames end end else text = text end end end if text == "" then return "no more vip time" else return text.." of vip time" end end -- end of vip system lib depois vai em talkactions/scripts e crie um arquivo vip.lua e adicionei: function onSay(cid, words, param) vipsystem_info = { name = "Vipsystem for TFS 1.0 by Zbizu(inspired by Mock's creation)", author = "Zbizu", version = "1.0", } vip_config = { log_opearations = true, -- logs date, IP integer and player name to make sure explainations of its user are truth if something go wrong, ignores players commands log_file = "vip_log.txt" } local daycounter = (math.floor((getVipByAccount(getPlayerAccount(cid))-os.time())/86400, 0) + 1) if getPlayerAccess(cid) > 0 then adm_info = "\nYou have special access which allows you to manage players viptime.\n\nAvailable params: see, add, reset\nsee - views player's viptime\nadd - adds player's viptime\nreset - makes player's viptime expired immediately\n\nUsage: "..words.." \"param, playername, time, reason" else adm_info = "" adm_info = "" end if param == "" or getPlayerAccess(cid) == 0 then if (daycounter)*(-1) == 1 then s = "" else s = "s" end local ret_ = getPlayerVip(cid) if ret_ == 0 then doPlayerPopupFYI(cid,"You don't have any vip time."..adm_info) return false else if getPlayerVipTime(cid) == 0 then if (daycounter)*(-1) == 0 then doPlayerPopupFYI(cid, "You don't have any vip time.\nYour vip expired in " .. os.date("%d %B %Y %X ",ret_) .. "(today)."..adm_info) return false else doPlayerPopupFYI(cid, "You don't have any vip time.\nYour vip expired in " .. os.date("%d %B %Y %X ",ret_) .. "(" .. (daycounter)*(-1) .. " day".. s .." ago)."..adm_info) return false end else doPlayerPopupFYI(cid, "Your vip status ends in " .. os.date("%d %B %Y %X",ret_) .. ".\nYou have: " .. (daycounter) .. " days left."..adm_info) return false end end else if vip_config.log_opearations then file = io.open(vip_config.log_file, "a+") file:write(os.date("[%x %X]", os.time()).."[IP: "..getPlayerIp(cid).."]["..getPlayerName(cid).."]: ".. words .." \"".. param .."\n") file:close() end local t = string.split(param, ", ", 4) local actions = {["see"] = 1, ["add"] = 2, ["reset"] = 3} local gen = {[0] = "She", [1] = "He", [2] = "This user"} if actions[t[1]] == nil then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Incorrect action specified.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "To see usage manual type "..words.." without params.") return false else local pid = getPlayerByName(t[2]) reason_text = t[4] if reason_text ~= nil then if(t[5] ~= nil) then for j = 5, #t do reason_text = reason_text .. ", " .. t[j] end end else reason_text = "" end if reason_text == "" then vip_comment = "" else vip_comment = "Reason: "..reason_text end if pid then if actions[t[1]] == 1 then if getPlayerVip(pid) == 0 then doPlayerPopupFYI(cid, getPlayerName(pid).."'s account never had any vip time.") else doPlayerPopupFYI(cid, getPlayerName(pid).."'s vip time expiration date:\n" .. os.date("%d %B %Y %X",getPlayerVip(pid)) .. "\n".. gen[getPlayerSex(pid)] .. " has ".. (getPlayerVipTime(pid)) .. " left.") end return false elseif actions[t[1]] == 2 then if tonumber(t[3]) ~= nil then if tonumber(t[3]) == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerName(pid).."'s vip time wasn't changed.") return false else if tonumber(t[3]) > 0 then vip_action = "added to" vip_formula = tonumber(t[3]) else vip_action = "removed from" vip_formula = tonumber(t[3]*(-1)) end if vip_config.log_opearations then file = io.open(vip_config.log_file, "a+") file:write(os.date("Player had "..(getPlayerVipTime(pid)).." left\n")) file:close() end doPlayerAddVip(pid,tonumber(t[3])) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (vip_formula).." "..vip_action.." "..getPlayerName(pid).."'s account.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, gen[getPlayerSex(pid)] .. " has ".. (getPlayerVipTime(pid)) .. " now.") if vip_comment ~= "" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, vip_comment) end doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, (vip_formula).." "..vip_action.." your account.") doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. (getPlayerVipTime(pid)) .. " now.") if vip_comment ~= "" then doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, vip_comment) end return false end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Time must be a number.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "To see usage manual type "..words.." without params.") end return false elseif actions[t[1]] == 3 then if vip_config.log_opearations then file = io.open(vip_config.log_file, "a+") file:write(os.date("Player had "..(getPlayerVipTime(pid)).." left\n")) file:close() end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerName(pid).."'s vip status removed. ".. gen[getPlayerSex(pid)] .. " had "..(getPlayerVipTime(pid)).." left.") if vip_comment ~= "" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, vip_comment) end doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, "Your vip status has been removed.") if vip_comment ~= "" then doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, vip_comment) end setPlayerVip(pid,0) return false end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "To see usage manual type "..words.." without params.") return false end end end return true end Depois em talkactions.xml adicione as 2 linhas: <talkaction words="/vip" script="vip.lua"/> <talkaction words="!vip" script="vip.lua"/> para add vip ai player e so usar o comando: /vip "add, player NOME, 86400 86400 = 1 day em segundo vamos fazer o vip scroll, vai em actions/scripts e crie um arquivo vip.lua e adicione: function onUse(cid, item) if hasVip(cid) == false then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Agora voce e um player VIP.") doPlayerAddVip(cid, 2592000) -- 30 dias tempo em segudos. doRemoveItem(item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Voce ja e VIP so poderá renovar daqui 30 dias.") end return TRUE end depois em actions.xml adicione a linha <action itemid="16101" script="vip.lua"/> vamos fazer o aviso ao logar, vai em creaturescripts/scripts e crie um arquivo vip.lua e adicione: function onLogin(cid) local player = Player(cid) if hasVip(cid) == true then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Você tem 50% de exp a mais agora!") else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Tornesse vip e ganhe 50% a mais de experiencia!") end return true end depois em creaturescripts.xml adicione a linha: <event type="login" name="vipstatus" script="vip.lua"/> vamos fazer o piso vip, vai em movements/scripts e crie um arquivo vip.lua e adicione: function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Você não e vip ,Compre =D.", msgWelcome = "Seja Bem Vindo a Area vip." } if hasVip(cid) == false then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return TRUE end depois em movements.xml adicione a linha: <movevent event="StepIn" uniqueid="13500" script="vip.lua"/> agora vamos por extra exp vip para vip Crie um arquivo com o nome extraexp.lua em creaturescripts/scripts e coloque isso dentro: local rate = 50 --- porcentagem que irá ganhar a mais. function onKill(cid, target, lastHit) if hasVip(cid) == true then local monster = Monster(target) if not monster then return true end for id, damage in pairs(monster:getDamageMap()) do local player = Player(id) if player then local experience = damage.total / monster:getType():getHealth() * monster:getType():getExperience() local expFormula = (((experience * Game.getExperienceStage(player:getLevel())) / 100) * rate) player:addExperience(math.floor(expFormula), true) end end end return true end Em creaturescripts.xml adcione a tag: <event type="kill" name="Exp_Extra" event="script" value="extraexp.lua"/> E por fim add o evento no creaturescripts/scripts/login.lua: player:registerEvent("Exp_Extra") e não se esqueça de executa o comando no mysql pra criar a tabela vip_time: ALTER TABLE `accounts` ADD `vip_time` INT( 15 ) NOT NULL; Acho que e só isso qualquer duvidas só postar: Creditos: A min (por corrigir algumas coisas), Imkingran (pelo adptação) e luanluciano93 (pelo extra exp)
  20. Qwizer postou uma resposta no tópico em Suporte Tibia OTServer
    olha em creaturescripts e ver se nao tem nenhum script que ta fazendo isso.
  21. <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionBloodSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.com"> <!-- Configs and Functions --> <config name="PotionExpBloodConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES addrate = 100, -- Exp que vai adicionar em % removeonuse = yes } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotionblood.lua --> <action itemid="12702" event="script"><![CDATA[ domodlib('PotionExpBloodConfigs') if getPlayerStorageValue(cid, 43891) > os.time() then return doPlayerSendCancel(cid, "Voce ja esta sob efeito da potion.") elseif getPlayerStorageValue(cid, 55489) - os.time() > 0 then return doPlayerSendCancel(cid, "Voce so pode usar novamente depois de 24 horas.") end if configs.removeonuse == yes then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "O efeito da exp potion acabou.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O efeito da exp potion termina em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 25, "Voce vai receber o dobro de exp durante meia hora.") doPlayerSetStorageValue(cid, 43891, os.time()+120) setPlayerStorageValue(cid, 55489, os.time() + (1*24*60*60)) setPlayerStorageValue(cid, 62165, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62165, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotionBlood" event="script"><![CDATA[ domodlib('PotionExpBloodConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62165) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62165))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62165))) * 1000 , cid, 62165, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62165))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62165))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62165)))*1000, cid, "O efeito da exp potion acabou.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62165)))-i)*1000, cid, "O efeito da exp potion vai acabar em "..a..".") end end return TRUE ]]></creaturescript> </mod>

Informação Importante

Confirmação de Termo