Bienvenue sur JeuxOnLine - MMO, MMORPG et MOBA !
Les sites de JeuxOnLine...
 

Panneau de contrôle

Recherche | Retour aux forums

JOL Archives

[Script] Remodification du Pwum_functions

Par RAT le 14/1/2003 à 9:09:00 (#3016378)

Bon j'ai remodifié le pwum_functions car quand il y avait un \n dans l'enregistrement cela faisait sauter toutes les sauvegardes car cela créé un bug comme dans le log il créé une coupure.

donc j'ai fais un replace dans le SetPWUMString de \n à °° (symbole très peu utilisé je pense).
Et dans le GetPWUMString , l'inverse de °° à \n

Bon je n'ai pas encore vérifier, mais cela devrait marcher normalement.


/* Persistent World Universal Mind System
DESC: Function calls for the PWUM system
AUTH: drako_wolfheart
*/

// ******************************************** //
// FUNCTION DECLARATIONS
// ******************************************** //

// Stores current locations for all PCs set to
// save location (default=save, change with
// SetPCToNotSaveLocation())
// fTimercount indicates how many seconds to delay
// before firing again.
// 0.0 = one time shot.
void PWUMLocationTimer(float fTimerCount=0.0);
// Stores current game date.
// fTimercount indicates how many seconds to delay
// before firing again.
// 0.0 = one time shot.
void PWUMDateTimer(float fTimerCount=0.0);
// Returns number of days from 0/0/0
// iOffset = how many days to add to "today"
// (i.e. 0=today, 1=tomorrow, 7=next week)
int GetOffsetGameDate(int iOffset=0);
// Stores Integer in log (for future sessions)
// var_name = name of variable
// var_val = integer value to store
// iExpire = how many days from now this variable should
// be removed from the system.
// iToken sets whether or not this variable's expiration
// date should update every time it is used (0=yes, 1=no)
// iExtend indicates how many days this variable should
// be updated if it is to be updated.
void SetPWUMInt(string var_name, int var_val, int iExpire=121000000, int iToken=0, int iExtend=0);
// Stores String in log (for future sessions)
// var_name = name of variable
// var_val = string value to store
// iExpire = how many days from now this variable should
// be removed from the system.
// iToken sets whether or not this variable's expiration
// date should update every time it is used (0=yes, 1=no)
// iExtend indicates how many days this variable should
// be updated if it is to be updated.
void SetPWUMString(string var_name, string var_val, int iExpire=121000000, int iToken=0, int iExtend=0);
// Stores Float in log (for future sessions)
// var_name = name of variable
// var_val = float value to store
// iExpire = how many days from now this variable should
// be removed from the system.
// iToken sets whether or not this variable's expiration
// date should update every time it is used (0=yes, 1=no)
// iExtend indicates how many days this variable should
// be updated if it is to be updated.
void SetPWUMFloat(string var_name, float var_val, int iExpire=121000000, int iToken=0, int iExtend=0);
// Stores Location in log (for future sessions)
// var_name = name of variable
// Uses area tag, three-float for vector, and float for facing
// iExpire = how many days from now this variable should
// be removed from the system.
// iToken sets whether or not this variable's expiration
// date should update every time it is used (0=yes, 1=no)
// iExtend indicates how many days this variable should
// be updated if it is to be updated.
void SetPWUMLocationA(string var_name, string area_tag, float vector_x, float vector_y, float vector_z, float loc_orientation, int iExpire=121000000, int iToken=0, int iExtend=0);
// Stores Location in log (for future sessions)
// Uses area tag, vector, and float for facing
// var_name = name of variable
// iExpire = how many days from now this variable should
// be removed from the system.
// iToken sets whether or not this variable's expiration
// date should update every time it is used (0=yes, 1=no)
// iExtend indicates how many days this variable should

// be updated if it is to be updated.
void SetPWUMLocationB(string var_name, string area_tag, vector the_vector, float loc_orientation, int iExpire=121000000, int iToken=0, int iExtend=0);
// Stores Integer in log (for future sessions)
// var_name = name of variable
// var_val = location value to store
// iExpire = how many days from now this variable should
// be removed from the system.
// iToken sets whether or not this variable's expiration
// date should update every time it is used (0=yes, 1=no)
// iExtend indicates how many days this variable should
// be updated if it is to be updated.
void SetPWUMLocationC(string var_name, location the_loc, int iExpire=121000000, int iToken=0, int iExtend=0);
// Sets the game date to the value of iOffsetDate (provided
// iOffsetDate is greater than the "current" date). This
// is NOT "days from today" but a converted date using
// GetOffsetGameDate();
void SetPWUMCalendar(int iOffsetDate);
// Delete Integer from game and log (will not re-appear
// next gaming session)
void DeletePWUMInt(string var_name);
// Delete String from game and log (will not re-appear
// next gaming session)
void DeletePWUMString(string var_name);
// Delete Float from game and log (will not re-appear
// next gaming session)
void DeletePWUMFloat(string var_name);
// Delete Location from game and log (will not re-appear
// next gaming session)
void DeletePWUMLocation(string var_name);
// Retrieve Integer saved by the system.
int GetPWUMInt(string var_name);
// Retrieve String saved by the system.
string GetPWUMString(string var_name);
// Retrieve Float saved by the system.
float GetPWUMFloat(string var_name);
// Retrieve Location saved by the system.
location GetPWUMLocation(string var_name);
// Sends a PC to their last saved location
void ResumePCLocation(object oPC);
// Sets a PC to save their location during
// PWUMLocationTimer() calls. (This is the
// default state)
void SetPCToSaveLocation(object oPC);
// Sets a PC to be skipped during calls to
// save PC locations with PWUMLocationTimer().
void SetPCToNotSaveLocation(object oPC);
//fonction replace
string StrReplace(string s1, string s2, string s3);


// ******************************************** //
// UTILITIES (used by functions below)
// ******************************************** //
string StrReplace(string s1, string s2, string s3)
{
int nTemp;
int nL = GetStringLength(s3);
int nLength = GetStringLength(s1);
string sTemp;
string sR = ";

while ((nTemp = FindSubString(s3, s1)) >= 0)
{
sTemp = GetStringLeft(s3, nTemp);
s3 = GetStringRight(s3, nL - nLength - nTemp);
sR = sR + sTemp + s2;
nL = GetStringLength(s3);
}
sR+=s3;

return sR;
}

void PWUMLocationTimer(float fTimerCount=0.0)
{
object oPC = GetFirstPC();
string sPCLocation;

// Loop through each PC
while (GetIsPC(oPC))
{
// If PC is currently setup to save location
if (GetLocalInt(oPC, "nSaveStatus") == 0)
{
// store the PC location
sPCLocation = GetPCPlayerName(oPC) + GetName(oPC) + "CurrentLocation";
SetPWUMLocationC(sPCLocation, GetLocation(oPC));
SendMessageToPC(oPC, "** Votre position a ete sauvegarde **");
}
oPC = GetNextPC();
}

/* If this is not a one-shot call,
recall this script after the directed delay */
if (fTimerCount > 0.0)
DelayCommand(fTimerCount, PWUMLocationTimer(fTimerCount));
}

void PWUMDateTimer(float fTimerCount=0.0)
{
SetPWUMInt("iPWUMDate", GetOffsetGameDate());
/* If this is not a one-shot call,
recall this script after the directed delay */
if (fTimerCount > 0.0)
DelayCommand(fTimerCount, PWUMDateTimer(fTimerCount));
}

int GetOffsetGameDate(int iOffset=0)
{
/* If a negative number was given then
this variable does not automatically expire. */
if (iOffset 335)
{
iYear++;
iOffset -= 336;
}
while (iOffset > 27)
{
iMonth++;
iOffset -= 28;
}
while (iOffset > 0)
{
iDay++;
iOffset--;
}
/* Now, if we have more than 28 days, roll the
month, and if we have more than 12 months,
roll the year - due to the way the year, month,
and days were added above, it should be impossible
to have more than 24 months or 56 days. */
if (iDay > 28)
{
iDay -= 28;
iMonth++;
}
if (iMonth > 12)
{
iMonth -= 12;
iYear++;
}
return iYear*336 + iMonth*28 + iDay;
}
}

