DysoForums Forum Index DysoForums
 
GalleryGallery   Donate to DysotopiaDonate   Dysotopia.com homepageDyso.com
SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStats   RegisterRegister 
 Login to check your private messagesLogin to check your private messages   LoginLogin 

Generalized respawn script

 
Post new topic   Reply to topic    DysoForums Forum Index -> Worldbuilders
View previous topic :: View next topic :: Hide signatures  
Author Message
Little Teapot
Deity


Joined: 11 Sep 2002
Posts: 2332

Level: 39
XP
EXP: 31 / 160 EXP: 31 / 160 EXP: 31 / 160
 19%
PostPosted: Wed Jul 30, 2003 9:37 pm    Post subject: Generalized respawn script Reply with quote

This is a respawn script that I made for Matthijs. it jumps people to one of 9 waypoints based on their alignment. I don't really plan on using it anywhere, and it just might be useful for someone else...

to use it you need 9 waypoints in your mod, with the tags:
"WP_GOODLAW"
"WP_GOOD"
"WP_GOODCHAOS"
"WP_NEUTRALLAW"
"WP_NEUTRAL"
"WP_NEUTRALCHAOS"
"WP_EVILLAW"
"WP_EVIL"
"WP_EVILCHAOS"

hopefully in those respective areas you want them to spawn in.

Code:
//::///////////////////////////////////////////////
//:: Name OnRespawn, by alignment
//:: FileName respawntoalign.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
    Sends player to one of 9 potential waypoints
    based on their alignment.
*/
//:://////////////////////////////////////////////
//:: Created By: Greg Baker
//:: Created On: 7/30/2003
//:://////////////////////////////////////////////


void main()
{
    object oPC=GetLastRespawnButtonPresser();
    string warpto;

    if(GetAlignmentGoodEvil(oPC)==ALIGNMENT_GOOD)
        warpto="GOOD";
    else if(GetAlignmentGoodEvil(oPC)==ALIGNMENT_EVIL)
        warpto="EVIL";
    else
        warpto="NEUTRAL";

    if(GetAlignmentLawChaos(oPC)==ALIGNMENT_LAWFUL)
        warpto+="LAW";
    else if(GetAlignmentLawChaos(oPC)==ALIGNMENT_CHAOTIC)
        warpto+="CHAOS";

    AssignCommand(oPC, ActionJumpToObject(GetWaypointByTag("WP_"+warpto)));

    ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPC);
    ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(GetMaxHitPoints()), oPC);
    effect eEffect=GetFirstEffect(oPC);
    while(GetIsEffectValid(eEffect))
    {
        RemoveEffect(oPC, eEffect);
        eEffect=GetNextEffect(oPC);
    }
}


for a 3 section afterlife (Good, evil, neutral) remove the section that reads:
Code:
if(GetAlignmentLawChaos(oPC)==ALIGNMENT_LAWFUL)
        warpto+="LAW";
    else if(GetAlignmentLawChaos(oPC)==ALIGNMENT_CHAOTIC)
        warpto+="CHAOS";


or comment it out by putting "/*" and "*/" above and below the part you want to remove.
_________________
Matthijs says:
   oh ja, ik weet het zonet nog niet
Matthijs says:
   het ziet er toch wel een beetje naar uit dat we nederlands praten
Matthijs says:
   mischien moet ik dan maar eens vaker nederlands gaan praten
Matthijs says:
   kan je me ook meteen niet op al mijn spellinsfouten wijzen
There you have it! indisputable proof Solo's a fascist!!!
Back to top
View users profile Send private message Send email AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    DysoForums Forum Index -> Worldbuilders All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.2 © 2001, 2002 phpBB Group