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

Panneau de contrĂ´le

Recherche | Retour aux forums

JOL Archives

Téléporter un joueur mort

Par Thalack Zauviir le 17/12/2002 Ă  19:23:21 (#2815902)

Un petit problème de cript

- le joueur A meurt
- A la place de joueur A apparait un cadavre avec le tag "joueur A"
- il respawn dans une zone d'attente
- pour faire revenir le joueur A, le joueur B doit mener le cadavre Ă  un PNJ
- Le joueur B arrive face au PNJ et c'est là que ça coince

- Le PNj doit prendre le corps mais le tag du corps change pour chaque joueur mort
si le PNJ prend le corps, le joueur A doit réapparaitre aux cotés du PNJ et du joueur B

A moins que je fasse fausse route et qu'il existe une autre solution. :maboule:

Pour donner une idée, voilà le morceau de script qui donne le tag au corps


location locPC = GetLocation(oPC) ; // Gets the location the PC died
/*
If you create your own custom item to use either:
1) Make sure the corpse tag/resref are pccorpse OR
2) Change "pccorpse" to match the tag/resref of your item in the line
below
*/
object oCorpse = CreateObject(OBJECT_TYPE_PLACEABLE, "pccorpse", locPC) ; // Creates the corpse at the death location
string sName = GetPCPlayerName(oPC) ; // Gets the PC name and sets it as a string (sName) of text
SetLocalString(oCorpse, "sOwner", sName) ; // Sets a local string on the corpse called sOwner with the string of text retrieved in hte line above
while(nCount <= nHowMany) // As long as the number of items taken is less than the number of items we need to take
{
nRandom = Random(11) ; // roll for a random number between 0 and 10 (inclusive)
oMyItem = GetMyItem(oPC, nRandom) ; // Gets the item object from the case slot corresponding to the number rolled
if(GetIsObjectValid(oMyItem)==TRUE) // If there is an item there
{
AssignCommand(oCorpse, ActionTakeItem(oMyItem, oPC)) ; // Item taken from PC and added to corpse inventory
nCount++ ; // add one to the interger holder nCount

JOL Archives 1.0.1
@ JOL / JeuxOnLine