Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 07/17/15 em todas áreas

  1. Vodkart

    Sistema de Reset

    pq ta fazendo pelo nome? acessa pelo id do player que não tem erro local coNdConf = { needPz = true, -- Precisa estar em Pz pra resetar? [true, false] needPa = false, -- Precisa ser Premium Account Pra resetar? [true, false] withe = false, -- Players com Pk Withe podem resetar? [true, false] red = false, -- Players com Pk Red pode resetar? [true, false] battle = false, -- Players precisão estar sem battle pra resetar? [true, false] teleport = true, -- Teleportar Player para o templo após resetar? [true, false] look = true, -- Aparecer Resets no Look do Player? [true, false] resetConf = { Level = 350, -- Level Necessário para Resetar. [Valor] backLvl = 100 -- Level que voltará após o Reset. [Valor] } } function getPlayerReset(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 function onSay(cid, words, param) local resetValue = getPlayerReset(cid) + 1 if getPlayerLevel(cid) < coNdConf.resetConf.Level then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return true elseif coNdConf.needPz and not getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar em Protection Zone Para Resetar. -") return true elseif coNdConf.needPa == true and not isPremium(cid) then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa ser Premium Account para Resetar. -") return true elseif not coNdConf.withe and getCreatureSkullType(cid) == 3 then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Withe. -") return true elseif not coNdConf.red and getCreatureSkullType(cid) == 4 then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Red. -") return true elseif coNdConf.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar sem Battle para Resetar. -") return true end doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `reset` = " .. resetValue .. ", `level` = "..coNdConf.resetConf.Level..", `experience` = "..getExperienceForLevel(coNdConf.resetConf.Level)..", `description` = "..(coNdConf.look and "[Resets: "..resetValue.."]" or "").." WHERE `id`= "..getPlayerGUID(cid)) return true end
    2 pontos
  2. bartazar

    [Download] sprite do onepiece

    Imagem : Baixar contém gráfico chopper, luffy, zoro, usopp, nami, sanji, monsters, sets, weapons Download: http://www.mediafire.com/download/n66nceocb6dchdq/sprite_do_onepiece.rar Scan: https://www.virustotal.com/pt/file/06f4ce7bd586ee2ba2567db616bd9d8dab504345d602d6f727d7927a2e58d7ee/analysis/1437127842/
    2 pontos
  3. Bruno

    TopLevel Effect

    Introdução Ele simplesmente manda um efeito para o Top Level caso ele estiver online, além disso, ele checa quando o top é ultrapassado e o efeito passa automaticamente ao novo top. Instalação: Em data/creaturescripts/creaturescripts.xml adicione: <event type="login" name="TopEffect" event="script" value="topeffect.lua"/> <event type="advance" name="CheckTop" event="script" value="topeffect.lua"/>Agora crie um arquivo em data/creaturescripts/scripts com o nome topeffect.lua e adicione: --[[ Script by Bruno Minervino para o Tibia King Caso for postar, colocar os créditos ]] local config = { tempo = 10, --tempo em segundos mensagem = { texto = "[TOP]", --não use mais de 9 caracteres efeito = TEXTCOLOR_LIGHTBLUE --efeito para a função doSendAnimatedText }, efeito = 30, --efeito da função doSendMagicEffect globalstr = 5687 -- uma global storage qualquer q esteje vazia } --[[ Não mexa em nada abaixo ]] local topPlayer = getGlobalStorageValue(config.globalstr) > 0 and getGlobalStorageValue(config.globalstr) or 0 function onLogin(cid) local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local pid = query:getDataString("id") local name = query:getDataString("name") if getPlayerName(cid) == name then if topPlayer ~= getPlayerID(cid) then topPlayer = getPlayerID(cid) end setGlobalStorageValue(config.globalstr, pid) TopEffect(cid) end end registerCreatureEvent(cid, "CheckTop") return true end function onAdvance(cid, skill, oldlevel, newlevel) if skill == 8 then local query = db.getResult("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then local level = tonumber(query:getDataString("level")) if level < newlevel and topPlayer ~= getPlayerID(cid) then doBroadcastMessage("O jogador " .. getPlayerName(cid) .. " tornou-se o novo Top Level. Parabens!", 22) topPlayer = getPlayerID(cid) doSaveServer() setGlobalStorageValue(config.globalstr, getPlayerID(cid)) TopEffect(cid) end end end return true end function TopEffect(cid) if not isPlayer(cid) then return true end if topPlayer == getPlayerID(cid) then doSendAnimatedText(getCreaturePosition(cid), config.mensagem.texto, config.mensagem.efeito) doSendMagicEffect(getCreaturePosition(cid), config.efeito) addEvent(TopEffect, config.tempo * 1000, cid) end end function getPlayerNameById(id) local query = db.getResult("SELECT `name` FROM `players` WHERE `id` = " .. db.escapeString(id)) if query:getID() ~= -1 then return query:getDataString("name") end return 0 end function getPlayerIdByName(name) local query = db.getResult("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(name)) if query:getID() ~= -1 then return tonumber(query:getDataString("id")) end return 0 end function getPlayerID(cid) return getPlayerIdByName(getPlayerName(cid)) end Espero que gostem
    1 ponto
  4. ThiagoBji

    [8.40] FoxWorld v1

    [8.40] FoxWorld v1 Exclusivos: Caves Magias Sistemas New Magias de Knights Magias de Paladins Magias de Sorcerers Magias de Druid Nome das Magias Knight: Uber Exori, Ezzori, Senpou Hur Paladin: Exori Song, Rasenshuriken, Karamatsu no Mai, Senpou Hur Sorcerer: Exevo Gran Mas Vis, Housenka Druid: Exevo Gran Mas Pox, Exevo Grav Vita, Exevo Para, Hyakka Ryouran Gran Castle Descrição: Trata-se de um evento em que o jogador tem por objetivo, subir todos os andares de um castelo enorme e destruir a torre de nome Gran Tower que fica no centro do último andar. Em breve, v2. Download: http://www.mediafire.com/download/w5wit34rnnxf3bx/[8.40]_FoxWorld_(Thiagobji).rar Scan: https://www.virustotal.com/pt/url/c8bd6107fcafd1c863b0c582080dc735339583a68e8c82f3584a1a5a79b1636b/analysis/1414685903/ Imagens © Copyright FoxWorld Open Tibia Server. All Rights Reserved.
    1 ponto
  5. Yan Oliveira

    Sistema Quest em Janela

    Tutorial refeito em: https://www.xtibia.com/forum/topic/251549-quest-log-em-janela/?tab=comments#comment-1759135
    1 ponto
  6. Kydrai

    Vip System By Account V1.0

    Vip System by Account 1.0 By Kydrai Este é um vip system por account, ou seja, um sistema de vip válido para todos os characters de uma determinada conta. O script foi testado no TFS 0.3.6 - 8.54. E no site Gesior 0.3.4 beta4. Em caso de erros ou dúvidas é só postar. Funções do Script Função necessária para começar a usar o script: installVip() -> Cria a coluna no banco de dados para usar o sistema de vip (testei somente em sqlite, mas acredito que funcione em mysql) Funções que utilizam o account id: doTeleportPlayersByAccount(acc, topos) -> Teleporta todos os players da account getVipTimeByAccount(acc) -> Pega o tempo de vip setVipTimeByAccount(acc, time) -> Edita o tempo de vip getVipDaysByAccount(acc) -> Pega o tempo de vip em dias isVipAccount(acc) -> Verifica se é vip addVipDaysByAccount(acc, days) -> Adiciona dias de vip doRemoveVipDaysByAccount(acc, days) -> Remove dias de vip getVipDateByAccount(acc) -> Pega a data e hora que irá terminar a vip Funções que utilizam o creature id (cid): doTeleportPlayers(cid, topos) -> Teleporta todos os players da account getVipTime(cid) -> Pega o tempo de vip setVipTime(cid, time) -> Edita o tempo de vip getVipDays(cid) -> Pega o tempo de vip em dias isVip(cid) -> Verifica se é vip addVipDays(cid, days) -> Adiciona dias de vip doRemoveVipDays(cid, days) -> Remove dias de vip getVipDate(cid) -> Pega a data e hora que irá terminar a vip Inserindo as funções Abra a pasta data/lib, crie um arquivo lua e coloque: vipAccount.lua --[[ Name: Vip System by Account Version: 1.0 Author: Kydrai Forum: http://www.xtibia.com/forum/topic/136543-vip-system-by-account-v10/ [Functions] -- Install installVip() -- By Account doTeleportPlayersByAccount(acc, topos) getVipTimeByAccount(acc) setVipTimeByAccount(acc, time) getVipDaysByAccount(acc) isVipAccount(acc) addVipDaysByAccount(acc, days) doRemoveVipDaysByAccount(acc, days) getVipDateByAccount(acc) -- By Player doTeleportPlayers(cid, topos) getVipTime(cid) setVipTime(cid, time) getVipDays(cid) isVip(cid) addVipDays(cid, days) doRemoveVipDays(cid, days) getVipDate(cid) ]]-- -- Install function installVip() if db.executeQuery("ALTER TABLE `accounts` ADD viptime INT(15) NOT NULL DEFAULT 0;") then print("[Vip System] Vip System instalado com sucesso!") return TRUE end print("[Vip System] Não foi possível instalar o Vip System!") return FALSE end -- By Account function doTeleportPlayersByAccount(acc, topos) if db.executeQuery("UPDATE `players` SET `posx` = "..topos.x..", `posy` = "..topos.y..", `posz` = "..topos.z.." WHERE `account_id` = "..acc..";") then return TRUE end return FALSE end function getVipTimeByAccount(acc) local vip = db.getResult("SELECT `viptime` FROM `accounts` WHERE `id` = "..acc..";") if vip:getID() == -1 then print("[Vip System] Account not found!") return FALSE end return vip:getDataInt("viptime") end function setVipTimeByAccount(acc, time) if db.executeQuery("UPDATE `accounts` SET `viptime` = "..time.." WHERE `id` = "..acc..";") then return TRUE end return FALSE end function getVipDaysByAccount(acc) local vipTime = getVipTimeByAccount(acc) local timeNow = os.time() local days = math.ceil((vipTime - timeNow)/(24 * 60 * 60)) return days <= 0 and 0 or days end function isVipAccount(acc) return getVipDaysByAccount(acc) > 0 and TRUE or FALSE end function addVipDaysByAccount(acc, days) if days > 0 then local daysValue = days * 24 * 60 * 60 local vipTime = getVipTimeByAccount(acc) local timeNow = os.time() local time = getVipDaysByAccount(acc) == 0 and (timeNow + daysValue) or (vipTime + daysValue) setVipTimeByAccount(acc, time) return TRUE end return FALSE end function doRemoveVipDaysByAccount(acc, days) if days > 0 then local daysValue = days * 24 * 60 * 60 local vipTime = getVipTimeByAccount(acc) local time = vipTime - daysValue setVipTimeByAccount(acc, (time <= 0 and 1 or time)) return TRUE end return FALSE end function getVipDateByAccount(acc) if isVipAccount(acc) then local vipTime = getVipTimeByAccount(acc) return os.date("%d/%m/%y %X", vipTime) end return FALSE end -- By Player function doTeleportPlayers(cid, topos) doTeleportPlayersByAccount(getPlayerAccountId(cid), topos) end function getVipTime(cid) return getVipTimeByAccount(getPlayerAccountId(cid)) end function setVipTime(cid, time) return setVipTimeByAccount(getPlayerAccountId(cid), time) end function getVipDays(cid) return getVipDaysByAccount(getPlayerAccountId(cid)) end function isVip(cid) return isVipAccount(getPlayerAccountId(cid)) end function addVipDays(cid, days) return addVipDaysByAccount(getPlayerAccountId(cid), days) end function doRemoveVipDays(cid, days) return doRemoveVipDaysByAccount(getPlayerAccountId(cid), days) end function getVipDate(cid) return getVipDateByAccount(getPlayerAccountId(cid)) end Exemplos de uso Talkaction GOD: /installvip /addvip name, days /removevip name, days /checkvip name Player: /buyvip /vipdays talkactions.xml: <talkaction log="yes" access="5" words="/installvip;/addvip;/removevip;/checkvip" event="script" value="vipaccgod.lua"/> <talkaction words="/buyvip;/vipdays" event="script" value="vipaccplayer.lua"/> vipaccgod.lua: function onSay(cid, words, param, channel) local t = param:explode(",") local name, days = t[1], tonumber(t[2]) if words == "/installvip" then if installVip() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Vip System instalado com sucesso!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não foi possível instalar o Vip System!") end elseif words == "/addvip" then if name then if days then local acc = getAccountIdByName(name) if acc ~= 0 then addVipDaysByAccount(acc, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você adicionou "..days.." dia(s) de vip ao "..name..", agora ele possui "..getVipDaysByAccount(acc).." dia(s) de vip.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player não existe.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode adicionar essa quantidade de dia(s) de vip.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode adicionar dia(s) de vip a este player.") end elseif words == "/removevip" then if name then if days then local acc = getAccountIdByName(name) if acc ~= 0 then doRemoveVipDaysByAccount(acc, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você retirou "..days.." dia(s) de vip do "..name..", agora ele possui "..getVipDaysByAccount(acc).." dia(s) de vip.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player não existe.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode retirar essa quantidade de dia(s) de vip.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode retirar dia(s) de vip a este player.") end elseif words == "/checkvip" then if name then local acc = getAccountIdByName(name) if acc ~= 0 then local duration = getVipDateByAccount(acc) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O "..name.." possui "..getVipDaysByAccount(acc).." dias de vip."..(duration and (" Ela irá durar até "..duration..".") or "")) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player não existe.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode visualizar os dias de vip a este player.") end end return TRUE end vipaccplayer.lua: function onSay(cid, words, param, channel) if words == "/buyvip" then local price = 1000000 local days = 30 if doPlayerRemoveMoney(cid, price) then addVipDays(cid, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você adicionou "..days.." dia(s) de vip, agora você possui "..getVipDays(cid).." dia(s) de vip.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa de "..price.." para adicionar "..days.." dia(s) de vip.") end elseif words == "/vipdays" then local duration = getVipDate(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você possui "..getVipDays(cid).." dia(s) de vip."..(duration and (" Ela irá durar até "..duration..".") or "")) end return TRUE end Movement (Tile) Coloque actionid 15000 em um tile onde somente os vips poderão passar. movements.xml: <movevent type="StepIn" actionid="15000" event="script" value="viptile.lua"/> viptile.lua: function onStepIn(cid, item, position, fromPosition) if isVip(cid) == FALSE then doTeleportThing(cid, fromPosition, false) doSendMagicEffect(position, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente players vip podem passar.") end return TRUE end Creaturescript (Login) Quando player logar irá verificar se a vip do player acabou, se sim então irá teleportar todos os players da account para o templo, se não irá mostrar o tempo da vip. creaturescripts.xml: <event type="login" name="viplogin" script="viplogin.lua"/> viplogin.lua: function onLogin(cid) local vip = isVip(cid) if getVipTime(cid) > 0 and vip == FALSE then local townid = 1 doPlayerSetTown(cid, townid) local templePos = getTownTemplePosition(getPlayerTown(cid)) doTeleportThing(cid, templePos, false) setVipTime(cid, 0) doTeleportPlayers(cid, templePos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua Vip acabou!") elseif vip == TRUE then local duration = getVipDate(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você possui "..getVipDays(cid).." dia(s) de vip."..(duration and (" Ela irá durar até "..duration..".") or "")) end return TRUE end Action (Door) Coloque actionid 15001 na door onde somente os vips poderão passar. Use a porta gate of expertise (id: 1227) actions.xml: <action actionid="15001" script="vipdoor.lua"/> vipdoor.lua: function onUse(cid, item, fromPosition, itemEx, toPosition) if isVip(cid) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Somente players vip podem passar.") elseif item.itemid == 1227 then doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition) end return TRUE end NPC (Vendedor de VIP) vipnpc.xml: <?xml version="1.0" encoding="UTF-8"?> <npc name="Vendedor de VIP" script="vipnpc.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|, I sell {vip} days."/> </parameters> </npc> vipnpc.lua: 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 function buyVip(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if doPlayerRemoveMoney(cid, parameters.price) then addVipDays(cid, parameters.days) npcHandler:say('Thanks, you buy '..parameters.days..' vip days. You have '..getVipDays(cid)..' vip days.', cid) else npcHandler:say('Sorry, you don\'t have enough money.', cid) end npcHandler:resetNpc() return true end local node1 = keywordHandler:addKeyword({'vip'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want buy 30 vip days for 1000000 gp\'s?'}) node1:addChildKeyword({'yes'}, buyVip, {price = 1000000, days = 30}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true}) npcHandler:addModule(FocusModule:new()) Erros e Soluções Configurando o Gesior Com essa configuração irá aparecer o vip status do player no site e será possível vender vip pelo site. Se eu esqueci de alguma coisa é só avisar. accountmanagement.php Depois de: if(!$account_logged->isPremium()) $account_status = '<b><font color="red">Free Account</font></b>'; else $account_status = '<b><font color="green">Premium Account, '.$account_logged->getPremDays().' days left</font></b>'; Adicione: if(!$account_logged->isVip()) $account_vip_status = '<b><font color="red">Not Vip Account</font></b>'; else $account_vip_status = '<b><font color="green">Vip Account, '.$account_logged->getVipDays().' days left</font></b>'; Depois de: <td class="LabelV" >Account Status:</td><td>'.$account_status.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].';" > Adicione: <td class="LabelV" >Account Vip Status:</td><td>'.$account_vip_status.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].';" > pot/OTS_Account.php Substitua: private $data = array('email' => '', 'blocked' => false, 'rlname' => '','location' => '','page_access' => 0,'lastday' => 0,'premdays' => 0, 'created' => 0); Por: private $data = array('email' => '', 'blocked' => false, 'rlname' => '','location' => '','page_access' => 0,'lastday' => 0,'premdays' => 0, 'created' => 0, 'viptime' => 0); Substitua: $this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('password') . ', ' . $this->db->fieldName('email') . ', ' . $this->db->fieldName('blocked') . ', ' . $this->db->fieldName('rlname') . ', ' . $this->db->fieldName('location') . ', ' . $this->db->fieldName('page_access') . ', ' . $this->db->fieldName('premdays') . ', ' . $this->db->fieldName('lastday') . ', ' . $this->db->fieldName('created') . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch(); Por: $this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('password') . ', ' . $this->db->fieldName('email') . ', ' . $this->db->fieldName('blocked') . ', ' . $this->db->fieldName('rlname') . ', ' . $this->db->fieldName('location') . ', ' . $this->db->fieldName('page_access') . ', ' . $this->db->fieldName('premdays') . ', ' . $this->db->fieldName('viptime') . ', ' . $this->db->fieldName('lastday') . ', ' . $this->db->fieldName('created') . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch(); Substitua: $this->db->query('UPDATE ' . $this->db->tableName('accounts') . ' SET ' . $this->db->fieldName('password') . ' = ' . $this->db->quote($this->data['password']) . ', ' . $this->db->fieldName('email') . ' = ' . $this->db->quote($this->data['email']) . ', ' . $this->db->fieldName('blocked') . ' = ' . (int) $this->data['blocked'] . ', ' . $this->db->fieldName('rlname') . ' = ' . $this->db->quote($this->data['rlname']) . ', ' . $this->db->fieldName('location') . ' = ' . $this->db->quote($this->data['location']) . ', ' . $this->db->fieldName('page_access') . ' = ' . (int) $this->data['page_access'] . ', ' . $this->db->fieldName('premdays') . ' = ' . (int) $this->data['premdays'] . ', ' . $this->db->fieldName('lastday') . ' = ' . (int) $this->data['lastday'] . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']); Por: $this->db->query('UPDATE ' . $this->db->tableName('accounts') . ' SET ' . $this->db->fieldName('password') . ' = ' . $this->db->quote($this->data['password']) . ', ' . $this->db->fieldName('email') . ' = ' . $this->db->quote($this->data['email']) . ', ' . $this->db->fieldName('blocked') . ' = ' . (int) $this->data['blocked'] . ', ' . $this->db->fieldName('rlname') . ' = ' . $this->db->quote($this->data['rlname']) . ', ' . $this->db->fieldName('location') . ' = ' . $this->db->quote($this->data['location']) . ', ' . $this->db->fieldName('page_access') . ' = ' . (int) $this->data['page_access'] . ', ' . $this->db->fieldName('premdays') . ' = ' . (int) $this->data['premdays'] . ', ' . $this->db->fieldName('viptime') . ' = ' . (int) $this->data['viptime'] . ', ' . $this->db->fieldName('lastday') . ' = ' . (int) $this->data['lastday'] . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']); Depois de: public function getPremDays() { if( !isset($this->data['premdays']) || !isset($this->data['lastday']) ) { throw new E_OTS_NotLoaded(); } return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday'])); } Adicione: public function getVipDays() { if( !isset($this->data['viptime']) || !isset($this->data['lastday']) ) { throw new E_OTS_NotLoaded(); } return ceil(($this->data['viptime'] - time()) / (24*60*60)); } Depois de: public function isPremium() { return ($this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday'])) > 0); } Adicione: public function isVip() { return ceil(($this->data['viptime'] - time()) / (24*60*60)) > 0; } characters.php Substitua: if($config['site']['show_vip_status']) { $id = $player->getCustomField("id"); if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=10%>Vip Status:</TD>'; $vip = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$config['site']['show_vip_storage'].';')->fetch(); if($vip == false) { $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>'; } else { $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>'; } $comment = $player->getComment(); $newlines = array("\r\n", "\n", "\r"); $comment_with_lines = str_replace($newlines, '<br />', $comment, $count); if($count < 50) $comment = $comment_with_lines; if(!empty($comment)) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>'; } } Por: if($config['site']['show_vip_status']) { $id = $player->getCustomField("id"); if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=10%>Account Vip Status:</TD>'; if(!$account->isVip()) { $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>'; } else { $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>'; } $comment = $player->getComment(); $newlines = array("\r\n", "\n", "\r"); $comment_with_lines = str_replace($newlines, '<br />', $comment, $count); if($count < 50) $comment = $comment_with_lines; if(!empty($comment)) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>'; } } shopsystem.php (+Créditos ao GM Bekman) Substitua: if($buy_offer['type'] == 'pacc') { $player_premdays = $buy_player_account->getCustomField('premdays'); $player_lastlogin = $buy_player_account->getCustomField('lastday'); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');'; $SQL->query($save_transaction); $buy_player_account->setCustomField('premdays', $player_premdays+$buy_offer['days']); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; if($player_premdays == 0) { $buy_player_account->setCustomField('lastday', time()); } $main_content .= '<h2>PACC added!</h2><b>'.$buy_offer['days'].' days</b> of Premium Account added to account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="index.php?subtopic=shopsystem">GO TO MAIN SHOP SITE</a>'; } Por: if($buy_offer['type'] == 'pacc') { $player_viptime = $buy_player_account->getCustomField('viptime'); $player_lastlogin = $buy_player_account->getCustomField('lastday'); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');'; $SQL->query($save_transaction); if($player_viptime > 0) $buy_player_account->setCustomField('viptime', $player_viptime + ($buy_offer['days'] * 24 * 60 * 60)); else $buy_player_account->setCustomField('viptime', time() + ($buy_offer['days'] * 24 * 60 * 60)); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; if($player_viptime == 0) { $buy_player_account->setCustomField('lastday', time()); } $main_content .= '<h2>VIP Days added!</h2><b>'.$buy_offer['days'].' days</b> of Vip Account added to account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="index.php?subtopic=shopsystem">GO TO MAIN SHOP SITE</a>'; } Links Úteis 01- [Gesior Acc] Vendedo Vip Pelo Pacc Créditos: GM Bekman 02- Double Exp Para Vip Créditos: Vodkart 03- Outfits Só Para Jogadores Vips Créditos: Vodkart
    1 ponto
  7. RigBy

    Passagem Secreta Diferente

    Passagem Secreta Gif de como funciona Essa semana tava ajudando um cara chamado Farathor nesse topico, e foi uma ideia boa então decidi refazer e trazer pra cá Ela funciona da seguinte maneira, vai ter 3 coal basin (Você pode configurar e coloca quantas você quiser), ai você vai ter que joga 3 itens diferente em cada coal basin (no meu caso eu usei os 3 fields) a estatua vai se move criando um teleport ou não (configurado), depois que você entrar no teleport ele ira fechar ou não (configurado). Eu usei como exemplo os 3 field mas você pode alterar para algum item ou até adicionar ou remover mais locais onde tera que joga o item. Testei na TFS 0.4 rev 3887 Então vamos instalar: Crie um arquivo chamado Secret_Passage.lua na pasta movement/script e coloque isso dentro: Agora adicione essa duas linha em movement.xml: <movevent type="AddItem" tileitem="1" actionid="13501" event="script" value="Secret_Passage.lua.lua"/> <movevent type="StepIn" actionid="5555" event="script" value="Secret_Passage.lua.lua"/> Agora so basta você adicionar o actionid 13501 nos coal basin ou nos piso mesmo. Se você alterar o actionid "5555" você terar que alterar no Secret_Passage.lua também. Para adicionar mais locais so basta você adicionar outra linha com o id do item e o local onde terá que ruma o item e não esqueã de sempre coloca 1 a mais no inicio, exemplo: se tiver 3 ai você cria o outro um a mais ficando 4. [4] = {necessary_Item = 2160, tile = {x = 1062, y = 1027, z = 7, stackpos= 1}}, Isso ai, xau
    1 ponto
  8. Vodkart

    Double Exp Para Vip

    servidos testado 8.54 ~ 8.60 Quando você compra vip você pode aumentar a taxa de exp em percent que ele irá receber a mais,como se fosse um bonus... a taxa se modifica aqui: local rate = 1.5 -- 50% vermelho:representa o quanto irá subir em % caso fosse 20% seria local rate = 1.2 e por ai vai.... [ Double exp para o Perfect Vip System ] : [ Double exp para o Vip System By Account V1.0 ] : [ Double exp para o Vip System By Mock] :
    1 ponto
  9. Avronex

    Shop System (Show Off)

    Bom dia galera! Hoje venho apresentar pra vocês o Shop Module do meu servidor de Pokemon! Sem mais delongas vamos a imagem! Comentem o que acharam? Quem quiser jogar meu servidor o link está na minha assinatura!
    1 ponto
  10. AndreArantes

    [Show Off] Andre Arantes

    Salve Comunidade, 1° mapa de tibia que eu estou fazendo vou deixar 2 Ss ai pra vocês darem uma olhada. Atualizado : 17/07/15
    1 ponto
  11. Administrador

    [Original] Azeroth RPG Completo!

    Azeroth Server Versão: 8.60 Distro: TFS 0.4 Mapa Base: Yourots Edited e Mix Yourots Inicialmente o mapa contem 7 cidades que são elas : Azeroth Avalon Zatur Liberty Bay Gloria Sand Trap Tiquanda Estou trabalhando com um amigo em um mapa, que seria o novo continente desse serve com mais 9 cidades... talvez mais em breve eu posto algo relacionado à isso. > Mapa RPG bem detalhado para Ots Low e Mid rate. > Inúmeras invasões automáticas, Low e High lvl (ou iniciadas pelo comando /raid "nome"). > NPCs de Travel/Boat diferentes para cada cidade. > Mais de 70 quests (além das principais) espalhadas pelo mapa. > Quests especiais com NPCs > Arena PvP sem perda de items. > Sistema de Guerras pelo Castelo [entre guilds] > Sistema de Refinamento e Slot (mais detalhes abaixo). > Sistema de Mineração > Scripts e sistemas aprimorados para o servidor > Distro SEM erro algum > Principais Quests: Annihilator Blue Legs Pits of Inferno MMS The Inquisition The Death FireWalker Boots Demon Helmet Draken Hell Conquer ______________________________________________________________________________________________________________________ V2.0 > Muitas correções no mapa > Ajustes nos scripts de Slot > Ajustes nos scripts de Mineração > Ajustes em alguns npcs > Adicionado mais 4 npcs pro futuro novo continente > Adicionado Battlefield Evento funcionado 100% (comando /battlefield "numero de players") > Adicionado Evento Zombie 100% automatico > Pequenas alterações no Castle of Honor > Balanceado sistemas de minério > Mais de 40 Quest adicionadas > Adicionado comando de expulsar player inativo da house > Corrigido muitos bugs encontrados ao decorrer da edição do serve > Adicionada muitas hunts (Hunts do nosso querido @Daniel implementadas) > e muito mais ... Não há teleports diretos para hunts ou quests. Não há items ou monstros editados(além dos trainers). Não há sistema VIP, VIP 2, VIP 3, VIP 345456364. Não há raids com monstros excessivamente fortes nas cidades iniciais. Créditos < Unknow YourOts Edited > < Mix Yourots Team > < Crystal Server Team > < Tryller > < Mock > < TFS Team > < TonyHanks > < Centera World > < Vmspk > <EddyHavoc> <Smart Maxx> <Daniel> <White Wolf> <Absolute> < e muitos outros ... > Otserv : http://www.mediafire...1v7c/otserv.rar Scan : https://www.virustot...sis/1416407066/ Db : https://www.mediafir...xwj5piwca7ff2xz
    1 ponto
  12. Bruno

    Sistema de Reset

    Testa esse, e se der certo eu refaço os stages:
    1 ponto
  13. Alencar522

    por vip com % de exp

    local expextra = 20 -- 20% de exp local storage = 13704 -- coloque sua storage aqui local valor = 1 -- valor da storage, se for por tempo deixe como está function onLogin(cid) if getPlayerStorageValue(cid, 1452369) == 1 then -- verificação para adicionar a xp só uma vez return true end if getPlayerStorageValue(cid, storage) >= valor then doPlayerSetExperienceRate(cid,expextra) doPlayerSendTextMessage(cid,21,"Você ganhou "..expextra.."% de exp por ser vip ") setPlayerStorageValue(cid, 1452369, 1) else doPlayerSendTextMessage(cid,21,"Torna-se vip e ganhe "..expextra.."% de exp") end end
    1 ponto
  14. Alencar522

    por vip com % de exp

    local expextra = 20 -- 20% de exp local storage = 13704 -- coloque sua storage aqui local valor = 1 -- valor da storage, se for por tempo deixe como está function onLogin(cid) if getPlayerStorageValue(cid, 1452369) == 1 then -- verificação para adicionar a xp só uma vez return true end if getPlayerStorageValue(cid, storage) >= valor then setPlayerExtraExpRate(cid, expextra) doPlayerSendTextMessage(cid,21,"Você ganhou "..expextra.."% de exp por ser vip ") setPlayerStorageValue(cid, 1452369, 1) else doPlayerSendTextMessage(cid,21,"Torna-se vip e ganhe "..expextra.."% de exp") end end Tenta ae
    1 ponto
  15. Bruno

    por vip com % de exp

    Qual é seu sistema vip meu querido?
    1 ponto
  16. Bruno

    Sistema de Reset

    Testa uma última vez, agora deixei as stages desabilitadas, para fazer um teste. Caso funfar tente com ela habilitada...
    1 ponto
  17. Alencar522

    por vip com % de exp

    Tenta assim local expextra = 20 -- 20% de exp local storage = 123456 -- coloque sua storage aqui local valor = 1 -- valor da storage, se for por tempo deixe como está function onLogin(cid) if getPlayerStorageValue(cid, 1452369) == 1 valor then -- verificação para adicionar a xp só uma vez return true end if getPlayerStorageValue(cid, storage) >= valor then doPlayerSetExperienceRate(cid,expextra) doPlayerSendTextMessage(cid,21,"Você ganhou "..expextra.."% de exp por ser vip ") setPlayerStorageValue(cid, 1452369, 1) else doPlayerSendTextMessage(cid,21,"Torna-se vip e ganhe "..expextra.."% de exp") end end
    1 ponto
  18. Bruno

    Sistema de Reset

    Você está certo Fiz algumas alterações, espero que agora vá!
    1 ponto
  19. Bruno

    Sistema de Reset

    Foi só uma vírgula que estava faltando kkkkkk Tenta agora:
    1 ponto
  20. Bruno

    Sistema de Reset

    @@crownzs, Vou ser sincero, não sei se vai funcionar, esse sistema ta uma bagunça. De qualquer forma, tenta aí: Primeiramente rode essa query manualmente em sua db: ALTER TABLE `players` ADD `reset` INT(11) NOT NULL DEFAULT 0;Agora tente com o sistema de reset:
    1 ponto
  21. caotic

    Pokebar para PDA

    E um erro muito indagado quando eu fiz o sistema más felizmente ele tem uma solução simples. Antes do pokemon for sumonado basta adicionar: if getCreatureCondition(cid, CONDITION_INFIGHT) == true and #getCreatureSummons(cid) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode trocar de pokemon durante a batalha.") return true end
    1 ponto
  22. RigBy

    Marcar mapa

    Daniel acho que ele que um jeito que quando loga, deixa aquelas figuras no mapa, tipo assim http://prntscr.com/7tl3in Aqui fiz o codigo, ta ai Creaturescript: .lua function onLogin(cid) local config = { [1] = {pos = {x = 1065, y = 1030, z = 7}, id = 5, discription = "Templo"}, [2] = {pos = {x = 1068, y = 1025, z = 7}, id = 4, discription = "Dp"}, [3] = {pos = {x = 1062, y = 1025, z = 7}, id = 1, discription = "Pipi"}, [4] = {pos = {x = 1062, y = 1025, z = 7}, id = 1, discription = "Pipi"}, [5] = {pos = {x = 1062, y = 1025, z = 7}, id = 1, discription = "Pipi"}, [6] = {pos = {x = 1062, y = 1025, z = 7}, id = 1, discription = "Pipi"}, -- So basta id adicionando +1 a cada novo --[7] = {pos = {x = 1062, y = 1025, z = 7}, id = 1, discription = "Pipi"}, } for i = 1, #config do doPlayerAddMapMark(position, config[i].pos, config[i].id, config[i].discription) end return true end Xml: <event type="login" name="MarkMap" event="Nome_do_Scriptt"> Login.lua antes do ultimo, return true registerCreatureEvent(cid, "MarkMap")
    1 ponto
  23. Peterwild

    [#3 Teaser] Rumores...

    "... você ouviu os rumores? Este deserto está ficando cada vez mais perigoso, noite passada, cem guerreiros não voltaram… Vou rezar por eles." Nosso update está previsto para Julho/2015. Fiquem atentos. Aproveite para participar do evento "Adivinhe a data e a hora do update" em nosso fórum! Atenciosamente, Equipe RadBR
    1 ponto
  24. Duuhzinhow

    Adicionar exaust

    Bom galera, vejo que muita gente pede ajuda para adicionar condowl em magias, runas, actions, etc.. entao vim aqui ensianr como adicionar o tao procurado condowl Primeiramente abra seu script, e procure onde ele faz a funçao como: Na linha a baixo da funçao, adicione isto : 23006 é o storage do exaust, coloque diferente em cada magia/action/talkaction para nao interferir umas nas outras. 20 é o tempo em segundos para poder usar a magia/action/talkaction/ novamente. Após adicionar isto, e configura-lo, pule uma linha e pronto Espero ter ajudado!
    1 ponto
  25. seguinte maninho vc vai cria o npc e os pokes =) dai vc va em lib/Wild Trainers e coloka um alinha assim --/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////-- wildPSONaturia = { [1] = {{name = "PSO Tangela", optionalLevel = 100, sex = SEX_FEMALE, nick = "", ball = "normal"}, {name = "PSO Meganiun", optionalLevel = 65, sex = SEX_MALE, nick = "", ball = "normal"}, {name = "PSO Vileplume", optionalLevel = 60, sex = SEX_MALE, nick = "", ball = "super"}, {name = "PSO Venusaur", optionalLevel = 70, sex = SEX_FEMALE, nick = "", ball = "normal"}, {name = "PSO Scyther", optionalLevel = 80, sex = SEX_MALE, nick = "", ball = "ultra"}, {name = "PSO Scizor", optionalLevel = 80, sex = SEX_MALE, nick = "", ball = "ultra"}, }, } ------- Lembrando que vc precisa mudar o PSONaturia e o PSOPokemon pq é no meu sv vc coloka do jeito que tu ker espero que eu ajude nem sei mexe nessa bagassa direito
    1 ponto
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...