SHARE
TWEET

Untitled

a guest Jul 27th, 2018 148 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Begin _AA_abode_amulet
  2.  
  3. ; This script teleports the player to the abode once they equip the amulet.
  4.  
  5. ; changes /abot
  6.  
  7. short OnPCEquip
  8. short PCSkipEquip
  9. short button
  10. short state
  11. float t1
  12.  
  13. if ( PCSkipEquip )
  14. else
  15.     set PCSkipEquip to 1  ; skip wearing item
  16. endif
  17.  
  18. if ( OnPCEquip )
  19.     set OnPCEquip to 0
  20.  
  21.     ; avoid doubling bug in case MCP fix is not installed
  22.     Player->AddItem "ab01UniqueRing" 1
  23.     Player->RemoveItem "ab01UniqueRing" 1
  24.  
  25.     set state to 1
  26. endif
  27.  
  28. if ( state )
  29. else
  30.     return
  31. endif
  32.  
  33. if ( state == 1 )
  34.     if ( MenuMode )
  35.         MenuTest 0  ; close Menu
  36.     endif
  37.     PlaySoundVP "spellmake success" 0.6 1.0
  38.     set state to 2
  39.     FadeOut 0.5
  40.     return
  41. endif
  42.  
  43. if ( state == 2 )
  44.     set t1 to ( t1 + GetSecondsPassed )
  45.     if ( t1 > 0.5 )
  46.         set t1 to 0
  47.         set state to 3
  48.         player->PositionCell 8 58 126 0 "Apothecary's Abode"
  49.     endif
  50.     return
  51. endif
  52.  
  53. set t1 to ( t1 + GetSecondsPassed )
  54. if ( GetPCCell "Apothecary's Abode" )
  55.     set state to 4
  56. elseif ( t1 > 5 )           ; safety
  57.     set state to 4
  58. endif
  59. if ( state == 4 )
  60.     set t1 to 0
  61.     set state to 0
  62.     FadeIn 0.4  ; PositionCellshould do this already, bot only in exteriors it seems /abot
  63. endif
  64.  
  65. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top