Advertisement
Guest User

Untitled

a guest
Jan 29th, 2023
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. Begin KS_Julan_Nofight
  2.  
  3. short j_marksman
  4. short state
  5. short hadnospells
  6. short hitcount
  7. float oldgamehour
  8. float timer
  9. short OnPCHitMe ; hopefully the missing variable is fixed
  10.  
  11. If ( Menumode == 1 )
  12. If ( KS_Julan->GetItemCount "KS_Burden" > 0 )
  13. KS_Julan->RemoveItem "KS_Burden" 1
  14. return
  15. else
  16. return
  17. endif
  18. elseif ( GameHour == oldgamehour )
  19. return
  20. endif
  21.  
  22. set oldgamehour to GameHour
  23.  
  24. if ( KS_Julan->GetHealth < 1 )
  25. set state to 10
  26. endif
  27.  
  28. if ( state == 0 )
  29. ; messagebox "julan in pacifist mode"
  30. ; set j_marksman to ( KS_Julan->GetMarksman )
  31. ; set hadnospells to KS_Jul_Nospells
  32. ; set KS_Jul_NoSpells to 1
  33. ; StartScript KS_Jul_SpellRemove
  34. set state to 1
  35. elseif ( state == 10 )
  36. If ( KS_Julan->GetItemCount "KS_Burden" > 0 )
  37. KS_Julan->RemoveItem "KS_Burden" 1
  38. return
  39. endif
  40. if ( KS_Julan->GetSpell "KS_Jul_Paralysis" == 1 )
  41. KS_Julan->RemoveSpell "KS_Jul_Paralysis"
  42. endif
  43. KS_Julan->AIFollow player 0 0 0 0
  44. ; if ( j_marksman > 0 )
  45. ; KS_Julan->SetMarksman j_marksman
  46. ; endif
  47. ; if ( hadnospells == 0 )
  48. ; set KS_Jul_NoSpells to 0
  49. ; StartScript KS_Jul_SpellAdd
  50. ; endif
  51. ; set j_marksman to 0
  52. ; KS_Julan->SetFight 30
  53. set state to 0
  54. set hitcount to 0
  55. ; messagebox "julan in rowdy mode"
  56. StopScript KS_Julan_Nofight
  57. return
  58. elseif ( state == 1 )
  59. KS_Julan->AIWander 0 0 0 0 0 0 0 0 0 0 0 0
  60. If ( KS_Julan->GetItemCount "KS_Burden" == 0 )
  61. KS_Julan->additem KS_Burden 1
  62. endif
  63. if ( KS_Julan->GetSpell "KS_Jul_Paralysis" == 0 )
  64. KS_Julan->AddSpell "KS_Jul_Paralysis"
  65. endif
  66. ; KS_Julan->SetMarksman 0
  67. ; KS_Julan->SetFight 0
  68. if ( OnPCHitMe == 1 )
  69. set hitcount to ( hitcount + 1 )
  70. endif
  71. if ( hitcount > 3 )
  72.  
  73. ; Uh oh, Houston, we have a problem here, you should never use the same identifier for a global variable and a script.
  74. ; if that is a variable used in dialog, probably faster fix is to rename the script (and everywhere it is referenced)
  75. ; to KS_Julan_NofightScr or something like that
  76. set KS_Jul_Nofight to 0
  77. endif
  78. if ( KS_Jul_NoFight == 0 )
  79. set state to 10
  80. else
  81. set timer to ( timer + GetSecondsPassed )
  82. if ( timer > 5 )
  83. set KS_Jul_NoFight to 0
  84. set timer to 0
  85. endif
  86. endif
  87. endif
  88.  
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement