Jump to content

Script Help


reaper9111

Recommended Posts

Hello guy's me again here rwequesting script help... i need this script to interact with 5 different stone,

This Script is attach to each of the 5 magic stone each of the 5 give a bonus to the player everytime a stone is activated

This script will remove the previous bonus so only one bonus can be added at once at any time, why it aint working ?

What doo i need to set to make it work... Nevermind the "String property graphVariable auto" there's no animation on the stones... I'll remove this lines !

ScriptName RAPMagicSchoolStoneScript extends ObjectReference  
  ;This Script is attach to each of the 5 magic stone each give a bonus to the player everytime a stone is activated  
  ;It will remove the previous bonus so only one bonus can be added at once at any time
 
import game  
import utility  
 
String property graphVariable auto  
 
BOOL PROPERTY RAPIllusionStone AUTO  
BOOL PROPERTY RAPRestorationStone AUTO  
BOOL PROPERTY RAPAlterationStone AUTO  
BOOL PROPERTY RAPDestructionStone AUTO  
BOOL PROPERTY RAPCongurationStone AUTO  
 
SPELL PROPERTY RAPIllusionStoneAbility AUTO  
SPELL PROPERTY RAPRestorationStoneAbility AUTO  
SPELL PROPERTY RAPAlterationStoneAbility AUTO  
SPELL PROPERTY RAPDestructionStoneAbility AUTO  
SPELL PROPERTY RAPCongurationStoneAbility AUTO  
 
 
BOOL DOONCE=TRUE  
 
Auto State base  
         
       EVENT onACTIVATE(OBJECTREFERENCE obj)  
                 
               IF(doOnce && obj AS ACTOR == game.getPlayer())  
                         
                       doOnce = FALSE  
                         
                       IF(RAPIllusionStone && game.getPlayer().hasSpell(RAPIllusionStoneAbility))  
                               utility.wait(2)  
                               doOnce = TRUE  
                       ELSEIF(RAPRestorationStone && game.getPlayer().hasSpell(RAPRestorationStoneAbility))  
                               utility.wait(2)  
                               doOnce = TRUE  
                       ELSEIF(RAPAlterationStone && game.getPlayer().hasSpell(RAPAlterationStoneAbility))  
                               utility.wait(2)  
                               doOnce = TRUE  
                       ELSEIF(RAPDestructionStone && game.getPlayer().hasSpell(RAPDestructionStoneAbility))  
                               utility.wait(2)                           
                               doOnce = TRUE  
                       ELSEIF(RAPCongurationStone && game.getPlayer().hasSpell(RAPCongurationStoneAbility))  
                               utility.wait(2)                           
                               doOnce = TRUE  
                         
                       ENDIF  
                         
               ENDIF  
       endEVENT  
         
endState  
 
 
FUNCTION addSign()  
       IF(RAPIllusionStone)  
               game.getPlayer().addSpell(RAPIllusionStoneAbility)  
       ELSEIF(RAPRestorationStone)  
               game.getPlayer().addSpell(RAPRestorationStoneAbility)  
       ELSEIF(RAPAlterationStone)  
               game.getPlayer().addSpell(RAPAlterationStoneAbility)  
       ELSEIF(RAPDestructionStone)  
               game.getPlayer().addSpell(RAPDestructionStoneAbility)  
       ELSeIF(RAPCongurationStone)  
               game.getPlayer().removeSpell(RAPCongurationStoneAbility)  
       ENDIF  
 
       EndFUNCTION  
 
 
FUNCTION removeSign()  
                 
       IF(game.getPlayer().hasSpell(RAPIllusionStoneAbility))  
               game.getPlayer().removeSpell(RAPIllusionStoneAbility)  
         
       ELSEIF(game.getPlayer().hasSpell(RAPRestorationStoneAbility))  
               game.getPlayer().removeSpell(RAPRestorationStoneAbility)                  
         
       ELSEIF(game.getPlayer().hasSpell(RAPAlterationStoneAbility))  
               game.getPlayer().removeSpell(RAPAlterationStoneAbility)   
         
       ELSEIF(game.getPlayer().hasSpell(RAPDestructionStoneAbility))  
               game.getPlayer().removeSpell(RAPDestructionStoneAbility)          
         
       ELSEIF(game.getPlayer().hasSpell(RAPCongurationStoneAbility))  
               game.getPlayer().removeSpell(RAPCongurationStoneAbility)  
         
       ENDIF  
         
endFUNCTION  
 
 
 
State waiting  
       ;do nothing  
endState

 

Can anyone also write a simple exemple script that would work OnActivate, to be able to" player.MoveTo (MyMapMapMarker)

Just an exemple so i can modify the needed stuff myself...

The syntax of papyrus is complicated... probably better for some, but compared to skyrim where i was pretty good at scripting, here, i'm lost !

Edited by reaper9111
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...