[SPELL] NwNRo_warp_portal (attention script assez specifique)

Répondre
Partager Rechercher
Code PHP:

//#include "ro_generic"
void main()
{
SpeakString("Warp Portal");
WriteTimestampedLogEntry("Warp Portal");

//BlueGem Consomation -- "Blue Gemstone"
/*if (BlueGem(1,OBJECT_SELF)==FALSE)
    {
    SendMessageToPC(OBJECT_SELF,"You do not have the Blue Gem needed to cast this spell");
    return;
    }
*/

if (GetTag(OBJECT_SELF)=="Area_103")
    {
    
FloatingTextStringOnCreature("Pas de Warp dans la zone de repos",OBJECT_SELF); // Tout simplement pour eviter les blocage de joueur en salle de repos.
    
}
location lPortal GetSpellTargetLocation();

object oWarp CreateObject(OBJECT_TYPE_PLACEABLE,"warpportal",lPortal);
SetLocalLocation(oWarp,"SavePointoMaster",GetCampaignLocation("DDBnwnro","warpportal",OBJECT_SELF));

AssignCommand(oWarp,DelayCommand(15.0,DestroyObject(oWarp)));
PlaySound("ef_portal");
DelayCommand(1.0,PlaySound("ef_readyportal"));
DelayCommand(2.0,PlaySound("ef_readyportal"));
DelayCommand(3.0,PlaySound("ef_readyportal"));
DelayCommand(4.0,PlaySound("ef_readyportal"));
DelayCommand(5.0,PlaySound("ef_readyportal"));
DelayCommand(6.0,PlaySound("ef_readyportal"));
DelayCommand(7.0,PlaySound("ef_readyportal"));
DelayCommand(8.0,PlaySound("ef_readyportal"));
DelayCommand(9.0,PlaySound("ef_readyportal"));
DelayCommand(10.0,PlaySound("ef_readyportal"));
DelayCommand(11.0,PlaySound("ef_readyportal"));
DelayCommand(12.0,PlaySound("ef_readyportal"));
DelayCommand(13.0,PlaySound("ef_readyportal"));
DelayCommand(14.0,PlaySound("ef_readyportal"));


Ceci cree un portal qui va rammener le joueur dans une location que l'on a stocke au prealable dans une location en BDD.

Pour les delayCommand, je conseille de faire une boucle for pour remplacer le texte un peu lourd, la, mais bon, disons que j'y suis allé pas a pas pour les reglages de synchro.

PS : attention, ce sort necessite un son custom ef_readyportal.wav et la creation d'un placeable custom reference "warpportal" en resref.


A noter que le placeable va contenir dans son OnUsed ceci :

Code PHP:

void main()
{
object oUser=GetLastUsedBy();
int nDeja_venu=GetLocalInt(oUser,"connection");
location lWhereto GetLocalLocation(OBJECT_SELF,"SavePointoMaster");

AssignCommand(oUser,ActionJumpToLocation(lWhereto));

Ceci va garantir que tous les joueurs warpent a l'endroit ou le caster a sauvegardé le point d'arrivé (SetCampaignLocation("DDBnwnro","warpportal",GetLocation(OBJECT_SELF),OBJECT_SELF));


Bref, ce sort est assez inutile.
Répondre

Connectés sur ce fil

 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés