Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 10/01/11 em todas áreas

  1. Capaverde

    Salvar Mapa In Game

    Fiz isso com a idéia de permitir aos players construir casas no meio do mato e salvar essas casas e tal Não consegui fazer salvar towns ainda (temple positions), daí você teria que editar o otbm e adicionar elas depois Como eu fiz? Peguei o saveMap do remere (que é open source) e modifiquei um pouco, adaptando ao que o otserver tem. Testei e funcionou em theforgottenserver 0.2rc9 Bom, vamos ao código luascript.h: static int32_t luaSaveMap(lua_State* L); luascript.cpp, dentro de registerFunctions(): //saveMap() lua_register(m_luaState, "saveMap", LuaScriptInterface::luaSaveMap); luascript.cpp: int32_t LuaScriptInterface::luaSaveMap(lua_State* L) { //saveMap() g_game.saveMapzord(); } game.h(public): void saveMapzord(){map->saveMapzord();} map.h, embaixo de bool saveMap();: bool saveMapzord(); map.cpp: bool Map::saveMapzord() { IOMap* loader = new IOMap(); bool saved = false; for(uint32_t tries = 0; tries < 3; tries++) { if(loader->saveMap(this, "eai.otbm", false)) { saved = true; break; } } return saved; } iomap.h: bool saveMap(Map* map, const std::string& identifier, bool showdialog); iomap.cpp: bool IOMap::saveMap(Map* map, const std::string& identifier, bool showdialog) { /* STOP! * Before you even think about modifying this, please reconsider. * while adding stuff to the binary format may be "cool", you'll * inevitably make it incompatible with any future releases of * the map editor, meaning you cannot reuse your map. Before you * try to modify this, PLEASE consider using an external file * like spawns.xml or houses.xml, as that will be MUCH easier * to port to newer versions of the editor than a custom binary * format. */ /*if(Items::dwMajorVersion < 3) { version = 0; } else { version = 1; }*/ FileLoader f; f.openFile(identifier.c_str(), true, false); f.startNode(0); { f.addU32(0); // Version f.addU16((uint16_t)map->mapWidth); f.addU16((uint16_t)map->mapHeight); f.addU32(Items::dwMajorVersion); f.addU32(Items::dwMinorVersion); f.startNode(OTBM_MAP_DATA); { f.addByte(OTBM_ATTR_DESCRIPTION); // Neither SimOne's nor OpenTibia cares for additional description tags f.addString("Saved with Remere's Map Editor "); f.addU8(OTBM_ATTR_DESCRIPTION); f.addString("Esse mapa é maneiro."); /*f.addU8(OTBM_ATTR_EXT_SPAWN_FILE); FileName fn(wxstr(map->spawnfile)); f.addString(std::string((const char*)fn.GetFullName().mb_str(wxConvUTF8))); if(gui.GetCurrentVersion() > CLIENT_VERSION_760) { f.addU8(OTBM_ATTR_EXT_HOUSE_FILE); fn.Assign(wxstr(map->housefile)); f.addString(std::string((const char*)fn.GetFullName().mb_str(wxConvUTF8))); }*/ // Start writing tiles //uint64_t tiles_saved = 0; bool first = true; int local_x = -1, local_y = -1, local_z = -1; for (uint64_t z=0; z<=15; ++z) for (uint64_t xi = 0; xi<map->mapWidth; xi+=256) for (uint64_t yi = 0; yi<map->mapHeight; yi+=256) for (uint64_t x = xi; x<xi+256; x++) for (uint64_t y = yi; y<yi+256; y++){ //MapIterator map_iterator = map.begin(); //while(map_iterator != map.end()) { // Update progressbar //++tiles_saved; //if(showdialog && tiles_saved % 8192 == 0) { //gui.SetLoadDone(int(tiles_saved / double(map.getTileCount()) * 100.0)); //} // Get tile Tile* save_tile = map->getTile(x,y,z); //Tile* save_tile = *map_iterator; if (!save_tile) continue; const Position& pos = save_tile->getPosition(); /*// Is it an empty tile that we can skip? (Leftovers...) if(save_tile->size() == 0) { ++map_iterator; continue; }*/ // Decide if new node should be created if(pos.x < local_x || pos.x >= local_x + 256 || pos.y < local_y || pos.y >= local_y + 256 || pos.z != local_z) { // End last node if(!first) { f.endNode(); } first = false; // Start new node f.startNode(OTBM_TILE_AREA); f.addU16(local_x = pos.x & 0xFF00); f.addU16(local_y = pos.y & 0xFF00); f.addU8( local_z = pos.z); } //HouseTile* houseTile = dynamic_cast<HouseTile*>(save_tile); f.startNode(/*houseTile? OTBM_HOUSETILE : */OTBM_TILE); f.addU8(pos.x & 0xFF); f.addU8(pos.y & 0xFF); /*if(houseTile) { f.addU32(houseTile->getHouse()->getHouseId()); }*/ /*if(save_tile->getMapFlags()) { f.addByte(OTBM_ATTR_TILE_FLAGS); f.addU32(save_tile->getMapFlags()); }*/ if(save_tile->ground) { Item* ground = save_tile->ground; /*if(ground->hasBorderEquivalent()) { bool found = false; for(ItemVector::iterator it = save_tile->items.begin(); it != save_tile->items.end(); ++it) { if((*it)->getGroundEquivalent() == ground->getID()) { // Do nothing // Found equivalent found = true; break; } } if(found == false) { ground->serializeItemNode_OTBM(*this, f); } } else*/ if(ground->isComplex()) { ground->serializeItemNode_OTBM(f); } else { f.addByte(OTBM_ATTR_ITEM); ground->serializeItemCompact_OTBM(f); } } for(ItemVector::reverse_iterator it = save_tile->downItems.rbegin(); it != save_tile->downItems.rend(); ++it) { //if(!(*it)->isMetaItem()) { (*it)->serializeItemNode_OTBM(f); //} } for(ItemVector::iterator it = save_tile->topItems.begin(); it != save_tile->topItems.end(); ++it) { //if(!(*it)->isMetaItem()) { (*it)->serializeItemNode_OTBM(f); //} } f.endNode(); //++map_iterator; } // Only close the last node if one has actually been created if(!first) { f.endNode(); } f.startNode(OTBM_TOWNS); { //for(TownMap::const_iterator it = townMap.begin(); it != townMap.end(); ++it) { for(TownMap::const_iterator it = Towns::getInstance().getFirstTown(); it != Towns::getInstance().getLastTown(); ++it){ Town* town = it->second; f.startNode(OTBM_TOWN); f.addU32(town->getTownID()); f.addString(town->getName()); f.addU16(town->getTemplePosition().x); f.addU16(town->getTemplePosition().y); f.addU8 (town->getTemplePosition().z); f.endNode(); } } f.endNode(); } f.endNode(); //std::cout << tiles_saved << std::endl; } f.endNode(); /*if(showdialog) gui.SetLoadDone(100, wxT("Saving spawns...")); saveSpawns(map, identifier); if(gui.GetCurrentVersion() > CLIENT_VERSION_760) { if(showdialog) gui.SetLoadDone(100, wxT("Saving houses...")); saveHouses(map, identifier); }*/ return true; } item.h, public da class Item: //map-saving virtual bool serializeItemNode_OTBM(FileLoader& f) const; // Will write this item to the stream supplied in the argument virtual void serializeItemCompact_OTBM(FileLoader& f) const; virtual void serializeItemAttributes_OTBM(FileLoader& f) const; item.h, public da class ItemAttributes: virtual bool isComplex() const {return (15 & m_attributes) != 0;} item.cpp: bool Item::serializeItemNode_OTBM(FileLoader& f) const { f.startNode(OTBM_ITEM); f.addU16(id); //if(maphandle.version == 0) { /*const ItemType& iType = items[id]; if(iType.stackable || iType.isSplash() || iType.isFluidContainer()){ f.addU8(getSubType()); }*/ //} serializeItemAttributes_OTBM(f); f.endNode(); return true; } void Item::serializeItemAttributes_OTBM(FileLoader& stream) const { //if(maphandle.version > 0) { const ItemType& iType = items[id]; if(iType.stackable || iType.isSplash() || iType.isFluidContainer()){ //stream.addU8(OTBM_ATTR_COUNT); stream.addU8(getItemCountOrSubtype()); } //}*/ /* if(items.dwMinorVersion >= CLIENT_VERSION_820 && isCharged()) { stream.addU8(OTBM_ATTR_CHARGES); stream.addU16(getSubtype()); }*/ if(getActionId()) { stream.addU8(OTBM_ATTR_ACTION_ID); stream.addU16(getActionId()); } if(getUniqueId()) { stream.addU8(OTBM_ATTR_UNIQUE_ID); stream.addU16(getUniqueId()); } if(getText().length() > 0) { stream.addU8(OTBM_ATTR_TEXT); stream.addString(getText()); } if(getSpecialDescription().length() > 0) { stream.addU8(OTBM_ATTR_DESC); stream.addString(getSpecialDescription()); } } void Item::serializeItemCompact_OTBM(FileLoader& stream) const { stream.addU16(id); /* This is impossible const ItemType& iType = item_db[id]; if(iType.stackable || iType.isSplash() || iType.isFluidContainer()){ stream.addU8(getSubtype()); } */ } fileloader.cpp: troca as funções addU8 e addU16 por essas(ou o mapa gerado vai tá corrompido, aconteceu comigo): bool FileLoader::addU8(uint8_t u8) { writeData(&u8, sizeof(u8), true); //unescape=true, or else some FEsomething itemid might be recognized as the start of a node return m_lastError == ERROR_NONE; } bool FileLoader::addU16(uint16_t u16) { writeData(reinterpret_cast<uint8_t*>(&u16), sizeof(u16), true); return m_lastError == ERROR_NONE; } Como usa isso? Só colocar saveMap() em algum script, mas olha que vai lagar. Dá pra facilmente criar um npc que salva o mapa de x em x horas, e se você for reiniciar o server por algum motivo é só kickar todo mundo e usar uma talkaction que salve.
    1 ponto
  2. Vodkart

    Simple Task 3.0

    Mods: NPC Como configurar?
    1 ponto
  3. alldakie

    Tutorial - Como Fazer Um Logo Do Tibia!

    Olá Xtibianos, Recentemente aprendi a fazer um logo do tíbia, procurei bastante esse tutorial no Xtibia mais não encontrei então vou disponibilizar p/ vocês... Titulo: Logotipo do Tibia Autor: Strad Nivel: Fácil Ferramenta: Photoshop CS2 ou superior. 1- Primeiramente crie um documento 300x120 px com o fundo a seu modo, o tamanho não e obrigatório e só um exemplo. 2- Você precisara da fonte "martel" se quiser um logo parecido com o do Tíbia, clique aqui para baixa-la. 3- Escreva "Tibia", com o layer do texto selecionado, vá em Window>Character e configure da seguinte forma. 4- Após a configuração você terá algo parecido com a imagem abaixo: 5- Agora, va em Layer>Layer Style>Blending Options e selecione e configure os Styles da seguinte forma: Selecione a aba "Inner Shadow" e configure igual a imagem abaixo. Selecione a aba "Bevel and Emboss" e configure igual a imagem abaixo. Selecione a aba "Gradient Overlay" e configure igual a imagem abaixo. Selecione a aba "Stroke" e configure igual a imagem abaixo. Após todas as configurações você devera ter algo parecido com a imagem abaixo: Obs:. A Cor do logo pode ser modificada p/ qualquer outra cor, você pode escrever qualquer outro texto. * Todos os links do tutorial estão hospedados no 4Shared. # Para aqueles que não conseguiram fazer igual ao tutorial, clique aqui para baixar o .PSD totalmente pronta! Creditos: Strad * Se eu estiver infringindo qualquer regra do fórum, por favor reportar!
    1 ponto
  4. Tirando parte do LAG do seu servidor. Criador: LastSoulS Tamanho: 11,5mb Tempo de video: 02 minutos e 51 segundos Qualidade: Perfeita, veja em FullScreen Vale a pena o download? Com certeza Link para download: http://www.4shared.com/file/32639165/83e97bc6/lag.html Espero que gostem. Em breve mais. XTibia, A sua comunidade de tibia e OTserv.
    1 ponto
  5. tyuahoi

    [Gesior Aac]Shop Itens Com Categorias.

    Olá Vi Augumas Pessoas Presisando Desse Script Entao Descidi Postar ;D 1º Va Em: C:\xampp\htdocs Abra o Shopsystem Apague Tudo E Cole Isso. <?PHP // ALTER TABLE `z_shop_history_item` CHANGE `offer_id` `offer_id` VARCHAR( 255 ) NOT NULL; // UPDATE `z_shop_history_item`, `z_shop_offer` SET `z_shop_history_item`.`offer_id` = `z_shop_offer`.`offer_name` WHERE `z_shop_history_item`.`offer_id` = `z_shop_offer`.`id`; if($config['site']['shop_system'] == 1) { if($logged) { $user_premium_points = $account_logged->getCustomField('premium_points'); } else { $user_premium_points = 'Login first'; } function getItemByID($id) { $id = (int) $id; $SQL = $GLOBALS['SQL']; $data = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' WHERE '.$SQL->fieldName('id').' = '.$SQL->quote($id).';')->fetch(); if ($data['offer_type'] == 'pacc') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['days'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif ($data['offer_type'] == 'item') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif ($data['offer_type'] == 'container') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['container_id'] = $data['itemid2']; $offer['container_count'] = $data['count2']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } return $offer; } function getOfferArray_cat1() { $offer_list = $GLOBALS['SQL']->query('SELECT * FROM '.$GLOBALS['SQL']->tableName('z_shop_offer').' WHERE `category` = 1 ORDER BY `id`;'); $i_pacc = 0; $i_item = 0; $i_container = 0; while($data = $offer_list->fetch()) { if ($data['offer_type'] == 'item') { $offer_array['item'][$i_item]['id'] = $data['id']; $offer_array['item'][$i_item]['item_id'] = $data['itemid1']; $offer_array['item'][$i_item]['item_count'] = $data['count1']; $offer_array['item'][$i_item]['points'] = $data['points']; $offer_array['item'][$i_item]['description'] = $data['offer_description']; $offer_array['item'][$i_item]['name'] = $data['offer_name']; $i_item++; } } return $offer_array; } function getOfferArray_cat2() { $offer_list = $GLOBALS['SQL']->query('SELECT * FROM '.$GLOBALS['SQL']->tableName('z_shop_offer').' WHERE `category` = 2 ORDER BY `id`;'); $i_pacc = 0; $i_item = 0; $i_container = 0; while($data = $offer_list->fetch()) { if ($data['offer_type'] == 'item') { $offer_array['item'][$i_item]['id'] = $data['id']; $offer_array['item'][$i_item]['item_id'] = $data['itemid1']; $offer_array['item'][$i_item]['item_count'] = $data['count1']; $offer_array['item'][$i_item]['points'] = $data['points']; $offer_array['item'][$i_item]['description'] = $data['offer_description']; $offer_array['item'][$i_item]['name'] = $data['offer_name']; $i_item++; } } return $offer_array; } function getOfferArray_cat3() { $offer_list = $GLOBALS['SQL']->query('SELECT * FROM '.$GLOBALS['SQL']->tableName('z_shop_offer').' WHERE `category` = 3 ORDER BY `id`;'); $i_pacc = 0; $i_item = 0; $i_container = 0; while($data = $offer_list->fetch()) { if ($data['offer_type'] == 'pacc') { $offer_array['pacc'][$i_pacc]['id'] = $data['id']; $offer_array['pacc'][$i_pacc]['days'] = $data['count1']; $offer_array['pacc'][$i_pacc]['points'] = $data['points']; $offer_array['pacc'][$i_pacc]['description'] = $data['offer_description']; $offer_array['pacc'][$i_pacc]['name'] = $data['offer_name']; $i_pacc++; } elseif ($data['offer_type'] == 'item') { $offer_array['item'][$i_item]['id'] = $data['id']; $offer_array['item'][$i_item]['item_id'] = $data['itemid1']; $offer_array['item'][$i_item]['item_count'] = $data['count1']; $offer_array['item'][$i_item]['points'] = $data['points']; $offer_array['item'][$i_item]['description'] = $data['offer_description']; $offer_array['item'][$i_item]['name'] = $data['offer_name']; $i_item++; } elseif ($data['offer_type'] == 'container') { $offer_array['container'][$i_container]['id'] = $data['id']; $offer_array['container'][$i_container]['container_id'] = $data['itemid2']; $offer_array['container'][$i_container]['container_count'] = $data['count2']; $offer_array['container'][$i_container]['item_id'] = $data['itemid1']; $offer_array['container'][$i_container]['item_count'] = $data['count1']; $offer_array['container'][$i_container]['points'] = $data['points']; $offer_array['container'][$i_container]['description'] = $data['offer_description']; $offer_array['container'][$i_container]['name'] = $data['offer_name']; $i_container++; } } return $offer_array; } if($action == "category=3") { unset($_SESSION['viewed_confirmation_page']); $main_content .= '<h2><center>Welcome to the Server Name Shop!<br /> Here you can buy some items.</center></h2>'; $offer_list = getOfferArray_cat3(); //show list of items offers if(count($offer_list['item']) > 0) { $main_content .= '<a href="index.php?subtopic=shopsystem" style="padding: 5px 5px 1px 5px; margin: 5px 1px 0px 1px; background-color: #F1E0C6; color: #aaaaaa;">Items</a><a href="index.php?subtopic=shopsystem&action=category=2" style="padding: 5px 5px 1px 5px; margin: 5px 1px 0px 1px; background-color: #F1E0C6; color: #aaaaaa;">Addon Items</a><a href="index.php?subtopic=shopsystem&action=category=3" style="padding: 5px 5px 1px 5px; margin: 5px 1px 0px 1px; background-color: #F1E0C6; color: #000000;">Others</a>'; $main_content .= '<table style="width:100%;" cellpadding="1" cellspacing="1"><tr style="background:#F1E0C6;"><td colspan="4" style="height:5px;"></td></tr></table>'; $main_content .= '<table border="0" cellpadding="1" cellspacing="1" width="650"><tr width="650" bgcolor="#b7a58a"><td colspan="3"><font color="#F1E0C6" size="4"><b> ITEMS</b></font></td></tr><tr bgcolor="#b7a58a"><td width="50" align="center"><font color=#FFFFFF><b>Picture</b></font></td><td width="350" align="left"><font color=#FFFFFF><b>Description</b></font></td><td width="250" align="center"><font color=#FFFFFF><b>Select product</b></font></td></tr>'; foreach($offer_list['item'] as $item) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center"><img src="item_images/'.$item['id'].'.jpg"></td><td><b>'.$item['name'].'</b> ('.$item['points'].' points)<br />'.$item['description'].'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$item['id'].'"><input type="submit" value="Buy '.$item['name'].'"><br><b>for '.$item['points'].' points</b></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table><br />'; } //show list of containers offers if(count($offer_list['container']) > 0) { $main_content .= '<table border="0" cellpadding="1" cellspacing="1" width="650"><tr width="650" bgcolor="#b7a58a"><td colspan="3"><font color="#F1E0C6" size="4"><b> CONTAINERS WITH ITEMS</b></font></td></tr><tr bgcolor="#b7a58a"><td width="50" align="center"><font color=#FFFFFF><b>Picture</b></font></td><td width="350" align="left"><font color=#FFFFFF><b>Description</b></font></td><td width="250" align="center"><font color=#FFFFFF><b>Select product</b></font></td></tr>'; foreach($offer_list['container'] as $container) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center"><img src="item_images/'.$container['id'].'.jpg"></td><td><b>'.$container['name'].'</b> ('.$container['points'].' points)<br />'.$container['description'].'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$container['id'].'"><input type="submit" value="Buy '.$container['name'].'"><br><b>for '.$container['points'].' points</b></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table><br />'; } //show list of pacc offers if(count($offer_list['pacc']) > 0) { $main_content .= '<table border="0" cellpadding="1" cellspacing="1" width="650"><tr width="650" bgcolor="#b7a58a"><td colspan="3"><font color="#F1E0C6" size="4"><b> PACC</b></font></td></tr><tr bgcolor="#b7a58a"><td width="50" align="center"><font color=#FFFFFF><b>Days</b></font></td><td width="350" align="left"><font color=#FFFFFF><b>Description</b></font></td><td width="250" align="center"><font color=#FFFFFF><b>Select product</b></font></td></tr>'; foreach($offer_list['pacc'] as $pacc) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center">'.$pacc['days'].'</td><td><b>'.$pacc['name'].'</b> ('.$pacc['points'].' points)<br />'.$pacc['description'].'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$pacc['id'].'"><input type="submit" value="Buy '.$pacc['name'].'"><br><b>for '.$pacc['points'].' points</b></form>'; } } $main_content .= '</table><br />'; } } if($action == "category=2") { unset($_SESSION['viewed_confirmation_page']); $main_content .= '<h2><center>Welcome to the Server Name Shop!<br /> Here you can buy some items.</center></h2>'; $offer_list = getOfferArray_cat2(); //show list of items offers if(count($offer_list['item']) > 0) { $main_content .= '<a href="index.php?subtopic=shopsystem" style="padding: 5px 5px 1px 5px; margin: 5px 1px 0px 1px; background-color: #F1E0C6; color: #aaaaaa;">Items</a><a href="index.php?subtopic=shopsystem&action=category=2" style="padding: 5px 5px 1px 5px; margin: 5px 1px 0px 1px; background-color: #F1E0C6; color: #000000;;">Addon Items</a><a href="index.php?subtopic=shopsystem&action=category=3" style="padding: 5px 5px 1px 5px; margin: 5px 1px 0px 1px; background-color: #F1E0C6; color: #aaaaaa;">Others</a>'; $main_content .= '<table style="width:100%;" cellpadding="1" cellspacing="1"><tr style="background:#F1E0C6;"><td colspan="4" style="height:5px;"></td></tr></table>'; $main_content .= '<table border="0" cellpadding="1" cellspacing="1" width="650"><tr width="650" bgcolor="#b7a58a"><td colspan="3"><font color="#F1E0C6" size="4"><b> ITEMS</b></font></td></tr><tr bgcolor="#b7a58a"><td width="50" align="center"><font color=#FFFFFF><b>Picture</b></font></td><td width="350" align="left"><font color=#FFFFFF><b>Description</b></font></td><td width="250" align="center"><font color=#FFFFFF><b>Select product</b></font></td></tr>'; foreach($offer_list['item'] as $item) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center"><img src="item_images/'.$item['id'].'.jpg"></td><td><b>'.$item['name'].'</b> ('.$item['points'].' points)<br />'.$item['description'].'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$item['id'].'"><input type="submit" value="Buy '.$item['name'].'"><br><b>for '.$item['points'].' points</b></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table><br />'; } } if($action == '') { unset($_SESSION['viewed_confirmation_page']); $main_content .= '<h2><center>Welcome to the Server Name Shop!<br /> Here you can buy some items.</center></h2>'; $offer_list = getOfferArray_cat1(); //show list of items offers if(count($offer_list['item']) > 0) { $main_content .= '<a href="index.php?subtopic=shopsystem" style="padding: 5px 5px 1px 5px; margin: 5px 1px 0px 1px; background-color: #F1E0C6; color: #000000;">Items</a><a href="index.php?subtopic=shopsystem&action=category=2" style="padding: 5px 5px 1px 5px; margin: 5px 1px 0px 1px; background-color: #F1E0C6; color: #aaaaaa;">Addon Items</a><a href="index.php?subtopic=shopsystem&action=category=3" style="padding: 5px 5px 1px 5px; margin: 5px 1px 0px 1px; background-color: #F1E0C6; color: #aaaaaa;">Others</a>'; $main_content .= '<table style="width:100%;" cellpadding="1" cellspacing="1"><tr style="background:#F1E0C6;"><td colspan="4" style="height:5px;"></td></tr></table>'; $main_content .= '<table border="0" cellpadding="1" cellspacing="1" width="650"><tr width="650" bgcolor="#b7a58a"><td colspan="3"><font color="#FFFFFF" size="4"><b> ITEMS</b></font></td></tr><tr bgcolor="#b7a58a"><td width="50" align="center"><font color=#FFFFFF><b>Picture</b></font></td><td width="350" align="left"><font color=#FFFFFF><b>Description</b></font></td><td width="250" align="center"><font color=#FFFFFF><b>Select product</b></font></td></tr>'; foreach($offer_list['item'] as $item) { $main_content .= '<tr bgcolor="#F1E0C6"><td align="center"><img src="item_images/'.$item['id'].'.jpg"></td><td><b>'.$item['name'].'</b> ('.$item['points'].' points)<br />'.$item['description'].'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method=POST><input type="hidden" name="buy_id" value="'.$item['id'].'"><input type="submit" value="Buy '.$item['name'].'"><br><b>for '.$item['points'].' points</b></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table><br />'; } } elseif($action == 'select_player') { unset($_SESSION['viewed_confirmation_page']); if(!$logged) { $main_content .= 'Please login first.'; } else { $buy_id = (int) $_REQUEST['buy_id']; if(empty($buy_id)) { $main_content .= 'Please <a href="?subtopic=shopsystem">select item</a> first.'; } else { $buy_offer = getItemByID($buy_id); if(isset($buy_offer['id'])) //item exist in database { if($user_premium_points >= $buy_offer['points']) { $main_content .= '<h2>Select player</h2> <table border="0" cellpadding="1" cellspacing="1" width="650"> <tr bgcolor="#b7a58a"><td colspan="2"><font color="#F1E0C6" size="4"><b>Selected offer</b></font></td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>Name:</b></td><td width="550">'.$buy_offer['name'].'</td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>Description:</b></td><td width="550">'.$buy_offer['description'].'</td></tr> </table><br /> <form action="?subtopic=shopsystem&action=confirm_transaction" method=POST><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="1" cellspacing="1" width="650"> <tr bgcolor="#b7a58a"><td colspan="2"><font color="#F1E0C6" size="4"><b>Give item/pacc* to player from your account</b></font></td></tr> <tr bgcolor="#F1E0C6"><td width="110"><b>Name:</b></td><td width="550"><select name="buy_name">'; $players_from_logged_acc = $account_logged->getPlayersList(); if(count($players_from_logged_acc) > 0) { $players_from_logged_acc->orderBy('name'); foreach($players_from_logged_acc as $player) { $main_content .= '<option>'.$player->getName().'</option>'; } } else { $main_content .= 'You don\'t have any character on your account.'; } $main_content .= '</select> <input type="submit" value="Give"></td></tr> </table> </form><br /><form action="?subtopic=shopsystem&action=confirm_transaction" method=POST><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="1" cellspacing="1" width="650"> <tr bgcolor="#b7a58a"><td colspan="2"><font color="#F1E0C6" size="4"><b>Give item/pacc* to other player</b></font></td></tr> <tr bgcolor="#F1E0C6"><td width="110"><b>To player:</b></td><td width="550"><input type="text" name="buy_name"> - name of player</td></tr> <tr bgcolor="#F1E0C6"><td width="110"><b>From:</b></td><td width="550"><input type="text" name="buy_from"> <input type="submit" value="Give"> - your nick, \'empty\' = Anonymous</td></tr> </table><br /> </form>'; $main_content .= '*PACC is for all characters from account of selected player name'; } else { $main_content .= 'For this item you need <b>'.$buy_offer['points'].'</b> points. You have only <b>'.$user_premium_points.'</b> premium points. Please <a href="?subtopic=shopsystem">select other item</a> or buy premium points.'; } } else { $main_content .= 'Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="?subtopic=shopsystem">select item</a> again.'; } } } } elseif($action == 'confirm_transaction') { if(!$logged) { $main_content .= 'Please login first.'; } else { $buy_id = (int) $_POST['buy_id']; $buy_name = stripslashes(urldecode($_POST['buy_name'])); $buy_from = stripslashes(urldecode($_POST['buy_from'])); if(empty($buy_from)) { $buy_from = 'Anonymous'; } if(empty($buy_id)) { $main_content .= 'Please <a href="?subtopic=shopsystem">select item</a> first.'; } else { if(!check_name($buy_from)) { $main_content .= 'Invalid nick ("from player") format. Please <a href="?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a> or contact with administrator.'; } else { $buy_offer = getItemByID($buy_id); if(isset($buy_offer['id'])) //item exist in database { if($user_premium_points >= $buy_offer['points']) { if(check_name($buy_name)) { $buy_player = new OTS_Player(); $buy_player->find($buy_name); if($buy_player->isLoaded()) { $buy_player_account = $buy_player->getAccount(); if($_SESSION['viewed_confirmation_page'] == 'yes' && $_POST['buy_confirmed'] == 'yes') { if($buy_offer['type'] == 'pacc') { $player_premdays = $buy_player_account->getCustomField('premdays'); $player_lastlogin = $buy_player_account->getCustomField('lastday'); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');'; $SQL->query($save_transaction); $buy_player_account->setCustomField('premdays', $player_premdays+$buy_offer['days']); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; if($player_premdays == 0) { $buy_player_account->setCustomField('lastday', time()); } $main_content .= '<h2>PACC added!</h2><b>'.$buy_offer['days'].' days</b> of Premium Account added to account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a>'; } elseif($buy_offer['type'] == 'item') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' (id, name, type, action, param1, param2, param3, param4, param5, param6, param7, delete_it) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', \'login\', \'give_item\', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', \'\', \'\', \'item\', '.$SQL->quote($buy_offer['name']).', \'\', \'1\');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', \'wait\', '.$SQL->quote(time()).', \'0\');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<h2>Item added!</h2><b>'.$buy_offer['name'].'</b> added to player <b>'.$buy_player->getName().'</b> items (he will get this items after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a>'; } elseif($buy_offer['type'] == 'container') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' (id, name, type, action, param1, param2, param3, param4, param5, param6, param7, delete_it) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', \'login\', \'give_item\', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote($buy_offer['container_id']).', '.$SQL->quote($buy_offer['container_count']).', \'container\', '.$SQL->quote($buy_offer['name']).', \'\', \'1\');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', \'wait\', '.$SQL->quote(time()).', \'0\');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<h2>Container of items added!</h2><b>'.$buy_offer['name'].'</b> added to player <b>'.$buy_player->getName().'</b> items (he will get this container with items after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a>'; } } else { $set_session = TRUE; $_SESSION['viewed_confirmation_page'] = 'yes'; $main_content .= '<h2>Confirm transaction</h2> <table border="0" cellpadding="1" cellspacing="1" width="650"> <tr bgcolor="#b7a58a"><td colspan="3"><font color="#F1E0C6" size="4"><b>Confirm transaction</b></font></td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>Name:</b></td><td width="550" colspan="2">'.$buy_offer['name'].'</td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>Description:</b></td><td width="550" colspan="2">'.$buy_offer['description'].'</td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>Cost:</b></td><td width="550" colspan="2"><b>'.$buy_offer['points'].' premium points</b> from your account</td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>For Player:</b></td><td width="550" colspan="2"><font color="#FFFFFF">'.$buy_player->getName().'</font></td></tr> <tr bgcolor="#F1E0C6"><td width="100"><b>From:</b></td><td width="550" colspan="2"><font color="#FFFFFF">'.$buy_from.'</font></td></tr> <tr bgcolor="#FFFFFF"><td width="100"><b>Transaction?</b></td><td width="275" align="left"> <form action="?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_confirmed" value="yes"><input type="hidden" name="buy_id" value="'.$buy_id.'"><input type="hidden" name="buy_from" value="'.urlencode($buy_from).'"><input type="hidden" name="buy_name" value="'.urlencode($buy_name).'"><input type="submit" value="Accept"></form></td> <td align="right"><form action="?subtopic=shopsystem" method="POST"><input type="submit" value="Cancel"></form></td></tr> </table> '; } } else { $main_content .= 'Player with name <b>'.$buy_name.'</b> doesn\'t exist. Please <a href="?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a>.'; } } else { $main_content .= 'Invalid name format. Please <a href="?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a> or contact with administrator.'; } } else { $main_content .= 'For this item you need <b>'.$buy_offer['points'].'</b> points. You have only <b>'.$user_premium_points.'</b> premium points. Please <a href="?subtopic=shopsystem">select other item</a> or buy premium points.'; } } else { $main_content .= 'Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="?subtopic=shopsystem">select item</a> again.'; } } } } if(!$set_session) { unset($_SESSION['viewed_confirmation_page']); } } 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 = '#FFFFFF'; $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>'.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="#FFFFFF">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 = '#FFFFFF'; $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 .= '<h2>Item transactions</h2><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=100%><tr bgcolor="#F1E0C6"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Bought on page</b></td><td><b>Received on OTS</b></td></tr>'.$items_received_text.'</table><br />'; } if(!empty($paccs_received_text)) { $main_content .= '<h2>PACC transactions</h2><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=100%><tr bgcolor="#F1E0C6"><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 item or PACC.'; } } $main_content .= '<br><br><b><font color="green">You have premium points: </font></b>'.$user_premium_points; } else $main_content .= 'Shop system is blocked on this server. Admin must install this script (LUA and in database only, PHP is installed) on server and set <b>shop_system = "1"</b> in config.ini file'; ?> Salve E feche. Agora Va Em: Shopadmin Apague Tudo E Cole Isso: <?PHP if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { $offertype = $_REQUEST['offer_type']; if((empty($action)) AND (empty($offertype))) { $main_content .= '<br><h2><center><a href="?subtopic=shopadmin&offer_type=item">ADD SHOP OFFER</a><br><br> <a href="?subtopic=shopadmin&action=viewoffer">VIEW SHOP OFFER <i>(EDIT/DELETE)</i></a><br><br><a href="?subtopic=shopadmin&action=points">ADD POINTS</a></center>'; } if($_REQUEST['offer_type']){ $shop_points = stripslashes(ucwords(strtolower(trim($_REQUEST['shop_points'])))); $shop_offer_type = stripslashes(trim($_REQUEST['offer_type'])); if(empty($shop_points)) { $main_content .= '<table border="0"><tr><td align="center"><b>Select offer type:</b></td><td><table border="0" ><tr bgcolor="#505050"> <td><font color="white">Item</td><td><font color="white">Container</td><td><font color="white">Pacc</td><td><font color="white">Redskull</td><td><font color="white">Unban</td><td><font color="white">Changename</td></tr> <tr bgcolor="#D4C0A1"> <td align="center"><a href="?subtopic=shopadmin&offer_type=item"><input type="radio" name="offer_type" value="item"></a></td> <td align="center"><a href="?subtopic=shopadmin&offer_type=container"><input type="radio" name="offer_type" value="container" ></a></td> <td align="center"><a href="?subtopic=shopadmin&offer_type=pacc"><input type="radio" name="offer_type" value="pacc" ></a></td> <td align="center"><a href="?subtopic=shopadmin&offer_type=redskull"><input type="radio" name="offer_type" value="redskull" ></a></td> <td align="center"><a href="?subtopic=shopadmin&offer_type=unban"><input type="radio" name="offer_type" value="unban" ></a></td> <td align="center"><a href="?subtopic=shopadmin&offer_type=changename"><input type="radio" name="offer_type" value="changename" ></a></td> </tr></table></td></tr>'; $main_content .= '<form action="?subtopic=shopadmin&offer_type='.$shop_offer_type.'&check" method="post" ><table border="0"><tr><td align="center" ><b>Points:</b></td> <td><input type="textbox" name="shop_points" maxlenght="7" style="width: 70px"></td></tr>'; if($_REQUEST['offer_type'] == 'container'){ $main_content .= '<tr><td align="center" ><b>Container ID:</b></td> <td><input type="text" name="shop_itemid1" maxlenght="7" style="width: 70px" ></td></tr> <tr><td align="center" ><b>Count Container:</b></td> <td><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr> <tr><td align="center" ><b>Item ID:</b></td> <td><input type="text" name="shop_itemid2" maxlenght="7" style="width: 70px" ></td></tr> <tr><td align="center" ><b>Count Item:</b></td> <td><input type="text" name="shop_count2" maxlenght="7" style="width: 70px" ></td></tr>'; } if($_REQUEST['offer_type'] == 'item'){ $main_content .= '<tr><td align="center"><b>Item ID:</b></td> <td><input type="text" name="shop_itemid1" maxlenght="7" style="width: 70px" ></td></tr> <tr><td align="center"><b>Item Count:</b></td> <td><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>'; } if($_REQUEST['offer_type'] == 'pacc'){ $main_content .= '<tr><td align="center" ><b>Days:</b></td> <td><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>'; } $main_content .= '<tr><td align="center" ><b>Offer Description:</b></td> <td ><textarea name="shop_offer_description" rows="2" cols="35"></textarea></td></tr> <tr><td align="center" ><b>Category:</b></td> <td><input type="text" name="shop_category" maxlenght="7" style="width: 70px" ></td></tr> <tr><td align="center" ><b>Offer Name:</b></td> <td><input type="text" name="shop_offer_name" maxlenght="40" style="width: 200px" ></td></tr> <tr><td><input name="submit" type="submit" value="Submit" /></form></td><td> <form action="?subtopic=shopadmin&offer_type=container" method="post" > <input name="submit" type="submit" value="Reset" /></form></td></tr></table>'; $main_content .= '<form action="?subtopic=shopadmin" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>'; } else { $shop_points = stripslashes(trim($_POST['shop_points'])); $shop_offer_type = stripslashes(trim($_REQUEST['offer_type'])); $shop_itemid1 = stripslashes(trim($_POST['shop_itemid1'])); $shop_count1 = stripslashes(trim($_POST['shop_count1'])); $shop_itemid2 = stripslashes(trim($_POST['shop_itemid2'])); $shop_count2 = stripslashes(trim($_POST['shop_count2'])); $shop_offer_description = stripslashes(trim($_POST['shop_offer_description'])); $shop_offer_name = stripslashes(trim($_POST['shop_offer_name'])); $shop_category = stripslashes(trim($_POST['shop_category'])); $SQL->query('INSERT INTO `z_shop_offer` (id, points, itemid1, count1, itemid2, count2, offer_type, offer_description, offer_name, pid, category) VALUES (NULL, '.$SQL->quote($shop_points).', '.$SQL->quote($shop_itemid1).', '.$SQL->quote($shop_count1).', '.$SQL->quote($shop_itemid2).', '.$SQL->quote($shop_count2).', '.$SQL->quote($shop_offer_type).', '.$SQL->quote($shop_offer_description).', '.$SQL->quote($shop_offer_name).', 0, '.$SQL->quote($shop_category).')'); $main_content .= '<center><h2><font color="red">Added to Shop:</font></h2></center><hr/> <tr><td align="center" ><b>Points:</b></td> <td>'.$shop_points.'</td></tr><br>'; if($shop_offer_type == 'container'){ $main_content .= '<tr><td align="center" ><b>Container ID:</b></td> <td>'.$shop_itemid1.'</td></tr><br> <tr><td align="center" ><b>Count Container:</b></td> <td>'.$shop_count1.'</td></tr><br> <tr><td align="center" ><b> Item ID (in Container):</b></td> <td>'.$shop_itemid2.'</td></tr><br> <tr><td align="center" ><b>Count Item (in Container):</b></td> <td>'.$shop_count2.'</td></tr><br> <tr><td align="center" ><b>Category:</b></td> <td>'.$shop_category.'</td></tr><br>'; } if ($shop_offer_type == 'item'){ $main_content .= '<tr><td align="center" ><b>Item ID:</b></td> <td>'.$shop_itemid1.'</td></tr><br> <tr><td align="center" ><b>Count Item:</b></td> <td>'.$shop_count1.'</td></tr><br> <tr><td align="center" ><b>Category:</b></td> <td>'.$shop_category.'</td></tr><br>'; } if ($shop_offer_type == 'pacc'){ $main_content .= '<tr><td align="center" ><b>Days:</b></td> <td>'.$shop_count1.'</td></tr><br> <tr><td align="center" ><b>Category:</b></td> <td>'.$shop_category.'</td></tr><br>'; } $main_content .= '<tr><td align="center" ><b>Offer Type:</b></td> <td>'.$shop_offer_type.'</td></tr><br> <tr><td align="center" ><b>Offer Description:</b></td> <td>'.$shop_offer_description.'</td></tr><br> <tr><td align="center" ><b>Offer Name:</b></td> <td>'.$shop_offer_name.'</td></tr> <br><form action="?subtopic=shopadmin&offer_type=item" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>'; } } if($action == "viewoffer") { $items = simplexml_load_file($config['site']['server_path'].'/data/items/items.xml') or die('<b>Could not load items!</b>'); foreach($items->item as $v) $itemList[(int)$v['id']] = $v['name']; $order = array("id" => "id", "points" => "points", "offer_type" => "offer_type", "itemid1" => "itemid1", "itemid2" => "itemid2"); $main_content .= '<center><table width="550"><tr BGCOLOR="#505050"><td width="5"><font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'id') . '" class=white>ID:</td><td width="5"><font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'points') . '" class=white>Points:</td><td width="7"> <font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'itemid1') . '" class=white>Item ID:</td><td width="5"><font color="white">Count:</td><td width="7"><center><font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'itemid2') . '" class=white>Container ID:</center></td><td width="5"><font color="white">Count:</td><td width="7"><font color="white"><a href="index.php?subtopic=shopadmin&action=viewoffer&order=' . getOrder($order, 'order', 'offer_type') . '" class=white>Offer Type:</td> <td width="85"><font color="white">Offer Description:</td><td width="30"><font color="white">Offer Name:</td><td width="30"></td></tr>'; $shopoffers = $SQL->query('SELECT id, points, itemid1, count1, itemid2, count2, offer_type, offer_description, offer_name, pid FROM z_shop_offer ' . makeOrder($order, 'order', 'id')); foreach($shopoffers as $shop) { $main_content .= '</B><tr BGCOLOR="#D4C0A1"><td align="center">'.$shop['id'].'<td align="center">'.$shop['points'].'</td>'; if($shop['itemid1'] == "0") { $main_content .= '<td align="center">'.$shop['itemid1'].'<br></td>'; } else { $main_content .= '<td align="center">'.$shop['itemid1'].'<br>(' . $itemList[(int)$shop['itemid1']] . ')</td>'; } $main_content .= '<td align="center">'.$shop['count1'].'</td>'; if($shop['itemid2'] == "0") { $main_content .= '<td align="center">'.$shop['itemid2'].'</td>'; } else { $main_content .= '<td align="center">'.$shop['itemid2'].'<br>(' . $itemList[(int)$shop['itemid2']] . ')</td>'; } $main_content .= '<td align="center">'.$shop['count2'].'</td><td align="center">'.$shop['offer_type'].'</td><td align="left">'.$shop['offer_description'].'</td><td align="left">'.$shop['offer_name'].'</td>'; $main_content .= '<td align="center"><a href="?subtopic=shopadmin&action=editoffer&id='.$shop['id'].'"><img src="'.$layout_name.'/images/news/edit_news.png" border="0"></a><br><br><a href="?subtopic=shopadmin&action=deleteoffer&id='.$shop['id'].'"><img src="'.$layout_name.'/images/news/delete_news.png" border="0"></a></td>'; } $main_content .= '</td></tr></TABLE><br><form action="?subtopic=shopadmin" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>'; } if($action == "deleteoffer") { $id = (int) $_REQUEST['id']; $SQL->query('DELETE FROM z_shop_offer WHERE id = '.$id.' LIMIT 1;'); $main_content .= '<center>Shop offer has been deleted.</center><br><center><form action="?subtopic=shopadmin&action=viewoffer" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form></center>'; } if($action == "editoffer") { $id = (int) $_REQUEST['id']; $shopoffers = $SQL->query('SELECT * FROM z_shop_offer WHERE id = '.$id.' LIMIT 1;'); foreach($shopoffers as $shop) { $main_content .= '<form action="?subtopic=shopadmin&action=edited&id='.$id.'" method="post" ><table border="0"><tr><td align="center" ><b>Points:</b></td> <td><input type="textbox" name="shop_points" maxlenght="7" value="'.$shop['points'].'" style="width: 70px"></td></tr>'; if($shop['offer_type'] == 'container'){ $main_content .= '<tr><td align="center" ><b>Container ID:</b></td> <td><input type="text" name="shop_itemid1" maxlenght="7" value="'.$shop['itemid1'].'" style="width: 70px" ></td></tr> <tr><td align="center" ><b>Count Container:</b></td> <td><input type="text" name="shop_count1" maxlenght="7" value="'.$shop['count1'].'" style="width: 70px" ></td></tr> <tr><td align="center" ><b>Item ID:</b></td> <td><input type="text" name="shop_itemid2" maxlenght="7" value="'.$shop['itemid2'].'" style="width: 70px" ></td></tr> <tr><td align="center" ><b>Count Item:</b></td> <td><input type="text" name="shop_count2" maxlenght="7" value="'.$shop['count2'].'" style="width: 70px" ></td></tr>'; } if($shop['offer_type'] == 'item'){ $main_content .= '<tr><td align="center"><b>Item ID:</b></td> <td><input type="text" name="shop_itemid1" maxlenght="7" value="'.$shop['itemid1'].'" style="width: 70px" ></td></tr> <tr><td align="center"><b>Item Count:</b></td> <td><input type="text" name="shop_count1" maxlenght="7" value="'.$shop['count1'].'" style="width: 70px" ></td></tr>'; } if($shop['offer_type'] == 'pacc'){ $main_content .= '<tr><td align="center" ><b>Days:</b></td> <td><input type="text" name="shop_count1" maxlenght="7" style="width: 70px" ></td></tr>'; } $main_content .= '<tr><td align="center" ><b>Offer Type:</b></td> <td><input type="text" name="shop_offer_type" value="'.$shop['offer_type'].'" maxlenght="40" style="width: 200px" ></td></tr> <tr><td align="center" ><b>Offer Description:</b></td> <td ><textarea name="shop_offer_description" rows="2" cols="35">'.$shop['offer_description'].'</textarea></td></tr> <tr><td align="center" ><b>Offer Name:</b></td> <td><input type="text" name="shop_offer_name" value="'.$shop['offer_name'].'" maxlenght="40" style="width: 200px" ></td></tr> <tr><td><input name="submit" type="submit" value="Submit" /></form></td><td></td></tr></table>'; $main_content .= '<form action="?subtopic=shopadmin&action=viewoffer" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>'; } } if($action == "edited") { $id = (int) $_REQUEST['id']; $shop_points = stripslashes(trim($_POST['shop_points'])); $shop_offer_type = stripslashes(trim($_POST['shop_offer_type'])); $shop_itemid1 = stripslashes(trim($_POST['shop_itemid1'])); $shop_count1 = stripslashes(trim($_POST['shop_count1'])); $shop_itemid2 = stripslashes(trim($_POST['shop_itemid2'])); $shop_count2 = stripslashes(trim($_POST['shop_count2'])); $shop_offer_description = stripslashes(trim($_POST['shop_offer_description'])); $shop_offer_name = stripslashes(trim($_POST['shop_offer_name'])); $SQL->query('UPDATE `z_shop_offer` SET `points` = '.$shop_points.', `itemid1` = '.$SQL->quote($shop_itemid1).', `count1` = '.$SQL->quote($shop_count1).', `itemid2` = '.$SQL->quote($shop_itemid2).', `count2` = '.$SQL->quote($shop_count2).', `offer_type` = '.$SQL->quote($shop_offer_type).', `offer_description` = '.$SQL->quote($shop_offer_description).', `offer_name` = '.$SQL->quote($shop_offer_name).' WHERE `id` = '.$id.';'); $main_content .= '<b><center>Shop offer successfully edited.</b><br><br><form action="?subtopic=shopadmin&action=viewoffer" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form><meta http-equiv="refresh" content="1;url=/?subtopic=shopadmin&action=viewoffer" />'; } if($action == "points") { $player = stripslashes(ucwords(strtolower(trim($_REQUEST['character'])))); $points = $_POST['points']; if(empty($player)) { $main_content .= '<form action="" method="post"><B>Enter Character Name:</B><input type="textbox" name="character"><br> <B>Enter Points Amount:</B><input type="textbox" name="points"><br><input type="submit" value="Submit"> </form></center><form action="?subtopic=shopadmin" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>'; } else { $player_data = $SQL->query("SELECT * FROM `players` WHERE `name` = '".$player."';")->fetch(); $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '".$points."' WHERE `id` = '".$player_data['account_id']."'"); $main_content .= '<b><center>'.$points.' Premium Points added to the account of <i>'.$player.'</i> !</b></center><br> <form action="?subtopic=shopadmin" method="post" ><input name="submit" type="submit" value="Back" title="Back"/></form>'; } } } else { $main_content .= 'Sorry, you have not the rights to access this page.'; } ?> Salve E Feche. Agora Va Em Sua Detabase E adicione Isso: ALTER TABLE `z_shop_offer` ADD `category` INT( 11 ) NOT NULL DEFAULT '1'; Quando Voçê for adicionar um iten ira aparecer a opçao, Category Ali Voçê Coloca 1 Para Aparecer Nos Itens, 2 Para Aparecer nos Addon Items, e 3 para aparecer em Others. Pronto. Bom Uso.
    1 ponto
  6. MatheusGlad

    Sistema De Novos Items

    Bem, 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 = tonumber(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[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="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. (É importante que voces peçam por novos atributos, porque os outros são mais complicados e eu nao vou faze-los para ninguem usar) Atributos: "description" "defense" "attack" "extradefense" "armor" "extraattack" Para adicionar os novos itemids aos players use doPlayerAddEditedItem(cid, ITEMID) em vez de doPlayerAddItem...
    1 ponto
  7. Olá vou postar aqui como criar 1 client sem o .spr, .dat, .pic. Para fazer seu client você vai precisar: 1º Cliente (Pode ser qualquer Client Wodbo - Tibia - Naruto - Pokemon) 2º MoleBox (pode ser encontrado no baixaki) VIDEO AULA No Final Postarei os Links. Primeiramente: NÂO TEM COMO BLOQUEAR PARA NINGUEM COPIAR SUAS SPRITES! Existem Vários programas que desfazem essa Compilação. Como exemplo vou compilar o Tibia 8.60 Tutorial em Imagens! ________________________________________________________________________________________ Abra o Molebox Entre em Package Options Em seguida selecione o executável do teu Cliente No próximo passo selecione um local para salvar seu novo Cliente Em seguida marque a opção "compress" Pressione o botão "Add Files" Selecione os Arquivos mostrados na imagem Aperte OK Em seguida aperte "Pack" Aguarde até que todos os arquivos sejam Compilados _________________________________________________________________________________ Links: http://www.2shared.c..._By_Babidy.html http://www.4shared.com/rar/vO-M74MG/MoleBox_Ultra_By_Babidy.html http://www.multiupload.nl/0LE7I45F06 SENHA: babidy SCAN: https://www.virustot...sis/1355177552/ [EDIT: Atualizei os Links e coloquei a vídeo aula] Espero te Ajudado. Créditos: Babidy Skype: Babidy4
    1 ponto
  8. luisstronda

    [Funciona] Abrindo Mapa De Pokemon

    Bom gente varias pessoas aqui do Xtibia , esta a procura de um tutorial de como abrir o seu map editor normalmente é "REMERES" que eles usam , eles querem abrir o mapa de pokemon e eu tenho a soluçao é simples abra o seu map editor vaai em FILE > PREFERENCES depois clique em CLIENTE VERSION e desmarque a OPÇAO "CHECK FILE SIGNATURES" e clique em APLLY e OK feche seu map editor. agooora instale o Tibia 8.54 ou da versão do seu OT de POKEMON , vaa na pasta do seu cliente POKEMON , copie os seguintes arquivos Tibia.spr & Tibia DAT , depois abra a pasta do seu tibia , e cola os 2 arquivos laa. proonto agoora e so abrir o seu map na pasta do seu ot / data / world e boooora editaar do seeu jeeito AJUDEI ? Meu Servidor De Pokemon Online REP ++
    1 ponto
  9. BlackLeft

    Tibia 8.6 (Rme)

    Notei que muitas pessoas está precisando do cliente do tibia 8.6 do remers (pois a porra do site do remeres esta off).... pois o unico jeito do seu mapa abrir para vc editar 8.6 é pegando o cliente que vou abaixo + RME2.1 : Download Tibia 8.6 Remeres Remeres 2.1 Scan: Depois coloco não deu tempo de colocar pois tive que ir para o trampo, mais quando eu chegar eu boto. (arquivo 100% livre de virus) Como Instalar: 1° Faça o download no 4shared. 2° Extraia a pasta do tibia 8.6 para algum lugar. 3° Abra seu RME com um mapa 8.6 selecione a pasta que você baixou. 4° Seja FELIZ !! Não custa nada da um +REP !!
    1 ponto
  10. Pidol666

    Aceleret {Roxor} 8.5

    Bem-vindo! Oi eu gostaria de apresentar a versão ots 8,5x num ápice : 1: Corrigido vários bugs 2: Magias Novas 3: Exp Novo 4: Novas quests 5: O novo visual da cidade Fotos : Busca vírus resultados http://www.virustotal.com/file-scan/report.html?id=9cbcf5cf55702147621f1c694cb2f557b5a47581a5a84b6bf9e4707521735d98-1286975430 Download http://www.mediafire.com/?dmb8wgd1d46sdpy Eu acho que você vai gostar e vai para o bom uso, eu convido você para comentar e expressar sua opinião sobre isso, e nada mais!
    1 ponto
  11. sejameuamigo

    ◄ Catapult System ►

    Nome: Catapult Versão Testada: 8.54 Server Usado: [8.54~8.57] Alissow Ots 4.0 Descrição: Você cria uma catapulta (ids: 5598, 5599, 5600, 5601) e, você escolhe uma parte (ou mais de uma) para por o unique ID de 1121 (ou outro). Ao dar use na parte com UID 1121, vai ser lançado um projétil, hitando o que tiver no caminho dele. No final o projétil cai no chão. Code: Gostou? Rep+ Não Gostou? Rep+
    1 ponto
  12. Crystal Server Olá Venho lhes trazer o Crystal Server. Aviso O Mapa é YurOTs 8.0 de gelo, editado por GOD Bom, e atualizado para 8.6 por Toty. Creditos ao mapa para Yurez (criador do mapa) e GOD Bon por edita-lo. Conta do GOD é 222222/password [ File changes: D = Deletado, M = Modificado, A = Adicionado. [ 0.1.9 A = data/npc/npcs.xml A = data/talkactions/scripts/blessings.lua A = data/actions/scripts/other/keys.lua M = OTServ.exe M = config.lua M = data/lib/000-constant.lua M = data/lib/001-class.lua M = data/lib/050-function.lua M = data/lib/100-compat.lua M = data/monster M = data/npc/lib/npcsystem/keywordhandler.lua M = data/npc/lib/npcsystem/main.lua M = data/npc/lib/npcsystem/modules.lua M = data/npc/lib/npcsystem/npchandler.lua M = data/spells/spells.xml M = data/spells/scripts/attack/whirlwind throw.lua M = data/spells/scripts/attack/strong ethereal spear.lua M = data/spells/scripts/attack/inflict wound.lua M = data/spells/scripts/attack/groundshaker.lua M = data/spells/scripts/attack/front sweep.lua M = data/spells/scripts/attack/fierce berserk.lua M = data/spells/scripts/attack/ethereal spear.lua M = data/spells/scripts/attack/curse.lua M = data/spells/scripts/attack/brutal strike.lua M = data/spells/scripts/attack/berserk.lua M = data/spells/scripts/attack/annihilation.lua M = data/actions/actions.xml M = data/actions/lib/actions.lua M = data/actions/scripts/foods/coconut_shrimp_bake.lua M = data/actions/scripts/foods/demonic_candy_ball.lua M = data/actions/scripts/foods/food.lua M = data/actions/scripts/foods/pot_of_blackjack.lua M = data/actions/scripts/foods/sweet_mangonaise_elixir.lua M = data/actions/scripts/liquids/antidote_potion.lua M = data/actions/scripts/liquids/berserk_potion.lua M = data/actions/scripts/liquids/bullseye_potion.lua M = data/actions/scripts/liquids/mastermind_potion.lua M = data/actions/scripts/liquids/potions.lua M = data/actions/scripts/other/blueberrybush.lua M = data/actions/scripts/other/ceremonialankh.lua M = data/actions/scripts/other/constructionkits.lua M = data/actions/scripts/other/decayto.lua M = data/actions/scripts/other/doors.lua M - data/actions/scripts/other/enchanting.lua M = data/actions/scripts/other/spellwand.lua M = data/actions/scripts/other/spideregg.lua M = data/actions/scripts/other/taming.lua M = data/actions/scripts/quests/system.lua M = data/actions/scripts/tools/fishing.lua M = data/actions/scripts/tools/skinning.lua M = data/actions/scripts/tools/squeeze.lua M = data/XML/channels.xml M = data/XML/mounts.xml M = data/creaturescripts/scripts/guild.lua M = data/creaturescripts/creaturescripts.xml M = data/creaturescripts/scripts/login.lua M = data/movements/movements.xml M = data/movements/scripts/closingdoor.lua M = data/movements/scripts/drown.lua M = data/movements/scripts/hotd.lua M = data/movements/scripts/junglemaw.lua M = data/movements/scripts/swimming.lua M = data/movements/scripts/tiles.lua M = data/movements/scripts/walkback.lua M = data/talkactions/talkactions.xml M = data/talkactions/scripts/reload.lua M = data/talkactions/scripts/gamemaster.lua M = data/talkactions/scripts/newtype.lua M = data/talkactions/scripts/save.lua M = data/talkactions/scripts/teleporttown.lua M = data/talkactions/scripts/broadcastclass.lua M = data/talkactions/scripts/newtype.lua M = data/talkactions/scripts/reports.lua M = data/talkactions/scripts/waypoints.lua M = data/items/items.xml M = data/items/randomization.xml D = data/actions/scripts/decrease.lua D = data/actions/scripts/increase.lua D = data/actions/scripts/other/trap.lua ] ] [ 0.1.9 [ Portugês Adicionada nova função lua doSaveHouse({list}) (Tryller, TFS) Adicionado duas novas creatureevents onSpawn e onThrow (Tryller, TFS) Adicionado reload para mounts (Toty) Adicionado mais doors no 000-constant.lua (Tryller, TFS) Adicionado mais tipos de menssagens em 000-constant.lua (Tryller, TFS) Adicionado SKULL_ORANGE at 000-constant.lua (Tryller) Adicionado mais compatibilidades em 100-compat.lua (Tryller, TFS) Adicionado novas configs para casa no config.lua (Tryller, TFS) Adicionado allowedMaxSizedPackets no config.lua (Toty, TFS) Adicionado npcs.xml na pasta de npc para fazer load dos npcs (Tryller, TFS) Adicionado groups para talkactions (Toty, TFS) Adicionado talkaction /bless playername, blessid (Tryller) Corrigido erro com hasCreatureCondition (Toty, TFS) Corrigido erro com reloads (Toty) Corrigido erro com npc system (Toty, TFS) Corrigido erros com chats (Tryller) Corrigido funções lua em 050-funcitons.lua (Tryller, TFS) Corrigido problemas com spawns (Toty, TFS) Corrigido problema com venda de casas para outros players (Toty, TFS) Corrigido problema com Soul Points (Tryller, TFS) Corrigido problemas com mounts (Tryller) Corrigido erro com guilds (Toty) Corrigido erro com conditions (Toty, TFS) Corrigido erro com pagamento de houses (Toty, TFS) Corrigido guild mtod (Big Vamp) Corrigido server save (Tryller, TFS) Corrigido talkactions /squelch, /town, /save, /newtype, (Tryller, TFS) Corrigido eeros com sistema de camas (bed's) (Tryller, TFS) Corrigido algumas talkactions (Tryller, TFS) Corrigido algumas spells (Tryller, TFS) Corrigido alguns erros em moements (Tryller, TFS) Corrigido problemas em algumas actions (Tryller, TFS) Atualizado items.xml (Toty, TFS) Atualizada ppasta monster (Toty, TFS) Removido reload para house prices (Toty) ] ] Download v0.1.9 http://www.megaupload.com/?d=96401ZJJ DLL http://www.speedysha.../a7ZuS/dlls.rar Source http://vapus.net/svn...Crystal+Server
    1 ponto
  13. Jeffer000

    Sistema M1-M12 Como Prometido

    Nome do sistema: M1 ~M12 Autor : Editado por min , retiado do server Pokemon EX 2.0 Descrição : Como prometido resolvi postar o meu sistema de move, é o mesmo que vem no pokemon EX 2.0 , porem arrumei a maioria dos bug que encontrei como o de o trainer falar "m7" e a falta de ataque em alguns pokemons, não tive tempo de add pokemons shinys porque estou add pokemons johto no meu OT, mas assim que eu colocar os shinys posto aqui novamente. Alterações feitas: Add magia strafe, metronome,eggbomb e aluma otra que não lembro, enfim que add foi poucas, mas a grande modificação esta na parte de não estar faltano nenhum ataque em nenhum pokemon, como antes q exeggcute so tinha m2. Link para download Aqui Instalação : Extraia os 12 arquivos em sua pasta data\talkactions\scripts e depois na pasta data\talkactions abra o arquivo talkactions.xml e coloque o seguinte : <talkaction words="m1" case-sensitive="no" event="script" value="move1.lua"/> <talkaction words="m2" case-sensitive="no" event="script" value="move2.lua"/> <talkaction words="m3" case-sensitive="no" event="script" value="move3.lua"/> <talkaction words="m4" case-sensitive="no" event="script" value="move4.lua"/> <talkaction words="m5" case-sensitive="no" event="script" value="move5.lua"/> <talkaction words="m6" case-sensitive="no" event="script" value="move6.lua"/> <talkaction words="m7" case-sensitive="no" event="script" value="move7.lua"/> <talkaction words="m8" case-sensitive="no" event="script" value="move8.lua"/> <talkaction words="m9" case-sensitive="no" event="script" value="move9.lua"/> <talkaction words="m10" case-sensitive="no" event="script" value="move10.lua"/> <talkaction words="m11" case-sensitive="no" event="script" value="move11.lua"/> <talkaction words="m12" case-sensitive="no" event="script" value="move12.lua"/> Ainda não tive tempo de congirar tambem os CD's e o ataque max e min, então o mais facil fica por parte de vocês ^^ Qualque duvida postem aqui que tentarei ajudalos.Abraços
    1 ponto
  14. Script Retirado por SkyDangerous Se quiser o script que faça ou procure em outro forum. Até +
    1 ponto
  15. bepokemon

    Alchemy System V1.0 By Uissu

    Ola galera do XTibia. Não costumo liberar muitos dos meus sistemas aqui, mas como fiz esse, que ficou um pouco simples demais e não se encaixava com oque eu precisava, então tive que fazer outro, a versão 2.0 que não sera liberada por agora. Como o script funciona Eh um MoveEvent entao quando voce jogar um item qualquer no item selecionado pela tag do script ele verifica se faz parte de uma receita, e se for ele começa aquela receita. Se você errar o próximo item, ou qualquer outro da receita, ela para e você perde tudo que já foi usado. Instalação De forma bem simples, siga o passo-a-passo no spoiler abaixo. Como adicionar novas receitas Tambem de forma muito simples apenas mude tudo que estiver colorido DE VERDE na tabela a seguir como quiser: Imagens
    1 ponto
  16. Mulizeu

    [Encerrado] Como Mudo O Jeito !online

    Veja se e isso que vc quer. local config = { showGamemasters = getBooleanFromString(getConfigInfo('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param) local players = getPlayersOnline() local strings = {} local i = 1 local position = 1 for _, pid in ipairs(players) do if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 else strings[position] = i == 1 and "" or strings[position] .. ", " end if((config.showGamemasters == TRUE or getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges) == TRUE or getPlayerCustomFlagValue(pid, PlayerCustomFlag_GamemasterPrivileges) ~= TRUE) and (isPlayerGhost(pid) ~= TRUE or getPlayerAccess(cid) > getPlayerAccess(pid))) then strings[position] = strings[position] ..'' i = i + 1 end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player(s) online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return TRUE end
    1 ponto
  17. Se estivar no local errado mova Outfits Criaturas Capacetes Armaduras Calças Botas Escudos E muito mais outras no link a baixo Sprites
    1 ponto
  18. digo1040

    [Dúvida] Npc!

    Eu acredito que seu problema seja no arquivo npc/scripts/lib/npcsystem.lua, abra ele e aproximadamente na linha 23 vai ter algo assim: FOCUS_GREETWORDS = {'hi', 'hello'} essas são as palavras que ele responde, tente ver se estão corretas :penguin:
    1 ponto
  19. Não sei se existe um script igual, mas estou postando o meu. Precisei de um npc que apresentasse um enigma. Descrição: Um npc que pode ser usado em quests. Pede ao player para resolver o enigma. Função: Se o player acertar a resposta poderá passar por um certo 'stone tile' ou porta. Se o player errar a resposta será 'sumonado' um certo monstro em um certo SQM. Vá até data/npc/ duplique um arquivo XML de algum npc. Mude o nome para Servo e cole isto: Legenda: Na cor ◘: Nome do NPC que será mostrado no OT. Vá até data/npc/scripts/ duplique um arquivo.lua de algum script de outro npc. Mude o nome para port_inf e cole isto: Legenda: Na cor ◘ : O enigma que será falado pelo NPC. Na cor ◘ : A resposta correta. Na cor ◘ : Número da storage: no caso, numero do actionid que terá que ser adicionado no tile/porta. Na cor ◘ : Nome do monstro que será 'sumonado' se o player errar a resposta. Na cor ◘ : Cordenadas de onde aparecerá o monstro. Depois disso, adicione o actionid no tile/porta que o player poderá passar só após responder o enigma. No meu caso adicionei o actionid: 313131 em uma Stone Tile. Agora é só importar o NPC no seu RME ou seu outro Map Editor. E mudar as falas do NPC se quiser ou se precisar. -Mas tome cuidado com as palavras que precisam ser faladas. Pronto! Seu npc está pronto! Meu resultado: Meu primeiro tópico e também meu primeiro script. Podem me corrigir e me xingar se estiver um lixo. Se tiver algo inútil no código, me avisem. É que foi tudo baseado no Henricus. Dúvida: Alguém sabe se há uma possibilidade/script onde o npc faria perguntas variadas aleatoriamente? Falow. Espero que tenha ajudado alguém. Créditos: 50% para mim e 50% para o cara que fez o Henricus (npc da Inquisition).
    1 ponto
  20. se nao der certo o que o amigo falou, tente instalar uma versão inferior do xampp
    1 ponto
  21. PauloBriitoh

    Problema Com Gesior

    Não influencio em nada. deve ser um erro de database , que não esta havendo a conexão com seu ot . Isso acontesse por que deve estar uma table bugada, ou sem. Mais como voce falo , sem erros é dificil resolve. Sugiro que troque sua database. t+
    1 ponto
  22. Cave de Ghoul baseada em Yalahar:
    1 ponto
  23. Proximo Update está Por vir!
    1 ponto
  24. matheusfera

    Pedido De Ot War

    MALS
    -1 pontos
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...