

Baiakuda
Campones-
Total de itens
45 -
Registro em
-
Última visita
Tudo que Baiakuda postou
-
Me desculpe por postar na área errada, mas alguém poderia me ajuda com o script? Preciso disso urgente!
-
Olá, é o seguinte, eu uso um sistema de vip e gostaria que quando o player ganha-se "x" dias de vip ele mesmo tanto em dias de premium, e quando acabar a vip acaba-se a premium dele tambem. MEU SISTEMA VIP (talkaction) local config = { vip = "yes", storage = 13500 } function onSay(cid, words, param, channel) if words == "/vip" then local days = 30 local storageplayer = getPlayerStorageValue(cid, 13500) if doPlayerRemoveItem(cid, 11739, 1) then addVipDays(cid, days) doPlayerAddPremiumDays(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ê não tem vip doll para ativar sua vip.") end elseif words == "/vipdias" 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
-
Eu achei esse script na net (movements), mais eu gostaria quando alguem ao passar nesse TILE ou TELEPORT com essa Action, nao pude-se atacar os que tambem passaram no mesmo teleport ou tile. function onStepIn(cid, item, frompos, item2, topos) local outfit = {lookType = 367, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookAddons = 3} if item.actionid == 2021 and isPlayer(cid) then doCreatureChangeOutfit(cid, outfit) end return true end
-
Arena eu ja tenho tudo pronta, só falta esses scripts, eu nao quero ter que dar /r nem /i , quero que um script faça isso por mim 1 vez por dia, assim não vou precisar todo dia na mesma hr fazer a mesma coisa.
-
Tipo do script: Não sei bem, acredito que seja globalevents Protocolo (versão do Tibia): 8.60 Servidor utilizado: tfs 0.4 Nível de experiência: ALTA Adicionais/Informações: Bom eu queria um teleport que aparece-se 1 vez ao dia que leva-se pra uma arena, dentro dessa arena tivesse uma alavanca e essa alavanca teria que ser puxada por algum lider de guild ... e apos essa alavanca ser puxada a guild teria que protege-la por 20min, apos passar esses 20 min essa alavanca sumi-se ou fica-se blokiada de algum jeito pra que mais ninguem puxa-se ela e a alanvaca daria acesso a uma area aonde somente a guild que puxou ela poderia entrar ... MUITO FODA nao sei se vc entenderam , mais é isso ...
-
Caramba cara, você me salvou!!! UP++
-
É o seguinte eu uso TFS 0.4 e apos o player colocar PROMOTION, quando ele morre ele volta level 1. Alguem sabe como ajudar? Alguem pode arrumar esses scripts se estiverem algo de errado? Meu vocations.xml <?xml version="1.0" encoding="UTF-8"?> <vocations> <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="50" gainmanaticks="6" gainmanaamount="100" manamultiplier="4.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="2.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.5"/> <skill id="1" multiplier="2.0"/> <skill id="2" multiplier="2.0"/> <skill id="3" multiplier="2.0"/> <skill id="4" multiplier="2.0"/> <skill id="5" multiplier="1.5"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="1" name="Master Sorcerer" description="a master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="50" gainmanaticks="2.5" gainmanaamount="145" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.5"/> <skill id="1" multiplier="2.0"/> <skill id="2" multiplier="2.0"/> <skill id="3" multiplier="2.0"/> <skill id="4" multiplier="2.0"/> <skill id="5" multiplier="1.5"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="2" name="Elder Druid" description="a elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="50" gainmanaticks="2.5" gainmanaamount="145" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="2"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.5"/> <skill id="1" multiplier="1.8"/> <skill id="2" multiplier="1.8"/> <skill id="3" multiplier="1.8"/> <skill id="4" multiplier="1.8"/> <skill id="5" multiplier="1.5"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="3" name="Royal Paladin" description="a royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2.5" gainhpamount="75" gainmanaticks="3" gainmanaamount="75" manamultiplier="1.4" attackspeed="800" soulmax="100" gainsoulticks="120" fromvoc="3"> <formula meleeDamage="1.0" distDamage="1.3" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.2"/> <skill id="1" multiplier="1.2"/> <skill id="2" multiplier="1.2"/> <skill id="3" multiplier="1.2"/> <skill id="4" multiplier="1.1"/> <skill id="5" multiplier="1.1"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="4" name="Elite Knight" description="a elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="150" gainmanaticks="3" gainmanaamount="50" manamultiplier="3.0" attackspeed="700" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleeDamage="1.1" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.1"/> <skill id="1" multiplier="1.1"/> <skill id="2" multiplier="1.1"/> <skill id="3" multiplier="1.1"/> <skill id="4" multiplier="1.4"/> <skill id="5" multiplier="1.1"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="5" name="Master Sorcerer [VIP]" description="a master sorcerer vip" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.5"/> <skill id="1" multiplier="2.0"/> <skill id="2" multiplier="2.0"/> <skill id="3" multiplier="2.0"/> <skill id="4" multiplier="2.0"/> <skill id="5" multiplier="1.5"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="6" name="Elder Druid [VIP]" description="an elder druid vip" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.5"/> <skill id="1" multiplier="1.8"/> <skill id="2" multiplier="1.8"/> <skill id="3" multiplier="1.8"/> <skill id="4" multiplier="1.8"/> <skill id="5" multiplier="1.5"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="7" name="Royal Paladin [VIP]" description="a royal paladin vip" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2.5" gainhpamount="75" gainmanaticks="2.5" gainmanaamount="75" manamultiplier="1.4" attackspeed="600" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.2" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.2"/> <skill id="1" multiplier="1.2"/> <skill id="2" multiplier="1.2"/> <skill id="3" multiplier="1.2"/> <skill id="4" multiplier="1.1"/> <skill id="5" multiplier="1.1"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="8" name="Elite Knight [VIP]" description="an elite knight vip" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="150" gainmanaticks="3" gainmanaamount="60" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30"> <formula meleeDamage="1.1" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.1"/> <skill id="1" multiplier="1.1"/> <skill id="2" multiplier="1.1"/> <skill id="3" multiplier="1.1"/> <skill id="4" multiplier="1.4"/> <skill id="5" multiplier="1.1"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="9" name="Vip Master Sorcerer" description="an Vip sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="Vip Elder Druid" description="an Vip druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Vip Royal Paladin" description="an Vip paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2.5" gainhpamount="75" gainmanaticks="2.5" gainmanaamount="75" manamultiplier="1.4" attackspeed="600" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Vip Elite Knight" description="an Vip knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="150" gainmanaticks="3" gainmanaamount="60" manamultiplier="3.0" attackspeed="450" soulmax="500" gainsoulticks="15" fromvoc="8" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> </vocations> Meu Npc vendedor de promotion king.xml: <?xml version="1.0" encoding="UTF-8"?> <npc name="King" script="promotion.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="332" head="20" body="39" legs="45" feet="7" addons="0"/> </npc> Meu script do npc, promotion.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 local node1 = keywordHandler:addKeyword({'promotion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) npcHandler:addModule(FocusModule:new())
-
[Encerrado] [Duvida] Servidor Buga De Madrugada
um tópico no fórum postou Baiakuda Tópicos Sem Resposta
Bom é o seguinte, todo dia de madrugada em volta das 4 as 7 da manha meu server BUGA. Como ele BUGA? R: Eu tambem não sei, mais quando eu olho no TFS(0.4) tem um monte de save e clean , ai ele para de salvar, qualquer player que UP na madrugada ele acaba não UPando pois o server não salva e com isso perco muitos players (muitas reclamações). Eu acredito que seja erro do XAMPP (MYSQL) ou algo relacionado a Globalevents.xml ... Necessito disso o mais rapido possivel! Agradeçido Baiakuda Ots. -
Como ninguem conseguiu me ajudar, eu resolvi me virar e encontrei um tutorial em outro forum. mais já que não é só eu que estou com o problema, vou ajudar quem precisar ... 1º coloque esse codigo abaixo no SQL do PHPMYADMIN (MYSQL) UPDATE accounts SET password=SHA1(password) WHERE id = 1; 2º troque seu config-and-functions.php POR ESSE ABAIXO: <?PHP // ###################### CONFIG ######################## $config['site'] = parse_ini_file('config/config.ini'); include('config/config.php'); if($config['site']['install'] != "no") { header("Location: install.php"); exit; } $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['mysqlHost'])) { $mysqlhost = $config['server']['mysqlHost']; $mysqluser = $config['server']['mysqlUser']; $mysqlpass = $config['server']['mysqlPass']; $mysqldatabase = $config['server']['mysqlDatabase']; } elseif(isset($config['server']['sqlHost'])) { $mysqlhost = $config['server']['sqlHost']; $mysqluser = $config['server']['sqlUser']; $mysqlpass = $config['server']['sqlPass']; $mysqldatabase = $config['server']['sqlDatabase']; } $sqlitefile = $config['server']['sqliteDatabase']; $passwordency = ''; if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['encryptionType']) == 'md5') $passwordency = 'md5'; if(strtolower($config['server']['encryptionType']) == 'sha1') $passwordency = 'sha1'; // ####################### POT ######################### include('pot/OTS.php'); $ots = POT::getInstance(); if(strtolower($config['server']['sqlType']) == "mysql") { try { $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); } catch(PDOException $error) { echo 'Database error - can\'t connect to MySQL database. Possible reasons:<br>1. MySQL server is not running on host.<br>2. MySQL user, password, database or host isn\'t configured in: <b>'.$config['site']['server_path'].'config.lua</b> .<br>3. MySQL user, password, database or host is wrong.'; exit; } } elseif(strtolower($config['server']['sqlType']) == "sqlite") { $link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile; try { $ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase)); } catch(PDOException $error) { echo 'Database error - can\'t open SQLite database. Possible reasons:<br><b>'.$link_to_sqlitedatabase.'</b> - file isn\'t valid SQLite database.<br><b>'.$link_to_sqlitedatabase.'</b> - doesn\'t exist.<br><font color="red">Wrong PHP configuration. Default PHP does not work with SQLite databases!</font>'; exit; } } else { echo 'Database error. Unknown database type in <b>'.$config['site']['server_path'].'config.lua</b> . Must be equal to: "<b>mysql</b>" or "<b>sqlite</b>". Now is: "<b>'.strtolower($config['server']['sqlType']).'"</b>'; exit; } $SQL = POT::getInstance()->getDBHandle(); $layout_name = "layouts/".$layout_name = $config['site']['layout'];; $layout_ini = parse_ini_file($layout_name.'/layout_config.ini'); foreach($layout_ini as $key => $value) $config['site'][$key] = $value; //###################### FUNCTIONS ###################### function isPremium($premdays, $lastday) { return ($premdays - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $lastday))) - date("z", $lastday)) > 0); } function saveconfig_ini($config) { $file = fopen("config/config.ini", "w"); foreach($config as $param => $data) { $file_data .= $param.' = "'.str_replace('"', '', $data).'"'; } rewind($file); fwrite($file, $file_data); fclose($file); } function password_ency($password) { $ency = $GLOBALS['passwordency']; if($ency == 'sha1') return sha1($password); elseif($ency == 'md5') return md5($password); elseif($ency == '') return $password; } function delete_player($name) { $SQL = $GLOBALS['SQL']; $player = new OTS_Player(); $player->find($name); if($player->isLoaded()) { try { $SQL->query("DELETE FROM player_skills WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {} try { $SQL->query("DELETE FROM guild_invites WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {} try { $SQL->query("DELETE FROM player_items WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {} try { $SQL->query("DELETE FROM player_depotitems WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {} try { $SQL->query("DELETE FROM player_spells WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {} try { $SQL->query("DELETE FROM player_storage WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {} try { $SQL->query("DELETE FROM player_viplist WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {} try { $SQL->query("DELETE FROM player_deaths WHERE player_id = '".$player->getId()."';"); } catch(PDOException $error) {} try { $SQL->query("DELETE FROM player_deaths WHERE killed_by = '".$player->getId()."';"); } catch(PDOException $error) {} $rank = $player->getRank(); if(!empty($rank)) { $guild = $rank->getGuild(); if($guild->getOwner()->getId() == $player->getId()) { $rank_list = $guild->getGuildRanksList(); if(count($rank_list) > 0) { $rank_list->orderBy('level'); foreach($rank_list as $rank_in_guild) { $players_with_rank = $rank_in_guild->getPlayersList(); $players_with_rank->orderBy('name'); $players_with_rank_number = count($players_with_rank); if($players_with_rank_number > 0) { foreach($players_with_rank as $player_in_guild) { $player_in_guild->setRank(); $player_in_guild->save(); } } $rank_in_guild->delete(); } $guild->delete(); } } } $player->delete(); return TRUE; } } function delete_guild($id) { $guild = new OTS_Guild(); $guild->load($id); if($guild->isLoaded()) { $rank_list = $guild->getGuildRanksList(); if(count($rank_list) > 0) { $rank_list->orderBy('level'); foreach($rank_list as $rank_in_guild) { $players_with_rank = $rank_in_guild->getPlayersList(); if(count($players_with_rank) > 0) { foreach($players_with_rank as $player_in_guild) { $player_in_guild->setRank(); $player_in_guild->save(); } } $rank_in_guild->delete(); } } $guild->delete(); return TRUE; } else return FALSE; } function check_name($name) { $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- [ ] '"); if ($temp != strlen($name)) { return false; } else { $ok = "/[a-zA-Z ']{1,25}/"; return (preg_match($ok, $name))? true: false; } } function check_account_name($name) { $temp = strspn("$name", "QWERTYUIOPASDFGHJKLZXCVBNM0123456789"); if ($temp != strlen($name)) return false; if(strlen($name) > 32) return false; else { $ok = "/[A-Z0-9]/"; return (preg_match($ok, $name))? true: false; } } function check_name_new_char($name) { $name_to_check = strtolower($name); $names_blocked = array('gm','cm', 'god', 'tutor'); $first_words_blocked = array('gm ','cm ', 'god ','tutor ', "'", '-'); $words_blocked = array('gamemaster', 'game master', 'game-master', "game'master", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor'); foreach($first_words_blocked as $word) if($word == substr($name_to_check, 0, strlen($word))) return false; if(substr($name_to_check, -1) == "'" || substr($name_to_check, -1) == "-") return false; if(substr($name_to_check, 1, 1) == ' ') return false; if(substr($name_to_check, -2, 1) == " ") return false; foreach($names_blocked as $word) if($word == $name_to_check) return false; foreach($GLOBALS['config']['site']['monsters'] as $word) if($word == $name_to_check) return false; foreach($GLOBALS['config']['site']['npc'] as $word) if($word == $name_to_check) return false; for($i = 0; $i < strlen($name_to_check); $i++) if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ') return false; foreach($words_blocked as $word) if (!(strpos($name_to_check, $word) === false)) return false; for($i = 0; $i < strlen($name_to_check); $i++) if($name_to_check[$i] == $name_to_check[($i+1)] && $name_to_check[$i] == $name_to_check[($i+2)]) return false; for($i = 0; $i < strlen($name_to_check); $i++) if($name_to_check[$i-1] == ' ' && $name_to_check[$i+1] == ' ') return false; $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- '"); if ($temp != strlen($name)) return false; else { $ok = "/[a-zA-Z ']{1,25}/"; return (preg_match($ok, $name))? true: false; } } function check_rank_name($name) { $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789-[ ] "); if ($temp != strlen($name)) { return false; } else { $ok = "/[a-zA-Z ]{1,60}/"; return (preg_match($ok, $name))? true: false; } } function check_guild_name($name) { $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789- "); if ($temp != strlen($name)) { return false; } else { $ok = "/[a-zA-Z ]{1,60}/"; return (preg_match($ok, $name))? true: false; } } function check_password($pass) { $temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890"); if ($temp != strlen($pass)) { return false; } else { $ok = "/[a-zA-Z0-9]{1,40}/"; return (preg_match($ok, $pass))? true: false; } } function check_mail($email) { $ok = "/[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}/"; return (preg_match($ok, $email))? true: false; } function items_on_player($characterid, $pid) { global $SQL; $item = $SQL->query("SELECT `itemtype` FROM `player_items` WHERE `pid` = '".$pid."' AND `player_id` = '".$characterid."'")->fetch(); return '<img src="images/items/' . $item['itemtype'] . '.gif" />'; } function showCommentsCount( $date ) { global $SQL; $result = $SQL->query("SELECT COUNT(*) as `count` FROM `z_news_comments` WHERE `news_date` = " . (int)$date . ";")->fetch(); return (int)$result['count']; } function getReason($reasonId) { switch($reasonId) { case 0: return "Offensive Name"; case 1: return "Invalid Name Format"; case 2: return "Unsuitable Name"; case 3: return "Name Inciting Rule Violation"; case 4: return "Offensive Statement"; case 5: return "Spamming"; case 6: return "Illegal Advertising"; case 7: return "Off-Topic Public Statement"; case 8: return "Non-English Public Statement"; case 9: return "Inciting Rule Violation"; case 10: return "Bug Abuse"; case 11: return "Game Weakness Abuse"; case 12: return "Using Unofficial Software to Play"; case 13: return "Hacking"; case 14: return "Multi-Clienting"; case 15: return "Account Trading or Sharing"; case 16: return "Threatening Gamemaster"; case 17: return "Pretending to Have Influence on Rule Enforcement"; case 18: return "False Report to Gamemaster"; case 19: return "Destructive Behaviour"; case 20: return "Excessive Unjustified Player Killing"; case 21: return "Invalid Payment"; case 22: return "Spoiling Auction"; default: break; } return "Unknown Reason"; } //################### DISPLAY FUNCTIONS ##################### function short_text($text, $chars_limit) { if (strlen($text) > $chars_limit) return substr($text, 0, strrpos(substr($text, 0, $chars_limit), " ")).'...'; else return $text; } function logo_monster() { return str_replace(" ", "", trim(mb_strtolower($GLOBALS['layout_ini']['logo_monster']))); } $statustimeout = 1; foreach(explode("*", str_replace(" ", "", $config['server']['statusTimeout'])) as $status_var) if($status_var > 0) $statustimeout = $statustimeout * $status_var; $statustimeout = $statustimeout / 1000; $config['status'] = parse_ini_file('config/serverstatus'); if($config['status']['serverStatus_lastCheck']+$statustimeout < time()) { $config['status']['serverStatus_checkInterval'] = $statustimeout+3; $config['status']['serverStatus_lastCheck'] = time(); $info = chr(6).chr(0).chr(255).chr(255).'info'; $sock = @fsockopen("127.0.0.1", $config['server']['statusPort'], $errno, $errstr, 1); if ($sock) { fwrite($sock, $info); $data=''; while (!feof($sock)) $data .= fgets($sock, 1024); fclose($sock); preg_match('/players online="(\d+)" max="(\d+)"/', $data, $matches); $config['status']['serverStatus_online'] = 1; $config['status']['serverStatus_players'] = $matches[1]; $config['status']['serverStatus_playersMax'] = $matches[2]; preg_match('/uptime="(\d+)"/', $data, $matches); $h = floor($matches[1] / 3600); $m = floor(($matches[1] - $h*3600) / 60); $config['status']['serverStatus_uptime'] = $h.'h '.$m.'m'; preg_match('/monsters total="(\d+)"/', $data, $matches); $config['status']['serverStatus_monsters'] = $matches[1]; } else { $config['status']['serverStatus_online'] = 0; $config['status']['serverStatus_players'] = 0; $config['status']['serverStatus_playersMax'] = 0; } $file = fopen("config/serverstatus", "w"); foreach($config['status'] as $param => $data) { $file_data .= $param.' = "'.str_replace('"', '', $data).'" '; } rewind($file); fwrite($file, $file_data); fclose($file); } $views_counter = "usercounter.dat"; if (file_exists($views_counter)) { $actie = fopen($views_counter, "r+"); $page_views = fgets($actie, 9); $page_views++; rewind($actie); fputs($actie, $page_views, 9); fclose($actie); } else { $actie = fopen($views_counter, "w"); $page_views = 1; fputs($actie, $page_views, 9); fclose($actie); } // Functions by Colandus function makeOrder($arr, $order, $default) { $type = 'asc'; if(isset($_GET['order'])) { $v = explode('_', strrev($_GET['order']), 2); if(count($v) == 2) if($orderBy = $arr[strrev($v[1])]) $default = $orderBy; $type = (strrev($v[0]) == 'asc' ? 'desc' : 'asc'); } return 'ORDER BY ' . $default . ' ' . $type; } function getOrder($arr, $order, $this) { $type = 'asc'; if($orderBy = $arr[$this]) if(isset($_GET[$order])) { $v = explode('_', strrev($_GET[$order]), 2); if(strrev($v[1]) == $this) $type = (strrev($v[0]) == 'asc' ? 'desc' : 'asc'); } return $this . '_' . $type; } ?> Espero que isso ajude alguem.
-
Resolvido! UP+
-
Valeu a ajuda, mais não funcionou aqui! Preciso disso URGENTE
-
Bom o meu problema é o seguinte: Eu uso TFS 0.4 e pra logar vc precisa ter PASS em sha1 (criptografada). Só que eu não sei fazer com que o player ao criar acc no site, o pass seja criptografado na hora. Exemplo: ACC: TEST PASS: TEST COM SHA1: ACC: TEST PASS: DSAJ01DSA5DS1DS01S5ADSADSDSA5SA0DS8A (É ALGO DO TIPO) OBS: USO MYSQL E QUERIA SABER SE TEM ALGUM CODIGO "SQL" PRA CONVERTER ELAS SOZINHAS... É UM CODIGO PARECIDO COM ALGUM DESSES DOIS ABAIXO ... UPDATE `accounts` SET `password` = SHA1( 'password' ) WHERE id = 1; SELECT * FROM `accounts` WHERE 1 `password` = SHA1
-
Tipo do script: Actions Protocolo (versão do Tibia):8.60 Servidor utilizado:TFS 0.4 Nível de experiência: MEDIO - ALTO Adicionais/Informações: Bom necessito de uma "ACTION" que quando TAL PLAYER ande em cima de TAL SQM, apareça em Vermelho pra todos do servidor assim: "TAL PLAYER(Nick do player que pisou no SQM) está tentando invadir o Castle War."
-
Tipo do script:Talkactions Protocolo (versão do Tibia):8.60 Servidor utilizado:TFS 0.4 Nível de experiência:médio Adicionais/Informações: Bom primeiro eu quero um sistema que quando os players falem !kills aparece meu sistema de frags. EXEMPLO: !kills >Time do pz on kill = 5min/ Frag System: 20 frags no dia para red/ 100 na semana pra red / 250 no mes pra red - 40 frags no dia para black skull / 200 na semana pra black skull / 500 no mes pra black skull
-
Quasee ... eu testei e deu tudo certo, porem quando morre o corpo some
-
Não funfou, quando o player morre dropa TUDO menos o amulet Mesmo assim Vlw Vodkart sempre ajudando todos do XTIBIA ... REP+
-
Tipo do script: Creaturescripts Protocolo (versão do Tibia): 8.60 Servidor utilizado: TFS 0.4 Nível de experiência: medio Adicionais/Informações: Como voces vao ver no script abaixo eu tenho um amuleto que nao dropa loot e ele é infinito, POREM quando voce morre RED SKULL com ele DROPA TUDO, porem quando voce RE-LOGA so ta o amuleto no corpo ... tem como tirar esse bug? amulet inf.lua > EM script/creaturescripts Amulet_id = 10719 function onDeath(cid, corpse, deathList) if(isPlayer(cid) == true) then if(getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == Amulet_id) then doPlayerSetStorageValue(cid, 25000, 1) end end return true end function onLogin(cid) if(getPlayerStorageValue(cid, 25000) == 1) then if(getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid <= 0) then doPlayerAddItem(cid, Amulet_id, 1) doPlayerSetStorageValue(cid, 25000, -1) end end registerCreatureEvent(cid, "Amulet Inf login") registerCreatureEvent(cid, "Amulet Inf death") return true end EM creaturescripts.xml <event type="login" name="Amulet Inf login" event="script" value="amulet inf.lua"/> <event type="death" name="Amulet Inf death" event="script" value="amulet inf.lua"/> MEU AMULETO na pasta ITEMS.XML <item id="10719" article="an" name="infinito amulet"> <attribute key="weight" value="420" /> <attribute key="absorbPercentAll" value="30" /> <attribute key="preventDrop" value="1" /> <attribute key="slotType" value="necklace" /> <attribute key="showattributes" value="1" /> </item>
-
Bom eu achei um script na net, onde o player ao fazer uma doação ele pode confirmar no site ... mais esse script esta incompleto, gostaria que alguem edita-se ele pra quando o cara confirma-se aparece-se um arquivo.txt no lugar onde esta hosteado meu site. SCRIPT DE CONFIRMAÇÃO DE PAGAMENTOS: <?PHP $main_content .= ' </SCRIPT> <FIELDSET id=fieldcontato><LEGEND><STRONG>Formulário</STRONG> </LEGEND> <FORM id=form1 method=post name=form1> <TABLE border=0 cellSpacing=3 cellPadding=3 width=500> <TBODY> <TR> <TD width="29%"><STRONG>Assunto</STRONG></TD> <TD width="71%"><LABEL><SELECT id=assunto name=assunto> <OPTION selected>Doação por Pagseguro (Boleto, Cartão de Credito e etc)</OPTION> </SELECT> </LABEL></TD></TR> <TR></TD> <TD height=20 vAlign=center colSpan=2> <HR color=#c0c0c0 noShade> </TD></TR> <TR> <TD><STRONG>Nome</STRONG></TD> <TD><SPAN id=nome><LABEL><INPUT id=nome maxLength=40 size=25 name=nome> </LABEL><SPAN class=textfieldRequiredMsg><FONT size=1>Digite seu nome completo.</FONT></SPAN></SPAN></TD></TR> <TR></TD> <TD height=20 vAlign=center colSpan=2> <HR color=#c0c0c0 noShade> </TD></TR> <TR> <TD><STRONG>Email da sua Account</STRONG></TD> <TD><SPAN id=email><LABEL><INPUT id=email size=25 name=email> </LABEL><SPAN class=textfieldRequiredMsg><FONT size=1>Digite o email da sua conta.</FONT></SPAN><SPAN class=textfieldInvalidFormatMsg></SPAN></SPAN></TD></TR> <TR></TD> <TD height=20 vAlign=center colSpan=2> <HR color=#c0c0c0 noShade> </TD></TR> <TR> <TD><STRONG>Sua Account</STRONG></TD> <TD><SPAN id=conta><LABEL><INPUT id=account maxLength=25 size=25 name=account> </LABEL><SPAN class=textfieldRequiredMsg><FONT size=1>Digite sua conta.</FONT></SPAN><SPAN class=textfieldInvalidFormatMsg></SPAN></SPAN></TD></TR> <TR></TD> <TD height=20 vAlign=center colSpan=2> <HR color=#c0c0c0 noShade> </TD></TR> <TR> <TD><STRONG>Personagem</STRONG></TD> <TD><SPAN id=personagem><LABEL><INPUT id=personagem size=25 name=personagem> </LABEL><SPAN class=textfieldRequiredMsg><FONT size=1>Digite seu personagem.</FONT></SPAN></SPAN></TD></TR> <TR></TD> <TD height=20 vAlign=center colSpan=2> <HR color=#c0c0c0 noShade> </TD></TR> <TR></TR> <TR> <TD><STRONG>Valor da doação</STRONG></TD> <TD><SPAN id=valor><LABEL><INPUT id=valor maxLength=3 size=25 name=valor> <SPAN class=textfieldRequiredMsg><FONT size=1>Exemplo: 40</FONT></SPAN></SPAN></LABEL></TD></TR> <TR></TD> <TD height=20 vAlign=center colSpan=2> <HR color=#c0c0c0 noShade> </TD></LABEL></TR> <TR> <TD><STRONG>Data do depósito</STRONG></TD> <TD><SPAN id=data><LABEL><INPUT id=data maxLength=10 size=25 name=data> </LABEL><SPAN class=textfieldRequiredMsg><FONT size=1>Exemplo: 15/07/2009</FONT></SPAN><SPAN class=textfieldInvalidFormatMsg></SPAN></SPAN></TD></TR> <TR></TD> <TD height=20 vAlign=center colSpan=2> <HR color=#c0c0c0 noShade> </TD></TR> <TR> <TD><STRONG>Hora do depósito</STRONG></TD> <TD><SPAN id=hora><LABEL><INPUT id=hora maxLength=5 size=25 name=hora> </LABEL><SPAN class=textfieldRequiredMsg><FONT size=1>Exemplo: 14:20</FONT></SPAN><SPAN class=textfieldInvalidFormatMsg></SPAN></SPAN></TD></TR> <TR></TD> <TD height=20 vAlign=center colSpan=2> <HR color=#c0c0c0 noShade> </TD></TR> <TR> <TD><STRONG>Imagem do comprovante</STRONG><BR><FONT color=red>(Apenas por Deposito)</FONT></TD> <TD><LABEL><INPUT id=imagem size=25 name=imagem> <BR> <H5>Hospede a foto do seu comprovante no <A href="http://www.imageshack.us" target=_blank>ImageShack</A></H5></LABEL></TD></TR> <TR></TD> <TD height=20 vAlign=center colSpan=2> <HR color=#c0c0c0 noShade> </TD></TR> <TR> <TD> </TD></TR></TBODY></TABLE> <P><INPUT value=Enviar type=submit name=enviar> <INPUT value=Limpar type=reset name=limpar></P></FORM></FIELDSET><BR> <H3>Dúvidas.</H3><FONT color=red>Atenção se você tentar postar duas vezes o mesmo comprovante poderá perder seu personagem, e se alguem tentar usar um comprovante que ja foi usado tambem.<BR></FONT> <P><STRONG>1) Fiz meu depósito e confirmei quantos dias devo esperar antes de enviar uma nova confirmação?</STRONG><BR><STRONG>R:</STRONG> Sua doação será liberada em até 24hrs após o envio da confirmação. Se em 24 horas você ainda não recebeu sua Doação, envie uma nova confirmação.</P> <P><STRONG>2) Fiz meu depósito, como prosseguir para receber meus points?</STRONG><BR><STRONG>R:</STRONG> É simples basta clicar em "Confirmar Doação", prencha ele corretamente com todos os dados pedidos. Não digite nada errado, pois isso atrasará sua Doação e você terá que esperar 24h para enviar uma nova confirmação.</P> <P><STRONG>3) O que é imagem do comprovante, como consigo uma? </STRONG><BR><STRONG>R:</STRONG> Esta opção serve para agiilizar a ativação de sua Doação. Após escanear o seu comprovante ou tirar uma foto você deve hospedar no site citado e enviar o link para nós usando o campo imagem.</P><FONT color=red>OBS: Nenhum tipo de doação é obrigatorio, pois a Equipe Kilmera não tem fins financeiros.<BR></FONT> <script type=text/javascript> <!-- var sprytextfield1 = new Spry.Widget.ValidationTextField("nome", "none", {validateOn:["blur", "change"]}); var sprytextfield2 = new Spry.Widget.ValidationTextField("email", "email", {validateOn:["blur", "change"]}); var sprytextarea1 = new Spry.Widget.ValidationTextarea("dados", {validateOn:["blur", "change"]}); var sprytextfield3 = new Spry.Widget.ValidationTextField("conta", "integer", {validateOn:["blur", "change"]}); var sprytextfield4 = new Spry.Widget.ValidationTextField("personagem", "none", {validateOn:["blur", "change"]}); var sprytextfield5 = new Spry.Widget.ValidationTextField("data", "date", {format:"dd/mm/yyyy", validateOn:["blur"]}); var sprytextfield6 = new Spry.Widget.ValidationTextField("valor", "integer", {validateOn:["blur", "change"]}); var sprytextfield7 = new Spry.Widget.ValidationTextField("hora", "time", {validateOn:["blur", "change"]}); //--> </SCRIPT> <BR><BR></TD></TABLE> <CENTER></CENTER></TD></TABLE></DIV> '; ?>
-
Tipo do script:Actions (acho) Protocolo (versão do Tibia):8.60 Servidor utilizado:TFS 0.4 Nível de experiência:alto Adicionais/Informações: Bom eu uso esse sistema de dominio de castelos http://www.xtibia.co...-castle-war-20/ , porem gostaria de fazer assim ... Quando fosse TAL DIA (EXEMPLO: TERÇA-FEIRA) as 19:00 ele abria e quando fosse 19:30 ele fecha-se. Oque seria Abrir e oque seria Fechar? Simples eu uso a ALAVANCA do script acima e gostaria que aparece algum ITEM em cima dessa alavanca, pra mais ninguem puxar ela e quando fosse terça-feira as 19:00 esse item que esta em cima dela SUMI-SE e só volta-se aparecer depois das 19:31. Sei que é complicado, mais tentei explicar do jeito melhor. Obs: Se nao for possivel fazer em tal dia, pode ser TODO dia mesmo.
-
Bom esse tutorial é sobre um sistema de TRADE no qual o player pode colocar seu item no site e esperar alguem comprar. VEJA A IMAGEM PARA TER UMA NOÇÃO. Crie um arquivo em data/talkactions/script --[[ Offline player to player item trader (Auction System) by vDk Script version: 1.2a [ -- FIXED CLONE ITEMS BUG -- ] ]]-- local config = { levelRequiredToAdd = 20, [ -- LEVEL PRA VENDER O ITEM -- ] maxOffersPerPlayer = 5, [ -- MAX DE PLAYERS QUE PODEM USAR O TRADE -- ] 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], false) 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])) .. ";") Agora adicione essa tag em data/talkactions/talkactions.xml <talkaction words="!offer" event="script" value="auctionsystem.lua"/> Agora vamos para a parte da DATABASE... Adicione esse codigo na database no lugar onde tem escrito "SQL" (canto superior direito) ALTER TABLE `players` ADD `auction_balance` INT( 11 ) NOT NULL DEFAULT '0'; Adicione esse codigo tambem na database no lugar onde tem escrito "SQL" (canto superior direito) 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 ; POR FIM ... crie um arquivo auctionsystem.php(na pasta do seu site) <?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="http://otland.net/images/items/'.$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/">vDk</a>.</small></p>'; } ?> Fim, Creditos ao vDk.
-
Vamos resumir isso Powergamers e Most Online são dois ranks que voce adiciona no seu site. Mais pra que server? Simples, ele serve pra ver quando de EXP o player ja pegou e a quanto tempo ele está online. Agora vamos parar de conversar e vamos ao Tutorial.(LEMBRANDO SÓ TESTEI EM Gesior Account Maker para Tfs 0.3+) 1- Como instalar? 1.1- vá na sua database (phpmyadmin)e adicione esse codigo em "SQL" (Se encontra ao canto superior do lado direito da sua tela): ALTER TABLE `players` ADD `exphist_lastexp` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `exphist1` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `exphist2` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `exphist3` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `exphist4` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `exphist5` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `exphist6` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `exphist7` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `onlinetimetoday` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `onlinetime1` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `onlinetime2` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `onlinetime3` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `onlinetime4` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `onlinetime5` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `onlinetime6` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `onlinetime7` BIGINT( 255 ) NOT NULL DEFAULT '0', ADD `onlinetimeall` BIGINT( 255 ) NOT NULL DEFAULT '0'; Após adicionar esse acima, adicione esse abaixo tambem: UPDATE `players` SET `exphist_lastexp`=`players`.`experience` 2- Criando Codigos .lua 2.1- Abra .../data/globalevents/scripts e crie um arquivo chamado history.lua function onThink(interval, lastExecution) if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then setGlobalStorageValue(23456, (tonumber(os.date("%d")))) db.executeQuery("UPDATE `players` SET `onlinetime7`=players.onlinetime6, `onlinetime6`=players.onlinetime5, `onlinetime5`=players.onlinetime4, `onlinetime4`=players.onlinetime3, `onlinetime3`=players.onlinetime2, `onlinetime2`=players.onlinetime1, `onlinetime1`=players.onlinetimetoday, `onlinetimetoday`=0;") db.executeQuery("UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience;") end db.executeQuery("UPDATE `players` SET `onlinetimetoday`=players.onlinetimetoday+60, `onlinetimeall`=players.onlinetimeall+60 WHERE `online` = 1;") return TRUE end 2.2- Abra agora .../ data / globalevents globalevents.xml/ e cole esta linha em qualquer lugar: <globalevent name="history" interval="60" event="script" value="history.lua"/> 3- Baixe os arquivos do link abaixo e salve em .../htdocs (Se você não baixar, não funcionará) http://www.speedyshare.com/files/17960064/pro-stats.zip 4- Agora você vai adicionar botões com links para novas páginas: Abra index.php, se encontra em: .../htdocs 4.1- Depois desta linha: case "highscores"; $topic = "Highscores"; $subtopic = "highscores"; include("highscores.php"); break; 4.2- Adicione esse codigo: caso "exphist"; $ Subtópico = "exphist"; $ Assunto = "Powergamers"; include ("exphist.php"); break; 4.3- Após essa linha: case "creatures"; $topic = "Creatures"; $subtopic = "creatures"; include("creatures.php"); break; 4.4- Cole: case "onlinetime"; $topic = "Onlinetime"; $subtopic = "onlinetime"; include("onlinetime.php"); break; 5- Abra .../htdocs /tibiacom/layout.php 5.1- Após: <a href='index.php?subtopic=guilds'> <div id='submenu_guilds' 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_guilds' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'>Guilds</div> 5.2- Adicione: <a href='index.php?subtopic=exphist'> <div id='submenu_exphist' 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_exphist' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'>Powergamers</div> <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> </div> <a href='index.php?subtopic=onlinetime'> <div id='submenu_onlinetime' 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_onlinetime' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'>Most Online</div> <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> </div> Esse parte "6" não é obrigatoria, ela serve pra mostrar o quanto de exp voce obteve em um certo tempo na pagina do seu character. 6- Abra .../htdocs/characters.php. 6.1 antes dessa linha: //deaths list; 6.2- Adicione: $main_content .= '</TABLE>'; include "charts.php"; $main_content .= "<table><tr width=\"100%\"><td width='9%'></td><td><center>".InsertChart ( "charts.swf", "charts_library", "charinfo.php?type=exp&uniqueID=" . uniqid(rand(),true) . "&guid=" . $player->getId(), 500, 300 )."</center></td></tr></table>"; $main_content .= "<table><tr width=\"100%\"><td width='9%'></td><td><center>".InsertChart ( "charts.swf", "charts_library", "charinfo.php?type=online&uniqueID=" . uniqid(rand(),true) . "&guid=" . $player->getId(), 500, 300 )."</center></td></tr></table>"; $main_content .= "<table><tr width=\"100%\"><td width='9%'></td><td><center>".InsertChart ( "charts.swf", "charts_library", "charinfo.php?type=expgain&uniqueID=" . uniqid(rand(),true) . "&guid=" . $player->getId(), 500, 300 )."</center></td></tr></table>"; $main_content .= '</TD></TR></TABLE>'; FIM. Se alguem ja postou algo parecido aqui por favor diga. No momento creditos a mim Até mais xtibia.
-
Bom eu achei esse script de "CONFIRMAR DOAÇÃO", porem no forum que eu achei ele nao tem um TUTORIAL nem nada do tipo, entao resolvi trazer isso para o xtibia e se for possivel alguem fazer um TUTORIAL. LINK DO CODIGO ABAIXO: www.speedyshare.com/files/24489940/donate.zip e alguns codigos que nao estao nele: index.php{POR ISSO EM QUALQUER LINHA} case "confirmacao"; $subtopic = "confirmacao"; $topic = "Confirmacao"; include("confirmacao.php"); break; index.php <style type="text/css"> <!-- .style1 {color: #000000} .style2 { font-family: Arial, Helvetica, sans-serif; font-size: 10px; } .style7 {font-size: 16px; } .style8 { font-size: 14; font-weight: bold; } .style9 {font-size: 16px; font-weight: bold; } .style10 {font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; } --> </style> <form name="form1" method="post" action="donate/gravar.php"> <p><strong><br /> </strong></p> confirmacao.php <?PHP $content = file_get_contents("donate/index.php"); if($content != FALSE) $main_content .= $content; else $main_content .= 'Can not load file <b>confirmacao.html</b> or file is empty.'; ?>
-
bom não tenho o scritp, mais tente falar com o dono desse server olha como ele fez isso http://sv2.falumir.com.br/falumir2/index.php?subtopic=houses , Talvez ele te ajude
-
vlw mesmo Vodkart , voce como sempre me salvando dos bugs!
-
desse script que eu postei la acima eu usava essa tag <action uniqueid="20101" script="alavanca/manapot.lua"/> entao eu tenho que adicionar esse "20101" no lugar do seu "11301", certo?
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.