// ******************************************** //
// SET (WRITE) FUNCTIONS
// ******************************************** //

void SetPWUMInt(string var_name, int var_val, int iExpire=121000000, int iToken=0, int iExtend=0)
{
object umObject = GetLocalObject(GetModule(), "um_object");
int iDate=GetOffsetGameDate(0);
/* If this is a first-time assignment, set the date
and change the token to indicate (for the log) that
this variable has already been assigned */
if (iToken < 2 && iExpire < 121000000)
{
if (iExpire < 121000000)
iExpire=GetOffsetGameDate(iExpire);
else
iExpire=GetLocalInt(umObject, "iDefaultExpire");
iToken=iToken+2;
}

/* Only set the variable if the expiration date has
not come and gone. Otherwise skip this entirely.
This will clean out the variables coming in from
the log (and if the call sends a negative number
of days to expire). */
if (iDate < iExpire)
{
string storageBuffer = "INT#" + var_name + "#" + IntToString(var_val) + "#" + IntToString(iExpire) + "#" + IntToString(iToken) + "#" + IntToString(iExtend) + "#";

SetLocalInt(umObject, var_name, var_val);
SetLocalInt(umObject, var_name + "x", iExpire);
if (iToken==2)
SetLocalInt(umObject, var_name + "t", iExtend);
WriteTimestampedLogEntry(storageBuffer);
}
}

void SetPWUMString(string var_name, string var_val, int iExpire=121000000, int iToken=0, int iExtend=0)
{
var_val=StrReplace("\n","°°",var_val);
object umObject = GetLocalObject(GetModule(), "um_object");
int iDate=GetOffsetGameDate(0);
if (iToken < 2 && iExpire < 121000000)
{
if (iExpire < 121000000)
iExpire=GetOffsetGameDate(iExpire);
else
iExpire=GetLocalInt(umObject, "iDefaultExpire");
iToken=iToken+2;
}

/* Only set the variable if the expiration date has
not come and gone. Otherwise skip this entirely.
This will clean out the variables coming in from
the log (and if the call sends a negative number
of days to expire). */
if (iDate < iExpire)
{
string storageBuffer = "STR#" + var_name + "#" + var_val + "#" + IntToString(iExpire) + "#" + IntToString(iToken) + "#" + IntToString(iExtend) + "#";

SetLocalString(umObject, var_name, var_val);
SetLocalInt(umObject, var_name + "x", iExpire);
if (iToken==2)
SetLocalInt(umObject, var_name + "t", iExtend);
WriteTimestampedLogEntry(storageBuffer);
}
}

void SetPWUMFloat(string var_name, float var_val, int iExpire=121000000, int iToken=0, int iExtend=0)
{
object umObject = GetLocalObject(GetModule(), "um_object");
int iDate=GetOffsetGameDate(0);
if (iToken < 2 && iExpire < 121000000)
{
if (iExpire < 121000000)
iExpire=GetOffsetGameDate(iExpire);
else
iExpire=GetLocalInt(umObject, "iDefaultExpire");
iToken=iToken+2;
}

/* Only set the variable if the expiration date has
not come and gone. Otherwise skip this entirely.
This will clean out the variables coming in from
the log (and if the call sends a negative number
of days to expire). */
if (iDate < iExpire)
{
string storageBuffer = "FLT#" + var_name + "#" + FloatToString(var_val) + "#" + IntToString(iExpire) + "#" + IntToString(iToken) + "#" + IntToString(iExtend) + "#";

SetLocalFloat(umObject, var_name, var_val);
SetLocalInt(umObject, var_name + "x", iExpire);
if (iToken==2)
SetLocalInt(umObject, var_name + "t", iExtend);
WriteTimestampedLogEntry(storageBuffer);
}
}

void SetPWUMLocationA(string var_name, string area_tag, float vector_x, float vector_y, float vector_z, float loc_orientation, int iExpire=121000000, int iToken=0, int iExtend=0)
{
object umObject = GetLocalObject(GetModule(), "um_object");
vector storageVector = Vector(vector_x, vector_y, vector_z);
location storageLoc = Location(GetObjectByTag(area_tag), storageVector, loc_orientation);
int iDate=GetOffsetGameDate(0);
if (iToken < 2 && iExpire < 121000000)
{
if (iExpire < 121000000)
iExpire=GetOffsetGameDate(iExpire);
else
iExpire=GetLocalInt(umObject, "iDefaultExpire");
iToken=iToken+2;
}

/* Only set the variable if the expiration date has
not come and gone. Otherwise skip this entirely.
This will clean out the variables coming in from
the log (and if the call sends a negative number
of days to expire). */
if (iDate < iExpire)
{
string storageBuffer = "LOC#" + var_name + "#" + area_tag + "*" + FloatToString(vector_x) + "*" + FloatToString(vector_y) + "*" + FloatToString(vector_z) + "*" + FloatToString(loc_orientation) + "*#" + IntToString(iExpire) + "#" + IntToString(iToken) + "#" + IntToString(iExtend) + "#";

SetLocalLocation(umObject, var_name, storageLoc);
SetLocalInt(umObject, var_name + "x", iExpire);
if (iToken==2)
SetLocalInt(umObject, var_name + "t", iExtend);
WriteTimestampedLogEntry(storageBuffer);
}
}

void SetPWUMLocationB(string var_name, string area_tag, vector the_vector, float loc_orientation, int iExpire=121000000, int iToken=0, int iExtend=0)
{
object umObject = GetLocalObject(GetModule(), "um_object");
location storageLoc = Location(GetObjectByTag(area_tag), the_vector, loc_orientation);
int iDate=GetOffsetGameDate(0);
if (iToken < 2 && iExpire < 121000000)
{
if (iExpire < 121000000)
iExpire=GetOffsetGameDate(iExpire);
else
iExpire=GetLocalInt(umObject, "iDefaultExpire");
iToken=iToken+2;
}

/* Only set the variable if the expiration date has
not come and gone. Otherwise skip this entirely.
This will clean out the variables coming in from
the log (and if the call sends a negative number
of days to expire). */
if (iDate < iExpire)
{
string storageBuffer = "LOC#" + var_name + "#" + area_tag + "*" + FloatToString(the_vector.x) + "*" + FloatToString(the_vector.y) + "*" + FloatToString(the_vector.z) + "*" + FloatToString(loc_orientation) + "*#" + IntToString(iExpire) + "#" + IntToString(iToken) + "#" + IntToString(iExtend) + "#";

SetLocalLocation(umObject, var_name, storageLoc);
SetLocalInt(umObject, var_name + "x", iExpire);
if (iToken==2)
SetLocalInt(umObject, var_name + "t", iExtend);
WriteTimestampedLogEntry(storageBuffer);
}
}

void SetPWUMLocationC(string var_name, location the_loc, int iExpire=121000000, int iToken=0, int iExtend=0)
{
object umObject = GetLocalObject(GetModule(), "um_object");
string storageAreaTag = GetTag(GetAreaFromLocation(the_loc));
vector storageVector = GetPositionFromLocation(the_loc);
float storageFacing = GetFacingFromLocation(the_loc);
int iDate=GetOffsetGameDate(0);
if (iToken < 2 && iExpire < 121000000)
{
if (iExpire < 121000000)
iExpire=GetOffsetGameDate(iExpire);
else
iExpire=GetLocalInt(umObject, "iDefaultExpire");
iToken=iToken+2;
}

/* Only set the variable if the expiration date has
not come and gone. Otherwise skip this entirely.
This will clean out the variables coming in from
the log (and if the call sends a negative number
of days to expire). */
if (iDate < iExpire)
{
string storageBuffer = "LOC#" + var_name + "#" + storageAreaTag + "*" + FloatToString(storageVector.x) + "*" + FloatToString(storageVector.y) + "*" + FloatToString(storageVector.z) + "*" + FloatToString(storageFacing) + "*#" + IntToString(iExpire) + "#" + IntToString(iToken) + "#" + IntToString(iExtend) + "#";

SetLocalLocation(umObject, var_name, the_loc);
SetLocalInt(umObject, var_name + "x", iExpire);
if (iToken==2)
SetLocalInt(umObject, var_name + "t", iExtend);
WriteTimestampedLogEntry(storageBuffer);
}
}

void SetPWUMCalendar(int iOffsetDate)
{
int iToday=GetOffsetGameDate(0);
/* Only set the date if the saved date is after
the start of the module. */
if (iOffsetDate > iToday)
{
// Get "zero" date
int iYear=0;
int iMonth=0;
int iDay=0;
// Add to the appropriate integer until iOffset == 0
while (iOffsetDate > 335)
{
iYear++;
iOffsetDate -= 336;
}
while (iOffsetDate > 27)
{
iMonth++;
iOffsetDate -= 28;
}
while (iOffsetDate > 1)
{
iDay++;
iOffsetDate--;
}
/* Now, if we have more than 28 days, roll the
month, and if we have more than 12 months,
roll the year - due to the way the year, month,
and days were added above, it should be impossible
to have more than 24 months or 56 days. */
if (iDay > 28)
{
iDay -= 28;
iMonth++;
}
if (iMonth > 12)
{
iMonth -= 12;
iYear++;
}
SetCalendar(iYear, iMonth, iDay);
}
}

// ******************************************** //
// DELETE (REMOVE) FUNCTIONS
// ******************************************** //

void DeletePWUMInt(string var_name)
{
object umObject = GetLocalObject(GetModule(), "um_object");

DeleteLocalInt(umObject, var_name);
DeleteLocalInt(umObject, var_name + "x");
DeleteLocalInt(umObject, var_name + "t");
WriteTimestampedLogEntry("DIN#" + var_name + "#");
//WriteTimestampedLogEntry("INT#" + var_name + "#");
}

void DeletePWUMString(string var_name)
{
object umObject = GetLocalObject(GetModule(), "um_object");

DeleteLocalString(umObject, var_name);
DeleteLocalInt(umObject, var_name + "x");
DeleteLocalInt(umObject, var_name + "t");
WriteTimestampedLogEntry("DST#" + var_name + "#");
}

void DeletePWUMFloat(string var_name)
{
object umObject = GetLocalObject(GetModule(), "um_object");

DeleteLocalFloat(umObject, var_name);
DeleteLocalInt(umObject, var_name + "x");
DeleteLocalInt(umObject, var_name + "t");
WriteTimestampedLogEntry("DFL#" + var_name + "#");
}

void DeletePWUMLocation(string var_name)
{
object umObject = GetLocalObject(GetModule(), "um_object");

DeleteLocalLocation(umObject, var_name);
DeleteLocalInt(umObject, var_name + "x");
DeleteLocalInt(umObject, var_name + "t");
WriteTimestampedLogEntry("DLO#" + var_name + "#");
}

// ******************************************** //
// GET (READ) FUNCTIONS
// ******************************************** //

int GetPWUMInt(string var_name)
{
int retVal;
object umObject = GetLocalObject(GetModule(), "um_object");
int iExpire=GetLocalInt(umObject, var_name + "x");
int iDate=GetOffsetGameDate(0);

/* This statement checks to see if the variable
has expired. If so, delete it and return
zero (NWN returns zero on all invalid Int
functions) */
if (iExpire > 0 && iExpire 0)
SetPWUMInt(var_name, retVal, GetOffsetGameDate(iExtend), 2, iExtend);
return(retVal);
}

string GetPWUMString(string var_name)
{
string retVal;
object umObject = GetLocalObject(GetModule(), "um_object");
int iExpire=GetLocalInt(umObject, var_name + "x");
int iDate=GetOffsetGameDate(0);

/* This statement checks to see if the variable
has expired. If so, delete it and return
" (NWN returns " on all invalid String
functions) */
if (iExpire > 0 && iExpire 0)
SetPWUMString(var_name, retVal, GetOffsetGameDate(iExtend), 2, iExtend);

retVal=StrReplace("°°","\n",retVal);

return(retVal);
}

float GetPWUMFloat(string var_name)
{
float retVal;
object umObject = GetLocalObject(GetModule(), "um_object");
int iExpire=GetLocalInt(umObject, var_name + "x");
int iDate=GetOffsetGameDate(0);

/* This statement checks to see if the variable
has expired. If so, delete it and return
0.0 */
if (iExpire > 0 && iExpire 0)
SetPWUMFloat(var_name, retVal, GetOffsetGameDate(iExtend), 2, iExtend);
return(retVal);
}

location GetPWUMLocation(string var_name)
{
location retVal;
object umObject = GetLocalObject(GetModule(), "um_object");
int iExpire=GetLocalInt(umObject, var_name + "x");
int iDate=GetOffsetGameDate(0);

/* This statement checks to see if the variable
has expired. If so, delete it (Not sure what
NWN returns on invalid Location functions) */
if (iExpire > 0 && iExpire 0)
SetPWUMLocationC(var_name, retVal, GetOffsetGameDate(iExtend), 2, iExtend);
return(retVal);
}

// ******************************************** //
// PC LOCATION FUNCTIONS
// ******************************************** //
void ResumePCLocation(object oPC)
{
if (!GetIsPC(oPC))
{
return; //buh-bye
}

AssignCommand(oPC, ActionWait(2.0)); //2.0 is long enough to account for most network lag

// effects can be added to go with this:
string sPCLocation = GetPCPlayerName(oPC) + GetName(oPC) + "CurrentLocation";
AssignCommand(oPC, ActionJumpToLocation(GetPWUMLocation(sPCLocation)));

}

void SetPCToSaveLocation(object oPC)
{
if (!GetIsPC(oPC))
{
return; //buh-bye
}

SetLocalInt(oPC, "nSaveStatus", 0); //set to save
}

void SetPCToNotSaveLocation(object oPC)
{
if (!GetIsPC(oPC))
{
return; //buh-bye
}

SetLocalInt(oPC, "nSaveStatus", 1); //set to not save
}


Par Iridian le 14/1/2003 à 15:24:00 (#3018893)

Bon j'ai remodifié le pwum_functions car quand il y avait un \n dans l'enregistrement cela faisait sauter toutes les sauvegardes car cela créé un bug comme dans le log il créé une coupure.

donc j'ai fais un replace dans le SetPWUMString de \n à °° (symbole très peu utilisé je pense).
Et dans le GetPWUMString , l'inverse de °° à \n

Bon je n'ai pas encore vérifier, mais cela devrait marcher normalement.

Bon travail :)
Des que tu me donnes le feu vert, j'ajoute ca a l'installation et je refait une version.
J'en profiterai pour ajouter le parsing des fonctions de banques (dont on a parler hier), comme ca il ne te restera plus qu'a faire les scripts qui vont bien pour que ce soit OK :)
(je l'ai ferai si j'ai le temps ;) )

a vos souhaits messieurs

Par Blam le 14/1/2003 à 17:59:57 (#3020285)

j'ai rien compris, non seulemnt au texte, mais en plus du sujet
j'ai meme été tellement inquiet que j'ai verifié si on m'avais pas mis le clavier hebreu !!!!!

:)
je suppose que c'est du beau travail ? et que ca a ete compliqué, mais siouplait msieur, dis tu m'explique ce que ca fait ?

;)

tu vois un candide ?
tu vois un newbye
tu croises les deux
et tu trouve mon prof !

Par RAT le 14/1/2003 à 20:16:08 (#3021461)

Message pour Iridian:

Oki pas de problème iridian, dès que je fais les tests pour savoir si le replace fonctionne et que tout fonctionne, je te le dirai directement.

Pour la banque, je dois d'abord le coder, régler le soucie que je t'ai parlé, car je n'ai pas eu le temps de le faire hier, et on devrait je pense en reparler encore un peu, pour bien qu'on s'organise nous deux :D.

Pour les scripts, je l'ai fais cela me dérange pas, comme je ne peux pas t'aider pour l'instant avec delphi , je t'aiderai sur nwn, pour qu'on se partage le boulot :).


Message pour Blam:

Blam, je vais essayer de t'expliquer un peu plus, j'espere que tu comprendras mieux :), j'ai un peu de mal à me faire comprendre des fois :D.

donc prenons un exemple :
"Bonjour,\ncomment vas-tu?" cela fait
"Bonjour,
Comment vas-tu?"

donc en clair le \n fait un saut de ligne.

Le problème c'est pour le parser, il va lire la ligne entiere pour pouvoir récupérer les valeurs. c'est à dire:
"STR#RecensementTC_SMESSAGE1#variable supprimée#121000000#0#0#"

Imaginons maintenant que tu mettes un \n entre variable et supprimée donc "variable\nsupprimée"
cela fera donc :
"STR#RecensementTC_SMESSAGE1#variable"
" supprimée#121000000#0#0#"

donc en clair il seront sous deux lignes et le parser ne récuperera donc pas toutes les valeurs dont il a besoin créant automatiquement un bug et donc le script ne pourra pas se compiler et les variables ne fonctionneront plus. Donc c'est pour cela que comme nous le faisons en automatique, il doit y avoir aucune erreur possible.

Donc en clair, dans le SetPWUMString, avant de l'enregistrer comme valeur.J'utilise une fonction replace, qui va remplacer le "\n" par un autre symbole, en l'occurence, j'ai pris "°°" comme cela l'ordinateur ne coupera plus la ligne en deux.

et dans le GetPWUMString , je refais un replace à l'inverse donc "°°" en "\n" pour que dans un dialogue par exemple la gestion du \n existe, donc qu'il coupe la phrase en deux.

En fait , ce système ne sert que pour les sauvegardes, c'est une sécurité si tu préferes.


Heuu, en fait je sais pas si je me suis mieux expliquer loool là.

:D :maboule:

Sorry en avance :rasta:

Par Iridian le 14/1/2003 à 20:26:31 (#3021556)

Provient du message de RAT
Message pour Iridian:

Oki pas de problème iridian, dès que je fais les tests pour savoir si le replace fonctionne et que tout fonctionne, je te le dirai directement.

Oki, je patiente ;)

Provient du message de RAT
Pour la banque, je dois d'abord le coder, régler le soucie que je t'ai parlé, car je n'ai pas eu le temps de le faire hier, et on devrait je pense en reparler encore un peu, pour bien qu'on s'organise nous deux :D.

Sans problemes, je serai sur msn ce soir vers 21H30 normalement. Nous verrons si l'on gere une banque d'argent uniquement ou egalement d'objets (c.a.d que le banquier sert aussi de coffre <= explication pour les fans :cool: )

Provient du message de RAT
Pour les scripts, je l'ai fais cela me dérange pas, comme je ne peux pas t'aider pour l'instant avec delphi , je t'aiderai sur nwn, pour qu'on se partage le boulot :).

Comme tu veux, j'ai ajouter la fonction de parsing des lignes d'entete BNQ, il n'y a plus qu'a en mettre dans le log :)
J'en ai profité pour regler les bugs connus (tous).
Tous ca dans la prochaine version donc :)
(ce serai bien de fournir des pnjs types pour le systeme, comme le banquier tout pret scripté et ton crieur aussi ;) )

Par RAT le 14/1/2003 à 20:37:56 (#3021684)

A 21h30, je ne pense pas que je serai là, j'ai une petite soirée billard prévu normalement, mais plus tard ou à la rigueur demain, comme cela, j'aurai le temps de commenter le crieur de ville version staff, et de le mettre en dl aussi :).

Oui pour la banque, je pense que cela serait une bonne idée de gérer les deux mais bon on en reparlera ensemble sur msn :)

Par RAT le 15/1/2003 à 3:16:00 (#3024346)

Bon déjà, Très bonne nouvelle Iridian, la fonction replace marche parfaitement, il remplace bien les \n par des °° et inversement quand on fait un Get.

Donc cela m'a l'air Ok, déjà pour les modifs du pwum_functions.

Bon là, je me lance vite fait sur mon système de banque et je t'en parle demain :)

Par Val Aslow le 15/1/2003 à 12:52:36 (#3026712)

Donc si j'ai bien compris, ce script sert a sauver toutes les actions faites par les pj sur le module (pour un monde persistant par exemple)
Et suis à ça, on pourra utiliser un pnj banquier ?
C'est ça ? :D



Et aussi, petite question bête, où faut il l'insérer ce script ? :doute:
Svp :)



Merci :)

Eltannus

Par Eltannus le 15/1/2003 à 13:48:35 (#3027134)

Bonjour

meme demande que Val Aslow:
- ou mettre ce script .

Amicalement Eltanus

Par Jaha Effect le 15/1/2003 à 13:54:05 (#3027178)

Normalement vous avez pas a vous en préocuper, ça devrait être compris dans la nouvelle version du PUMA (PwUMA).

Jaha Effect :D

A Jaja Effect, RAT Iridian

Par Eltannus le 16/1/2003 à 12:48:49 (#3034301)

Messieurs

Chapeau bas....

Nous vous saluons et vous remercions chaleureusement

Amicalement

Eltannus.... qui sans son couvre chef attrape un rhume de cerveau

Par Jaha Effect le 16/1/2003 à 21:20:21 (#3037695)

Moi j'y suis pour rien du tout, c'est Iridian et RAT les instigateurs du projet, moi je fourni que encouragement et admiration :)

Jaha Effect :D

Par Iridian le 16/1/2003 à 23:14:25 (#3038369)

Provient du message de Jaha Effect
Moi j'y suis pour rien du tout, c'est Iridian et RAT les instigateurs du projet, moi je fourni que encouragement et admiration :)

Jaha Effect :D


Et c'est déjà bien :)

JOL Archives 1.0.1
@ JOL / JeuxOnLine