Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Begin KS_Julan_Nofight
- short j_marksman
- short state
- short hadnospells
- short hitcount
- float oldgamehour
- float timer
- short OnPCHitMe ; hopefully the missing variable is fixed
- If ( Menumode == 1 )
- If ( KS_Julan->GetItemCount "KS_Burden" > 0 )
- KS_Julan->RemoveItem "KS_Burden" 1
- return
- else
- return
- endif
- elseif ( GameHour == oldgamehour )
- return
- endif
- set oldgamehour to GameHour
- if ( KS_Julan->GetHealth < 1 )
- set state to 10
- endif
- if ( state == 0 )
- ; messagebox "julan in pacifist mode"
- ; set j_marksman to ( KS_Julan->GetMarksman )
- ; set hadnospells to KS_Jul_Nospells
- ; set KS_Jul_NoSpells to 1
- ; StartScript KS_Jul_SpellRemove
- set state to 1
- elseif ( state == 10 )
- If ( KS_Julan->GetItemCount "KS_Burden" > 0 )
- KS_Julan->RemoveItem "KS_Burden" 1
- return
- endif
- if ( KS_Julan->GetSpell "KS_Jul_Paralysis" == 1 )
- KS_Julan->RemoveSpell "KS_Jul_Paralysis"
- endif
- KS_Julan->AIFollow player 0 0 0 0
- ; if ( j_marksman > 0 )
- ; KS_Julan->SetMarksman j_marksman
- ; endif
- ; if ( hadnospells == 0 )
- ; set KS_Jul_NoSpells to 0
- ; StartScript KS_Jul_SpellAdd
- ; endif
- ; set j_marksman to 0
- ; KS_Julan->SetFight 30
- set state to 0
- set hitcount to 0
- ; messagebox "julan in rowdy mode"
- StopScript KS_Julan_Nofight
- return
- elseif ( state == 1 )
- KS_Julan->AIWander 0 0 0 0 0 0 0 0 0 0 0 0
- If ( KS_Julan->GetItemCount "KS_Burden" == 0 )
- KS_Julan->additem KS_Burden 1
- endif
- if ( KS_Julan->GetSpell "KS_Jul_Paralysis" == 0 )
- KS_Julan->AddSpell "KS_Jul_Paralysis"
- endif
- ; KS_Julan->SetMarksman 0
- ; KS_Julan->SetFight 0
- if ( OnPCHitMe == 1 )
- set hitcount to ( hitcount + 1 )
- endif
- if ( hitcount > 3 )
- ; Uh oh, Houston, we have a problem here, you should never use the same identifier for a global variable and a script.
- ; if that is a variable used in dialog, probably faster fix is to rename the script (and everywhere it is referenced)
- ; to KS_Julan_NofightScr or something like that
- set KS_Jul_Nofight to 0
- endif
- if ( KS_Jul_NoFight == 0 )
- set state to 10
- else
- set timer to ( timer + GetSecondsPassed )
- if ( timer > 5 )
- set KS_Jul_NoFight to 0
- set timer to 0
- endif
- endif
- endif
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement