begin DasScript
short Button
short aktiviert
short hatAlles
if ( menumode )
return
endif
if ( aktiviert == 0 )
set aktiviert to OnActivate
return
elseif ( aktiviert == 1 )
set hatAlles to 1
messagebbox "Was wollt Ihr herstellen" "Item a" "Item b" "Item c" "Item d" "Abbrechen"
set aktiviert to -1
return
endif
set Button to GetButtonPressed
if ( Button == 0 )
if ( Player-> GetItemCount "a_1" = 0 )
set hatAlles to 0
endif
if ( Player-> GetItemCount "a_2" = 0 )
set hatAlles to 0
endif
if ( Player-> GetItemCount "a_3" = 0 )
set hatAlles to 0
endif
if ( Player-> GetItemCount "a_4" = 0 )
set hatAlles to 0
endif
if ( hatAlles )
messagebox "Ihr stellt Item a her"
Player-> RemoveItem "a_1" 1
Player-> RemoveItem "a_2" 1
Player-> RemoveItem "a_3" 1
Player-> RemoveItem "a_4" 1
Player-> AddItem "a_ready" 1
else
messagebox "Ihr habt nicht alle benötigten Sachen"
endif
elseif ( Button == 1 )
if ( Player-> GetItemCount "b_1" = 0 )
set hatAlles to 0
endif
if ( Player-> GetItemCount "b_2" = 0 )
set hatAlles to 0
endif
if ( Player-> GetItemCount "b_3" = 0 )
set hatAlles to 0
endif
if ( Player-> GetItemCount "b_4" = 0 )
set hatAlles to 0
endif
if ( hatAlles )
messagebox "Ihr stellt Item b her"
Player-> RemoveItem "b_1" 1
Player-> RemoveItem "b_2" 1
Player-> RemoveItem "b_3" 1
Player-> RemoveItem "b_4" 1
Player-> AddItem "b_ready" 1
else
messagebox "Ihr habt nicht alle benötigten Sachen"
endif
elseif ( Button == 2 )
...
messagebox "Ihr stellt Item c her"
...
elseif ( Button == 3 )
...
messagebox "Ihr stellt Item d her"
...
else
messagebox "Ihr brecht ab"
endif
set aktiviert to 0
end