Alan
-
Compteur de contenus
31 -
Inscription
-
Dernière visite
Type de contenu
Profils
Forums
Boutique
Calendrier
Messages posté(e)s par Alan
-
-
@ ASIKOOen effet c'était pas top, c'est un peu mieux maintenant même si ce n'est plus le même problème car je l'ai réglé après pas mal de recherche. Mais sur celui-là je bloque complètement
Pas mal de chose à adapter pour que ça puisse compiler sur ces files (ex : remplacer les auto_ptr par unique_ptr, TR1_NS:: par std:: etc...).
-
Bonjour à tous,
J'ai suivi ce tuto afin d'implanter les magasins hors-ligne :
1 - Je rencontre ce soucis côté serveur : (files 2014 -42050)
J'ai du mal à comprendre car c'est un fichier auquel je n'ai pas touché et je ne sais pas comment le modifier. Voici le fichier en question :
Citation#include "stdafx.h"
#include "../../libgame/include/grid.h"
#include "constants.h"
#include "utils.h"
#include "config.h"
#include "desc.h"
#include "desc_manager.h"
#include "char.h"
#include "char_manager.h"
#include "item.h"
#include "item_manager.h"
#include "buffer_manager.h"
#include "packet.h"
#include "log.h"
#include "db.h"
#include "questmanager.h"
#include "monarch.h"
#include "mob_manager.h"
#include "locale_service.h"
#include "offlineshop.h"
#include "p2p.h"COfflineShop::COfflineShop() : m_pkOfflineShopNPC(NULL)
{
m_pGrid = M2_NEW CGrid(8, 8);
}COfflineShop::~COfflineShop()
{
TPacketGCShop pack;
pack.header = HEADER_GC_OFFLINE_SHOP;
pack.subheader = SHOP_SUBHEADER_GC_END;
pack.size = sizeof(TPacketGCShop);Broadcast(&pack, sizeof(pack));
for (GuestMapType::iterator it = m_map_guest.begin(); it != m_map_guest.end(); ++it)
{
LPCHARACTER ch = it->first;
ch->SetOfflineShop(NULL);
}M2_DELETE(m_pGrid);
}void COfflineShop::SetOfflineShopNPC(LPCHARACTER npc)
{
m_pkOfflineShopNPC = npc;
}void COfflineShop::SetShopItems(TShopItemTable * pTable, BYTE bItemCount, LPCHARACTER ch)
{
if (!ch)
return;m_pGrid->Clear();
m_offlineShopItemVector.resize(OFFLINE_SHOP_HOST_ITEM_MAX_NUM);
memset(&m_offlineShopItemVector[0], 0, sizeof(OFFLINE_SHOP_ITEM) * m_offlineShopItemVector.size());for (int i = 0; i < bItemCount; ++i)
{
int iPos;
LPITEM pkItem = ch->GetItem(pTable->pos);if (!pkItem)
{
sys_err("COfflineShop::SetShopItems: cannot find item on pos (%d, %d) (name: %s)", pTable->pos.window_type, pTable->pos.cell, ch->GetName());
continue;
}if(pkItem->IsEquipped() == true || pkItem->isLocked() == true || pkItem->IsExchanging())
continue;const TItemTable * item_table = pkItem->GetProto();
if (!item_table)
{
sys_err("COfflineShop::SetShopItems: no item table by item vnum #%d", pTable->vnum);
continue;
}if (IS_SET(item_table->dwAntiFlags, ITEM_ANTIFLAG_GIVE | ITEM_ANTIFLAG_MYSHOP))
continue;iPos = pTable->display_pos;
if (iPos < 0)
{
sys_err("COfflineShop::SetShopItems: not enough shop window!");
continue;
}//sys_log(0, "COfflineShop::SetShopItems: use position %d", iPos);
if (!m_pGrid->IsEmpty(iPos, 1, pkItem->GetSize()))
{
sys_err("COfflineShop::SetShopItems: not empty position offline shop %s[%d]", ch->GetName(), ch->GetPlayerID());
continue;
}m_pGrid->Put(iPos, 1, pkItem->GetSize());
/* memory part begin */
OFFLINE_SHOP_ITEM & offShopItem = m_offlineShopItemVector[iPos];//////////
// bIsSold already declared as = false in offlineshop.h
offShopItem.owner_id = ch->GetPlayerID();
offShopItem.pos = iPos;
offShopItem.count = pkItem->GetCount();
offShopItem.price = pTable->price;
offShopItem.vnum = pkItem->GetVnum();for (int x = 0; x < ITEM_SOCKET_MAX_NUM; x++)
offShopItem.alSockets[x] = pkItem->GetSocket(x);for (int x = 0; x < ITEM_ATTRIBUTE_MAX_NUM; x++)
{
offShopItem.aAttr[x].bType = pkItem->GetAttributeType(x);
offShopItem.aAttr[x].sValue = pkItem->GetAttributeValue(x);
}
/* memory part end *//* query part begin */
char szColumns[QUERY_MAX_LEN], szValues[QUERY_MAX_LEN];snprintf(szColumns, sizeof(szColumns),
"owner_id, pos, count, price, vnum,"
"socket0, socket1, socket2,"
"attrtype0, attrvalue0, attrtype1, attrvalue1,"
"attrtype2, attrvalue2, attrtype3, attrvalue3,"
"attrtype4, attrvalue4, attrtype5, attrvalue5,"
"attrtype6, attrvalue6");
snprintf(szValues, sizeof(szValues), "%u, %d, %u, %u, %u, %ld, %ld, %ld, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
ch->GetPlayerID(), iPos, pkItem->GetCount(), pTable->price, pkItem->GetVnum(),
pkItem->GetSocket(0), pkItem->GetSocket(1),
pkItem->GetSocket(2),
pkItem->GetAttributeType(0), pkItem->GetAttributeValue(0), pkItem->GetAttributeType(1), pkItem->GetAttributeValue(1),
pkItem->GetAttributeType(2), pkItem->GetAttributeValue(2), pkItem->GetAttributeType(3), pkItem->GetAttributeValue(3),
pkItem->GetAttributeType(4), pkItem->GetAttributeValue(4), pkItem->GetAttributeType(5), pkItem->GetAttributeValue(5),
pkItem->GetAttributeType(6), pkItem->GetAttributeValue(6));char szInsertQuery[QUERY_MAX_LEN];
snprintf(szInsertQuery, sizeof(szInsertQuery), "INSERT INTO %soffline_shop_item (%s) VALUES (%s)", get_table_postfix(), szColumns, szValues);
std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery(szInsertQuery));
/* query part end *//* log for web */
LogManager::instance().OfflineShopLog(ch->GetDesc()->GetAccountTable().id, pkItem->GetName(), "PUT");
/* end log for web */ITEM_MANAGER::instance().RemoveItem(pkItem);
++pTable;
}
}void COfflineShop::PutItem(LPCHARACTER ch, TItemPos item_pos, int iPrice)
{
if (!ch || !ch->CanHandleItem())
return;LPITEM pkItem = ch->GetItem(item_pos);
if (!pkItem)
return;if (pkItem->IsEquipped() == true || pkItem->isLocked() == true || pkItem->IsExchanging())
return;const TItemTable * item_table = pkItem->GetProto();
if (!item_table)
return;if (IS_SET(item_table->dwAntiFlags, ITEM_ANTIFLAG_GIVE | ITEM_ANTIFLAG_MYSHOP))
return;int iPos = m_pGrid->FindBlank(1, item_table->bSize);
if (iPos < 0)
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You don't have enough space to put your item!"));
return;
}if (!m_pGrid->IsEmpty(iPos, 1, item_table->bSize))
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You don't have enough space to put your item!"));
return;
}m_pGrid->Put(iPos, 1, item_table->bSize);
/* memory part begin */
OFFLINE_SHOP_ITEM & offShopItem = m_offlineShopItemVector[iPos];//////////
// bIsSold already declared as = false in offlineshop.h
offShopItem.owner_id = ch->GetPlayerID();
offShopItem.pos = iPos;
offShopItem.count = pkItem->GetCount();
offShopItem.price = iPrice;
offShopItem.vnum = pkItem->GetVnum();for (int x = 0; x < ITEM_SOCKET_MAX_NUM; x++)
offShopItem.alSockets[x] = pkItem->GetSocket(x);for (int x = 0; x < ITEM_ATTRIBUTE_MAX_NUM; x++)
{
offShopItem.aAttr[x].bType = pkItem->GetAttributeType(x);
offShopItem.aAttr[x].sValue = pkItem->GetAttributeValue(x);
}
/* memory part end */
/* query part begin */
char szColumns[QUERY_MAX_LEN], szValues[QUERY_MAX_LEN];snprintf(szColumns, sizeof(szColumns),
"owner_id, pos, count, price, vnum,"
"socket0, socket1, socket2,"
"attrtype0, attrvalue0, attrtype1, attrvalue1,"
"attrtype2, attrvalue2, attrtype3, attrvalue3,"
"attrtype4, attrvalue4, attrtype5, attrvalue5,"
"attrtype6, attrvalue6");snprintf(szValues, sizeof(szValues), "%u, %d, %u, %u, %u, %ld, %ld, %ld, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
ch->GetPlayerID(), iPos, pkItem->GetCount(), iPrice, pkItem->GetVnum(),
pkItem->GetSocket(0), pkItem->GetSocket(1),
pkItem->GetSocket(2),
pkItem->GetAttributeType(0), pkItem->GetAttributeValue(0), pkItem->GetAttributeType(1), pkItem->GetAttributeValue(1),
pkItem->GetAttributeType(2), pkItem->GetAttributeValue(2), pkItem->GetAttributeType(3), pkItem->GetAttributeValue(3),
pkItem->GetAttributeType(4), pkItem->GetAttributeValue(4), pkItem->GetAttributeType(5), pkItem->GetAttributeValue(5),
pkItem->GetAttributeType(6), pkItem->GetAttributeValue(6));char szInsertQuery[QUERY_MAX_LEN];
snprintf(szInsertQuery, sizeof(szInsertQuery), "INSERT INTO %soffline_shop_item (%s) VALUES (%s)", get_table_postfix(), szColumns, szValues);
std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery(szInsertQuery));
/* query part end *//* log for web */
LogManager::instance().OfflineShopLog(ch->GetDesc()->GetAccountTable().id, pkItem->GetName(), "PUT_REMOTE");
/* end log for web */BroadcastUpdateItem(iPos);
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Item %s has been successfully added to your offline shop, price: %d."), pkItem->GetName(), iPrice);
ITEM_MANAGER::instance().RemoveItem(pkItem);
}bool COfflineShop::AddGuest(LPCHARACTER ch, LPCHARACTER npc)
{
if (!ch || ch->GetExchange() || ch->GetShop() || ch->GetMyShop() || ch->GetOfflineShop())
return false;ch->SetOfflineShop(this);
m_map_guest.insert(GuestMapType::value_type(ch, false));TPacketGCShop pack;
pack.header = HEADER_GC_OFFLINE_SHOP;
pack.subheader = SHOP_SUBHEADER_GC_START;TPacketGCOfflineShopStart pack2;
memset(&pack2, 0, sizeof(pack2));
pack2.owner_vid = npc->GetVID();for (DWORD i = 0; i < m_offlineShopItemVector.size() && i < OFFLINE_SHOP_HOST_ITEM_MAX_NUM; ++i)
{
const OFFLINE_SHOP_ITEM & offShopItem = m_offlineShopItemVector[i];pack2.items[i].count = offShopItem.count;
pack2.items[i].price = offShopItem.price;
pack2.items[i].vnum = offShopItem.vnum;
pack2.items[i].bIsSold = offShopItem.bIsSold;
strncpy(pack2.items[i].buyerName, offShopItem.buyerName, CHARACTER_NAME_MAX_LEN);for (int x = 0; x < ITEM_SOCKET_MAX_NUM; x++)
pack2.items[i].alSockets[x] = offShopItem.alSockets[x];
for (int x = 0; x < ITEM_ATTRIBUTE_MAX_NUM; x++)
{
const TPlayerItemAttribute & c_rItemAttr = offShopItem.aAttr[x];
pack2.items[i].aAttr[x].bType = c_rItemAttr.bType;
pack2.items[i].aAttr[x].sValue = c_rItemAttr.sValue;
}
}pack.size = sizeof(pack)+sizeof(pack2);
ch->GetDesc()->BufferedPacket(&pack, sizeof(TPacketGCShop));
ch->GetDesc()->Packet(&pack2, sizeof(TPacketGCOfflineShopStart));
return true;
}void COfflineShop::RemoveGuest(LPCHARACTER ch)
{
if (ch->GetOfflineShop() != this)
return;m_map_guest.erase(ch);
ch->SetOfflineShop(NULL);TPacketGCShop pack;
pack.header = HEADER_GC_OFFLINE_SHOP;
pack.subheader = SHOP_SUBHEADER_GC_END;
pack.size = sizeof(TPacketGCShop);ch->GetDesc()->Packet(&pack, sizeof(pack));
}void COfflineShop::RemoveAllGuest()
{
TPacketGCShop pack;
pack.header = HEADER_GC_OFFLINE_SHOP;
pack.subheader = SHOP_SUBHEADER_GC_END;
pack.size = sizeof(TPacketGCShop);Broadcast(&pack, sizeof(pack));
for (GuestMapType::iterator it = m_map_guest.begin(); it != m_map_guest.end(); ++it)
{
LPCHARACTER ch = it->first;
ch->SetOfflineShop(NULL);
}
}void COfflineShop::Destroy(LPCHARACTER npc)
{
RemoveAllGuest();
M2_DESTROY_CHARACTER(npc);
}void COfflineShop::GiveBackMyItems(LPCHARACTER ch)
{
if (!ch)
return;RemoveAllGuest();
/* cleanup begin */
DBManager::instance().DirectQuery("DELETE FROM %soffline_shop_item WHERE owner_id = %u", get_table_postfix(), ch->GetPlayerID());
/* cleanup end */for (DWORD i = 0; i < m_offlineShopItemVector.size() && i < OFFLINE_SHOP_HOST_ITEM_MAX_NUM; ++i)
{
const OFFLINE_SHOP_ITEM & r_item = m_offlineShopItemVector[i];if (r_item.bIsSold || !r_item.vnum)
continue;LPITEM pItem = ITEM_MANAGER::instance().CreateItem(r_item.vnum, r_item.count);
if (pItem)
{
pItem->SetSockets(r_item.alSockets);
pItem->SetAttributes(r_item.aAttr);int cell;
cell = ch->GetEmptyInventory(pItem->GetSize());if (cell != -1)
{
pItem->AddToCharacter(ch, TItemPos(INVENTORY, cell));
}
else
{
pItem->AddToGround(ch->GetMapIndex(), ch->GetXYZ());
pItem->StartDestroyEvent();
pItem->SetOwnership(ch, 60);
}/* log for web */
LogManager::instance().OfflineShopLog(ch->GetDesc()->GetAccountTable().id, pItem->GetName(), "GIVE_BACK");
/* end log for web */
}
}
}int COfflineShop::Buy(LPCHARACTER ch, BYTE bPos)
{
//if (!ch)
// return SHOP_SUBHEADER_GC_END;
if (ch->GetOfflineShopOwner()->GetOfflineShopRealOwner() == ch->GetPlayerID())
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't buy anything from your offline shop."));
return SHOP_SUBHEADER_GC_OK;
}if (bPos >= m_offlineShopItemVector.size())
{
sys_log(0, "COfflineShop::Buy: invalid position %d : %s", bPos, ch->GetName());
return SHOP_SUBHEADER_GC_INVALID_POS;
}//sys_log(0, "COfflineShop::Buy: name: %s, pos: %d", ch->GetName(), bPos);
GuestMapType::iterator it = m_map_guest.find(ch);
if (it == m_map_guest.end())
return SHOP_SUBHEADER_GC_END;OFFLINE_SHOP_ITEM & r_item = m_offlineShopItemVector[bPos];
if (r_item.bIsSold)
return SHOP_SUBHEADER_GC_SOLD_OUT;DWORD dwPrice = r_item.price;
if (r_item.price < 0)
return SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY;if (ch->GetGold() < static_cast<int>(dwPrice))
return SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY;LPITEM item = ITEM_MANAGER::instance().CreateItem(r_item.vnum, r_item.count);
if (!item)
return SHOP_SUBHEADER_GC_END;int iEmptyPos = ch->GetEmptyInventory(item->GetSize());
if (iEmptyPos < 0)
{
M2_DESTROY_ITEM(item);
return SHOP_SUBHEADER_GC_INVENTORY_FULL;
}ch->PointChange(POINT_GOLD, -dwPrice, false);
r_item.bIsSold = true;
strncpy(r_item.buyerName, ch->GetName(), CHARACTER_NAME_MAX_LEN);item->SetSockets(r_item.alSockets);
item->SetAttributes(r_item.aAttr);item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
DBManager::instance().DirectQuery("UPDATE player.player SET gold_offlineshop = gold_offlineshop + %u WHERE id = %u", dwPrice, ch->GetOfflineShopOwner()->GetOfflineShopRealOwner());
DBManager::instance().DirectQuery("DELETE FROM %soffline_shop_item WHERE owner_id = %u AND pos = %d AND vnum = %d LIMIT 1", get_table_postfix(), r_item.owner_id, bPos, r_item.vnum);LogManager::instance().OfflineShopLog(ch->GetOfflineShopOwner()->GetOfflineShopRealOwnerAccountID(), item->GetName(), "SELL");
BroadcastUpdateItem(bPos);
ch->SetMyOfflineShopTime();
ch->Save();LPCHARACTER tch = CHARACTER_MANAGER::instance().FindByPID(ch->GetOfflineShopOwner()->GetOfflineShopRealOwner());
if (tch)
{
char msg[CHAT_MAX_LEN + 1];
snprintf(msg, sizeof(msg), LC_TEXT("Your item %s sold, buyer is: %s."), item->GetName(), ch->GetName());LPDESC pkVictimDesc = tch->GetDesc();
if (pkVictimDesc)
{
TPacketGCWhisper pack;int len = MIN(CHAT_MAX_LEN, strlen(msg) + 1);
pack.bHeader = HEADER_GC_WHISPER;
pack.wSize = sizeof(TPacketGCWhisper) + len;
pack.bType = WHISPER_TYPE_SYSTEM;
strlcpy(pack.szNameFrom, "[Market Tezgahý]", sizeof(pack.szNameFrom));TEMP_BUFFER buf;
buf.write(&pack, sizeof(TPacketGCWhisper));
buf.write(msg, len);pkVictimDesc->Packet(buf.read_peek(), buf.size());
}//tch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Market Tezgâhýndan nesne satýldý: %s."), item->GetName());
}
else
{
// P2P_FINDTPacketGGOfflineShopMessage p;
p.bHeader = HEADER_GG_OFFLINE_SHOP_SEND_MESSAGE;
p.dwTargetPID = ch->GetOfflineShopOwner()->GetOfflineShopRealOwner();
strlcpy(p.szItemName, item->GetName(), sizeof(p.szItemName));
strlcpy(p.szName, ch->GetName(), sizeof(p.szName));
P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGOfflineShopMessage));
}return (SHOP_SUBHEADER_GC_OK);
}void COfflineShop::BroadcastUpdateItem(BYTE bPos)
{
TPacketGCShop pack;
TPacketGCShopUpdateOfflineItem pack2;TEMP_BUFFER buf;
pack.header = HEADER_GC_OFFLINE_SHOP;
pack.subheader = SHOP_SUBHEADER_GC_UPDATE_ITEM;
pack.size = sizeof(pack) + sizeof(pack2);OFFLINE_SHOP_ITEM & r_item = m_offlineShopItemVector[bPos];
pack2.item.count = r_item.count;
pack2.item.price = r_item.price;
pack2.item.vnum = r_item.vnum;
pack2.item.bIsSold = r_item.bIsSold;
pack2.pos = r_item.pos;
strncpy(pack2.item.buyerName, r_item.buyerName, CHARACTER_NAME_MAX_LEN);for (int x = 0; x < ITEM_SOCKET_MAX_NUM; x++)
pack2.item.alSockets[x] = r_item.alSockets[x];for (int x = 0; x < ITEM_ATTRIBUTE_MAX_NUM; x++)
{
const TPlayerItemAttribute & c_rItemAttr = r_item.aAttr[x];pack2.item.aAttr[x].bType = c_rItemAttr.bType;
pack2.item.aAttr[x].sValue = c_rItemAttr.sValue;
}buf.write(&pack, sizeof(pack));
buf.write(&pack2, sizeof(pack2));
Broadcast(buf.read_peek(), buf.size());
}void COfflineShop::Broadcast(const void * data, int bytes)
{
for (GuestMapType::iterator it = m_map_guest.begin(); it != m_map_guest.end(); ++it)
{
LPCHARACTER ch = it->first;
if (ch->GetDesc())
ch->GetDesc()->Packet(data, bytes);
}
}
2 - A la fin je dois créer une table dans la base de donnée "player". Cependant je ne sais pas comment la configurer comme l'indique le tuto. Je vous partage les instructions :
CitationCréez "gold_offlineshop" dans la table des joueurs. bigint - 25 - non nul - "0" par défaut
Quelqu'un aurait-il la gentillesse de m'éclairer ?
Merci d'avance,
Alan
-
Bonjour à tous,
Files : 2014 40250
Niveau : Débutant
Sur les files 2014 les costumes avec bonus sont implantés mais je ne crois pas qu'il y ai la partie programmation permettant de les switchs et je n'ai pas les compétences pour coder...
J'ai donc 2 questions :
1 - Quelqu'un a-t-il ou pourrait partager cette partie de système des costumes ?
2 - Où peut-on modifier les bonus des costumes ? (je n'ai pas trouver de table sur Navicat qui correspond)
Merci d'avance pour vos réponses
-
Solution trouvée vous pouvez fermer le sujet. Le problème venait de l'importation excel, je vous mets les screens de ce qui fonctionnent.
-
J'ai suivi le tuto dont tu trouveras le lien ci-dessous. Je trouve que les modifications du côté serveur sont assez flou (même lorsque je me dirige vers le tuto d'édition des rates. J'ai simplement modifié l'item_proto.txt et l'item_name.txt. En fouillant un peu j'ai trouvé dans usr/metin2/share/data le dossier "monster", j'ai pris exemple sur le contenu des fichiers afin d'y mettre celui de mon mob avec les fichiers d'animations (.msa), le motlist.txt et le fichier .msm.
Je me doute qu'il y a surement d'autres choses à faire mais je ne parviens pas à trouver d'infos à ce sujet.
PS : Ce qui m'interroge aussi c'est que lorsque je delete la ligne ajouté dans le mob_proto et le mob_names l'erreur est toujours là, je suis donc obligé de remettre le fichier d'origine pourtant identique lorsque je les compares.
Edit : Lorsque je réalise l'ouverture du fichier d'origine via excel (texte séparateur tabulation) et que j'enregistre le fichier sans le modifier, celui-ci n'est plus fonctionnel. Je précise que j'ai réalisé exactement les mêmes manipulations avec l'item_proto.txt et je n'ai pas ce soucis. Lorsque je modifie le fichier avec sublimetext cela fonctionne mais impossible de travailler comme ça...
-
Bonjour à tous,
Sources : FE 2016 by @ Saw
J'ai un soucis lorsque j'essaye d'implanter un boss sur mon serveur (Connected refused).
Syserr :
CitationSYSERR: Jul 25 16:19:57 :: pid_init:
Start of pid: 1236SYSERR: Jul 25 16:19:57 :: socket_connect: HOST 127.0.0.1:15000, could not connect.
Après plusieurs manip' je ne parviens pas à trouver le problème... Je vous partage le mob_ proto.txt. VNUM 2598 : Azrael déjà implanté / VNUM 2599 : le mob que j'essaye d'implanter (j'ai simplement recopié la ligne d'Azra en modifiant le VNUM, le level et le folder pour l'instant. Je précise que lorsque je remets le mob_proto d'origine, le serveur démarre, le problème vient donc bien de ma modification. Je vous remercie d'avance pour votre aide !
Hidden Content
-
Give reaction to this post to see the hidden content.
-
Bonjour,
Lorsque j'implante une map j'obtiens le syserr suivant côté client (le crash intervient lors du chargement de TP vers la map implantée :
Citation0721 10:01:15605 :: CMapBase::LoadProperty(FileName=metin2_laurin_map\MapProperty.txt) - LoadMultipleTextData ERROR ÆÄÀÏÀÌ ¾øÀ» °¡´É¼ºÀÌ ¸¹½À´Ï´Ù.
0721 10:01:15606 :: CMapManager::LoadMap() Invalid Map TypeVoici ce que j'ai réalisé dans le client :
1 - repack le dossier metin2_laurin_map + ajout dans le fichier index.txt
2 - Ajout des infos dans le fichier atlasinfo dans root ET locale_fr + repack et remplacé
3 - Relance du .exe
Je précise que j'ai également réalisé la partie serveur et je n'ai pas de syserr de ce côté là.
J'ai vu beaucoup de sujet avec le même syserr mais les personnes ayant résolu le problème n'ont pas communiqué la cause et les changements à effectuer. Je vous remercie d'avance pour votre aide
Voici quelques screens :
atlasinfo :
Contenu du dossier metin2_laurin_map
Index.txt
mapproperty
Setting
-
Ces files sont-ils compatibles en No-IP ? Si oui je n'arrive pas à accéder à la config IP avec la commande "sysinstall".
-
Il y a 1 heure, Yalabi a dit :
Si mes souvenires sont bon c'est "locale/france"
Bien joué ça fonctionne ! Pas simple à comprendre au regard du tuto 100% anglais.
- 1
-
Bonjour,
Merci pour ces files qui en effet fonctionnent. Je rencontre cependant un soucis lors du changement de langue (FR). J'ai suivi l'ensemble des étapes mais j'ai une erreur qui s'affiche lors du lancement dans la VM.
-
Merci de votre aide ! La solution de Asikoo a permis de me connecter. Cependant, j'ai un problème lors de la création de personnage. Dès la sélection du royaume, le client crash. J'ai reboot et refais la manip' de compilation mais le même problème survient...
Voici les logs :
Citation204 21:37:15257 :: R :: CPythonSkill::RegisterSkillDesc(dwSkillIndex=170, strType=wolfman).STRANGE_SKILL_TYPE
0204 21:37:15257 :: R :: CPythonSkill::RegisterSkillDesc(dwSkillIndex=171, strType=wolfman).STRANGE_SKILL_TYPE
0204 21:37:15257 :: R :: CPythonSkill::RegisterSkillDesc(dwSkillIndex=172, strType=wolfman).STRANGE_SKILL_TYPE
0204 21:37:15257 :: R :: CPythonSkill::RegisterSkillDesc(dwSkillIndex=173, strType=wolfman).STRANGE_SKILL_TYPE
0204 21:37:15257 :: R :: CPythonSkill::RegisterSkillDesc(dwSkillIndex=174, strType=wolfman).STRANGE_SKILL_TYPE
0204 21:37:15257 :: R :: CPythonSkill::RegisterSkillDesc(dwSkillIndex=175, strType=wolfman).STRANGE_SKILL_TYPE
0204 21:37:19386 :: R :: Hair number 11 is not exist.
0204 21:37:19386 :: R :: Hair number 11 is not exist.
0204 21:37:19386 :: R :: Traceback (most recent call last):0204 21:37:19386 :: R :: File "introSelect.py", line 331, in Refresh
0204 21:37:19387 :: R :: File "introSelect.py", line 939, in SelectSlot
0204 21:37:19387 :: R :: AttributeError
0204 21:37:19387 :: R :: :
0204 21:37:19387 :: R :: 'NoneType' object has no attribute 'Show'
0204 21:37:19387 :: R ::0204 21:37:19387 :: R :: Unknown packet header: 64, last: 253 32
PS : J'hésitais à créer un sujet pour ne pas encombrer ce tuto mais cela aidera sans doute d'autres personnes qui souhaiteraient exploiter ses files.
-
Cela peut-il être dû au système d'exploitation windows que j'utilise (version très retouchée et non officiel) où à ma carte réseau ? Ce qui est bizarre c'est que sur WinSCP ou Navicat je peux accéder sans problème.
-
Voici ce que j'ai à l'aide de la commande ps. Je n'ai toujours pas réussi à solutionner le problème...
-
Bonjour,
Merci beaucoup pour ce tuto. J'ai suivi toutes les étapes mais je ne parviens pas à me connecter IG. J'ai vérifié plusieurs fois l'adresse IP et le lancement du serveur via putty. J'ai déjà réalisé un serveur M2project mais je ne me souviens pas d'avoir utilisé putty. Le lancement du serveur via la virtualbox est-il nécessaire ?
Ps : je précise que j'ai bien repack.
Voici les screens :
Hidden Content
-
Give reaction to this post to see the hidden content.
Hidden Content
-
Give reaction to this post to see the hidden content.
Hidden Content
-
Give reaction to this post to see the hidden content.
Merci d'avance pour votre aide !
- 1
-
il y a 1 minute, ASIKOO a dit :
C'est étrange, dans la mise à jour 1.0.1 de mes files, le 70058 a été configuré sans problème et c'est un anneau qui aura X utilisations et le 40008 sera lui illimité...
Oui je trouve ça étrange également. J'ai donc prit l'item 40002 (anneau de levi) et ça fonctionne parfaitement
-
Problème résolu (ou plutôt esquivé).
Le problème vient de l'objet en lui-même. Le mystère reste entier sur le pourquoi du comment.
Merci de ton aide
-
Il y a 17 heures, ASIKOO a dit :
Peut être l'encodage, duplique une quête existante depuis WinSCP pour avoir le bon encodage dès le début.
Fait mais ça ne fonctionne pas. Je vais essayer d'éditer ta quête en LUA (j'en transpire déjà )
-
J'ai complété la base que tu m'as apporté. Tout semble ok quand je fais 203 PRE QC (ci-joint la capture d'écran). Mais IG rien ne se passe...
Capture d'écran de la VM :
La quête : (c'est mieux ranger dans SublimeText)
Citationquest AnneauTP begin
state start begin
when 70058.use begin
local choix_des_maps = select("Map 1 Bleu", "Map 2 Bleu", "Map 1 Rouge", "Map 2 Rouge", "Map 1 Jaune", "Map 2 Jaune", "Map Orc", "Desert", "Terre de feu", "Tour du demon", "Cave 1", "Cave 2", "Grotte de l'Exil 1", "Grotte de l'Exil 2", "Foret", "Bois Rouge", "Geant", "Beran-Seatou", "Catacombes", "Observatoire de Nemere", "Meley", "Fermer")if choix_des_maps == 22 then
return
endif choix_des_maps == 1 then
pc.warp(959900, 269200)
endif choix_des_maps == 2 then
pc.warp(863900, 246000)
endif choix_des_maps == 3 then
pc.warp(474300, 954800)
endif choix_des_maps == 4 then
pc.warp(353100, 882900)
endif choix_des_maps == 5 then
pc.warp(63800, 166400)
endif choix_des_maps == 6 then
pc.warp(145500, 240000)
endif choix_des_maps == 7 then
pc.warp(333000, 746600)
endif choix_des_maps == 8 then
pc.warp(217800, 627200)
endif choix_des_maps == 9 then
pc.warp(599400, 756300)
endif choix_des_maps == 10 then
pc.warp(590500, 110500)
endif choix_des_maps == 11 then
pc.warp(60000 , 496000)
endif choix_des_maps == 12 then
pc.warp(704100 , 464200)
endif choix_des_maps == 13 then
pc.warp(10000, 1207800)
endif choix_des_maps == 14 then
pc.warp(241800, 1275000)
endif choix_des_maps == 15 then
pc.warp(288700, 5700)
endif choix_des_maps == 16 then
pc.warp(1119500, 701)
endif choix_des_maps == 17 then
pc.warp(828300, 763500)
endif choix_des_maps == 18 then
pc.warp(181600, 1220700)
endif choix_des_maps == 19 then
pc.warp(591600 , 99900)
endif choix_des_maps == 20 then
pc.warp(432000 , 164800)
end
if choix_des_maps == 21 then
pc.warp(614000 , 707100)
end
end
end
endL'item_proto de l'item :
Citation70058 XXX ITEM_QUEST 0 1 NONE NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0 12 7
-
Ça marche je vais réécrire ça je te remercie !
J'utilisais le 202 Update jusqu'à maintenant. Merci de l'info
-
Version des Files : M2 Project
Hello à tous,
Je souhaite personnaliser une quête au niveau de l'anneau de TP à partir de mes faibles connaissances actuelles sur le codage (Avoir accès pour tous aux maps 1 et 2 de tous les royaumes, ajout des instances dans le TP...). Seulement, je ne maîtrise pas le langage LUA (pour le moment) et j'ai donc souhaité réalisé une nouvelle quête au format .quest sur un autre item disponible. Seulement, elle n’apparaît pas du tout IG sur l'objet cible comme si ce dernier ne servait à rien. Si quelqu'un voit quelque chose qui bloque.
Ce que j'ai fait :
- Créer une quête au format .quest
- Ajouter ma quête à partir de WinSCP en suivant le chemin suivant : /usr/m2_project/1.0.0/resources/locale/france/quest
- Éditer le fichier new_local_list.txt en laissant une ligne supplémentaire à la fin.
- Vérifier dans l'item_proto que le Vnum choisi est bien configuré comme ITEM_QUEST
- Fait un update de toutes les quêtes à partir de la VM
- Reboot le serveur
Voici la quète que j'essaye d'implanter :
Citationquest AnneauTP begin
state start begin
when 70058.use."Map 1 Rouge" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(474300, 954800)
else
return
end
end
when 70058.use."Map 2 Rouge" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(353100, 882900)
else
return
end
end
when 70058.use."Map 1 Jaune" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(63800, 166400)
else
return
end
end
when 70058.use."Map 2 Jaune" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(145500, 240000)
else
return
end
end
when 70058.use."Map 1 Bleu" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(959900, 269200)
else
return
end
end
when 70058.use."Map 2 Bleu" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(863900, 246000)
else
return
end
end
when 70058.use."Map Orc" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(333000, 746600)
else
return
end
end
when 70058.use."Map Desert" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(217800, 627200)
else
return
end
end
when 70058.use."Mont Sohan" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(434200, 290600)
else
return
end
end
when 70058.use."Terre de feu" begin
say_reward("Voulez-vous être téléporté ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(599400, 756300)
else
return
end
end
when 70058.use."Tour du démon" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(590500, 110500)
else
return
end
end
when 70058.use."Foret" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(288700, 5700)
else
return
end
end
when 70058.use."Bois Rouge" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(1119500, 701)
else
return
end
end
when 70058.use."Cave 1" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(60000 , 496000)
else
return
end
end
when 70058.use."Cave 2" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(704100 , 464200)
else
return
end
end
when 70058.use."Grotte de l'Exil 1" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(10000, 1207800)
else
return
end
end
when 70058.use."Grotte de l'Exil 2" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(241800, 1275000)
else
return
end
end
when 70058.use."Geant" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(828300, 763500)
else
return
end
end
when 70058.use."Catacombes" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(591600 , 99900)
else
return
end
end
when 70058.use."Beran-Seatou" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(181600, 1220700)
else
return
end
end
when 70058.use."Observatoire de Nemere" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(432000 , 164800)
else
return
end
end
when 70058.use."Meley" begin
say_reward("Voulez-vous y aller ?")
local s1=select("Oui","Non")
if s1 == 1 then
pc.warp(614000 , 707100)
else
return
end
end
end
endMerci à tous pour votre aide.
Cordialement,
Alan
-
Icônes X322
dans Graphismes 2D
Merci !
-
Icônes X18
dans Graphismes 2D
Merci !
-
Il est également possible de fixe l'IP de ton téléphone dans tes paramètres c'est peut-être plus simple
-
Citation
71051 򘡤À簡º񼪉 ITEM_USE USE_SPECIAL 1 ANTI_DROP | ANTI_SELL | ANTI_STACK LOG | STACKABLE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0
71052 򘡤À簦º񼪉 ITEM_USE USE_SPECIAL 1 ANTI_DROP | ANTI_SELL | ANTI_STACK LOG | STACKABLE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 071051 򘡤À簡º񼪉 ITEM_USE USE_SPECIAL 1 ANTI_DROP | ANTI_SELL | ANTI_STACK LOG | ITEM_STACKABLE NONE NONE 100000 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0
71052 򘡤À簦º񼪉 ITEM_USE USE_SPECIAL 1 ANTI_DROP | ANTI_SELL | ANTI_STACK LOG | ITEM_STACKABLE NONE NONE 50000 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0Dans le premier cas les items ne sont pas empilables et fonctionnent. Dans le second cas, les items sont empilables mais ne fonctionnent pas...
Plusieurs problèmes Magasin hors ligne
dans Questions & Réponses
Posté(e)
Update : L'ensemble des problèmes côté serveur semble réglé.
J'ai par contre un bug côté client. Je parviens à me connecter mais lorsque je click sur l'inventaire le client crash. Voici ce que j'ai dans le syserr....
J'ai recherché l'erreur mais je ne parviens pas à la trouver, le problème semble venir de uiminimap.py :