
elli
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
elli deu reputação a Fir3z em [8.60] OTXServer by Fir3zNome: OTXServer by Fir3z
Versão: 8.60
Créditos: OTXServer Team, Fir3z (eu)
Parei com TFS 0.4 e agora estou usando o OTXServer...
Pra quem não conhece o OTX, ele tem praticamente as mesmas funções de um TFS, a equipe que iniciou o OTX retirou alguns bugs e algumas coisas irrelevantes, deixando a distro melhor, cada um tem sua opinião, eu estou usando agora o OTXServer, ai vai ele editado por mim =]
Download (Source + Exe + Dlls)
[4Shared]
[MediaFire]
[Mega]
Oque tem na versão editada por mim, que não tem na versão original:
♦ Criar contas com encriptação no formato PLAIN (sem interferências).
♦ Usar Account Manager com SITE! (sem bug's).
♦ Usar qualquer versão de items.
♦ Bug de duplicar item usando elf bot, removido!
* Lembrando que todos os OTXServer já contem war system. -
elli deu reputação a Absolute em [Link Quebrado]GLOBAL FULL DOWNLOAD 10.95 [TFS 1.2/FERUMBRAS QUEST/KRAILOS/NEW ARENA/CAST/NEW ITEMS/REWARD/EVENTS/CASINO] ~ AtualizaçõesDISPONÍVEL PARA DOWNLOAD!
Índice
A seguir vocês acompanharão:
1. Introdução
2. Features
3. Imagens
4. Versão
5. Downloads/Scans
6. Notas Finais
PARA TUDO!
Algo jamais visto para download, algo completo!
Tenho hoje o prazer de traze-los o download do servidor que será ESTÁ disponibilizado para galera do TIBIAKING!
Introdução:
Há alguns dias atrás eu e Ciroc resolvemos desenvolver um servidor na versão atual contendo tudo jamais disponibilizado na internet, ou seja; tudo foi realizado do zero e estará sendo disponibilizado para vocês.
Pegamos como base o servidor ORTS do próprio theforgottenserver e trabalhamos arduamente em cima do mesmo, para disponibiliza-los.
Features:
• Novas áreas 10.82/10.90
• Novos items 10.90
• Novos monstros/npcs/montarias 10.90
• Umbral creation
• Reward system Full Global
• Bosses prison roshamuul
• Oramond full incluindo seacrest ground e glooth factory
• Cast system work
• Casino automático
• Raids Full
• Battlefield Event
• Zombie Event
• Exp Shared
• Krailos
• New Arena Tibia.com
• Ferumbras' Ascendant Quest
• Equip HOTKEY
Imagens:
• Depot Thais (Entrada para nova arena)
• Nova arena PVP 10.90
• Cassino dice automático
• Treiners online aquatic room
• Seacrest Ground Cave
• Roshamuul prison key (incluido golden key)
• Novos monstros, novos items e novas outfits/montarias
• Boss Feroxa invasão 100%, mapa também.
• Local para duelar na arena (5vs5)
• Ao dar use, os players serão teleportados pra arena.
• Ferumbras' Ascendant Quest
• Entrada 7 bosses Ferumbras Quest
• Coletando recompensa com questlog.
• Entregando as demonic essences ao npc Mazarius
• Respawn Krailos Otimizado
Versão atual (Atualizaremos juntamente com o tibia.com)
~
Downloads/Scan (DISPONÍVEL):
Atenção: o servidor foi postado em um novo site de upload para tibia que iremos inaugurar oficialmente em breve, agradecimentos otupload.com ao @Guilherme pelo desenvolvimento em si.
Download do servidor completo + database + sources [LINUX]: http://otupload.com/file/1456169626_G1091_ABSOLUTE_CIROC_FOR_TK
Download do servidor completo + database + sources [LINUX] (LINK ALTERNATIVO, PROVISÓRIO): https://www.sendspace.com/file/1ctint
Download do servidor completo + database + sources [WINDOWS]: (Ainda não disponível, caso alguém queira se habilitar e compilar nossas sources, nós e a comunidade TK deixamos os sinceros votos de agradecimentos)
Scan do servidor: https://www.virustotal.com/pt/file/2f5fe15d174d47ec9080e1a9db3d33767e8536794a7b331c4c9646229567de97/analysis/1458112382/
Github: https://github.com/absoluten/absoluteglobal (O projeto será lançado em breve no github para as demais atualizações, sigam lá).
Notas Finais:
Este servidor é completo, é uma base/prévia do meu servidor em que trabalho.
O servidor é completo e encontra-se livre de quaisquer bugs graves.
Estaremos atualizando o servidor juntamente com a versão do tibia.com
Vocês poderão opinar e contribuir com o projeto de qualquer forma; sugestões, reports e etc.
Atenção: em breve nós estaremos trabalhando em um website na altura deste projeto, vocês poderão acompanhar aqui no fórum, fiquem atentos.
Créditos:
*Absolute
*@ciroc
*Orts
*Theforgottenserver
*@xWhiteWolf
Absolute/Ciroc Global, um servidor completo e perfeito, aproveitem.
-
elli deu reputação a Natanael Beckman em [GlobalEvents] Perfect Lottery System (MySql) - AtualizadoSistema de Loterias por globalevents.
Crie um arquivo .lua com o nome lottery dentro da pasta data/globalevents/scripts/loterry.lua, adicione dentro do arquivo o seguinte code:
local config = { lottery_hour = "2 hours", -- Tempo ate a proxima loteria (Esse tempo vai aparecer somente como broadcast message) rewards_id = {2494, 2472, 2514, 2160}, -- ID dos Itens Sorteados na Loteria crystal_counts = 10, -- Usado somente se a rewards_id for crystal coin (ID: 2160). website = "yes", -- Only if you have php scripts and table `lottery` in your database! days = { "Monday-08:00", "Monday-13:00", "Monday-19:30", "Tuesday-08:00", "Tuesday-13:00", "Tuesday-19:30", "Wednesday-08:00", "Wednesday-13:00", "Wednesday-19:30", "Thursday-08:00", "Thursday-13:00", "Thursday-19:30", "Friday-01:22", "Friday-13:00", "Friday-19:30", "Saturday-21:27", "Saturday-21:28", "Saturday-21:29", "Sunday-08:00", "Sunday-13:00", "Sunday-19:30" } } local function getPlayerWorldId(cid) if not(isPlayer(cid)) then return false end local pid = getPlayerGUID(cid) local worldPlayer = 0 local result_plr = db.getResult("SELECT * FROM `players` WHERE `id` = "..pid..";") if(result_plr:getID() ~= -1) then worldPlayer = tonumber(result_plr:getDataInt("world_id")) result_plr:free() return worldPlayer end return false end local function getOnlineParticipants() local players = {} for _, pid in pairs(getPlayersOnline()) do if getPlayerAccess(pid) <= 2 and getPlayerStorageValue(pid, 281821) <= os.time() then table.insert(players, pid) end end if #players > 0 then return players end return false end function onThink(cid, interval) if table.find(config.days, os.date("%A-%H:%M")) then if(getWorldCreatures(o) <= 0)then return true end local query = db.query or db.executeQuery local random_item = config.rewards_id[math.random(1, #config.rewards_id)] local item_name = getItemNameById(random_item) local data = os.date("%d/%m/%Y - %H:%M:%S") local online = getOnlineParticipants() if online then local winner = online[math.random(1, #online)] local world = tonumber(getPlayerWorldId(winner)) if(random_item == 2160) then doPlayerSetStorageValue(winner, 281821, os.time() + 3600 * 24) doPlayerAddItem(winner, random_item, config.crystal_counts) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. config.crystal_counts .." " .. getItemNameById(random_item) .. "s! Congratulations! (Next lottery in " .. config.lottery_hour .. ")") else doPlayerSetStorageValue(winner, 281821, os.time() + 3600 * 24) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " ..getItemNameById(random_item) .. "! Congratulations! (Next lottery in " .. config.lottery_hour .. ")") doPlayerAddItem(winner, random_item, 1) end if(config.website == "yes") then query("INSERT INTO `lottery` (`name`, `item`, `world_id`, `item_name`, `date`) VALUES ('".. getCreatureName(winner).."', '".. random_item .."', '".. world .."', '".. item_name .."', '".. data .."');") end else print("Ninguem OnLine pra ganhar na loteria") end end return true end Recomendamos modificar: - rewards_id = {2494, 2472, 2514, 2160}, -- ID dos Itens Sorteados na Loteria Recomendo de item count apenas o 2160, outros podem bugar. - crystal_counts = 10, -- Usado somente se a rewards_id for crystal coin (ID: 2160). Altere pra mais ou menos o dinheiro. - "Monday-08:00", Ajuste os dias e horários como desejado. Em globalevents.xml, adicione:
<!-- Lottery --> <globalevent name="lottery" interval="60000" event="script" value="lottery.lua"/> Não mexa no code acima.
Certo, essa é a parte do servidor, agora vamos adicionar as querys necessárias no MySql:
CREATE TABLE `lottery` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `item` varchar(255) NOT NULL, `world_id` tinyint(2) unsigned NOT NULL default '0', `item_name` varchar(255) NOT NULL, `date` varchar(256) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; Caso você queria adicionar uma query pra testar o site, veja:
INSERT INTO `lottery` (`id`, `name`, `item`, `world_id`, `item_name`, `date`) VALUES(NULL, 'Character', '2470', '0', 'golden legs', '22/05/2014 - 04:49:50'); Agora vamos pra parte do site, crie um arquivo .php com o nome lottery, adicione dentro do arquivo o seguinte code:
<?PHP $main_content .= '<center><h1>Lottery</h1><h3>Lotterys held at 09:00, 14:00 and 20:30 hour, brazil time.</h3></center><br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><tr BGCOLOR="'.$config['site']['vdarkborder'].'"><td CLASS=white><center><b>Player Name</b></center></td><td CLASS=white width=184 colspan=2><center><b>Winning Item</b></center></td><td width=50 CLASS=white><center><b>World</b></center></td><td width=100 CLASS=white><center><b>Date and Time</b></center></td></tr>'; $lottery = $SQL->query('SELECT id, name, item, world_id, item_name, date FROM lottery WHERE world_id = 0 ORDER BY id DESC;'); foreach($lottery as $result) { $players++; if(is_int($players / 2)) $bgcolor = $config['site']['lightborder']; else $bgcolor = $config['site']['darkborder']; $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=35%><center><a href="?subtopic=characters&name='.urlencode($result['name']).'">'.$result['name'].'</a></center></td><TD WIDTH=5%><img src=\'/item_images/'.urlencode($result['item']).'.gif\'></td><TD WIDTH=30%><center>'.$result['item_name'].'</center></td><TD WIDTH=7%><center>MegaTibia</center></td></td><TD WIDTH=30%><center>'.$result['date'].'</center></td></tr>'; } $main_content .= '</table>'; ?> Em index.php adicione:
case "lottery"; $topic = "Lottery"; $subtopic = "lottery"; include("lottery.php"); break; Em layouts.php adicione o code abaixo:
<a href="?subtopic=lottery"> <div id="submenu_lottery" class="Submenuitem" onmouseover="MouseOverSubmenuItem(this)" onmouseout="MouseOutSubmenuItem(this)"> <div class="LeftChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> <div id="ActiveSubmenuItemIcon_lottery" class="ActiveSubmenuItemIcon" style="background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);"></div> <div id="ActiveSubmenuItemLabel_lottery" class="SubmenuitemLabel">Lottery</div> <div class="RightChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> </div> </a> Pronto galera só isso, não esqueça clica em GOSTEI! Comente, participe do tópico, isso nos ajuda muito.
Créditos:
.lua - Killua e Matheus
.php - Matheus e Natanael Beckman
querys - Natanael Beckman e Matheus
Atualização 24/05/2014 - Adicionado regras pra não sorteá membro da staff(GM, GOD) - Adicionando sistema de Storage pra não correr o risco de um player ganhar 2x no mesmo dia. -
elli deu reputação a Absolute em [8.60] Baiak Absolute - Editado completo [O MELHOR]Fala galera do TK, andei pegando um BAIAK base pra dar uma editada, trackeando alguns mapas e otimizando algumas coisas para disponibilizar um baiak "filé" para vocês do TK
Sem mimimi, vamos ao que interessa e depois algumas imagens!
O que temos neste lindo Baiak?
New Templo bem baiak.
Dodge System
Run Event
BP Event
Guilds System
Castle 24H
Battlefield Event
Blood Castle Event
Firestorm Event
Capture the Flags Event
Items Donates para vender no site/jogo
Items VIP a mostra no termplo
3 Áreas VIPS jogo e Donate
Vários Teleports
Novas Hunts
Look Frags
Sistema de Refinamento
Criminal System
Hit Rank
Reset System
Full Task
Zombie Event
[VIP] no nome ao adquirir VIP
Distro 04 com Cast System (LUAN)
Sistema de teleporte (!FLY)
Level Skills System
Ao cadastrar o player irá ganhar 2 dias VIPs na quest do templo!
War System
Várias quests
Arena PVP
Treiners modificados
Roda em SQLITE E MYSQL!
E muito mais, basta baixar para conferir!
Vamos as imagens:
Ao abrir o mapa:
Ingame:
Local onde o player começa:
Templo Baiak Absolute:
Teleports Free's Básicos:
Área de Eventos e Summon por alavanca:
BP Event Room:
TPS VIP DONATE:
TPS VIP +:
TPS VIP ++:
Pasta do servidor:
Dowload/Scan
Download do servidor completo: http://www.4shared.com/rar/e7YfCJ_Sce/Baiak_Absolute.html?
Scan: https://www.virustotal.com/pt/url/6c6070c9c24da3b7719a92a1788bd2d8434d81c541b0038f68777621a121dccc/analysis/1407454456/
Desejo a todos um bom proveito e sucesso
Créditos:
Até a próxima
Absolute.
-
elli deu reputação a Natanael Beckman em Auto-Backup DatabaseGalera esse script é um auto backup da sua database, quem gosta de prevenir vamos ao tutorial.
Backup.sh
Criei uma pasta em qualquer local no linux, no meu caso eu fiz uma pasta com o nome database que está localizada na pasta home.
home/database/backup.sh Certo vamos configura o arquivo, dentro dele já vem tudo explicado mais vou dar um reforço, dentro do arquivo backup.sh contém:
#!/bin/bash CAMINHO="/home/database/" <--- local onde vai ficar salvo os backups NOMEBACKUP="server-backup" <--- nome do backup USER="root" <--- não mexe SENHA="nitendo64" <--- senha da database BANCO="casa_blanca" <--- nome da database #Nao mexer daqui pra baixo TEMPO="$(date +'%d-%m-%Y-%H-%M')" ##### #Rodando o backup ##### if [[ -z "$USER" || -z "$SENHA" || -z "$BANCO" ]]; then echo "Por favor preencha o usuário, senha e banco de dados nas configurações." else mysqldump -u$USER -p$SENHA $BANCO > $CAMINHO"/"$NOMEBACKUP"-"$TEMPO".sql" fi Certo configurado né, vamos fazer um teste:
Acessa a pasta:
cd /home/database Da permissão pros arquivos dentro dela, no caso o backup.sh:
chmod 777 -R * Roda o script pra um teste:
./backup.sh Veja na imagem do meu teste, já aparece ali a database, então ta ok deu certo as configurações:
Tudo bem, agora vamos configura pra ficar automático, pra todos os dias o script executar o backup em um certo horário:
crontab -e Se aparecer algo tipo seleciona alguma opção, selecione Nano, que provavelmente seja numero 2...
----------------------------------------------------------------------------------
Se não aparecer vai direto pra isso:
Digite isso dentro do nano, como você ver na imagem acima já tem adicionado:
0 6,21 * * * sh /home/database/backup.sh ctrl+x y da ENTER No meu caso botei pro script ser executado as 06:00hrs e 21:00hrs, então todo os dias nesse horário o script vai fazer o backup pra essa pasta que configurei, caso queria mudar o horário a logica do comado é clara né.
Caso queria deixar de minutos em minutos abaixo observe um exemplo de 5 em 5 minutos:
*/5 * * * * sh /home/database/backup.sh Caso queria deixar de horas em horas abaixo observe um exemplo de 1 em 1 hora:
0 */1 * * * sh /home/database/backup.sh Qualquer duvida postem, clica em GOSTEI, valeu.
Créditos total:
Joffily Ferreira
-
elli deu reputação a MatheusMkalo em Sistema De Novos ItemsBem, como todos sabem, não da pra criar 2 items com o mesmo sprite, somente editando a source e o dat etc...
Usando esse sistema que eu fiz voce nao precisara editar nada somente adicionar os scripts.
Primeiramente vá na pasta lib e crie um arquivo ItemsEditedLib.lua e adicione isso dentro:
function doPlayerAddEditedItem(cid, itemid) local newxml = io.open("data/items/newitems.xml", "r") local configs = {} for i in newxml:read("*a"):gmatch("<item (.-)</item>") do local itemid = i:match('id="(.-)"') local itemconfig = { ["spriteid"] = tonumber(i:match('spriteid.-=.-"(.-)"')), ["article"] = i:match('article.-=.-"(.-)"'), ["name"] = i:match('name.-=.-"(.-)"'), ["description"] = i:match('key.-=.-"description".-value.-=.-"(.-)"'), ["defense"] = tonumber(i:match('key.-=.-"defense".-value.-=.-"(.-)"')), ["attack"] = tonumber(i:match('key.-=.-"attack".-value.-=.-"(.-)"')), ["extradefense"] = tonumber(i:match('key.-=.-"extradef".-value.-=.-"(.-)"')), ["armor"] = tonumber(i:match('key.-=.-"armor".-value.-=.-"(.-)"')), ["extraattack"] = tonumber(i:match('key.-=.-"extraatk".-value.-=.-"(.-)"')), } configs[tonumber(itemid)] = itemconfig end if configs[itemid] then local item = doPlayerAddItem(cid, configs[itemid].spriteid) for i,x in pairs(configs[itemid]) do doItemSetAttribute(item, i, x) end end end Depois vá na pasta items e adicione um arquivo newitems.XML (XML NAO LUA!!!) e adicione isso dentro: <?xml version="1.0" encoding="UTF-8"?> <items> <item id="100" spriteid="2400" article="a" name="magic edited sword"> <attribute key="description" value="Arma editada." /> <attribute key="defense" value="45" /> <attribute key="attack" value="100" /> <attribute key="elementIce" value="34"/> <attribute key="extradef" value="10" /> <attribute key="extraatk" value="10" /> </item> <item id="101" spriteid="2472" article="a" name="master plate armor"> <attribute key="description" value="Armor editada." /> <attribute key="armor" value="19" /> </item> </items>
Bem como voces podem ver, o xml guarda os novos items, o xml funciona praticamente como o items.xml so que tem um novo campo o "spriteid", nele fica o itemid original.
Eu sei que ainda faltam atributos, com o tempo e com os pedidos eu vou adicionando.
Atributos:
"description"
"defense"
"attack"
"extradefense"
"armor"
"extraattack"
Para adicionar os novos itemids aos players use doPlayerAddEditedItem(cid, ITEMID) em vez de doPlayerAddItem...
Não tinha onde postar entao foi aki mesmo.
-
elli deu reputação a vankk em Evento para inovar OTREMOVIDO!
-
elli deu reputação a Marcio Santos em PROBLEMA CREATEACCOUNTOlá manin vou te ajuda com isso
createaccount
Espero ter ajudado manin
-
elli deu reputação a Natanael Beckman em StreamTemple TFS 0.4 [8.60]Opa galera eu mais uma vez postando mais uma novidade na área de OTServer!
StreamTemple é um sistema que proporciona uma visualização em tempo real da movimentação de characters em um determinado local do server, isso vai depender das suas configurações...
Esse sistema foi criado por Gesior.pl para versão TFS 1.0 e migrado para a versão TFS 0.4 por Killua(90%) e Eu(Fix bug player move)
Vamos la galera, em data/globalevents/scripts crie um arquivo .lua e nomeie para stream_temple.lua adicione dentro do mesmo este code:
-- for linux default: '/var/www/streamtemple/stream.json' -- create folder 'streamtemple' in main folder of acc. maker! -- [LINUX] check that folder 'streamtemple' has rights to create new file by anyone local playerJsonInfoPath = '/var/www/streamtemple/stream.json' -- center position of your 'stream' - make sure you set valid left/top corner of image in PHP! -- stream show only players on same 'floor'/'level' local centerPosition = {x = 32349, y = 32222, z = 7} --[[ I RECOMMEND TO NOT SET WIDTH HIGHER THEN 20, BECAUSE IT MAY CAUSE LITTLE LAG ON SERVERS WITH 300-400 ONLINE! ]]-- -- viewWidth is not really width of stream, if viewWidth is '11': -- then stream shows players 11 tiles to the left and 11 tiles to the right from center positon, so real width is 23 tiles! local viewWidth = 11 -- viewHeight is not really height of stream, if viewHeight is '6': -- then stream shows players 6 tiles to the top and 6 tiles to the bottom from center positon, so real height is 13 tiles! local viewHeight = 6 function onThink() -- get players/monsters/npcs in area list local spectators = getSpectators(centerPosition, viewWidth, viewHeight, false) -- generate information local stream = "{" if(spectators) then for _, spectator in pairs(spectators) do local player = spectator if(player) then local playerPosition = getCreaturePosition(player) local playerOutfit = getCreatureOutfit(player) if(centerPosition.z == playerPosition.z) then stream = stream .. '"'..getCreatureName(player)..'":['.. playerPosition.x ..','.. playerPosition.y ..','.. playerPosition.z ..','.. playerOutfit.lookType ..','.. playerOutfit.lookAddons ..','.. playerOutfit.lookHead ..','.. playerOutfit.lookBody ..','.. playerOutfit.lookLegs ..','.. playerOutfit.lookFeet ..','.. getPositionByDirection(player) ..','.. getCreatureLookDirection(player) ..',' .. playerOutfit.lookTypeEx .. ','.. getCreatureSkullType(player) ..'],' end end end end stream = stream .. '}' -- save to file local streampath = io.open(playerJsonInfoPath, "w") streampath:write(stream) streampath:close() return true end No arquivo acima faça as seguintes alterações:
Aqui altere pro local correto onde ficara localizada a pasta streamtemple na pasta do site.
local playerJsonInfoPath = '/var/www/streamtemple/stream.json' Aqui você vai botar as coordenada central de acordo com a imagem que vai utilizar.
local centerPosition = {x = 32349, y = 32222, z = 7} Em globalevents.xml registre esse code:
<!-- Stream Temple --> <globalevent name="stream" interval="700" script="stream_temple.lua"/> No site você vai adicionar o arquivo .php chamado de streamtemple.php com esse code:
<style type="text/css"> .alpha_wrapper { padding-top: 8px; float: left; position: relative; color: #fff; width: 96px; text-align: center; } .name { white-space: nowrap; color: rgb(0, 255, 0); font-size:10px; width: 50%; margin: 0px auto; padding-bottom: 2px; font-family: Verdana; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; } .skull { background: transparent url(images/skulls/redskull.gif) no-repeat; position: absolute; top: 31px; left: 57px; width: 11px; height: 11px; width: 50%; margin: 0px auto; } </style> <div style="float:center;text-align:center;margin: 0 auto;text-shadow:0 0 5px #fff;font-family:Georgia,serif;font-weight:strong;font-size:35px;"><img src=megastr.png></div> <!-- Your temple image must have tiles width/height 32px! --> <!-- There is 'streamtemple/temple.png', if you keep your temple image in other format or on other host, edit this. DO NOT FORGET TO EDIT THIS PART OF LINE BELOW: 'width:600px;height:380px', there must be width and height of your temple image! --> <div style="background-image:url('streamtemple/temple.png');width:600px;height:380px;box-shadow:0 0 20px #000;font-family:Arial, sans-serif;border:2px solid black;margin:5px auto;text-align:center;overflow:hidden;position:relative;" id="templeAnimationWindow"></div> <script type="text/javascript"> // -- CONFIG -- // url to stream file - it's NOT full path to that file like 'c:\xampp\...' var playerJsonInfoURL = 'streamtemple/stream.json'; // BEST VALUE IS SAME AS INTERVAL IN GLOBALEVENTS.XML var updateIntervalInSeconds = 1; // It's NOT same position as center of stream in LUA, this position depends on your temple image on www! // set it to position that is in game when you look at top-left corner of your temple image (+/- 1 after tests on www) // -- example: // HARD PART: If your image on www shows 16x8 tiles of 'game screen' and left-top corner positon is '1000,1000' then.. // What is center-position and width/height for LUA script config? [if it's on floor 7..] // YES! It's: Position(1008, 1004, 7), width: 8 (8*2+1 = 17, more then your image!), height: 4 (4*2+1 = 9, more ..!) // --- // but don't worry, if you set it to (32337,32220,7) and set width 15 and height 15 it will work too! (just use more CPU then it should) var leftTopCornetX = 32339; var leftTopCornetY = 32216; // adjust these values (from -32 to 32, it's value in pixels) to make your character stand at same position as in game // you must compare image on www and in game by yourself var imageCorrectionX = 2; var imageCorrectionY = 4; // images URL var itemImagesURL = 'http://item-images.ots.me/1030/'; // outfit generation script URL, you need your own outfit images host, how to create: // http://otland.net/threads/gesior2012-make-your-own-outfits-items-country-flags-hosting-recommended.210844/ var outfitImagesURL = 'outfit.php'; // -- END OF CONFIG -- function disableSelection(target) { if (typeof target.onselectstart!="undefined") { target.onselectstart=function(){return false} } else if (typeof target.style.MozUserSelect!="undefined") { target.style.MozUserSelect="none"; } else { target.onmousedown=function(){return false} } target.style.cursor = "default"; } disableSelection(document.body); var uid = Math.floor(Math.random()*(10000000-1))+10000000; function handler(data) { setTimeout(update, updateIntervalInSeconds * 1000); try { var obj = eval("(" + data + ")"); } catch(err) {} var s = ''; for (x in obj) { var k = obj[x]; s += '<div style="z-index:'+(k[1]-20)+';position:absolute;top:'+(((k[1]-leftTopCornetY)*32)+imageCorrectionY)+'px;left:'+(((k[0]-leftTopCornetX)*32)+imageCorrectionX)+'px;width:64px;height:64px;background:transparent url('; if(k[3] == 0) { s += itemImagesURL + k[11]+'.gif'; } else { var mountID = parseInt(k[9]); if(mountID > 0) { mountID += 65536; } s += outfitImagesURL + '?id='+k[3]+'&addons='+k[4]+'&head='+k[5]+'&body='+k[6]+'&legs='+k[7]+'&feet='+k[8]+'&direction='+(parseInt(k[10])+1); } s += ') no-repeat right bottom;">' + '<div class="alpha_wrapper">' + '<div class="name" style="margin: 5px 19px">'+x.replace(/( )/g,' ')+'</div>' + '<div style="margin-left: 34px; margin-top: -7px; width: 25px; height: 2px; background-color: rgb(0, 191, 0); border: 1px solid black;"></div>'; if(k[12] >= 3) { // known problem: there is no white skull image in Gesior2012, if you got it, you can put it in your /images/skulls/ s += '<div class="skull" style="background-image:url(images/skulls/'+(k[12] == 3 ? 'white' : (k[12] == 4 ? 'red' : 'black')) + 'skull.gif);"> </div>'; } s += '</div></div>'; } document.getElementById('templeAnimationWindow').innerHTML = s; } function update() { var xhr; try { xhr=new XMLHttpRequest(); } catch (e) { try { xhr=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xhr=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xhr.open("GET", playerJsonInfoURL + "?"+Math.random(), true); xhr.onreadystatechange=function() { // status 4 = query realized without problems if(xhr.readyState==4) { // if query failed for some reason, it will stop animation handler(xhr.responseText); } } xhr.send(null); } update(); </script> E o outfit.php.
Certo aqui você baixe a pasta abaixo que já com o arquivo stream.json e uma imagem que utilizo no meu servidor.
streamtemple
E baixe essa pasta de outfits pro sistema funcionar perfeitamente:
outfits
Veja um exemplo do sistema:
-
elli deu reputação a Natanael Beckman em Trade OFF - Shop OfflineEsse sistema disponibiliza uma negociação offline, onde você oferta um item e esse item é divulgado no site do server e qualquer player pode comprar o item utilizando um comando especificado.
Crie uma arquivo .lua dentro da pasta data/talkactions/scripts com o nome auctionsystem.lua, dentro do mesmo adicione o code:
local config = { levelRequiredToAdd = 20, maxOffersPerPlayer = 5, SendOffersOnlyInPZ = true, blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933} } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") if(t[1] == "add") then if((not t[2]) or (not t[3]) or (not t[4])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end if(not tonumber(t[3]) or (not tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.") return true end if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.") return true end local item = getItemIdByName(t[2]) if(not item) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end if(getPlayerLevel(cid) < config.levelRequiredToAdd) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.") return true end if(isInArray(config.blocked_items, item)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.") return true end if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).") return true end local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";") if(check:getID() == -1) then elseif(check:getRows(true) >= config.maxOffersPerPlayer) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.") return true end end if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.") return true end local itemcount, costgp = math.floor(t[4]), math.floor(t[3]) doPlayerRemoveItem(cid, item, itemcount) db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.") end if(t[1] == "buy") then if(not tonumber(t[2])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(buy:getID() ~= -1) then if(getPlayerMoney(cid) < buy:getDataInt("cost")) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.") buy:free() return true end if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.") buy:free() return true end if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.") buy:free() return true end if(isItemStackable((buy:getDataString("item_id")))) then doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count")) else for i = 1, buy:getDataInt("count") do doPlayerAddItem(cid, buy:getDataString("item_id"), 1) end end doPlayerRemoveMoney(cid, buy:getDataInt("cost")) db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!") db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";") buy:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "remove") then if((not tonumber(t[2]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.") return true end end local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(delete:getID() ~= -1) then if(getPlayerGUID(cid) == delete:getDataInt("player")) then db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") if(isItemStackable(delete:getDataString("item_id"))) then doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count")) else for i = 1, delete:getDataInt("count") do doPlayerAddItem(cid, delete:getDataString("item_id"), 1) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!") end delete:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "withdraw") then local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";") if(balance:getDataInt("auction_balance") < 1) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.") balance:free() return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!") doPlayerAddMoney(cid, balance:getDataInt("auction_balance")) db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";") balance:free() end return true end Em seguida em talkactions.xml adicione a tag:
<talkaction words="!offer" event="script" value="auctionsystem.lua"/> No banco de dados execute as querys:
CREATE TABLE `auction_system` ( `id` int(11) NOT NULL auto_increment, `player` int(11), `item_id` int(11), `item_name` varchar(255), `count` int(11), `cost` int(11), `date` int(11), PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ALTER TABLE `players` ADD `auction_balance` INT( 11 ) NOT NULL DEFAULT '0'; Na pasta do seu site crie um arquivo chamado tradeoff.php, em seguida adicione o code:
<?PHP $auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`, `auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name` FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')->fetchAll(); $players = 0; $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><center><h2>Commands</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br /><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />'; if(empty($auctions)) { $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is no one active Auction.</TD></TR></TABLE>'; $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small></p>'; } else { foreach($auctions as $auction) { $players++; if(is_int($players / 2)) $bgcolor = $config['site']['lightborder']; else $bgcolor = $config['site']['darkborder']; $cost = round($auction['cost']/1000, 2); $content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img src="/item_images/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>'; } $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>'; $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vdk.1553/">vDk</a>.</small></p>'; } ?> Em layouts.php adcione o code:
<a href="?subtopic=tradeoff"> <div id="submenu_tradeoff" class="Submenuitem" onmouseover="MouseOverSubmenuItem(this)" onmouseout="MouseOutSubmenuItem(this)"> <div class="LeftChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> <div id="ActiveSubmenuItemIcon_tradeoff" class="ActiveSubmenuItemIcon" style="background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);"></div> <div id="ActiveSubmenuItemLabel_tradeoff" class="SubmenuitemLabel">Trade Off</div> <div class="RightChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> </div> </a> Pra finalizar em index.php adicione esse code:
case "tradeoff"; $topic = "Trade Off"; $subtopic = "tradeoff"; include("tradeoff.php"); break;
-
E pronto galera clica em GOSTEI e comenta no tópico.
-
elli deu reputação a Natanael Beckman em [MYSQL] Backup_points Resetando e devolvendo os points automático.Boa galera estamos mais uma vez trazendo o que a de melhor pra todos e esse sistema é muito top pra qualquer administrador de OTserver.
Um parceiro meu Felipe Funck administrador do ImperialOT chegou pra mim com essa ideia de fazer um backup de point me explicou como deveria ser, achei uma ideia muito interessante e fui atrás de fazer o sistema.
Esse sistema tem a função de registrar todos os pontos adquiridos por uma ACC em outras palavras ele faz um backup de todos os pontos que essa ACC recebe, sim mais e dai? As vezes temos a obrigação de resetar a database e eu confesso não tem nada mais chato do que devolver os pontos, simplesmente porque é muito trabalhoso você devolver pontos.
Veja abaixo como adicionar o sistema no seu server:
Acesse sua database e na tabela accounts execute está query:
ALTER TABLE `accounts` ADD `backup_points` INT NOT NULL AFTER `premium_points`; Feito né? Essa query é a coluna backup_points nela vai ficar registrado todos os pontos que serão adicionados na ACC.
Agora abra o seu retpagseguro.php e na linha 151 vai ter esse code:
mysql_query("UPDATE accounts SET premium_points = premium_points + '$NumItens' WHERE name = '".htmlspecialchars($accname)."'"); Adicione abaixo o seguinte code:
mysql_query("UPDATE accounts SET backup_points = backup_points + '$NumItens' WHERE name = '".htmlspecialchars($accname)."'"); Quem não tiver o sistema de pagseguro automático veja esse TUTORIAL.
Cuidado a você que utiliza o double points pra não esquecer da multiplicação * 2.
Certo, pra você que ainda não utiliza o sistema pagseguro utilize este shopadmin abaixo que já está configurado pra adicionar os pontos nas duas colunas.
shopadmin.php
Serve para todos os Gesior ACC.
Pronto dessa forma todos os pontos adicionados em premium_points vai ficar registrado em backup_points.
Bom galera o sistema está feito, beleza, quando você for resetar você vai executar a query abaixo. Mais qual a função dela?
A função dessa query é limpar a coluna premium_points e leva os pontos que tiverem na coluna backup_points pra coluna premium_points, assim todos os pontos que entraram naquela ACC estaram de volta e corretamente.
Nunca apague os registros do backup_points.
Cuidado antes de usa a query faça um backup da sua database, só pra precaver nada de mais!
UPDATE `accounts` SET `premium_points` = `accounts`.`backup_points` WHERE `backup_points` > 0; Query feita por, Raphael Luiz.
Galera quem gostar clica em GOSTEI e valeu!
-
elli deu reputação a xWhiteWolf em VoodooAeeeeeee carai, hoje vim trazer pra vocês meu mais novo sistema *-*. É uma fodenda spell que você seleciona alguém pra ser seu voodoo e a partir disso durante um tempo X ela vai receber todos os hit's que você deveria receber... INCRÍVEL, NÃO?
Agora se nesse meio tempo ela deslogar ou entrar em pz você vai tomar o dano normal, mas se ainda tiver nesse tempo X e ela sair ela vai receber o dano instantaneamente (É BOM DEMAIS PRA SER VERDADE).
Agora você deve estar imaginando, e se eu usar a magia pra transferir o dano pra um amigo e ele fizer a mesma coisa em mim, pra onde vai o dano?
PRA LUGAR NENHUM!!!! Até porque eu já me previni contra esse bug fazendo com que não seja possível fazer alguém de voodoo se ele já tiver alguém de voodoo.
Testado em versão 8.54 TFS Crying Damnson mas deve funcionar em todas as versões que tenham a função onStatsChange no creaturescripts.
Bom, o script tá 100% funcional e livre de bugs (se vc achar algum eu te dou 3 REP).
Agora vamos à mágica:
Crie um arquivo em mods com extensão .xml e adiciona isso daqui nele
<?xml version="1.0" encoding="UTF-8"?> <mod name="Voodoo System" version="1.0" author="Night Wolf" contact="none" enabled="yes"> ------------------------------------------------------------------------------------ <config name="feitisso"><![CDATA[ configuration = { storage = 24567, tempo = 20, cooldown = 45, effect1 = 13, effect2 = 65 } storagecool = 24568 ]]></config> ---------------------------------------------------------------------------------- <event type="login" name="registerVoodoo" event="script"><![CDATA[ function onLogin(cid) domodlib('feitisso') if getPlayerStorageValue(cid, configuration.storage) > 0 then doPlayerSendTextMessage(cid, 22, "Your victim is not receiving your hits anymore.") doPlayerSetStorageValue(cid, configuration.storage, 0) end registerCreatureEvent(cid,"voodoo") return true end ]]></event> ------------------------------------------------------------------------------------ <instant name="Feitiço" words="voodoo" lvl="50" mana="10" prem="1" range="3" needtarget="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script"> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> <![CDATA[ function onCastSpell(cid, var) domodlib('feitisso') if not (isPlayer(variantToNumber(var))) then doPlayerSendCancel(cid, "You can only use this spell in players.") return false end if getPlayerStorageValue(variantToNumber(var), configuration.storage) > 0 then doPlayerSendCancel(cid, "You can't make a voodoo of someone who already has a voodoo.") return false end if (os.time() - getPlayerStorageValue(cid, storagecool)) >= configuration.cooldown then if getPlayerStorageValue(cid, configuration.storage) <= 0 then timeleft = (os.time() + configuration.cooldown) doPlayerSetStorageValue(cid, storagecool, timeleft) local target = getPlayerGUID(variantToNumber(var)) doPlayerSetStorageValue(cid, configuration.storage, target) doSendMagicEffect(getPlayerPosition(cid), configuration.effect1) doSendMagicEffect(getThingPos(variantToNumber(var)), configuration.effect1) addEvent(function() if isCreature(cid) then doSendMagicEffect(getPlayerPosition(cid), configuration.effect2) doPlayerSendTextMessage(cid, 22, "Your victim is not receiving your hits anymore.") doPlayerSetStorageValue(cid, configuration.storage, 0) end end, 100+1000*configuration.tempo) elseif getPlayerStorageValue (cid, configuration.storage) > 0 then doPlayerSendCancel(cid, "You've already set a target.") end else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(configuration.cooldown - (os.time() - getPlayerStorageValue(cid, storagecool))).." seconds.") end return true end ]]></instant> ------------------------------------------------------------------------------------ <event type="statschange" name="voodoo" event="script"><![CDATA[ function onStatsChange(cid, attacker, type, combat, value) domodlib('feitisso') if isPlayer(cid) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getPlayerStorageValue(cid, configuration.storage) >= 1 then local name = getPlayerNameByGUID(getPlayerStorageValue(cid, configuration.storage)) local victim = getCreatureByName(name) if isCreature(victim) and not (getTilePzInfo(getPlayerPosition(victim))) then dano = math.ceil(value) doSendMagicEffect(getPlayerPosition(cid), configuration.effect2) if attacker == victim then doTargetCombatHealth(cid, victim, combat, -dano, -dano, configuration.effect2) else doTargetCombatHealth(attacker, victim, combat, -dano, -dano, configuration.effect2) end return false end end return true end ]]></event> ------------------------------------------------------------------------------------ </mod> aqui você edita os storages da magia e do cooldown, além do tempo que ela dura, o tempo de cooldown (um uso e outro) e os efeitos que vão sair.
-------------------------------------------------------------------------------------------------------------
aqui você edita o nome da spell, as palavras pra ela sair, level, custo de mana, se é preciso ser premium pra usar, o range dela, e as vocações que podem usá-la.
OBS: se vc quiser que essa spell seja ganha em uma quest (por se tratar de algo bastante apelativo), é só colocar needlearn = "1" e fazer uma quest pra ganhar a spell (tem no meu Darkness Pact Quest uma quest de ganhar Spell, é só ir lá no meu perfil e procurar o tópico).
Essa spell não serve somente pra ATS, use a criatividade pra criar uma história e fazer ela se encaixar... foque nos elementos de RPG e tcharam, está feito!.
Façam bom uso e espero que não saiam postando em outros lugares sem os devidos créditos. Abraços do lobinho pra vcs
PS: a foto ficou meio bosta mas vou postar mesmo assim
Eu (sorc) ataquei a zuera e tomei o dano de volta e ainda saiu esse efeitinho bonito.
Espero que tenham gostado e usem essa spell como base pra fazer outras coisas maravilhosas pra esse fórum
E não esqueça de clicar em "gostei" caso tenha curtido a idéia.
Ahhh, e antes que eu me esqueça dos agradecimentos:
@ViitinG por me ajudar a testar
@CreatServer por me dar a idéia
@MaXwEllDeN por me orientar a trocar a table pelo storage possibilitando que o script fosse possível.
-
elli deu reputação a xWhiteWolf em Gran Castle Event (8.54+)Olá pessoa, hoje vim trazer pra vocês um script bem requisitado que inclusive é vendido por alguns scripters. Algumas versões "pioradas" dessse script podem ser encontradas em servidores cópias do Fox World porém nenhum desses scripts chegará aos pés desse daqui que foi arrumado por mim.
Eu não sou o criador do Script, eu peguei qualquer um na internet e só fui arrumando e adicionando coisas que as pessoas reclamavam que não tinha.
O cara que criou a versão que eu editei é esse daqui:
Não vou me prolongar e nem falar mal da versão do Roksas, apenas saibam que eu editei ela praticamente inteira e que agora está 100%.
Aqui tem um pequeno vídeo de como funciona o evento:
Explicação: Gran Castle é um evento para ser feito sozinho ou com a guild, há um limite configurável no script de membros que podem entrar da mesma guild. Em dias determinados é aberto o evento e os players podem entrar ao falar com o NPC Melkrapo. Uma vez dentro do castelo os players batalharão para subir os andares e chegar até a Gran Tower, um monstro lendário que dará glória para aqueles que o derrotarem. Será que você é capaz? Instale no seu server e descubra! Um evento para redefinir o conceito de PVP e onde o seu maior inimigo serão seus semelhantes.
Sem mais delongas vamos começar a instalar esse monstrinho.. porque ele é grande pra caralho.
Agora crie um arquivo em creaturescripts\scripts chamado Gran Tower.lua e adicione o seguinte:
em data\lib crie um arquivo chamado 046-Gran Tower.lua e adicione o seguinte dentro dele:
Agora voltando aos creaturescripts crie um arquivo em scripts chamado Gran Aura.lua e adicione:
E um arquivo chamado Barrier.lua na mesma pasta com o seguinte conteúdo:
Agora em globalevents\globalevents.xml adicione a seguinte linha:
<globalevent name="Gran Tower" interval="60" event="script" value="Gran Tower.lua"/> E adicione o script associado em globalevents\scripts com o nome de Gran Tower.lua:
Agora na pasta monster procure o seu monsters.xml e adicione essas duas linhas:
<monster name="Gran Tower" file="8.4/Gran Tower.xml"/> <monster name="Barrier" file="8.4/barrier.xml"/> Feito isso crie os monstros na pasta data\monster\8.4:
O primeiro se chama barrier.xml e deverá conter:
O segundo se chamará Gran Tower.xml e deverá conter:
Agora vamos para NPC, vá em data\npc e crie um arquivo chamado Melkrapo.xml com o seguinte conteúdo:
Agora em npc\scripts crie um arquivo chamado Melkrapo.lua e adicione o seguinte:
Agora partindo pra spells vá em data\spells e adicione no spells.xml essas linhas:
-
elli deu reputação a Lyu em [Dodge System] Versão com Amuleto & Elementos de Defesa.'Dodge System 2015' versão com AMULETO & ELEMENTOS DE DEFESA. Testado em OTX Server 8.60 & TFS 0.4 dev 3884. Antes de começar, quero avisar às pessoas que estão sem tempo ou com preguiça de ler o tópico inteiro, que eu upei um zip do sistema inteiro. então é só baixar e instalar ai. Download SCAN Continuando Tópico.. Cada ponto de Dodge equivale a x% de chance de desviar de um ataque, e ao mesmo tempo, enviar um elemento compatível com o nível de dodge do jogador. Sobre o desvio, quase todo mundo já conhece, mas e esse tal elemento? Ao desviar do ataque, automaticamente o amuleto contra-ataca com um ataque de distância; sua fonte de energia é o fist fighting, quanto mais alto for o skill, mais alto será o dano; Cada amuleto possui seu próprio elemento e ele será a chave para o funcionamento do dodge, ou seja, sem AMULET, sem Dodge. 1º - Procure a pasta Lib na sua datapack, crie um arquivo 151-dodgesystem.lua e dentro adicione isso :
2º- abra o arquivo actions.xml e adicione isso : <action itemid="12411" event="script" value="dodge.lua"/> 3º- entre na pasta scripts em actions, crie um arquivo .lua chamado dodge e adicione isso :
4º- abra o arquivo creaturescripts.xml e adicione isso : <event type="statschange" name="DodgeSystem" event="script" value="dodge.lua"/> 5º- entre na pasta scripts em creaturescripts, crie um arquivo .lua chamado dodge e adicione isso :
6º- ainda em creaturescripts, abra o arquivo login.lua e adicione isso la no final antes do return true : registerCreatureEvent(cid, "DodgeSystem") 7º- abra o arquivo movements.xml, substitua isso : OTX :
TFS :
por isso :
8º - entre na pasta scripts em movements, crie um arquivo .lua chamado dodgeamulet e adicione isso :
9º- abra o arquivo talkactions.xml e adicione isso : <talkaction log="yes" words="!dodge;/dodge" event="script" value="dodge.lua"/> 10º- entre na pasta scripts em talkactions, crie um arquivo .lua chamado dodge e adicione isso :
no arquivo lib.. DODGE_PERCENT é os porcentos que o jogador ganhará por cada ponto adquirido; DODGE_MAX é o máximo de dodge; DODGE_PRICE é o preço de cada pedra; DODGE_ITEMID é o ID da pedra de dodge; DODGE_COMMAND_REMOVE é um comando para remover 1 ponto de dodge e receber 75% do dinheiro que você pagou pela pedra. true = comando disponível, false = comando inexistente; DODGE_ONLY_PREMIUM é para jogadores com premium, true = o dodge só funcionará com premium, false = qualquer um poderá usar; DODGE_TEXT é o texto que aparecerá quando o player desviar de um ataque; DODGE_TEXTCOLOR é a cor do texto; DODGE_FISTMULTIPLIER é para multiplicar o fist fighting do jogador pelo multiplier configurado. true = multiplica, false = os multipliers serão sempre os mesmos valores; type é o tipo de elemento; min é o hit mínimo; max é o hit máximo; mana é a quantidade de mana que precisa para contra-atacar com o elemento. se não tiver mana, só vai desviar; shoot é o efeito de distância. ID dos amulets : terra amulet : 7887 glacier amulet : 7888 lightning pendant : 7889 magma amulet : 7890 comandos : !dodge; !dodge buy; !dodge remove. caso você queira que o amulet mude de elemento ao dar use(estilo exp alta), abra o items.xml e substitua isso :
por isso :
um exemplo do DODGE_FISTMULTIPLIER : se estiver true, o jogador estiver com o 'magma amulet' e tiver 100 fist fighting, ele terá a chance de acertar um hit entre 400-1000 de dano; se estiver false, ele só vai hitar entre 4-9 de dano, ai você vai ter que editar pra deixar mais alto, só que será o padrão; algumas imagens :
Então pessoal, espero que tenham gostado da minha versão. Eu fiz ela do zero, peguei só a ideia do Dodge System que vi em alguns Ots e mandei bala acrescentando esses elementos com amuleto. créditos : Halls Santos & o criador do Dodge System, infelizmente não sei o nome dele. comentem ai que eu edito depois. -
elli deu reputação a Natanael Beckman em ShopGuild Points 100% add em player offline. AtualizadoObrigatoriamente leia tudo!
Atualizado 01/07/2014
Opa galera mais uma vez eu trazendo o melhor para todos.
Hoje vou postar o sistema de Guild de Points que eu utilizo em meu OTserver, acredito que dificilmente será encontrado por ae um tão completo e sem bugs igual o que será postado logo abaixo, é um sistema completo que é utilizado pelo líder da guild executando um comando que, se tiver de acordo com as regras que seram feitas por você, todos os membros da guild iram receber os pontos uma unica vez, lembrando que quando os pontos são adicionados a um player ele não receberá entrando em outra guild e não receberá criando outro personagem na conta, resumindo ele só receberá uma unica vez na conta e com um player só. E um dos detalhes que me causava dor de cabeça era que quando um líder executava o comando, quem estava online recebia os pontos, mais quem estava offline não recebia, isso acontecia normalmente porque tem guilds que contém 50, 70, 100 players, portanto nem sempre todos estavam online. O comando só pode ser executado uma vez por dia cada guild, para não gerar processamentos desnecessários e assim um mal funcionamento do servidor.
Cada administrador pode configurar seu sistema da forma que quiser, por ser um sistema muito simples, você pode bota que todos os players estejam no minimo level x, que a guild só possa executar o comando quando estiver quantidade x de players online, isso é bom porque traz um certa dificuldade para fraudes de pontos, e o sistema só vira bagunça dependendo do que você vai oferecer no seu shop guild, eu particularmente só utilizei esse comando porque muitas guilds grandes pediam pontos, eles me cobravam uma quantidade x de pontos e eu cobrava uma quantidade x de player então pra automatizar o processo e não ter dor de cabeça foi feito todo esse sistema. Se você analisar bem vai ver que tudo isso só gera mais crescimento ao seu servidor.
Bom, vamos ao sistema:
Em talkactions.xml, adicione a tag abaixo:
<talkaction words="!guildpoints" event="script" value="guildpoints.lua"/> Na pasta talkactions/scripts faça um .lua com o nome guildpoints e dentro dele adicione os coder abaixo: GuildPointsConfigs = { ExecuteIntervalHours = 24, NeedPlayersOnline = 10, NeedDiferentIps = 6, MinLevel = 80, AddPointsForAcc = 9 } function getGuildPlayersValidAccIDS(GuildID, MinLevel) local RanksIDS = {} local AccsID = {} local ValidAccsID = {} Query1 = db.getResult("SELECT `id` FROM `guild_ranks` WHERE guild_id = '".. GuildID .."'") if(Query1:getID() == -1) then return ValidAccsID end for i = 1, Query1:getRows() do table.insert(RanksIDS, Query1:getDataInt("id")) Query1:next() end Query2 = db.getResult("SELECT `account_id` FROM `players` WHERE `rank_id` IN (".. table.concat(RanksIDS, ', ') ..") AND `level` >= ".. MinLevel .."") if(Query2:getID() == -1) then return ValidAccsID end for i = 1, Query2:getRows() do local AccID = Query2:getDataInt("account_id") if #AccsID > 0 then for k = 1, #AccsID do if AccID == AccsID[k] then AddAccList = false break end AddAccList = true end if AddAccList then table.insert(AccsID, AccID) end else table.insert(AccsID, AccID) end Query2:next() end Query3 = db.getResult("SELECT `id` FROM `accounts` WHERE `guild_points_stats` = 0 AND `id` IN (".. table.concat(AccsID, ', ') ..")") if(Query3:getID() == -1) then return ValidAccsID end for i = 1, Query3:getRows() do local AccID = Query3:getDataInt("id") if #ValidAccsID > 0 then for k = 1, #ValidAccsID do if AccID == ValidAccsID[k] then AddAccList = false break end AddAccList = true end if AddAccList then table.insert(ValidAccsID, AccID) end else table.insert(ValidAccsID, AccID) end Query3:next() end return ValidAccsID end function onSay(cid, words, param, channel) if(getPlayerGuildLevel(cid) == 3) then local GuildID = getPlayerGuildId(cid) Query = db.getResult("SELECT `last_execute_points` FROM `guilds` WHERE id = '".. GuildID .."'") if(Query:getID() == -1) then return true end if Query:getDataInt("last_execute_points") < os.time() then local GuildMembers = {} local GuildMembersOnline = {} local PlayersOnline = getPlayersOnline() for i, pid in ipairs(PlayersOnline) do if getPlayerGuildId(pid) == GuildID then if getPlayerLevel(pid) >= GuildPointsConfigs.MinLevel then table.insert(GuildMembersOnline, pid) end end end if #GuildMembersOnline >= GuildPointsConfigs.NeedPlayersOnline then local IPS = {} for i, pid in ipairs(GuildMembersOnline) do local PlayerIP = getPlayerIp(pid) if #IPS > 0 then for k = 1, #IPS do if PlayerIP == IPS[k] then AddIPList = false break end AddIPList = true end if AddIPList then table.insert(IPS, PlayerIP) end else table.insert(IPS, PlayerIP) end end if #IPS >= GuildPointsConfigs.NeedDiferentIps then local ValidAccounts = getGuildPlayersValidAccIDS(GuildID, GuildPointsConfigs.MinLevel) db.executeQuery("UPDATE `guilds` SET `last_execute_points` = ".. os.time() +(GuildPointsConfigs.ExecuteIntervalHours * 3600) .." WHERE `guilds`.`id` = ".. GuildID ..";") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "".. #ValidAccounts .." Players received points") if #ValidAccounts > 0 then db.executeQuery("UPDATE `accounts` SET `guild_points` = `guild_points` + " ..GuildPointsConfigs.AddPointsForAcc .. ", `guild_points_stats` = ".. os.time() .." WHERE `id` IN (" .. table.concat(ValidAccounts, ',') ..");") for i, pid in ipairs(GuildMembersOnline) do local PlayerMSGAccID = getPlayerAccountId(pid) for k = 1, #ValidAccounts do if PlayerMSGAccID == ValidAccounts[k] then doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "You received "..GuildPointsConfigs.AddPointsForAcc .." guild points.") break end end end end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Only ".. #IPS .." players are valid, you need ".. GuildPointsConfigs.NeedDiferentIps .." players with different ips.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Has only ".. #GuildMembersOnline .." players online you need ".. GuildPointsConfigs.NeedPlayersOnline .." players online at least from level ".. GuildPointsConfigs.MinLevel ..".") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The command can only be run once every "..GuildPointsConfigs.ExecuteIntervalHours .." hours.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Only guild leader can request points.") end return true end No coder acima bem no inicio tem as linhas seguintes para configurar:
ExecuteIntervalHours = 24, ( Intervalo para execução do comando, ae está de 24 em 24hrs)
NeedPlayersOnline = 10, (Quantos players é preciso está online para poder executar o comando.)
NeedDiferentIps = 6, (Quantos IPS diferentes são necessários para executar o comando no exemplo ae tem 6.)
MinLevel = 80, (Aqui adicione o level minimo, é necessário que todos os player da guild tenha o level pedido para o lider executar o comando.)
AddPointsForAcc = 9, (Aqui é a quantidade de pontos para adicionar em cada player da guild.)
Em data/globalevents/scripts crie um arquivo chamado shopguild.lua e adicione o code a seguir:
local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGE local SQL_interval = 30 function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_guildcomunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) 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 doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", "This item can only be used by the player ".. getPlayerName(cid) .."!") doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) 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 GuildShop.') db.executeQuery("DELETE FROM `z_ots_guildcomunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shopguild_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS GuildShop 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 GuildShop 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 Em data/globalevents/globalevents.xml adicione a seguinte tag:
<globalevent name="shopguild" interval="300" event="script" value="shopguild.lua"/> Certo, a parte do servidor é esta, ta feita, vamos adicionar a database o coder a seguir:
ALTER TABLE `accounts` ADD `guild_points` INTEGER(11) NOT NULL DEFAULT 0; ALTER TABLE `accounts` ADD `guild_points_stats` INT NOT NULL DEFAULT '0'; ALTER TABLE `guilds` ADD `last_execute_points` INT NOT NULL DEFAULT '0'; CREATE TABLE `z_shopguild_offer` ( `id` int(11) NOT NULL auto_increment, `points` int(11) NOT NULL default '0', `itemid1` int(11) NOT NULL default '0', `count1` int(11) NOT NULL default '0', `itemid2` int(11) NOT NULL default '0', `count2` int(11) NOT NULL default '0', `offer_type` varchar(255) default NULL, `offer_description` text NOT NULL, `offer_name` varchar(255) NOT NULL, `pid` INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`)) CREATE TABLE `z_shopguild_history_item` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `offer_id` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`)) CREATE TABLE `z_shopguild_history_pacc` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `pacc_days` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`)) CREATE TABLE IF NOT EXISTS `z_ots_guildcomunication` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13107; Olha estamos quase finalizando tudo, só precisamos terminar a parte de web.
O meu GuildShop eu copiei meu shopsystem.php e fiz umas modificações, simples você pode fazer o mesmo é menos trabalhoso.
Copie o shopsystem.php renomeie para shopguild.php, após abra-o e modifique como manda a seguir:
shop_system para shopguild_system
premium_points para guild_points
premium points para guild points
z_shop_offer para z_shopguild_offer
shopsystem para shopguild
z_shop_history_pacc para z_shopguild_history_pacc
z_shop_history_item para z_shopguild_history_item
z_ots_comunication para z_ots_guildcomunication
Ou utilize este já pronto:
shopguild.php
O shopguildadmin.php está no link abaixo, basta fazer o mesmo procedimento:
shopguildadmin.php
Em index.php add:
case "shopguild"; $topic = "Shop Guild"; $subtopic = "shopguild"; include("shopguild.php"); break; case "shopguildadmin"; $topic = "ShopGuild Admin"; $subtopic = "shopguildadmin"; include("shopguildadmin.php"); break; Vá em config.php adicione:
$config['site']['shopguild_system'] = 1; $config['site']['access_adminguild_panel'] = 9; Vá em layouts.php adicione abaixo de buypoints:
<a href='?subtopic=shopguild'> <div id='submenu_shopguild' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)'onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_shopguild' class='ActiveSubmenuItemIcon'style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'>Shop Guild</div> <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> </div> </a> Em layouts.php add depois do shopadmin:
if($group_id_of_acc_logged >= $config['site']['access_adminguild_panel']) echo "<a href='?subtopic=shopadmin'> <div id='submenu_shopguildadmin' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)'onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_shopguildadmin' class='ActiveSubmenuItemIcon'style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'><font color=red>! ShopGuild Admin !</font></div> <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div> </div> </a>"; Em shopsystem.php procure por:
elseif($action == 'show_history') { if(!$logged) { $main_content .= 'Please login first.'; } else{ $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($items_history_received)) { foreach($items_history_received as $item_received) { if($account_logged->getId() == $item_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $items_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$item_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $item_received['from_account']) $items_received_text .= '<i>Your account</i>'; else $items_received_text .= $item_received['from_nick']; $items_received_text .= '</td><td>'.$item_received['offer_id'].'</td><td>'.$item_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>'; if($item_received['trans_real'] > 0) $items_received_text .= '<td>'.date("j F Y, H:i:s",$item_received['trans_real']).'</td>'; else $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>'; $items_received_text .= '</tr>'; } } $paccs_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($paccs_history_received)) { foreach($paccs_history_received as $pacc_received) { if($account_logged->getId() == $pacc_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $paccs_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$pacc_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $pacc_received['from_account']) $paccs_received_text .= '<i>Your account</i>'; else $paccs_received_text .= $pacc_received['from_nick']; $paccs_received_text .= '</td><td>'.$pacc_received['pacc_days'].' days</td><td>'.$pacc_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $pacc_received['trans_real']).'</td></tr>'; } } $main_content .= '<center><h1>Transactions History</h1></center>'; if(!empty($items_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="6"><font color="white" size="4"><b> Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Cost</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$items_received_text.'</table><br />'; if(!empty($paccs_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b> Pacc Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccs_received_text.'</table><br />'; if(empty($paccs_received_text) && empty($items_received_text)) $main_content .= 'You did not buy/receive any items or PACC.'; } } Troque por:
elseif($action == 'show_history') { if(!$logged) { $main_content .= 'Please login first.'; } else{ $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($items_history_received)) { foreach($items_history_received as $item_received) { if($account_logged->getId() == $item_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $items_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$item_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $item_received['from_account']) $items_received_text .= '<i>Your account</i>'; else $items_received_text .= $item_received['from_nick']; $items_received_text .= '</td><td>'.$item_received['offer_id'].'</td><td>'.$item_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>'; if($item_received['trans_real'] > 0) $items_received_text .= '<td>'.date("j F Y, H:i:s",$item_received['trans_real']).'</td>'; else $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>'; $items_received_text .= '</tr>'; } } $itemsguild_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shopguild_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($itemsguild_history_received)) { foreach($itemsguild_history_received as $itemguild_received) { if($account_logged->getId() == $itemguild_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $itemsguild_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$itemguild_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $itemguild_received['from_account']) $itemsguild_received_text .= '<i>Your account</i>'; else $itemsguild_received_text .= $itemguild_received['from_nick']; $itemsguild_received_text .= '</td><td>'.$itemguild_received['offer_id'].'</td><td>'.$itemguild_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $itemguild_received['trans_start']).'</td>'; if($itemguild_received['trans_real'] > 0) $itemsguild_received_text .= '<td>'.date("j F Y, H:i:s",$itemguild_received['trans_real']).'</td>'; else $itemsguild_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>'; $itemsguild_received_text .= '</tr>'; } } $paccs_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($paccs_history_received)) { foreach($paccs_history_received as $pacc_received) { if($account_logged->getId() == $pacc_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $paccs_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$pacc_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $pacc_received['from_account']) $paccs_received_text .= '<i>Your account</i>'; else $paccs_received_text .= $pacc_received['from_nick']; $paccs_received_text .= '</td><td>'.$pacc_received['pacc_days'].' days</td><td>'.$pacc_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $pacc_received['trans_real']).'</td></tr>'; } } $paccsguild_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shopguild_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($paccsguild_history_received)) { foreach($paccsguild_history_received as $paccguild_received) { if($account_logged->getId() == $paccguild_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $paccsguild_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$paccguild_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $paccguild_received['from_account']) $paccsguild_received_text .= '<i>Your account</i>'; else $paccsguild_received_text .= $paccguild_received['from_nick']; $paccsguild_received_text .= '</td><td>'.$paccguild_received['pacc_days'].' days</td><td>'.$paccguild_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $paccguild_received['trans_real']).'</td></tr>'; } } $main_content .= '<center><h1>Transactions History</h1></center>'; if(!empty($items_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="6"><font color="white" size="4"><b> ShopServer Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Cost</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$items_received_text.'</table><br />'; if(!empty($itemsguild_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="6"><font color="white" size="4"><b> ShopGuild Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Cost</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$itemsguild_received_text.'</table><br />'; if(!empty($paccs_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b> ShopServer VIP Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccs_received_text.'</table><br />'; if(!empty($paccsguild_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b> ShopGuild VIP Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccsguild_received_text.'</table><br />'; if(empty($paccs_received_text) && empty($items_received_text)) $main_content .= 'You did not buy/receive any items or PACC.'; if(empty($paccsguild_received_text) && empty($itemsguild_received_text)) $main_content .= 'You did not buy/receive any items or PACC.'; } } Finalmente terminamos!
Bom todo esse processo é feito só para facilitar tudo pra você e o player e pra diferenciar o Shop System do Shop Guild, porque um sustenta as despesas do server e o outro atrai player, porque pra conseguir player é preciso ter player.
Galera acredito que não esteja faltando nada, espero que gostem e tudo que eu poder fazer para nossas melhoras estarei postando, me desculpem meus erros de português mais o que importa aqui é o script está correto, abraços!
Créditos:
Natanael Beckman
LukeSkywalker (Raphael Luiz) .lua 100%
Não proíbo ninguém de copia o tópico só peço que onde você adicione inclua os créditos mencionados.
-
elli deu reputação a luanluciano93 em TFS 0.4 CASTOlá pessoal, tive a iniciativa de criar esse tópico para atualizar e otimizar as sources do TFS 0.4 DEV que é uma das mais usadas no mundo do otserv. Conteúdo totalmente gratuito e pretendemos melhora-lo cada vez mais.
Qualquer um pode colaborar, postando bugs, erros, otimizando códigos, comentar aqui no tópico, toda ajuda é bem vinda, vamos tornar essa a melhor source disponível. Conto com vocês.
Versão do Tibia: 8.60
Alguns sistema já implementados na source:
• TFS 0.4 DEV rev 3777 (by TFS Team)
• Anti-Divulgação (.servegame, .no-ip, .net, .com, .org, .pl, .biz, .br, .sytes, .info)
• War System
• Cast System (by Summ)
• Retirado bugs de anti-push ..
• Retirado bugs de elfbot ...
• Retirado erro de não aceitar outros items ...
• Retirado erro de Malformed File ...
• Add creatureevent onMoveItem() ...
• Add função getCreaturePathTo () ...
• E vários outros!
Complementos:
• Add cast System (passo a passo): [AQUI]
• Pode add o comando na config.lua:
healthHealingColor = COLOR_GREEN -- [podendo alterar a cor]. manaHealingColor = COLOR_DARKPURPLE -- [podendo alterar a cor]. Downloads:
• Distro Compilada 32x
• Distro Compilada 64x
• Sources 7
TESTADO EM WINDOWS, DEBIAN 7.8, UBUNTU 12.04 E 14.05!
• Compilar em Linux:
• Erros para arrumar:
Obrigado ao runeraserver pelo incentivo em fixa-la para linux
E é isso pessoal, espero ter ajudado, abraços
-
elli deu reputação a Matheus Miranda em Equipe Para Baiak 8.6estou interessado se por acaso voce ainda precisar manda msgm inbox!
-
elli deu reputação a Durkilit em FALHA AO CRIAR ADMIN ACC NO STEP 5Elli... Bom eu tinha tentado criar um site so para aprender com o Gesior na nova versão! Porém deu este mesmo problema...
Dai eu peguei a baixei o da versão anterior, não sei se tem problema mais aqui ficou tudo 100% normal e consegui fazer normalmente.
-
elli recebeu reputação de RoxBaiak em [Duvidas] Site- Para colocar o email do seu pagseguro, altere na pasta do seu site/config/config.php
da um "ctrl + f" e procura pagseguro, até achar o email rsrs.
-Sobre o ip, depende, você está hosteando o site em casa ? ou tem vps ?
-
elli deu reputação a Finn Mertens em procuro vaga em algun projetoopa
-
elli deu reputação a Bruno Minervino em Efeito levle upVá em data/creaturescripts/scripts e crie um arquivo chamado advance.lua com o seguinte conteúdo:
local config = { [0] = { "Fist skill UP", 31 }, [1] = { "Club skill UP", 31 }, [2] = { "Sword skill UP", 31 }, [3] = { "Axe skill UP", 31 }, [4] = { "Distance skill UP", 31 }, [5] = { "Shield skill UP", 31 }, [6] = { "Fishing skill UP", 31 }, [7] = { "Magic level UP", 31 }, [8] = { "Level UP", 30 } } function onAdvance(cid, skill, oldlevel, newlevel) local pos = getPlayerPosition(cid) local effectPositions = { {x = pos.x, y = pos.y - 3, z = pos.z}, {x = pos.x, y = pos.y + 3, z = pos.z}, {x = pos.x - 3, y = pos.y, z = pos.z}, {x = pos.x + 3, y = pos.y, z = pos.z}, {x = pos.x - 2, y = pos.y - 2, z = pos.z}, {x = pos.x + 2, y = pos.y - 2, z = pos.z}, {x = pos.x + 2, y = pos.y + 2, z = pos.z}, {x = pos.x - 2, y = pos.y + 2, z = pos.z} } for type, variable in pairs(config) do if skill == type then doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1) for _, ePos in ipairs(effectPositions) do doSendDistanceShoot(pos, ePos, CONST_ANI_SMALLHOLY) doSendMagicEffect(ePos, CONST_ME_HOLYAREA) end end end return true end Ainda em data/creaturescripts/scripts inclua no arquivo login.lua isto:
registerCreatureEvent(cid, "advance") Agora em data/creaturescripts inclua no arquivo creaturescripts.xml isto:
<event type="advance" name="advance" script="advance.lua"/> Achei este script em outro fórum e trouxe apenas para lhe ajudar, foi postado por Loney porém não sei se o mesmo é o criador, de qualquer forma os créditos são dele.
-
elli deu reputação a Beeny em Naruto WhiteFala pessoal :3
Naruto White é um servidor feito por um amigo meu, totalmente feito do 0 !
•Informações
Distro limpa (o único erro é um test no mapa, não vai afetar em nada, e é fácil resolver.) 28 Vocações : Naruto, Sasuke, Sakura, Lee, Neji, Tenten, Kiba, Shino, Kisame, Hidan, Kakuzu, Itachi, Deidara, Kakashi, Killer Bee, Yamato, Madara, Minato, Hashirama, Tobirama, Obito, Kankuro, Gaara, Kabuto, Jiraya, Tsunade, Anbu, Hinata. Todas as vocações balanceadas. Spells de acordo com o ANIME! Sprites do "WoNO" Jutsus / Transforms
•Imagens
•Download
Client Servidor -- Não faço a minima ideia do porque tem todos esses vírus, já aviso que não tem nada. Quem quiser baixar, baixa. Sources Site Dat + Spr Client para usar no MAP
•Scan
Client Servidor Sources Site Dat + Spr Client para usar no MAP
•Créditos
Ken Kaneki (Helton) Beeny TFS Team Maenilse -
elli deu reputação a Adriano SwaTT em Sistema: Cassino Slots.Boa noite galera,
após um pedido aqui no fórum sobre um sistema de Cassino, decidi então criar este e disponibilizar para vocês.
Introdução:
Bom, este script simula a máquina de Cassino conhecida como Cassino Slots, pra quem não conhece é a máquina que se encontra no spoiler abaixo:
Como funciona?
O jogador precisa escolher 1 (um) dos 10 (dez) itens disponíveis (da para configurar a quantidade de itens) como seu Item da Sorte, e após feito isso, terá que girar a alavanca e torcer para que a máquina sorteie 3 itens repetidos igual ao que o jogador em questão escolheu.
Para tornar um pouco mais fácil de vencer, criei para que a máquina dê pequenos brindes à quem acertar 1 ou 2 itens dos sorteados (configurável).
Como jogar?
Para jogar é simples, como desenvolvi todo script em apenas um arquivo, para facilitar na criação, na instalação e até mesmo na jogabilidade, o jogo se baseia na posição em que o jogador está para identificar qual ação executar.
Selecionar Item da Sorte: com seu personagem virado para baixo (sul), clique na alavanca e automaticamente o item da sorte aparecerá na mesa configurada no script, caso queira outro item, basta ir usando a alavanca até encontrar o item desejado.
Como Jogar: Após ter selecionado seu item da sorte, que deve estar à mostra em cima da mesa própria, basta virar seu personagem para cima (norte) e clicar novamente na alavanca.
E se virar esquerda ou direita?: Nada acontecerá, apenas uma mensagem ensinando como jogar será enviada para que o jogador se oriente.
Dicas de instalação!
Sugiro que quando for criar o mapa para o evento, não faça como do vídeo, pois os itens criados nas mesas não estão com atributos para que não possam ser movidos, sendo assim é provável que jogadores de má fé venham a roubar itens... Faça como a imagem abaixo:
Instalando:
Basta criar um arquivo na pasta “data/actions/scripts” chamado “cassino_slots.lua” e adicionar o código abaixo dentro:
Agora em “actions.xml” adicione a tag abaixo:
Agora basta configurar de acordo com as informações disponíveis no início do script.
Vejam o vídeo demonstrativo do Sistema em funcionamento.
Criado por: Adriano Swatt'
-
elli deu reputação a GabrielSapient em [Pedido]OTCSim isso mesmo.
Se ajudei REP+ !
-
elli deu reputação a Toony em [Ajuda] DesignerNão tinha visto esse pedido, vi aqui agora e fiz rapidaum , tae