Psion OnRest script mod

Development for CoPaP
Post Reply
Drakuul
Groundling
Posts: 120
Joined: Tue Feb 03, 2004 8:18 am

Psion OnRest script mod

Post by Drakuul »

The current OnRest module script will have to be modified to include

if ((GetLastRestEventType()==REST_EVENTTYPE_REST_FINISHED)
&& (GetLevelByClass(60, oPC)>=1))
SetLocalInt(GetModule(), GetPCPlayerName(oPC)+GetName(oPC)+"PSP", GetLocalInt(GetModule(), GetPCPlayerName(oPC)+GetName(oPC)+"PSPMax") );

Or something similar anyhow :) I got this direct from the riginal Psionics mod. Otherwise any psionic characters won't be able to regain used PSPs ever.

Not sure where it should go though in that script :/
*Your superior intelligence can not defeat my puny weapons*
Serpentax
Groundling
Posts: 144
Joined: Sun Feb 29, 2004 5:29 am
Location: Abyss 404
Contact:

Post by Serpentax »

it can go anywhere aslong as its firing itself and not under a "if" or "else" section..

best to add right to the start or right at the very end..

either will work
Drakuul
Groundling
Posts: 120
Joined: Tue Feb 03, 2004 8:18 am

Post by Drakuul »

Tried both and neither option worked on an offline version of Hala
*Your superior intelligence can not defeat my puny weapons*
teleri
World Leader: The Outlands
Posts: 497
Joined: Thu Jul 01, 2004 2:24 pm
Location: Sigil
Contact:

Post by teleri »

Drak this code is incomplete.

It looks like there is anotehr piece missing (as I have the Psion Class disabled at the moment I was not worried about this yet.

It looks like there should be some validation of the PSP count, and you might need to validate the class.

Cheers,
teleri
Cheers,
teleri

Building the Outlands one GateTown at a Time
[url=http://www.greatring.net][color=blue][u][b]The Outlands[/color][/u][/b][/url]
[url=http://www.diterlizzi.com/art/games/planescape/index.html][color=blue][u][b]The Look of PlaneScape[/color][/u][/b][/url]
Drakuul
Groundling
Posts: 120
Joined: Tue Feb 03, 2004 8:18 am

Post by Drakuul »

THat is all there is on the onrest code in the original Psionics mod, the max PSPs are determined in another script called lib_psionic.

I'll take the hint though and leave it to people who know what they are doing with scripts ;)
*Your superior intelligence can not defeat my puny weapons*
Themicles
Leader: Tairis'nàdur & CoPaP Hak-Master
Posts: 887
Joined: Tue Nov 25, 2003 11:26 am
Location: Michigan
Contact:

Post by Themicles »

Code: Select all

            //Restore PSP for Psionicists
            if ((GetLastRestEventType()==REST_EVENTTYPE_REST_FINISHED)
            && (GetLevelByClass(60, oPC)>=1))
            SetLocalInt(GetModule(), GetPCPlayerName(oPC)+GetName(oPC)+"PSP", GetLocalInt(GetModule(), GetPCPlayerName(oPC)+GetName(oPC)+"PSPMax") );
If this matches Drak's code, then no, it's not incomplete.

Find the place in your rest script that handles the REST_EVENTTYPE_REST_FINISHED, and add it under there.

If there is no such place, just add it where all other effects are added at the end of resting in your OnRest script.

-Themicles
"A wise man does not dwell on his past. He learns from it, he grows from it, and then moves ahead into his future." -me
teleri
World Leader: The Outlands
Posts: 497
Joined: Thu Jul 01, 2004 2:24 pm
Location: Sigil
Contact:

Post by teleri »

Drakuul wrote:THat is all there is on the onrest code in the original Psionics mod, the max PSPs are determined in another script called lib_psionic.

I'll take the hint though and leave it to people who know what they are doing with scripts ;)
Ahh didn't see a lib_psionic called that would do it.
Cheers,
teleri

Building the Outlands one GateTown at a Time
[url=http://www.greatring.net][color=blue][u][b]The Outlands[/color][/u][/b][/url]
[url=http://www.diterlizzi.com/art/games/planescape/index.html][color=blue][u][b]The Look of PlaneScape[/color][/u][/b][/url]
Post Reply